Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Streaming from hard disk




So, finally got the change to write my first (small) device driver, after having to do lot's of other jobs....

Okay, so I'm able to load/unload, open/close, write to the device (for me as a Linux nitwit already an achievment...). Now I want to make use of the dvb_dmx_swfilter() call, and thus copied that one into my source (as it's static in dvb_demux.c). Looking at the code, I see that I have to fill the dvb_demux struct (Am I right?). But, I haven't got the faintest idea of how to proceed.

Questions:
1) Can I just call the dvb_dmx_swfilter() from the write, after setting up the dvb_demux structure?
2) If so, can somebody point me into the right diection of how to set-up the struct?
3) To control the playout speed, can I "simply" use kernel timers, and make sure that in between triggers enough data is sent to the sw filter? Or is this totally the wrong approach?

Thanks a lot,

Gert-Jan van Dijk

to switch between different streams from network streaming servers) and
some code that registers a software demux and calls the
dvb_dmx_swfilter()

callback with the data read from disk or a network connection. Since
multiple people asked for a solution like this we highly welcome patches
implementing such a debugging driver.

That's a good idea. I just took a glance at the dummy code, and I'll start
from there. Thanks, and rest asure that I'll share the stuff I make when I
get it to work, no worries.
feel free to ask on this list if you need help understanding or implementing the internal driver API, this is unfortunally not too well documented, sorry.

The tricky part is the timing of the TS playback. For the
av7110 driver the dvr device slurps data as fast as the
disk can deliver it, unless you set a video and/or audio PID
with DMX_OUT_DECODER in which case the MPEG decoder controls
the timing.

That seems logical, so we need to control the speed by also giving it a
symbolrate. That's also what you do on most of the streamers (some determine
this by parsing the tables, others don't). So have to look into the decoder
to see how it controls timing, and then make it configurable via symbolrate.
Thanks, this is grand....
You can guess/calculate the stream rate either by parsing the stream headers (to keep the deltaPCR/deltaTime rate or deltaPTS/deltaTime rate constant or even more sophisticated use the mux rates encoded in the headers) or simpler use the symbolrate passed to the frontend device -- then you can easily adjust this from userspace according to your needs.

Holger

_________________________________________________________________
MSN Search, for accurate results! http://search.msn.nl



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index