Strange issue with pipeline

Pedro Côrte-Real pedro at pedrocr.net
Sun Dec 29 05:49:11 PST 2013


I'm still working on the disk saving from rtsp source pipeline. The
latest version actually works based on uridecodebin as a source. The
autoplug signal stuff is very cool, a single callback of a single line
of code sets up "autoplug until you have a parsed h264 stream". I have
two questions and an issue I'd appreciate some help with:

1) Question: Is there a way to specify caps of "parsed video stream in
any format"? Currently I'm doing:

gst_caps_is_subset(caps, gst_caps_from_string ("video/x-h264, parsed=true"));

Changing that to "video, parsed=true" doesn't seem to work properly.

2) Question: is !DELTA_UNIT the proper way to sync to I-frames?

The buffers with !DELTA_UNIT seem to always come in pairs so I'm
wondering if a buffer will always correspond to a frame or if each
buffer is only half a frame. Do I have to do anything special to make
sure that when I do a blocking probe I'm stopping the pipeline on a
frame boundary?

3) Issue: My pipeline stops writing completely sometimes with no error
message and while continuing to spend CPU

My current setup is this:
- Pipeline is uridecodebin ! queue ! matroskamux ! filesink
- matroskamux and filesink are inside a bin
- I have a blocking probe on the queue src and every N buffers with
!DELTA_UNIT I swap the bin before unblocking
- to swap the bin I set the bin state to NULL, remove it from the
pipeline, create a new bin, add it to the pipeline, link it and set it
to PLAYING

This works fine some of the time. Yet other times the pipeline will
get two !DELTA_UNIT frames in the beginning and then continue to use
CPU and not give any errors but not actually write anything to the
file. After some printf debugging it seems to always block after
receiving 120 buffers. When it doesn't block in the beginning it seems
to run fine for a long time. I've tried setting the queue's max-size-*
higher and that didn't work.

The buggy code is here:
https://github.com/pedrocr/camerasink/blob/fe2a30d0d283f8ed95cc2cc6967689dfee1abcbd/bin/testsave.c

I'm testing this on master with a gst-rtsp-server with just a h264
stream. Any pointers are most welcome.

Pedro


More information about the gstreamer-devel mailing list