C API question...

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
oviano
Posts: 4
Joined: Wed Dec 02, 2020 12:32 pm

C API question...

Post by oviano »

Greetings

I'm adding HDHomeRun support to my streaming project and I just have a small Q regarding using the C API.

When changing the program filter, using hdhomerun_device_set_tuner_program(), at what point do the new packets received relate to the new filter?

i.e. if I do this sequence:

hdhomerun_device_set_tuner_program()
hdhomerun_device_stream_flush()
hdhomerun_device_stream_recv()

Would that guarantee that the packets I get from recv() are from the new filter? If not, is there a way to ensure that, other than stopping the video stream, changing program, and restarting the video stream?

Or should I just change the program, and then it's up to me to detect the new filter by parsing the TS packets for the program number?

Post Reply