简体   繁体   中英

GStreamer attaching appsrc to another pipeline

I am new to GStreamer following is the issue I am facing

v4l2src device=/dev/video241 ! video/x-h264,height=720,width=1280,framerate=30/1 ! tvcameradmx name=demux demux.video_0 ! queue ! omx_h264dec ! xvimagesink

appsrc ! video/x-h264,height=720,width=1280,framerate=30/1 ! avimux ! filesink

I want to attach appsrc to the queue of pipeline 1

For this I am using appsrc in push mode.

  1. I have created a callback for "need-data" signal
  2. This callback is triggered when pipeline 2 goes from paused to playing state
  3. Now to push queue buffer I have to use gst_app_src_push_buffer.

If you're trying to go from v4l2, to a file sink and X, you'll want to use a tee, as JPS indicates. The pipeline would become something along these lines:

v4l2src device=/dev/video241 ! video/x-h264,height=720,width=1280,framerate=30/1 ! tvcameradmx name=demux demux.video_0 ! tee name=t ! queue ! omx_h264dec ! xvimagesink t. ! queue ! avimux ! filesink location=...

After creating a tee and naming it ("t" in this case), you can reference it again in the pipeline by appending "." after it. It then becomes a sort of new source element.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM