I have a question in regard to MediastreamSource GetSamples for WinRT , and below are the details.
I have 30s duration Mp4 files fetching from the server, then AVC h.264 stream, and i parse for SPS, PPS NAL units from Mp4 , then i construct one complete stream by appending start codes for each NAL unit (3 byte 001) and with SPS and PPS at the start of the
stream, the stream plays nicely, each sample i feed on SampleRequested is one MP4 file (30 s duration). so there is no problem in Playback when i have the mp4 file chunks locally.
But I have problems when downloading the file simultaneously and feeding it to SampleRequested.
if i have a sample to 10 mp4 chunks playing a certain video, when i receive one mp4 chunk i immediately feed it to the samplerequest from MediaStreamSource, if the samples are downloading i first request for deferral and Asynchronous block until i receive a
Even though i and sending the sample when i receive to the sample request callback, it does not play until there are no more samples to load , that is i send NULL for sample request.
Problem is it does not play immediately as soon as i feed the first sample.But plays all 10 samples once ,and when i say no more samples. Null to sample request.
not sure whats happening here.
Appreciate your HELP, Please let me know what i am doing wrong here.