How to reconnect to ASF network stream without restarting topology ? RRS feed

  • Question

  • ASF media stream communicates through IMFByteStream where programmer free to do whatever he wants.

    Sink out Process started from Write synchronous function and continues in BeginWrite/Invoke/EndWrite

    Function Write receives ASF stream header and waits for incoming connection. After HTTP negotiation it sends header  to Media Player. Once MEdia player get disconnected 

    ByteStream can start socket ACCEPT again and wait for another incoming connection. But the problem here the sink doesnt know that it has to send now

    header again and continue to send video samples with delimiters (I found that delimiters mostly 19 bytes but sometimes 14 bytes)

    At this moment I am looking way to ask sink regenerate the header or use MFCreateASFContentInfo to generate it manually. 

    It could sound stupid, but at initial connect I tried to save header and resend it at next connect. So far nothing good or bad happened, I just got blank screen 

    but media player was increasing play time. Actually I am not sure, probably way when I save initial header works and I just didnt take sufficient header data.

    Anyway I would appreciate for any help.



    Wednesday, December 5, 2012 5:25 AM

All replies

  • I am also interested in this. I am working on a live video streaming project and would like the client to reconnect if the socket gets disconnected. I will also try storing the ASF header, but am not sure how to determine where it ends from within the byte stream class.
    Wednesday, May 15, 2013 3:56 PM