Porting DC1394 plugin to 1.x

Ryan Talbot rtalbot at vtti.vt.edu
Tue Apr 12 10:22:38 UTC 2016


Greetings!

I have a need to capture frames from a Point Grey Flea3, and later a Ximea brand camera, both connected via USB 3.0.  I've managed to write a small test program to capture frames in our required fromat from the Flea3 using libdc1394, but ultimately I need to feed these frames into a GStreamer pipeline.  I could not find a readily available plugin that acts as a source for IIDC cameras in general or Point Grey models in particular, save for the dc1394 plugin from the GStreamer 0.10 "bad" plugins repository.  I'd like to use GStreamer 1.x, though, so that doesn't help me out of the box, and I've decided to try and port it.

I'm a newcomer to GStreamer and GLib.  I've read through the plugin writer's guide and the porting 0.10-to-1.0 documents, and skimmed the code for v4l2src.  I currently have the dc1394src ported enough so that the following produces an output file of the expected size:

gst-launch-1.0 dc1394src num_buffers=20 ! video/x-bayer,width=2080,height=1552,framerate=60/1,vmode=88,bpp=8,format=rggb ! bayer2rgb ! videoconvert ! filesink location=testdc1394src.rgb

This also seems to produce an H264 stream that VLC can at least recognize (fails to play due to some inability to resize itself on this display, though):

gst-launch-1.0 dc1394src num_buffers=60 ! video/x-bayer,width=2080,height=1552,framerate=60/1,vmode=88,bpp=8 ! bayer2rgb ! videoconvert ! queue ! x264enc speed-preset=ultrafast ! filesink location=testdc1394src.h264

Where I'm running into trouble, is when I try to add an mp4mux element to the pipeline:

gst-launch-1.0 dc1394src num_buffers=60 ! video/x-bayer,width=2080,height=1552,framerate=60/1,vmode=88,bpp=8 ! bayer2rgb ! videoconvert ! queue ! x264enc speed-preset=ultrafast ! mp4mux ! filesink location=testdc1394src.mp4
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...

(gst-launch-1.0:21468): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed

...(repeated for each frame)...

Got EOS from element "pipeline0".
Execution ended after 0:00:01.645092401
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...


All I get is a garbage MP4 file that is only 1480 bytes in size.

I've turned debugging on in the various modules, but nothing is jumping out at me as being the problem.

I would love any insight as to where to go from here.

Thanks in advance,
Ryan Talbot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160412/5ab9f76e/attachment.html>


More information about the gstreamer-devel mailing list