Re: Help using DMX_SET_BUFFER_SIZE

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

 



Florian Lohoff wrote:
> On Sat, Mar 01, 2008 at 12:20:05AM +0000, Andrea wrote:
> 
> In 2.6.25-rc3 the dvr kernel side looks like this:
> 
> 1015         switch (cmd) {
> 1016         case DMX_SET_BUFFER_SIZE:
> 1017                 // FIXME: implement
> 1018                 ret = 0;
> 1019                 break;
> 
> i guess its clear why it doesnt make a difference ;)

I've been thinking a little about how to implement that and I came across this issue:
(given my limited experience of dvb kernel developing the following might not be 100% correct...)

Usually everything (frontend, demux) is set up and only afterwards a dvr is opened.

That means that a dvr is live immediately and its buffer gets filled immediately.
So it is a bit tricky to change the size of the buffer while the buffer is operating.
The demux on the other hand does not operate immediately.

Possible solutions:

1) open the DVR before starting the demux. So that it is possible to change the dvr buffer size
it is usually done the other way round.

2) enable the resize of a live ring buffer.
Currently:

dvb_dvr_write DOES     lock the mutex (dmxdev->mutex)
dvb_dvr_read  DOES NOT lock the mutex (the code to lock the mutex is there, but commented out, why?)

Is it enough to lock the mutex in dvb_dvr_read?
Then the new function to change the buffer size could just lock the mutex, change the size and unlock.

3) don't bother.

I personally prefer option 2), which gives me the chance to learn how all that works.
I'd like to have an opinion about this matter, maybe just to improve my knowledge of the dvb mechanism.

Anyone?

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux