Pipeline stuck in PAUSE under some instances

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pipeline stuck in PAUSE under some instances

jimfcarroll
I've been trying to post this for a day so my apologies if it shows up twice.

I'm using gstreamer-java (1.0) and I originally asked a related question on
that list but they told me to ask over here.

I have a pipeline that looks like:

uridecodebin ! videoconvert ! video/x-raw ! tee (using only 1 branch) !
queue ! appsink

The appsink registers for NEW_SAMPLE and NEW_PREROLL and, after processing
them, pushes frame buffers onto:

appsrc ! videoscale ! videoconvert ! video/x-raw,width=640,height=480 !
queue ! xvimagesink

I have the  appsink -> appsrc wrapped in a Bin with the pads Ghosted. I have
the entire thing wrapped in a Pipeline. (as a Note I ALSO tried this by
gating the appsrc.pushBuffer using the AppSrc.NEED_DATA/ENOUGH_DATA and
nothing changed).

I registered a listener on the Pipeline so I could track state changes to
help me debug. What I'm seeing is, occasionally the Pipeline will not come
out of the PAUSE state. It seems to come out of the PAUSE state most of the
time but it occasionally hangs.

It ALWAYS hangs if I replace the final xvimagesink with: theoraenc ! oggmux
! tcpserversink.

Also, if I chain more than one of these appsink -> appsrc "breakouts" I get
extra frames in the final sink. I'm guessing this is due to not managing the
PREROLL correctly but if I drop the PREROLL from either breakout the pipe
just hangs.

Can someone tell me what I'm missing? Clearly I'm not understanding
something.

Thanks
Jim







--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline stuck in PAUSE under some instances

jimfcarroll

I should also note for the sake of completion that for the breakout (appsink
-> appsrc), the first frame that arrives on the appsink through
NEW_SAMPLE/NEW_PREROLL causes a read of the current negotiated caps on the
appsink's sink pad. Those caps are then transferred to the appsrc using
setCaps (on the java side. This is gst_app_src_set_caps on the c side).





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline stuck in PAUSE under some instances

jimfcarroll
One more piece of information.

It looks like the PREROLL is called on the AppSink when the AppSink is in
the READY state. When it doesn't work, even if the PREROLL callback returns
a FlowReturn of OK, it doesn't seem to move into the PAUSED state.

If I add a log message from the PREROLL callback, even the tcpserversink
will work sometimes. So it seems like a race condition somewhere but I have
no idea what to wait for or block on or where.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel