public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea <mariofutire@googlemail.com>
To: Florian Lohoff <flo@rfc822.org>
Cc: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] Help using DMX_SET_BUFFER_SIZE
Date: Sun, 02 Mar 2008 23:08:02 +0000	[thread overview]
Message-ID: <47CB3352.5060607@googlemail.com> (raw)
In-Reply-To: <20080301085538.GA4003@paradigm.rfc822.org>

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@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

  parent reply	other threads:[~2008-03-02 23:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-01  0:20 [linux-dvb] Help using DMX_SET_BUFFER_SIZE Andrea
2008-03-01  8:55 ` Florian Lohoff
2008-03-01  9:11   ` Andrea
2008-03-02 23:08   ` Andrea [this message]
     [not found] <mailman.7.1204534746.20845.linux-dvb@linuxtv.org>
2008-03-03 19:49 ` Andrea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47CB3352.5060607@googlemail.com \
    --to=mariofutire@googlemail.com \
    --cc=flo@rfc822.org \
    --cc=linux-dvb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox