[Solved] tsreader.ax graph assistance (1 Viewer)

sgraves66

Portal Member
August 26, 2011
5
0
I'm trying to create a quick and dirty application to playback live tv streams and to support zapping. This is a test application that will alleviate the need to constantly run the full MediaPortal application and eventually provide a slim client for an embedded device. I've essentially ripped the graph building out of TSReaderPlayer and BaseTSReaderPlay. This piece works fine. I'm able to tune and view a live tv stream; however, I've been unsuccessful getting TSReader channel zapping to work properly. Based upon TVHome.ViewChannelAndCheck(), the following steps need to occur:

1. Pause active graph
2. Call OnZapping(0x80) in TSReader
3. Tune to new channel
4. If successful, and card has not changed, call OnZapping(0x04); otherwise, rebuild
5. Call SeekToEnd()
6. Resume the graph playback

After resuming the graph, playback continues briefly on the previous channel before the new channel is displayed. It appears that tsreader never "seeks" to the correct position in the stream for the new channel and continues playing exactly where it left off. Am I missing additional calls to support zapping?
 

sgraves66

Portal Member
August 26, 2011
5
0
Re: tsreader.ax graph assistance

I was trying to handle the audio change request in the 'OnRequestAudioChange' callback itself. This doesn't work properly. Querying for 'IAMStreamSelect' returns null, so it had to be moved into the main processing loop. Sweet! Working really well now.
 

Users who are viewing this thread

Top Bottom