[gst-devel] New DXR3 components and scheduling problem

Ronald Bultje rbultje at ronald.bitfreak.net
Mon Mar 31 06:47:19 CEST 2003


Hi Martin,

On Mon, 2003-03-31 at 15:49, Martin Soto wrote:
> I'm currently developing elements to write video, audio, and SPU
> graphics to the Creative DXR3, Real Magic Hollywood and other compatible
> DVD cards supported by the driver at dxr3.sourceforge.net.  I'm aware
> that there is already such a plugin in Gstreamer, but after checking the
> code, I decided to restart from the scratch, among other reasons,
> because I'm taking a different approach to synchronization that so far
> is giving really good results.

Wonderful! I'm very interested in trying it out, I've got a DXR3 too.

> The idea is to complete a GPL'd Gstreamer based DVD player for the
> DXR3.  I will be releasing an alpha version soon (and want to integrate
> as much of it back into Gstreamer as possible) but let me tell you, for
> the moment, that I have used my software to watch entire feature films
> with no (visible) audio/video sync glitches, and very low processor use.

Offtopic question: will the plugins be LGPL? We prefer LGPL for plugin
licensing. Of course, that's all your own choice, just a FYI.

>                         +-----------------------------------+
>                         | Thread                            |
>                         |                                   |
>   +-------+ac3_stream   |  +-------+ ac3_sink +-----------+ |
>   |       |-----o   o---+--| Queue |----------|           | |
>   | MPEG  |             |  +-------+          | DXR3Audio | |
>   | Demux |             |                     |  Sink     | |
>   |       |pcm_stream   |  +-------+  pcm_sink|           | |
>   |       |-------------+--| Queue |----------|           | |
>   +-------+             |  +-------+          +-----------+ |
>                         |                                   |
>                         +-----------------------------------+
> 
> However, as soon as I do that, no more sound buffers are delivered to
> the dxr3audiosink element.  The pipeline seams to run however, in that I
> can see the video running, but no flow of data seems to happen inside
> the thread.  By fiddling with the structure, I have seen that the sole
> fact of having two queues in the thread is enough to stop the flow of
> data, even if only one of them is connected. Putting the queues outside
> the thread seems not to have an effect, i. e. the problem persists.

I'm assuming the scheduler sees a connected queue and tries to fetch a
buffer from either queue (and hangs on the first one) in the thread.
Disconnect both the ac3 sink pad on the dxr3audiosink *and* on the
mpegdemux ac3 src pad. Only then, the scheduler can be sure not to fetch
buffers from the src pad and not to try acquire buffers for the sink
pad. So both need to be disconnected.

                        +-----------------------------------+
                        | Thread                            |
                        |                                   |
  +-------+ac3_stream   |  +-------+ ac3_sink +-----------+ |
  |       |-----o   o---+--| Queue |---o  o---|           | |
  | MPEG  |             |  +-------+          | DXR3Audio | |
  | Demux |             |                     |  Sink     | |
  |       |pcm_stream   |  +-------+  pcm_sink|           | |
  |       |-------------+--| Queue |----------|           | |
  +-------+             |  +-------+          +-----------+ |
                        |                                   |
                        +-----------------------------------+

HTH, looking forward to your application!

Ronald

-- 
Ronald Bultje <rbultje at ronald.bitfreak.net>
Linux Video/Multimedia developer





More information about the gstreamer-devel mailing list