Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

How to reconnect to ASF network stream without restarting topology ?

$
0
0

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.

Regards

Aelksey


Viewing all articles
Browse latest Browse all 1079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>