Giter VIP home page Giter VIP logo

gst-interpipe's People

Contributors

bill9889 avatar bperez241 avatar bshankstd avatar dgarbanzo avatar dicroce avatar edisonf avatar emmadrigal avatar eramirez392 avatar fischer avatar jafet-chaves avatar jassonrm avatar jcaballeros avatar jsalas98 avatar michaelgruner avatar migueltaylor avatar mleivaf avatar mmontero avatar ronnyjimenez avatar rrcarlosrodriguez avatar rsatom avatar solzc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gst-interpipe's Issues

Recording wont start with gstd commands

Hi
I am testing the below pipelines using gstd

gst-client pipeline_create pipe1 v4l2src device=/dev/video1 ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! interpipesink name=ch1 sync=false async=false

gst-client pipeline_create pipe9 interpipesrc name=src format=time listen-to=ch1 ! nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! h264parse ! mux. pulsesrc device="alsa_input.usb-VXIS_Inc_ezcap_U3_capture-02.analog-stereo" ! audio/x-raw,width=16,depth=16,rate=44100,channel=1 ! queue ! audioconvert ! voaacenc ! aacparse ! mpegtsmux name=mux ! filesink location="/tmp/addd.ts" sync=false async=false

gst-client pipeline_play pipe1

gst-client pipeline_play pipe9

The pipeleines are created without errors and when played the state changes to playing state without errors. But the file is not created

I test the below command using gst-launch and interpipes its working

gst-launch-1.0 -e v4l2src device=/dev/video1 ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! interpipesink name=vid interpipesrc name=src format=time listen-to=vid ! nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! h264parse ! mux. pulsesrc device="alsa_input.usb-VXIS_Inc_ezcap_U3_capture-02.analog-stereo" ! audio/x-raw,width=16,depth=16,rate=44100,channel=1 ! queue ! audioconvert ! voaacenc ! aacparse ! mpegtsmux name=mux ! filesink location="addds.ts"

How to resolve this error?

Interpipe with RGB format

Hi,
I'm trying to use interpipe with an RGB video source, but I am getting the following error.
"videotestsrc ! video/x-raw,format=xRGB ! interpipesink name=camera sync=false"
"interpipesrc name=display listen-to=camera accept-events=false accept-eos-event=false enable-sync=false allow-renegotiation=false ! autovideosink sync=false async=false"

0:00:00.057117808 4839 0x5555559ad320 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: Internal data stream error.
0:00:00.057123026 4839 0x5555559ad320 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: streaming stopped, reason not-negotiated (-4)

Does interpipe not support RGB formats (in the same way that intervideosrc does not either)?
If so, why not? What's involved in adding support for it? Can you provide pointers to to so?
Thanks

Failed 8 out of 16 tests on Odroid XU4

I have compiled your gst-interpipe plugin on Odroid XU4 and after calling "make check" 8 out of 16 tests failed. You can see test logs here: https://pastebin.com/raw/ZbuAPakB

Additional information:

  • GStreamer version: 1.8.3
  • uname -a: Linux odroid 3.10.104 #1 SMP PREEMPT Tue Nov 29 10:18:41 UTC 2016 armv7l armv7l armv7l GNU/Linux
  • gcc version: gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

"make check" fails

When running "make check", one of the tests failed:-
"$ more tests/check/test-suite.log ====================================================
GstInterpipe 1.0.4: tests/check/test-suite.log

TOTAL: 16

PASS: 15

SKIP: 0

XFAIL: 0

FAIL: 1

XPASS: 0

ERROR: 0

.. contents:: :depth: 2

FAIL: gst/test_get_caps
======================="

Running suite(s): Interpipe
66%: Checks: 3, Failures: 1, Errors: 0
gst/test_get_caps.c:250:F:get_caps_two_interpipesrcs_no_intersection:interpipe_get_caps_two_interpipesrcs_no_interse
ction:0: Failure 'GST_STATE_CHANGE_FAILURE == gst_element_get_state (GST_ELEMENT (src1), NULL, NULL, GST_CLOCK_TIME_
NONE)' occurred
FAIL gst/test_get_caps (exit status: 1)

I am building this with the following system configuration:
lee@lee-VirtualBox:/media/sf_Share/workspace-HaWC/gst-interpipe$ uname -a
Linux lee-VirtualBox 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
lee@lee-VirtualBox:/media/sf_Share/workspace-HaWC/gst-interpipe$ gst-launch-1.0 --gst-version
GStreamer Core Library version 1.8.3

Cheers,

Lee

interpipe used in deepstream example

Hi everyone.

(1)I am trying to add dynamic control to my code. So I am modifying deepstream-app-test4, and this is my pipeline
source -> decodebin -> muxer -> tee1 -> pgie -> tracker -> osd -> tee2 -> renderer
tee1-> interpipesink => interpipesrc... and tee2 ->msgconv -> msgbroker => GUI
When I set the recording pipeline as

recording_pipe = gst_parse_launch("interpipesrc listen-to=record_h264 format=time allow-renegotiation=true enable-sync=true is-live=true ! queue ! nvmultistreamtiler width=1920 height=1080 rows=2 columns=2 ! nvvideoconvert ! nvv4l2h264enc insert-sps-pps=true iframeinterval=10 bitrate=8000000 ! h265parse ! matroskamux ! filesink name=filesink_record_h264 location=output_h264.mkv sync=false async=false", NULL);

and set the pipeline state as GST_STATE_PLAYING. The original pipeline will freeze and I can get only one frame as video output.

But if I set pipeline as

recording_pipe = gst_parse_launch("interpipesrc listen-to=record_h264 format=time allow-renegotiation=true enable-sync=true is-live=true ! queue ! nvmultistreamtiler width=1920 height=1080 rows=2 columns=2 ! nvvideoconvert ! nveglglessink", NULL);

it can display the streaming video and original pipeline’s display will be lagging, but able to play.

This is the interpipesink I used in my code.

g_object_set (G_OBJECT (recording_sink), "name", "record_h264", "forward-events", TRUE, "forward-eos", TRUE, "sync", FALSE, "async", FALSE, "enable-last-sample", FALSE,"drop", TRUE, NULL);

Does anyone have idea about issue?

(2) I looked into other code, if I used gstd-client, the issue might be solved. But since there is a probe function in example code. Is there a way to use this probe function with gstd c library?

Thanks in advance

storeing mpegts file storing only audio gstreamer

Hi All,
I am trying to encode video and audio and storing it as mpegts my command is
command:

gstd-client pipeline_create video0src v4l2src device=/dev/video0 ! vspmfilter outbuf-alloc=true !  video/x-raw,width=640,height=480 ! videorate ! video/x-raw,width=640,height=480,framerate=6/1 ! omxh264enc target-bitrate=2097152 ! mpegtsmux name="muxer" !  \
filesink location=/home/root/testvideo.mpegts \
alsasrc device=hw:0,0 latency-time=30000 buffer-time=800000 ! queue ! audioconvert ! queue ! faac bitrate=128000 ! aacparse ! muxer.

this command is working fine and I an getting testvideo.mpegts file with both audio and video.

when i change this command with interpipe elements my command id

command:

gstd-client pipeline_create video0src v4l2src device=/dev/video0  \
! vspmfilter outbuf-alloc=true ! video/x-raw,width=640,height=480 ! videorate \
! video/x-raw,width=640,height=480,framerate=6/1 ! queue ! interpipesink name=video0_src

gstd-client pipeline_create video0mainsrc interpipesrc is-live=true listen-to=video0_src do-timestamp=true ! queue ! omxh264enc target-bitrate=2097152 ! h264parse ! video/x-h264,stream-format=avc,width=640,height=480,mapping=/stream ! interpipesink name=video0_main sync=false async=false caps=video/x-h264,width=640,height=480

gstd-client pipeline_create video0storing interpipesrc is-live=true listen-to=video0_main do-timestamp=true ! queue ! h264parse config-interval=1 ! \
mpegtsmux name="muxer" ! filesink location=/home/root/testvideo.mpegts \
alsasrc device=hw:0,0 latency-time=30000 buffer-time=800000 ! queue ! audioconvert ! queue ! faac bitrate=128000 ! aacparse ! audio/mpeg,mapping=/audio ! queue ! tee name=aud ! queue ! rtspsink service=8554 \
aud. ! aacparse ! audio/mpeg ! muxer.

I am using 3 different pipelines like above to store video but i am getting only audio no video is storing.please help me am i doing anything wrong.

gstreamer version:1.12.2

Thank you all

Low framerate when "rtspsrc" run with delay

I am trying to create something like this, to switch between live feed and test pattern image (to show live is not available):

videotestsrc -> interpipesink  ------- interpipesrc -> ximagesink
rtspsrc -> interpipesink -------------|

video test pattern starts immediately and pipeline waits for rtspsrc to connect, it might be any time during application lifetime. For test I wait 10 seconds and then start the rtspsrc pipeline, after switch output video framerate drops to ~1 fps.

I have tested with both source as "videotestsrc" and it works fine (I followed this example)

It only happens when second source is rtspsrc and its pipeline starts with some delay. When I start both pipelines at same time it works fine.

Here are my pipelines:

std::string testSource = "videotestsrc is-live=true ! videoscale ! video/x-raw,width=1280,height=720 ! queue ! interpipesink name=offlineSource caps=video/x-raw,width=1280,height=720,framerate=30/1 sync=false async=false";

std::string exitNode = "interpipesrc name=exitNode listen-to=offlineSource is-live=true allow-renegotiation=true stream-sync=compensate-ts ! tee name=raw-video-splitter ! queue ! fpsdisplaysink async=false sync=false";
    
std::string rtspSource = "rtspsrc location=<RTSPURI>  latency=50 ! rtph264depay ! h264parse ! avdec_h264 max-threads=10 ! videoconvert ! videorate ! "
                            "video/x-raw,width=1280,height=720,framerate=30/1 ! queue leaky=downstream ! "
                            "interpipesink name=liveSource caps=video/x-raw,width=1280,height=720,framerate=30/1 sync=false async=false";

Do you think this is something related to interpipe plugin or rtsp source?

Python Support

Dear Interpipe Team

Thanks for the brilliant plugin

Was just wondering if there is python support for this Gst plugin? I noticed a thread had already been started here where a Wiki example was referenced. However, the wiki example only contains a bash example, not a Python example. I am looking to use interpipe on Gstreamer pipelines that have been initialized and are running through Gst-Python, would appreciate if you could explain how interpipe can be setup for usage in Python

Master failing tests

I installed the latest master today on Linux Mint 18 with GStreamer 1.8.2. After make check, I received the following results:

After building, I had 4 failing test cases:

PASS: gst/test_buffer_properties
PASS: gst/test_node_name_removed
FAIL: gst/test_hot_plug
PASS: gst/test_block_switch
FAIL: gst/test_allow_renegotiation_property
FAIL: gst/test_get_caps
PASS: gst/test_set_caps
FAIL: gst/test_caps_renegotiation
PASS: gst/test_interpipe_synchronization
PASS: gst/test_anonymous_connection
PASS: gst/test_reconfigure_event
PASS: gst/test_invalid_caps
PASS: gst/test_out_of_bounds_events
PASS: gst/test_in_bounds_events
PASS: gst/test_out_of_bounds_upstream_events
PASS: gst/test_enable_sync
============================================================================
Testsuite summary for GstInterpipe 1.0.0.1
============================================================================
# TOTAL: 16
# PASS:  12
# SKIP:  0
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0

Is this expected for the code on Github master?

Could not connect to local host: Connection refused

I rebuild gstd and interpipe for the imx8m (ARM64) and everything seemed to go well. I verified gstd is working. gst-inspect-1.0 alos shows all the interpipe elements as expected.
root@imx8mmwasp:~# gst-inspect-1.0 interpipe
Plugin Details:
Name interpipe
Description Elements to communicate buffers across pipelines
Filename /usr/lib/gstreamer-1.0/libgstinterpipe.so
Version 1.0.4
License Proprietary
Source module gst-interpipe
Binary package GstInterpipe
Origin URL http://www.ridgerun.com

interpipesrc: Inter pipeline source
interpipesink: Internal pipeline sink

2 features:
+-- 2 elements

I am trying to run the test scripts cctv.sh and camera.sh and I get these connection refused:

root@imx8mmwasp:~# ./cctv.sh

====== CCTV Example (Switch the scr_pipe to listen in runtime) ======

====> Create the scr_pipe_1

Could not connect to localhost: Connection refused

====> Create the scr_pipe_2

Could not connect to localhost: Connection refused

====> Create the scr_pipe_3

Could not connect to localhost: Connection refused

====> Create the sink_pipe_4 (listener)

Could not connect to localhost: Connection refused

====> Change to PLAYING STATE

Could not connect to localhost: Connection refused
Could not connect to localhost: Connection refused
Could not connect to localhost: Connection refused
Could not connect to localhost: Connection refused

====> Every 3 seconds the sink_pipe will change the src_pipe that is listening to

====> Start listening to scr_pipe_1

any idea what could be causing this?

License inconsistency

Hello,

All source files under gst/interpipe have license header for LGPL 2 or later. But license file COPYING and README.md says LGPL 2.1.

Please clarify this license inconsistency.

Thanks,
Rahul

How to truly decouple pipelines using gst-interpipe ?

I wanted to create decoupled dynamic pipelines and gst-interpipe has helped me achieve this.
My application has 2 pipelines, one video pipeline connects to the video source and decodes the stream and distributes decode data using interpipesink, other video analysis pipeline receives that decoded data using interpipesrc and does some video analysis on that.

In the video pipeline there is reconnection logic for which there is a probe on the rtspsrc element's src pad to observer if data is being received, if data is not received for more than certain threshold(in seconds) then it reconnects. The video pipeline also has a videosink (for debugging purposes).

Q.1 Now when the two pipelines are connected and if i pause the analysis pipeline (need to that for some reason), the video freezes in the videosink and the reconnection logic runs and goes into loop of connecting and reconnecting. If i see the state of video pipeline and its elements they are in playing state. How do i decouple the pipelines such that the state of one doesn't affect another ?

Q.2 If there is some error in the analysis pipeline, the same thing of the video freezing in the videosink and the reconnection logic running in loop mentioned in Q.1 happens but this time there is a upstream reconfigure event on interpipesink of video sink - which i drop by adding a probe, but the situation still happens. How do stop this event ?

Here are the graphs of the pipelines.
Video Pipeline
image

Analysis Pipeline
analytic_pipeline

Pipeline switching not working

I'm using gst-interpipe to switch between two playing webcams (both Logitech C920) by setting the "listen-to" property and I've made it work with the following:

Source pipeline 1: v4l2src device=/dev/video0 ! interpipesink name=webcam0
Source pipeline 2: v4l2src device=/dev/video1 ! interpipesink name=webcam1
Sink pipeline: interpipesrc name=src listen-to=webcam0 ! videoconvert ! xvimagesink

where I start by getting the webcam0 images on screen, subsequently setting listen-to=webcam1, and the sink correctly receives webcam1 images.
So far, so good.
But when I change the sink pipeline to the following, it stops working:

interpipesrc name=src listen-to=webcam0 format=time ! queue ! video/x-h264,framerate=30/1 ! rtph264pay config-interval=1 pt=96 ! queue ! udpsink host=127.0.0.1 port=8004"

That is, it works fine until I try to set listen-to=webcam1: the webcam1 pipeline then stops playing and the sink receives no data. I can switch back to the other webcam by setting listen-to=webcam0 and the streaming works again as expected.
With my limited understanding of gst-interpipe, I'm guessing there must be some pipeline synchronization problems during the switch, and I've tried to change different parameters but without success.
I can't tell if this is a bug or if I'm just missing some configuration.

Any help would be greatly appreciated.

I'm using:

  • gstreamer version 1.14.1
  • gst-interpipe version 1.0.4

Tests failing and EVENT_CAPS

As mentioned in #2, the tests are still failing with Sticky event misordering, got 'segment' before 'caps' errors.

I'm also trying to use interpipe with an RTSP server, with a pipeline feeding H264 into an interpipesink and the RTSP server starting a pipeline of interpipesrc ! rtph264pay when a client connects. It fails with this error from the payloader: error: No input format was negotiated, i.e. no caps event was received.

For this problem and the tests, it seems like the interpipesrc is never sending EVENT_CAPS downstream. Is there a fix for this?

filesrc not working with interpipe

gstc_pipeline_create (client, "pipe1", "filesrc location=/home/1.mpg ! decodebin ! videoconvert ! capsfilter caps=video/x-raw,format=(string)I420,width=640,height=480,framerate=(fraction)30/1 ! interpipesink name=src_1 sync=false async=false");

gstc_pipeline_create (client, "pipe_sink", "interpipesrc name=interpipesrc1 listen-to=src_1 ! queue ! capsfilter caps=video/x-raw,format=(string)I420,width=[300,640],height=[200,480],framerate=(fraction)30/1 ! autovideosink async=false sync=false");

I have tried multiple pipelines for filesrc with interpipe but it didn't worked, what I am doing incorrectly.

No error in gstd but no output.

While building interpipe, make check failed 2 test (already reported on github) is it related to filesrc?
Any help will be appreciated.
Thanks in advance.

Audio synchronization issue

Hi all,

I've converted an existing(working) gstreamer pipeline to use gst-interpipes with the following split. When running this combination of pipelines, I seem to be getting periodic audio blipping/skipping, which sounds like a forced synchronization being done by interpipesrc. The audio blipping is removed when stream-sync=1, but then the audio & video are completely out of sync.

Video pipeline:
rtspsrc ! rtph264depay ! h264parse ! queue ! interpipesink name=video

Audio pipeline:
alsasrc ! queue ! audioconvert ! avenc_ac3 ! queue ! interpipesink name=audio

Combined pipeline:
interpipesrc listen-to=video is-live=true allow-renegotiation=true stream-sync=0 ! queue ! h264parse ! mp4mux name=mux ! filesink
interpipesrc listen-to=audio is-live=true allow-renegotiation=true stream-sync=0 ! queue ! mux.

Does anyone see any obvious issue, or some way I can achieve proper audio/video sync without interruption?

Thank you!

License

Is this project open source? Could you add a license file to the repository?

Using Interpipes on Jetson TX-1 with NVMM

Is there a trick to using Interpipes on a TX-1 with memory:NVMM for peak performance?

If I create two simple pipelines:

gstd> pipeline_create c1 nvcamerasrc name=nvcam1 sensor-id=2 ! capsfilter caps="video/x-raw(memory:NVMM),width=640,height=480,framerate=(fraction)30/1" ! interpipesink name=ipsink1

gstd> pipeline_create d1 interpipesrc listen-to=ipsink1 ! nvoverlaysink
gstd> pipeline_play c1
gstd> pipeline_play d1

tailing gstd shows the output below. I can get it to work by inserting nvvidconv on both sides of the interpipe, but that kills performance. I've tried using queues on both sides and all of the parameters from the camera example in the doc.

gstd> pipeline_create c1 nvcamerasrc name=nvcam1 sensor-id=2 ! capsfilter caps="video/x-raw(memory:NVMM),width=640,height=480,framerate=(fraction)30/1" ! queue max-size-buffers=8 leaky=downstream ! interpipesink name=ipsink1 sync=true async=false
gstd> pipeline_create d1 interpipesrc listen-to=ipsink1 is-live=false allow-renegotiation=true enable-sync=false format=time ! queue max-size-buffers=11 leaky=downstream ! fakesink

Any other suggestions?

Available Sensor modes : 
3864 x 2174 FR=60.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1932 x 1094 FR=120.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1288 x 734 FR=120.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1288 x 546 FR=240.000000 CF=0x1009208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 0 WxH = 3864x2174 FrameRate = 60.000000 ...


(gstd:3747): GStreamer-CRITICAL **: gst_allocator_alloc: assertion '((params->align + 1) & params->align) == 0' failed

(gstd:3747): GStreamer-CRITICAL **: gst_memory_map: assertion 'mem != NULL' failed

(gstd:3747): GStreamer-CRITICAL **: gst_allocator_free: assertion 'memory != NULL' failed

(gstd:3747): GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object != NULL' failed

imxv4l2videosrc to imxipuvideosink issue

Board details:
iMX6Q - yocto morty - kernel 4.9.11
gst-inspect-1.0 version 1.10.4
gstreamer1.0-plugin-imx version 0.12.2

I'm trying to test interpipes on our arm platform, I've managed to switch between two videotestsrc pipelines but am unable to get any camera pipeline working.

I'm now trying a very simple pipeline of :
gst-launch-1.0 -vv imxv4l2videosrc ! "video/x-raw,width=640,height=480,framerate=15/1" ! interpipesink name=test sync=false async=false interpipesrc is-live=true listen-to=test ! imxipuvideosink async=false sync=false

I get 0 frames through and the following output:
0:00:00.116966334 9901 0x1d21560 INFO interpipe gstinterpipe.c:306:gst_inter_pipe_add_node: Adding node interpipesink0
0:00:00.117198667 9901 0x1d21560 INFO interpipe gstinterpipe.c:360:gst_inter_pipe_remove_node: Removing node interpipesink0
0:00:00.117290667 9901 0x1d21560 INFO interpipe gstinterpipe.c:306:gst_inter_pipe_add_node: Adding node test
0:00:00.126341334 9901 0x1d21560 INFO interpipesink gstinterpipesink.c:403:gst_inter_pipe_sink_get_caps: No listeners yet, accepting any caps
0:00:00.126596334 9901 0x1d21560 INFO interpipesink gstinterpipesink.c:403:gst_inter_pipe_sink_get_caps: No listeners yet, accepting any caps
Setting pipeline to PAUSED ...
0:00:00.141425000 9901 0x1d21560 INFO interpipe gstinterpipe.c:123:gst_inter_pipe_listen_node: listener interpipesrc0 listen to node test
0:00:00.141510334 9901 0x1d21560 INFO interpipe gstinterpipe.c:140:gst_inter_pipe_listen_node: Adding new listener interpipesrc0 to node test
0:00:00.141581334 9901 0x1d21560 INFO interpipesink gstinterpipesink.c:718:gst_inter_pipe_sink_add_listener: Adding new listener interpipesrc0
0:00:00.141685000 9901 0x1d21560 INFO interpipesink gstinterpipesink.c:761:gst_inter_pipe_sink_add_listener: Cannot set caps, no caps event stuck on sink pad
0:00:00.141744000 9901 0x1d21560 INFO interpipesrc gstinterpipesrc.c:383:gst_inter_pipe_src_start: Listening to node test
Pipeline is live and does not need PREROLL ...
0:00:01.385964334 9901 0x1d38f20 INFO interpipesink gstinterpipesink.c:526:gst_inter_pipe_sink_forward_event: Incoming serialized event stream-start
0:00:01.386248334 9901 0x1d38f20 INFO interpipesink gstinterpipesink.c:531:gst_inter_pipe_sink_forward_event: Event timestamp 0:00:00.000000000
0:00:01.386476334 9901 0x1d38f20 DEBUG interpipesrc gstinterpipesrc.c:728:gst_inter_pipe_src_push_event: Event stream-start with calculated timestamp 0:00:00.000000000 enqueued on serial pending events
/GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1
Setting pipeline to PLAYING ...
0:00:01.392228001 9901 0x1d21560 INFO interpipesrc gstinterpipesrc.c:435:gst_inter_pipe_src_event: Incoming upstream event latency
New clock: GstSystemClock

(gst-launch-1.0:9901): GStreamer-CRITICAL **: Registering meta implementation 'GstImxV4l2Meta' without init function
0:00:01.485469667 9901 0x1d38f20 INFO interpipesink gstinterpipesink.c:526:gst_inter_pipe_sink_forward_event: Incoming serialized event eos
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data stream error.
0:00:01.485549001 9901 0x1d38f20 INFO interpipesink gstinterpipesink.c:531:gst_inter_pipe_sink_forward_event: Event timestamp 0:00:00.000000000
Additional debug info:
../../../../gstreamer-1.10.4/libs/gst/base/gstbasesrc.c(2950): gst_base_src_loop (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
streaming stopped, reason not-negotiated (-4)
0:00:01.485620001 9901 0x1d38f20 LOG interpipesink gstinterpipesink.c:680:gst_inter_pipe_sink_eos: Received new EOS on node test
0:00:01.485674334 9901 0x1d38f20 LOG interpipesink gstinterpipesink.c:686:gst_inter_pipe_sink_eos: Ignoring EOS
Execution ended after 0:00:00.091842334
Setting pipeline to PAUSED ...
0:00:01.486080001 9901 0x1d38ef0 LOG interpipesrc gstinterpipesrc.c:464:gst_inter_pipe_src_create: parent create() returned flushing
Setting pipeline to READY ...
0:00:01.486837667 9901 0x1d21560 INFO interpipesrc gstinterpipesrc.c:413:gst_inter_pipe_src_stop: Removing listener from node test
0:00:01.486907001 9901 0x1d21560 INFO interpipe gstinterpipe.c:216:gst_inter_pipe_leave_node_priv: listener interpipesrc0 leaving node test
0:00:01.486974001 9901 0x1d21560 INFO interpipesink gstinterpipesink.c:837:gst_inter_pipe_sink_remove_listener: Removing listener interpipesrc0
Setting pipeline to NULL ...
Freeing pipeline ...
0:00:01.550349334 9901 0x1d21560 DEBUG interpipesink gstinterpipesink.c:273:gst_inter_pipe_sink_finalize: Removing node test and associated listeners
0:00:01.550482334 9901 0x1d21560 INFO interpipe gstinterpipe.c:360:gst_inter_pipe_remove_node: Removing node test

I have tried connecting the camera directly to the screen and this works, which suggests the issue is in the interpipes module.

Could you suggest any extra debug to turn on/ changes to the pipeline which could help with this?

Thanks
Brandon

Issues with Deepstream pipelines

I'm using Gst-interpipe with Deepstream SDK (5.0), following this example, but instead of having all nvstreammux, nvinfer and nvtracker elements in the same pipeline, I want to have them in independent pipelines. However this does not seem to work, as nvtracker fails with the following error:

gstnvtracker: NvBufSurfaceTransform failed with error -3 while converting buffergstnvtracker: Failed to convert input batch.

I did some digging, and found out that nvtracker also outputs:

gstnvtracker: numStreams not set. so setting default to 1
gstnvtracker: batchSize not set. so setting default to 1
gstnvtracker: surfaceSize not set. so setting default to 1

Without gst-interpipe, nvtracker does not output these lines , and works properly.
With gst-interpipe, nvtracker crash (if batch-size > 1).

After some more digging, I found out that Deepstream might be using these queries, in nvtracker to get batch-size (as this plugin does not have a batch-size property).
Does gst-interpipe handles this kind of queries ? I not, is this something that can be implemented ?

If you want to reproduce this error, using your example, and splitting out the deepstream pipeline in two parts should do the trick !

Digital Camera Example Flush Error

Hello,
I get an error 16 when "gstd-client event_flush_start recording_pipe" or "gstd-client event_flush_stop recording_pipe false" is called in your digital camera example. I cannot get the example to work. I checked out the top revision of the common subrepo because in the latest release I got an error during build (see #26). The build and also the checks ran successfully. We use NVidia Jetson Nano platform.

Response Error:

{
"code" : 16,
"description" : "Event error",
"response" : null
}

How can I get the flush event to work?

Thanks in advance

Marc

Unable to make simple python example run

I am trying to debug a more complex interpipe application and made a simpler example to try it out:

import gi
from gi.repository import GObject
import os
import sys

try:
    gi.require_version('Gst', '1.0')
except ValueError:
    print 'Could not find required Gstreamer library'
    sys.exit(1)

from gi.repository import Gst


def make_src_pipeline():
    pipeline = Gst.Pipeline()
    src = Gst.ElementFactory.make('videotestsrc', None)
    sink = Gst.ElementFactory.make('interpipesink', None)
    sink.set_property('name', 'output')
    pipeline.add(src)
    pipeline.add(sink)
    src.link(sink)
    pipeline.set_state(Gst.State.PLAYING)


def make_sink_pipeline():
    pipeline = Gst.Pipeline()
    src = Gst.ElementFactory.make('interpipesrc', None)
    sink = Gst.ElementFactory.make('xvimagesink', None)
    src.set_property('listen-to', 'output')
    pipeline.add(src)
    pipeline.add(sink)
    src.link(sink)
    pipeline.set_state(Gst.State.PLAYING)

def make_simple_pipeline():
    pipeline = Gst.Pipeline()
    src = Gst.ElementFactory.make('videotestsrc', None)
    sink = Gst.ElementFactory.make('xvimagesink', None)
    pipeline.add(src)
    pipeline.add(sink)
    src.link(sink)
    pipeline.set_state(Gst.State.PLAYING)

if __name__ == "__main__":
    os.environ["GST_DEBUG"] = '2'
    Gst.init(None)
    # make_simple_pipeline()
    make_src_pipeline()
    make_sink_pipeline()

    while 1:
        pass

The pipeline created by make_simple_pipeline shows the video test source as expected. However, if I run the script as shown with the two interpipe pipelines, no video window appears. The attached errors.txt file contains the error outputs at GST debug level 4.
errors.txt

There's definitely something happening in the background, because if I leave the program running (even with a low log level), eventually the PC slows down, including mouse movements.

Are there properties I need to set on the interpipe elements in this simple pipeline?

interpipe using h264 data

Hi guys,

I'm trying to use gst-interpipe to comunicate 2 pipelines using h264 data (and not RAW data).

This example works so far:

gst-launch-1.0 \
videotestsrc ! interpipesink name=vts \
interpipesrc listen-to=vts ! autovideosink

The idea is to include interpipe components in this simple pipeline:

gst-launch-1.0 videotestsrc ! queue ! x264enc ! \
queue ! avdec_h264 ! autovideosink

So, here the result:

gst-launch-1.0 videotestsrc ! queue ! x264enc ! \
interpipesink name=vts \
interpipesrc listen-to=vts ! \
queue ! avdec_h264 ! autovideosink

With debug level 3, decoder prints this warning:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.081900235 17456 0x5591b575e360 FIXME                default gstutils.c:3980:gst_pad_create_stream_id_internal:<interpipesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.081920200 17456 0x5591b575e400 FIXME                default gstutils.c:3980:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Redistribute latency...
Redistribute latency...
0:00:00.117136387 17456 0x5591b575e2a0 WARN            videodecoder gstvideodecoder.c:2423:gst_video_decoder_chain:<avdec_h264-0> Received buffer without a new-segment. Assuming timestamps start from 0.

And level 9, latest traces are:

0:00:01.588387245 17988 0x555c68d40ea0 DEBUG             bufferpool gstbufferpool.c:244:mark_meta_pooled:<videobufferpool1> marking meta 0x7f3dec003d30 as POOLED in buffer 0x7f3de85b0a20
0:00:01.588396082 17988 0x555c68d40ea0 LOG               bufferpool gstbufferpool.c:286:do_alloc_buffer:<videobufferpool1> allocated buffer 2/0, 0x7f3de85b0a20
0:00:01.588405068 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstobject.c:236:gst_object_ref:<videobufferpool1> 0x7f3de8014ad0 ref 3->4
0:00:01.588414652 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:721:gst_mini_object_replace: replace (nil) (0) with 0x7f3de85b0a20 (1)
0:00:01.588422842 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:465:gst_mini_object_ref: 0x7f3de85b0a20 ref 1->2
0:00:01.588432495 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:721:gst_mini_object_replace: replace 0x7f3de85b0a20 (2) with (nil) (0)
0:00:01.588440388 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:647:gst_mini_object_unref: 0x7f3de85b0a20 unref 2->1
0:00:01.588451188 17988 0x555c68d40ea0 LOG               GST_BUFFER gstbuffer.c:1797:gst_buffer_map_range: buffer 0x7f3de85b0a20, idx 0, length 1, flags 0003
0:00:01.588459545 17988 0x555c68d40ea0 LOG               GST_BUFFER gstbuffer.c:241:_get_merged_memory: buffer 0x7f3de85b0a20, idx 0, length 1
0:00:01.588467800 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:465:gst_mini_object_ref: 0x7f3dec0e0f00 ref 1->2
0:00:01.588477913 17988 0x555c68d40ea0 TRACE            GST_LOCKING gstminiobject.c:220:gst_mini_object_lock: lock 0x7f3dec0e0f00: state 00010000, access_mode 3
0:00:01.588487490 17988 0x555c68d40ea0 LOG               GST_BUFFER gstbuffer.c:1797:gst_buffer_map_range: buffer 0x7f3de85b0a20, idx 0, length 1, flags 0003
0:00:01.588495622 17988 0x555c68d40ea0 LOG               GST_BUFFER gstbuffer.c:241:_get_merged_memory: buffer 0x7f3de85b0a20, idx 0, length 1
0:00:01.588504395 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:465:gst_mini_object_ref: 0x7f3dec0e0f00 ref 2->3
0:00:01.588512941 17988 0x555c68d40ea0 TRACE            GST_LOCKING gstminiobject.c:220:gst_mini_object_lock: lock 0x7f3dec0e0f00: state 00010103, access_mode 3
0:00:01.588521980 17988 0x555c68d40ea0 LOG               GST_BUFFER gstbuffer.c:1797:gst_buffer_map_range: buffer 0x7f3de85b0a20, idx 0, length 1, flags 0003
0:00:01.588529984 17988 0x555c68d40ea0 LOG               GST_BUFFER gstbuffer.c:241:_get_merged_memory: buffer 0x7f3de85b0a20, idx 0, length 1
0:00:01.588538429 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:465:gst_mini_object_ref: 0x7f3dec0e0f00 ref 3->4
0:00:01.588546948 17988 0x555c68d40ea0 TRACE            GST_LOCKING gstminiobject.c:220:gst_mini_object_lock: lock 0x7f3dec0e0f00: state 00010203, access_mode 3
0:00:01.588555432 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:465:gst_mini_object_ref: 0x7f3de85b0a20 ref 1->2
0:00:01.588564226 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:822:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> linesize 384, data 0x7f3dec0e0fc0
0:00:01.588572252 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:822:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> linesize 192, data 0x7f3dec0f95c0
0:00:01.588580850 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:822:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> linesize 192, data 0x7f3dec0ff740
0:00:01.588588939 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:822:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> linesize 0, data (nil)
0:00:01.588596680 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:822:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> linesize 0, data (nil)
0:00:01.588605731 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:822:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> linesize 0, data (nil)
0:00:01.588613379 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:822:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> linesize 0, data (nil)
0:00:01.588621004 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:822:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> linesize 0, data (nil)
0:00:01.588630068 17988 0x555c68d40ea0 LOG                    libav gstavviddec.c:837:gst_ffmpegviddec_get_buffer2:<avdec_h264-0> returned frame 0x7f3de85b0a20
0:00:01.588696897 17988 0x555c68d40ea0 LOG             videodecoder gstvideodecoder.c:4097:gst_video_decoder_get_max_decode_time:<avdec_h264-0> earliest 99:99:99.999999999, frame deadline 0:00:00.066666666, deadline +2562047:47:16.854775807
0:00:01.588707874 17988 0x555c68d40ea0 DEBUG                  libav gstavviddec.c:1687:gst_ffmpegviddec_video_frame:<avdec_h264-0> return flow ok, got frame: 0
0:00:01.588716494 17988 0x555c68d40ea0 TRACE            GST_LOCKING gstminiobject.c:280:gst_mini_object_unlock: unlock 0x7f3df0214030: state 00010101, access_mode 1
0:00:01.588724192 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstminiobject.c:647:gst_mini_object_unref: 0x7f3df0214030 unref 2->1
0:00:01.588732123 17988 0x555c68d40ea0 TRACE                default gstvideoutils.c:136:gst_video_codec_frame_unref: 0x7f3df01f4710 unref 3->2
0:00:01.588742508 17988 0x555c68d40ea0 DEBUG         GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<avdec_h264-0:sink> called chainfunction &gst_video_decoder_chain with buffer 0x555c68defea0, returned ok
0:00:01.588751469 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstobject.c:263:gst_object_unref:<avdec_h264-0> 0x555c68ded650 unref 2->1
0:00:01.588760276 17988 0x555c68d40ea0 TRACE        GST_REFCOUNTING gstobject.c:263:gst_object_unref:<avdec_h264-0:sink> 0x555c68d2b5b0 unref 2->1
0:00:01.588768420 17988 0x555c68d40ea0 DEBUG         queue_dataflow gstqueue.c:1516:gst_queue_loop:<queue1> queue is empty
0:00:01.588781262 17988 0x555c68d40ea0 LOG           queue_dataflow gstqueue.c:1525:gst_queue_loop:<queue1> (queue1:src) wait for ADD: 0 of 0-200 buffers, 0 of 0-10485760 bytes, 0 of 0-1000000000 ns, 0 items

On the other hand, if I remove the encoder the pipeline plays fine but, of course, I would need to decode the video on the second and independent pipeline.

gst-launch-1.0 videotestsrc ! queue ! x264enc ! \
interpipesink name=vts \
interpipesrc listen-to=vts ! \
queue ! fakesink

Am I missing something or doing something wrong? Have you tried similar examples on your side or always with RAW data?

Thanks!

Multiple interpipesrc elements in the same pipeline

Hi

Is it possible to have multiple interpipesrc elements within the same pipeline? The use-case I have in mind is to have one interpipesrc element for each sink pad on a compositor.

I would then be able to connect up multiple video decoder pipelines whose interpipesink elements would connect to newly created interpipesink elements connected to a sink pad on the compositor.

The compositor would then arrange for the video stream from each decoder pipeline to be displayed within its own area on the display.

Jetson Xavier NX, 2 Tests failed

Ran the make check and got two errors

PASS: gst/test_allow_renegotiation_property
PASS: gst/test_anonymous_connection
PASS: gst/test_block_switch
PASS: gst/test_buffer_properties
PASS: gst/test_caps_renegotiation
FAIL: gst/test_enable_sync
PASS: gst/test_get_caps
PASS: gst/test_hot_plug
PASS: gst/test_in_bounds_events
FAIL: gst/test_interpipe_synchronization
PASS: gst/test_invalid_caps
PASS: gst/test_node_name_removed
PASS: gst/test_out_of_bounds_events
PASS: gst/test_out_of_bounds_upstream_events
PASS: gst/test_reconfigure_event
PASS: gst/test_set_caps

Can't locate gtkdoc-common.pl

On Ubuntu 18.04.1 LTS, I'm getting this error despite installing gtk-doc-tools:

Can't locate gtkdoc-common.pl in @inc (@inc contains: /usr/share/gtk-doc/data /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ../../common/gstdoc-scangobj line 38.

The only way I can build is by:

./autogen.sh --noconfigure

./configure --libdir /usr/lib/x86_64-linux-gnu/gstreamer-1.0/ --disable-gtk-doc

make

Request: How to do pipe monitor ?

Have few pipes connected to one source (record, stream, stream2, snapshot etc.)
Sometimes record pipe works as design, sometimes stops at 52Kb/148Kb saved. There is somekind of logic because lenght is the same almost all the time but can't catch and reproduce it 100%.
Now I'm thinking about monitoring health of pipe with bus_filter warning,errors & bus_read. And respectively to re-start the pipe with pipeline_play ?
Did someone make anything like this to share it ?

freeze frame

Hi,
I'm watching the strange behavior of the plugin. The following code produces a freeze frame:

gst_init(nullptr, nullptr);

GstElement *src = gst_parse_launch("videotestsrc ! video/x-raw,framerate=30/1,foramt=I420 ! queue ! interpipesink name=aaa", NULL);
GstElement *sink = gst_parse_launch("interpipesrc is-live=true listen-to=aaa name=src ! autovideosink", NULL);

gst_element_set_state (src, GST_STATE_PLAYING);
gst_element_set_state (sink, GST_STATE_PLAYING);

GMainLoop *loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(loop);

Logs (GST_DEBUG=4):
GST_DEBUG_FREEZE.log

However, just add a sleep and everything works fine:

gst_init(nullptr, nullptr);

GstElement *src = gst_parse_launch("videotestsrc ! video/x-raw,framerate=30/1,foramt=I420 ! queue ! interpipesink name=aaa", NULL);
GstElement *sink = gst_parse_launch("interpipesrc is-live=true listen-to=aaa name=src ! autovideosink", NULL);

gst_element_set_state (src, GST_STATE_PLAYING);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
gst_element_set_state (sink, GST_STATE_PLAYING);

GMainLoop *loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(loop);

Logs (GST_DEBUG=4):
GST_DEBUG_OK.log

Plugin version: 1.0.4.
Gstreamer version: 1.14.4
Kernel version: 4.18.0-25-generic
OS: Ubuntu 18.04.2 LTS

When I use the terminal everything works fine.

gst-launch-1.0 videotestsrc ! video/x-raw,framerate=30/1,format=I420 ! interpipesink name=aaa interpipesrc is-live=true listen-to=aaa ! autovideosink

gst_segment_to_running_time: assertion 'segment->format == format' failed

Hi all,
I am using the following gst-interpipe commands,I am getting the video but i am getting following error.Please help me if I am missing anything in the command

Thank you all in advance

command:

gstd-client pipeline_create video0src videotestsrc ! queue ! interpipesink name=video0_src sync=false async=false \
gstd-client pipeline_create video0mainsrc interpipesrc name=src is-live=true listen-to=video0_src ! queue ! omxh264enc target-bitrate=2097152 num-p-frames=0 ! rtph264pay pt=96 name=pay0 config-interval=3 ! queue ! udpsink host=127.0.0.1 port=5000

gstd-client pipeline_play video0src
gstd-client pipeline_play video0mainsrc

Error log:
(gstd:753): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed
(gstd:753): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed
(gstd:753): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed
(gstd:753): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed
(gstd:753): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed

I am getting this error continuously

gstd version:0.6.2
gstreamer version:1.2.3

event_flush_* returns always Code 16: Event error

Gstd version 0.6.3
Follow that example
I assume that event_flush_* are commands to start/stop empty buffer of pipeline. Is that correct?
But anyway how I use it - start when not using pipe or start when using pipe ( because on your site they are used both ways https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Daemon_-_Flush_start/Flush_stop)
I'm still receive Code 16: Event error.

Do I need that flush for recording&streaming pipes and how to use it.

16 out of 16 tests fail on macOS 10.14.5

Hey there,

I've tired to build gst-interpipe on macOS 10.14.5 using this steps:

#!/usr/bin/env bash


brew install gtk-doc automake autoconf libffi gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

./autogen.sh --noconfigure
./configure --libdir /usr/local/Cellar/gstreamer/1.16.0_1/lib --enable-gtk-doc-html=no
make
make check
make install

(I chose to build without gtk-doc, because otherwise gtkdoc-common.pl was not found and make did not complete. On linux gtkdoc-common.pl seems to be part of gtk-doc-tools, but I was not able to find that for macOS.)

However all 16 unit tests fail when I run make check. Is it possible to build gst-interpipe on macOS 10.14.5?

GStreamer version: 1.16.0

Thanks!

interpipe with udpsrc and udpsink

Hi,

I try interpipe to route several udp streams inputs (mpegts streams) to one udp output (udpsink).
No success for now :( Is interpipe able to route udp streams ?

2x udp inputs:
pipeline_create p1 name=input1 udpsrc address=127.0.0.1 port=3000
pipeline_create p2 name=input2 udpsrc address=127.0.0.1 port=4000

1x udp output:
gstd> pipeline_create out1 interpipesrc name=output1 listen-to=input1 is-live=true allow-renegotiation=true enable-sync=true ! queue ! udpsink host=127.0.0.1 port=6000

The error i get:

{
  "code" : 2,
  "description" : "Bad pipeline description",
  "response" : null
}

Thanks for helping

Jetson nano 2 test failed

I tried make check on jetson nano , 2 test failed

PASS: gst/test_allow_renegotiation_property
PASS: gst/test_anonymous_connection
PASS: gst/test_block_switch
PASS: gst/test_buffer_properties
PASS: gst/test_caps_renegotiation
FAIL: gst/test_enable_sync
PASS: gst/test_get_caps
PASS: gst/test_hot_plug
PASS: gst/test_in_bounds_events
FAIL: gst/test_interpipe_synchronization
PASS: gst/test_invalid_caps
PASS: gst/test_node_name_removed
PASS: gst/test_out_of_bounds_events
PASS: gst/test_out_of_bounds_upstream_events
PASS: gst/test_reconfigure_event
PASS: gst/test_set_caps
============================================================================
Testsuite summary for GstInterpipe 1.1.0
============================================================================
# TOTAL: 16
# PASS:  14
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

Failed 8 out of 16 tests on Ubuntu 16.04

Similar to #11 : I have compiled your gst-interpipe plugin on my 64bit Ubuntu 16.04 PC and after calling "make check" 8 out of 16 tests failed. You can see test logs here: https://pastebin.com/raw/rP2rqXYT

Additional information:

GStreamer version: 1.8.3
uname -a: Linux MyMachineName 4.8.0-49-generic #52~16.04.1-Ubuntu SMP Thu Apr 20 10:55:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
gcc version: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

Recording usb camera using interpipe fails

Hi,
I tired to record a usb camera source in jetson nano using the below method using interpipes

gst-client pipeline_create pipe1 v4l2src device=/dev/video0 ! interpipesink name=vid sync=false async=false

gst-client pipeline_create pipe3 interpipesrc listen-to=vid is-live=false ! 'video/x-raw, framerate=30/1, format=YUY2' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! omxh264enc ! mpegtsmux ! filesink location="/tmp/rrcam.ts" sync=false async=false

gstd-client pipeline_play pipe1

{
"code" : 0,
"description" : "Success",
"response" : {
"name" : "state",
"value" : "PLAYING",
"param" : {
"description" : "The state of the pipeline",
"type" : "GstdStateEnum",
"access" : "((GstdParamFlags) READ | 2)"
}
}
}

gstd-client pipeline_play pipe3

{
"code" : 0,
"description" : "Success",
"response" : {
"name" : "state",
"value" : "PLAYING",
"param" : {
"description" : "The state of the pipeline",
"type" : "GstdStateEnum",
"access" : "((GstdParamFlags) READ | 2)"
}
}
}

The file is not created. What can be the issue?

imxv4l2src related

Hi,

I would like to use interpipe src and sink for my application in imx platform.

I used like below pipeline:

sink = GST_ELEMENT (gst_parse_launch ("imxv4l2src device=/dev/v4l/by-path/platform-1ffc000.pcie-pci-0000:01:00.0-video-index0 ! video/x-raw,format=(string)UYVY,width=720,height=576,framerate=(fraction)25/1,interlace-mode=(string)interleaved ! queue ! interpipesink name=sink async=true", &error));
src1 = GST_ELEMENT (gst_parse_launch ("interpipesrc listen-to=sink is-live=true ! queue ! video/x-raw,format=(string)UYVY,width=720,height=576,framerate=(fraction)25/1,interlace-mode=(string)interleaved ! imxvideoconvert_ipu ! overlaysink sync=false", &error));

Unfortunately, I see the below error:

0:00:06.782479250 10006 0xba260 WARN imxv4l2 gstimxv4l2.c:1885:gst_imx_v4l2_queue_gstbuffer: new buffer (0x73807bf0) use the same memblk(0x738016bc) with queued buffer(0x73807b50)
0:00:06.782605593 10006 0xba260 WARN imxv4l2 gstimxv4l2.c:1888:gst_imx_v4l2_queue_gstbuffer: gstbuffer(0x73807b50) for (0x76c79a50) not dequeued yet but queued again, index(1937800016).
0:00:06.782670265 10006 0xba260 ERROR imxv4l2 gstimxv4l2.c:1770:imx_v4l2_do_queue_buffer: queue v4l2 buffer failed.
0:00:06.782713602 10006 0xba260 ERROR imxv4l2 gstimxv4l2.c:1892:gst_imx_v4l2_queue_gstbuffer: queue gstbuffer (0x73807bf0) failed.

(gstr:10006): GStreamer-CRITICAL **: gst_buffer_iterate_meta: assertion 'buffer != NULL' failed

(gstr:10006): GStreamer-CRITICAL **: gst_buffer_add_meta: assertion 'buffer != NULL' failed
Killing all inferiors
logout

I guess, it is because of imx v4l2 source expects its hardware buffer to be released. 
Because it has limited buffers. 

Could you please update me with any possible solutions for my issue ?
Also please suggest how to use interpipe src/sink with imxv4l2src

Also below pipeline works like champ:
//sink = GST_ELEMENT (gst_parse_launch ("videotestsrc pattern=1 is-live=true ! video/x-raw,format=(string)I420,width=(int)320,height=(int)240,framerate=(fraction)15/1 ! queue ! interpipesink name=sink forward-events=true", &error));
//src1 = GST_ELEMENT (gst_parse_launch ("interpipesrc listen-to=sink is-live=true ! queue ! video/x-raw,format=(string)I420,width=(int)320,height=(int)240,framerate=(fraction)15/1 ! imxvideoconvert_ipu ! overlaysink sync=false", &error));

Thanks in advance.
Prakash

Clockoverlay won't show but pipe works

Have few pipes and just one which streaming mpegts has clockoverlay.
Another two recording to file and showing livepreview works but w/o clockoverlay.
That's the source
pipeline_create cam_src_pipe imxv4l2videosrc typefind=true ! imxipuvideotransform deinterlace=true ! interpipesink name=cam_src caps=video/x-raw,width=640,height=480,framerate=25/1 sync=true async=false forward-eos=true

That's wont show any clock overlay:
pipeline_create live_preview_pipe interpipesrc name=live_prev_intpsrc listen-to=cam_src is-live=true allow-renegotiation=true enable-sync=true ! queue max-size-buffers=3 leaky=downstream flush-on-eos=true ! clockoverlay ! videoconvert ! imxg2dvideosink window-width=640 window-height=480 window-x-coord=800 window-y-coord=400

That's wont show too:
pipeline_create recording_pipe interpipesrc name=rec_intpsrc listen-to=cam_src is-live=true allow-renegotiation=true enable-sync=false format=time ! clockoverlay halignment=left valignment=bottom ! queue max-size-buffers=3 leaky=downstream ! imxvpuenc_h264 bitrate=8192 ! h264parse ! splitmuxsink location=/tmp/rec_%03d.mpg max-size-time=60000000000 max-files=4 muxer=mpegtsmux
BUT that one works without any problem:
pipeline_create stream_pipe interpipesrc name=stream_intpsrc listen-to=cam_src is-live=true allow-renegotiation=true enable-sync=false ! queue max-size-buffers=4 leaky=downstream flush-on-eos=true ! clockoverlay shaded-background=true font-desc="Nimbus mono" valignment=1 ! textoverlay shaded-background=true font-desc="Nimbus mono" valignment=1 halignment=2 text="42.1233N 24.1234E" ! imxvpuenc_h264 bitrate=6000 gop-size=16 ! mpegtsmux ! tcpserversink host=0.0.0.0 port=1234 sync=true
Both problematic pipes are with different place of clock sink to test the defect.
Any ideas what's could be a problem ?
Version of interpipe plugin is:

gst-inspect-1.0 interpipe
Plugin Details:
Name interpipe
Description Elements to communicate buffers across pipelines
Filename /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/gstreamer-1.0/libgstinterpipe.so
Version 1.0.4
License Proprietary
Source module gst-interpipe
Binary package GstInterpipe
Origin URL http://www.ridgerun.com

interpipesink: Internal pipeline sink
interpipesrc: Inter pipeline source

2 features:
+-- 2 elements

GSTD is the latest commit in dev branch

commit 0546757b7e7c2fb5f5ca489ac6ee0d668c369936
Merge: f1747c7 41a4c43
Author: eramirez392 [email protected]
Date: Wed Jan 9 16:26:01 2019 -0600

Merge branch 'feature/fix-docs-build' into develop

8 tests fail on TX1 jetpack 3.0 Ubuntu 16.04

ubuntu@tegra-ubuntu:~/gst-interpipe$ make check
Making check in gst
make[1]: Entering directory '/home/ubuntu/gst-interpipe/gst'
Making check in interpipe
make[2]: Entering directory '/home/ubuntu/gst-interpipe/gst/interpipe'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ubuntu/gst-interpipe/gst/interpipe'
make[2]: Entering directory '/home/ubuntu/gst-interpipe/gst'
make[2]: Nothing to be done for 'check-am'.
make[2]: Leaving directory '/home/ubuntu/gst-interpipe/gst'
make[1]: Leaving directory '/home/ubuntu/gst-interpipe/gst'
Making check in tests
make[1]: Entering directory '/home/ubuntu/gst-interpipe/tests'
Making check in check
make[2]: Entering directory '/home/ubuntu/gst-interpipe/tests/check'
make  gst/test_buffer_properties gst/test_node_name_removed gst/test_hot_plug gst/test_block_switch gst/test_allow_renegotiation_property gst/test_get_caps gst/test_set_caps gst/test_caps_renegotiation gst/test_interpipe_synchronization gst/test_anonymous_connection gst/test_reconfigure_event gst/test_invalid_caps gst/test_out_of_bounds_events gst/test_in_bounds_events gst/test_out_of_bounds_upstream_events gst/test_enable_sync
make[3]: Entering directory '/home/ubuntu/gst-interpipe/tests/check'
  CC       gst/test_buffer_properties.o
  CCLD     gst/test_buffer_properties
  CC       gst/test_node_name_removed.o
  CCLD     gst/test_node_name_removed
  CC       gst/test_hot_plug.o
  CCLD     gst/test_hot_plug
  CC       gst/test_block_switch.o
  CCLD     gst/test_block_switch
  CC       gst/test_allow_renegotiation_property.o
  CCLD     gst/test_allow_renegotiation_property
  CC       gst/test_get_caps.o
  CCLD     gst/test_get_caps
  CC       gst/test_set_caps.o
  CCLD     gst/test_set_caps
  CC       gst/test_caps_renegotiation.o
  CCLD     gst/test_caps_renegotiation
  CC       gst/test_interpipe_synchronization.o
  CCLD     gst/test_interpipe_synchronization
  CC       gst/test_anonymous_connection.o
  CCLD     gst/test_anonymous_connection
  CC       gst/test_reconfigure_event.o
  CCLD     gst/test_reconfigure_event
  CC       gst/test_invalid_caps.o
  CCLD     gst/test_invalid_caps
  CC       gst/test_out_of_bounds_events.o
  CCLD     gst/test_out_of_bounds_events
  CC       gst/test_in_bounds_events.o
  CCLD     gst/test_in_bounds_events
  CC       gst/test_out_of_bounds_upstream_events.o
  CCLD     gst/test_out_of_bounds_upstream_events
  CC       gst/test_enable_sync.o
  CCLD     gst/test_enable_sync
make[3]: Leaving directory '/home/ubuntu/gst-interpipe/tests/check'
make  check-TESTS
make[3]: Entering directory '/home/ubuntu/gst-interpipe/tests/check'
make[4]: Entering directory '/home/ubuntu/gst-interpipe/tests/check'
PASS: gst/test_buffer_properties
PASS: gst/test_node_name_removed
PASS: gst/test_hot_plug
FAIL: gst/test_block_switch
FAIL: gst/test_allow_renegotiation_property
FAIL: gst/test_get_caps
FAIL: gst/test_set_caps
FAIL: gst/test_caps_renegotiation
FAIL: gst/test_interpipe_synchronization
PASS: gst/test_anonymous_connection
FAIL: gst/test_reconfigure_event
PASS: gst/test_invalid_caps
PASS: gst/test_out_of_bounds_events
PASS: gst/test_in_bounds_events
PASS: gst/test_out_of_bounds_upstream_events
FAIL: gst/test_enable_sync
============================================================================
Testsuite summary for GstInterpipe 1.0.2
============================================================================
# TOTAL: 16
# PASS:  8
# SKIP:  0
# XFAIL: 0
# FAIL:  8
# XPASS: 0
# ERROR: 0
============================================================================
See tests/check/test-suite.log
Please report to http://www.github.com/RidgeRun/gst-interpipe-1.0
============================================================================
Makefile:1025: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1
make[4]: Leaving directory '/home/ubuntu/gst-interpipe/tests/check'
Makefile:1131: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 2
make[3]: Leaving directory '/home/ubuntu/gst-interpipe/tests/check'
Makefile:1309: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/home/ubuntu/gst-interpipe/tests/check'
Makefile:473: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/gst-interpipe/tests'
Makefile:535: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

2 interpipesrc to videomixer not working

pipe player1:
filesrc name=src location=/home/rpi/Downloads/t1.mov ! decodebin3 name=dmux ! queue ! video/x-raw,width=640,height=360,format=I420,framerate=25/1 ! videoconvert ! videorate ! queue max-size-buffers=3 leaky=downstream ! interpipesink name=player1 sync=true async=true forward-events=false forward-eos=false

pipe black:
videotestsrc name=videotestsrc pattern=ball is-live=true ! video/x-raw,width=640,height=360,format=I420,framerate=25/1 ! queue max-size-buffers=3 leaky=downstream ! interpipesink name=black caps=video/x-raw,width=640,height=360,format=I420,framerate=25/1 sync=true async=true forward-events=false forward-eos=true

pipe colorbar:
videotestsrc name=videotestsrc is-live=true ! video/x-raw,width=640,height=360,format=I420,framerate=25/1 ! queue max-size-buffers=3 leaky=downstream ! interpipesink name=colorbar caps=video/x-raw,width=640,height=360,format=I420,framerate=25/1 sync=true async=true forward-events=false forward-eos=true

receiver pipe:
videomixer name=mixer ! \ queue max-size-buffers=3 leaky=downstream ! \ videoconvert ! \ ximagesink sync=false async=true \ interpipesrc name=input0 listen-to=black is-live=false format=time caps=video/x-raw,width=640,height=360,format=I420,framerate=25/1 accept-events=false accept-eos-event=false allow-renegotiation=true !\ queue max-size-buffers=3 leaky=downstream ! \ videoconvert ! videorate ! queue ! mixer. \ interpipesrc name=input1 listen-to=black is-live=false format=time caps=video/x-raw,width=640,height=360,format=I420,framerate=25/1 accept-events=false accept-eos-event=false allow-renegotiation=true !\ queue max-size-buffers=3 leaky=downstream ! \ videoconvert ! videorate ! queue ! mixer.

I can switch input1 from black to colorbar and vice versa without problem.
BUT: switching to player1 makes the video mixer output freeze for about 7-9 seconds, then the video from player1 runs rather smooth, but the video from input0 (ball) is at a framerate about 1 per second.
I've tried for a week now, searched forums but did not find any solution.

By the way: interpipesrc does not have the option enable-sync (getting bad pipeline description if i use it).
Interpipe version shows:
gst-inspect-1.0 interpipe Plugin Details: Name interpipe Description Elements to communicate buffers across pipelines Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstinterpipe.so Version 1.1.3 License LGPL Source module gst-interpipe Binary package GstInterpipe Origin URL http://www.ridgerun.com
Could anyone give me advice with that? Many thanks for any answer!

how can I use interpipe to create low latency pipeline?

I am trying to create a low latency pipeline (< 1s) , but it seems aways buffer more than few seconds

here is my parameter

rtspsrc buffer-mode=none latency=20 ! interpipesink name=interpipe0 max-buffers=3 sync=true max-lateness=100
interpipesrc format=time listen-to=interpipe0 is-live=true max-latency=10

I used following command to push:

gst-launch-1.0 -e videotestsrc pattern=ball is-live=true ! clockoverlay halignment=right valignment=top text="wk0=" shaded-background=true font-desc="Sans, 25" ! x264enc tune=zerolatency key-int-max=10 ! video/x-h264, stream-format="byte-stream" ! rtspclientsink location=rtsp://xxxx protocols=tcp latency=20

I wonder what parameters can result in very low latency link between interpipesink/src

enable-sync=true causes unnecessary buffer copies

In the gst_inter_pipe_src_push_buffer (GstInterPipeIListener * iface, GstBuffer * buffer, guint64 basetime) function, the buffer is converted to writable when enable-sync property is set true:

if (src->enable_sync) {
    guint64 difftime;

    buffer = gst_buffer_make_writable (buffer);

To compensate the timestamps it is not necessary to make the buffer writable. The fix is to remove the following line of the above code section: "buffer = gst_buffer_make_writable (buffer);"

Making the buffer writable causes unnecessary internal buffer copies if the incoming buffers are labeled as non-shareable.

Simple pipeline rapidly out of memory on TX2

Hello, the following pipeline rapidly runs out of memory and is killed in approx 60 seconds when run on a Jetson TX2 dev kit that I believe is updated to most recent version:

gst-launch-1.0 videotestsrc ! interpipesink name=src interpipesrc listen-to=src ! xvimagesink

Adding "block=true" to interpipesrc stops the memory use and it runs indefinitely. Should block=true be required? Thanks!

using x264enc causes Critical caps event error

Hi

I'm trying to use Gst-Interpipe to change of sources of content on the fly and output the generated result to HLS streams.

When using the x264enc encoder with the interpipesrc elements the following error is raised and playback is paused.

GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed

This pipeline works fine without interpipe, to generate a test stream but I am looking to be able to use interpipe to switch streams when needed.

Sample code attached to show this issue.

Is this an issue with the Caps Negotiation - as it seems that a new caps event is created from x264enc without a "format" parameter.

Is there a way that interpipe could be causing this issue to occur?

hls.txt

Problem with audio

filesrc location=/home/jumanji.mp4 !
    qtdemux name=demux
      demux.audio_0 ! queue ! decodebin ! audioconvert ! audio/x-raw ! audioresample  ! queue ! interpipesink name=audio_source1  sync=false caps=audio/x-raw
     demux.video_0 ! queue ! decodebin ! videoconvert ! videoscale  ! videorate ! video/x-raw,width=1920,height=1080,framerate=25/1 ! interpipesink name=video_source1  sync=true caps=video/x-raw,width=1920,height=1080,framerate=25/1

videotestsrc pattern=black is-live=true ! video/x-raw,width=1920,height=1080,framerate=25/1 ! interpipesink name=s1 \

interpipesrc name=audiocompositor listen-to=audio_source1 ! queue ! audio/x-raw ! interpipesink sync=false name=mixer_audio \

interpipesrc name=local_output listen-to=mixer_audio ! queue ! audio/x-raw ! autoaudiosink \


interpipesrc name=output1 listen-to=mixer_video ! queue ! video/x-raw,width=1920,height=1080,framerate=25/1 !  fpsdisplaysink \

interpipesrc name=output2 listen-to=mixer_video
	!  video/x-raw,width=1920,height=1080,framerate=25/1
	! videoconvert
	!  x264enc noise-reduction=10000 speed-preset=fast tune=zerolatency byte-stream=true threads=4 key-int-max=15 intra-refresh=true
	!  muxer.
interpipesrc listen-to=mixer_audio name=output3
	! avenc_ac3
	!  muxer.
mpegtsmux  name=muxer
  ! tcpserversink host=0.0.0.0 port=5004  recover-policy=keyframe sync-method=latest-keyframe sync=false \
 \
compositor name=mix \
  ! identity name=sig \
  ! interpipesink name=mixer_video caps=video/x-raw,width=1920,height=1080,framerate=25/1 
  sync=true async=false forward-eos=true \
   \
 interpipesrc \
    name=pipe1 \
    listen-to=s1 \
    format=time \
! mix.

i am trying to have a compositor, with a interpipesource "video_mixer"
the video mixer, listens to "video_source1" (and can be changed on the fly)
(this part works like a charm)

also i have multiple outputs (fpsdisplaysink, tcpserversink) which listen to interpipesrc=video_mixer
(works also perfectly)

now i am trying to do the same with audio, it works - (as above) with the autoaudiosink, via the "audio_mixer"

but as soon as i add:

interpipesrc listen-to=mixer_audio name=output3
	! avenc_ac3
	!  muxer.

the filesrc seems to be broken, and does not push/play anything.

changing the above with a audiotestsrc:

audiotestsrc listen-to=mixer_audio name=output3
  !avenc_ac3
  !muxer.

works, i get

  • local output (fpsdisplayoutput)
  • local audio output via autoaudiosink
  • tcp output
    • correct video from video_mixer
    • correct audiotestsrc

basic idea: change listen to from audiocompositor(audio) and mix(video) - to cut to different sources.

anyone has a idea?

plugin get blacklisted, libgstinterpipes-1.0.so is not a GStreamer plugin

$ gst-inspect-1.0 /tmp/gst-interpipe/build/gst/interpipe/libgstinterpipes-1.0.so
Could not load plugin file: File "/tmp/gst-interpipe/build/gst/interpipe/libgstinterpipes-1.0.so" is not a GStreamer plugin
$ gst-inspect-1.0 /tmp/gst-interpipe/build/gst/interpipe/libgstinterpipes-1.0.so.1.0
Could not load plugin file: File "/tmp/gst-interpipe/build/gst/interpipe/libgstinterpipes-1.0.so.1.0" is not a GStreamer plugin

I built it with gstreamer 1.17.90 or system gstreamer 1.16.2, both yield same problem.
here is configure result:

The Meson build system
Version: 0.55.1
Source dir: /tmp/gst-interpipe
Build dir: /tmp/gst-interpipe/build
Build type: native build
Using 'PKG_CONFIG_PATH' from environment with value: '/data/gst-build/1.17/lib/pkgconfig'
Using 'PKG_CONFIG_PATH' from environment with value: '/data/gst-build/1.17/lib/pkgconfig'
Project name: gst-interpipes
Project version: 1.1.2
Using 'CC' from environment with value: 'clang-10'
Using 'CC' from environment with value: 'clang-10'
C compiler for the host machine: clang-10 (clang 10.0.1 "Ubuntu clang version 10.0.1-++20200708122807+ef32c611aa2-1~exp1~20200707223407.61 ")
C linker for the host machine: clang-10 ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (1.6.3)
Using 'PKG_CONFIG_PATH' from environment with value: '/data/gst-build/1.17/lib/pkgconfig'
Run-time dependency gstreamer-app-1.0 found: YES 1.17.90
Using 'PKG_CONFIG_PATH' from environment with value: '/data/gst-build/1.17/lib/pkgconfig'
Run-time dependency gstreamer-check-1.0 found: YES 1.17.90
Compiler for C supports arguments -Wmissing-declarations: YES 
Compiler for C supports arguments -Wmissing-prototypes: YES 
Compiler for C supports arguments -Wredundant-decls: YES 
Compiler for C supports arguments -Wundef: YES 
Compiler for C supports arguments -Wwrite-strings: YES 
Compiler for C supports arguments -Wformat: YES 
Compiler for C supports arguments -Wformat-nonliteral: YES 
Compiler for C supports arguments -Wformat-security: YES 
Compiler for C supports arguments -Wold-style-definition: YES 
Compiler for C supports arguments -Winit-self: YES 
Compiler for C supports arguments -Wmissing-include-dirs: YES 
Compiler for C supports arguments -Waddress: YES 
Compiler for C supports arguments -Waggregate-return: YES 
Compiler for C supports arguments -Wno-multichar: YES 
Compiler for C supports arguments -Wdeclaration-after-statement: YES 
Compiler for C supports arguments -Wvla: YES 
Compiler for C supports arguments -Wpointer-arith: YES 
Has header "dlfcn.h" : YES 
Has header "inttypes.h" : YES 
Has header "memory.h" : YES 
Has header "poll.h" : YES 
Has header "stdint.h" : YES 
Has header "stdlib.h" : YES 
Has header "stdio_ext.h" : YES 
Has header "strings.h" : YES 
Has header "string.h" : YES 
Has header "sys/param.h" : YES 
Has header "sys/poll.h" : YES 
Has header "sys/prctl.h" : YES 
Has header "sys/socket.h" : YES 
Has header "sys/stat.h" : YES 
Has header "sys/times.h" : YES 
Has header "sys/time.h" : YES 
Has header "sys/types.h" : YES 
Has header "sys/utsname.h" : YES 
Has header "sys/wait.h" : YES 
Has header "ucontext.h" : YES 
Has header "unistd.h" : YES 
Has header "valgrind/valgrind.h" : NO 
Has header "sys/resource.h" : YES 
Using 'PKG_CONFIG_PATH' from environment with value: '/data/gst-build/1.17/lib/pkgconfig'
Run-time dependency gstreamer-1.0 found: YES 1.17.90
Configuring version.entities using configuration
Configuring config.h using configuration
Build targets in project: 15

ldd looks fine:

$ ldd build/gst/interpipe/libgstinterpipes-1.0.so
        linux-vdso.so.1 (0x00007ffdf47e3000)
        libgstapp-1.0.so.0 => /data/gst-build/1.17/lib/libgstapp-1.0.so.0 (0x00007fee168df000)
        libgstbase-1.0.so.0 => /data/gst-build/1.17/lib/libgstbase-1.0.so.0 (0x00007fee1685a000)
        libgstreamer-1.0.so.0 => /data/gst-build/1.17/lib/libgstreamer-1.0.so.0 (0x00007fee16703000)
        libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fee16677000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fee1654e000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fee1635a000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fee16337000)
        libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fee16331000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fee161e2000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fee161dc000)
        libunwind.so.8 => /lib/x86_64-linux-gnu/libunwind.so.8 (0x00007fee161bf000)
        libdw.so.1 => /lib/x86_64-linux-gnu/libdw.so.1 (0x00007fee1615e000)
        libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007fee16152000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fee160df000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fee16905000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fee160b6000)
        libelf.so.1 => /lib/x86_64-linux-gnu/libelf.so.1 (0x00007fee1609a000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fee1607c000)
        libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fee16069000)

I set the GST_PLUGIN_PATH

echo $GST_PLUGIN_PATH
/tmp/gst-interpipe/build/gst/interpipe/

but gst-inspect show it is blacklisted:

Blacklisted files:
  libgstvalidatessim.so
  libgstinterpipes-1.0.so

Total count: 2 blacklisted files

$ gst-inspect-1.0 libgstinterpipes-1.0.so
Plugin Details:
  Name                     libgstinterpipes-1.0.so
  Description              Plugin for blacklisted file
  Filename                 /tmp/gst-interpipe/build/gst/interpipe/libgstinterpipes-1.0.so
  Version                  0.0.0
  License                  BLACKLIST
  Source module            BLACKLIST
  Binary package           BLACKLIST
  Origin URL               BLACKLIST


  0 features:

Capture interpipe with openCV

Hello RedgeRun Team,

i try to capture interpipes with openCV in Python.
In the following example code you can see how i try to get this work.
I use videotestsrc. To check if interpipes are working the videotestsrc first is displayed for 5 seconds in a xvimagesink.
After that i try to capture the appsink of a interpipe in cv.VideoCapture().

Example Code 1
#!/usr/bin/env python3
import cv2 as cv
import numpy as np
import time
from pygstc.gstc import *


# Create PipelineEntity object to manage each pipeline
class PipelineEntity(object):
    def __init__(self, client, name, description):
        self._name = name
        self._description = description
        self._client = client
        print("Creating pipeline: " + self._name)
        self._client.pipeline_create(self._name, self._description)
    def play(self):
        print("Playing pipeline: " + self._name)
        self._client.pipeline_play(self._name)
    def stop(self):
        print("Stopping pipeline: " + self._name)
        self._client.pipeline_stop(self._name)
    def delete(self):
        print("Deleting pipeline: " + self._name)
        self._client.pipeline_delete(self._name)
    def eos(self):
        print("Sending EOS to pipeline: " + self._name)
        self._client.event_eos(self._name)
    def set_file_location(self, location):
        print("Setting " + self._name + " pipeline recording/snapshot location to " + location);
        filesink_name = "filesink_" + self._name;
        self._client.element_set(self._name, filesink_name, 'location', location);
    def listen_to(self, sink):
        print(self._name + " pipeline listening to " + sink);
        self._client.element_set(self._name, self._name + '_src', 'listen-to', sink);

pipelines_base = []
pipelines_video_rec = []
pipelines_video_enc = []
pipelines_snap = []

# Create GstD Python client
client = GstdClient()


camera1 = PipelineEntity(client, 'camera1', 'videotestsrc ! queue ! interpipesink name=camera1 sync=true')
pipelines_base.append(camera1)


camera1_empty_pipe = PipelineEntity(client, 'camera1_empty_pipe', 'interpipesrc listen-to=camera1 ! videoconvert ! interpipesink name=camera1_empty_pipe')
pipelines_base.append(camera1_empty_pipe)


# Create display pipeline
display_pipe = PipelineEntity(client, 'display_pipe', 'interpipesrc listen-to="camera1_empty_pipe" ! xvimagesink')
pipelines_base.append(display_pipe)

#Create appsink pipeline
appsink_pipe = PipelineEntity(client, 'appsink_pipe', 'interpipesrc listen-to="camera1_empty_pipe" ! appsink')




# Play base pipelines
# appsink_pipe is not started here with base pipelines
for pipeline in pipelines_base:
    pipeline.play()

print("show display_pipe for 5 seconds in xvimagsink")
time.sleep(5)
print("go on and try to show appsink_pipe with openCV")
print("")




#try to start appsink_pipe without PipelineEntity class
play = client.pipeline_play('appsink_pipe')   

def preprocess(play):
    print("start capturing interpipe with cv.VideoCapture ")
    print(" ")
    # init video capture with appsink_pipe
    vod = cv.VideoCapture(play, cv.CAP_GSTREAMER)
   
    # read the first frame
    ret, frame = vod.read()
    
    # as long as frames are successfully read
    while ret:
        
        cv.imshow('Display Interpipe appsink', frame)

        k = cv.waitKey(1)
        # user Esc
        if k == 27:
            break

        # continue to next frame
        ret, frame = vod.read()

    # release the capture & destroy all windows
    vod.release()
    cv.destroyAllWindows()
    pipelines_base.append(appsink_pipe)
    for pipeline in pipelines_base:
    	pipeline.stop()
    for pipeline in pipelines_base:
    	pipeline.delete()
    
if __name__ == '__main__':

 
   preprocess(play)

Try to run this results the following errors

Console output errors for "Example Code 1"
Creating pipeline: camera1
Creating pipeline: camera1_empty_pipe
Creating pipeline: display_pipe
Creating pipeline: appsink_pipe
Playing pipeline: camera1
Playing pipeline: camera1_empty_pipe
Playing pipeline: display_pipe
show display_pipe for 5 seconds in xvimagsink
go on and try to show appsink_pipe with openCV

start capturing interpipe with cv.VideoCapture 
 
[ WARN:0] global /home/thomas/opencv/modules/videoio/src/cap_gstreamer.cpp (711) open OpenCV | GStreamer warning: Error opening bin: empty pipeline not allowed
[ WARN:0] global /home/thomas/opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Stopping pipeline: camera1
Stopping pipeline: camera1_empty_pipe
Stopping pipeline: display_pipe
Stopping pipeline: appsink_pipe
Deleting pipeline: camera1
Deleting pipeline: camera1_empty_pipe
Deleting pipeline: display_pipe
Deleting pipeline: appsink_pipe

I also tried to have the pipeline started with the PipelineEntity class directly out of cv.VideoCapture()

#Create appsink pipeline
appsink_pipe = PipelineEntity(client, 'appsink_pipe', 'interpipesrc listen-to="camera1_empty_pipe" ! appsink')

# init video capture with appsink_pipe
    vod = cv.VideoCapture(appsink_pipe, cv.CAP_GSTREAMER)
Example Code 2 (changed)
#!/usr/bin/env python3
import cv2 as cv
import numpy as np
import time
from pygstc.gstc import *


# Create PipelineEntity object to manage each pipeline
class PipelineEntity(object):
    def __init__(self, client, name, description):
        self._name = name
        self._description = description
        self._client = client
        print("Creating pipeline: " + self._name)
        self._client.pipeline_create(self._name, self._description)
    def play(self):
        print("Playing pipeline: " + self._name)
        self._client.pipeline_play(self._name)
    def stop(self):
        print("Stopping pipeline: " + self._name)
        self._client.pipeline_stop(self._name)
    def delete(self):
        print("Deleting pipeline: " + self._name)
        self._client.pipeline_delete(self._name)
    def eos(self):
        print("Sending EOS to pipeline: " + self._name)
        self._client.event_eos(self._name)
    def set_file_location(self, location):
        print("Setting " + self._name + " pipeline recording/snapshot location to " + location);
        filesink_name = "filesink_" + self._name;
        self._client.element_set(self._name, filesink_name, 'location', location);
    def listen_to(self, sink):
        print(self._name + " pipeline listening to " + sink);
        self._client.element_set(self._name, self._name + '_src', 'listen-to', sink);

pipelines_base = []
pipelines_video_rec = []
pipelines_video_enc = []
pipelines_snap = []

# Create GstD Python client
client = GstdClient()


camera1 = PipelineEntity(client, 'camera1', 'videotestsrc ! queue ! interpipesink name=camera1 sync=true')
pipelines_base.append(camera1)


camera1_empty_pipe = PipelineEntity(client, 'camera1_empty_pipe', 'interpipesrc listen-to=camera1 ! videoconvert ! interpipesink name=camera1_empty_pipe')
pipelines_base.append(camera1_empty_pipe)


# Create display pipeline
display_pipe = PipelineEntity(client, 'display_pipe', 'interpipesrc listen-to="camera1_empty_pipe" ! xvimagesink')
pipelines_base.append(display_pipe)

#Create appsink pipeline
appsink_pipe = PipelineEntity(client, 'appsink_pipe', 'interpipesrc listen-to="camera1_empty_pipe" ! appsink')




# Play base pipelines
# appsink_pipe is not started here with base pipelines
for pipeline in pipelines_base:
    pipeline.play()

print("show display_pipe for 5 seconds in xvimagsink")
time.sleep(5)
print("go on and try to show appsink_pipe with openCV")
print("")




#try to start appsink_pipe without PipelineEntity class
#play = client.pipeline_play('appsink_pipe')   


def preprocess(appsink_pipe):
    print("start capturing interpipe with cv.VideoCapture ")
    print(" ")
    # init video capture with appsink_pipe
    vod = cv.VideoCapture(appsink_pipe, cv.CAP_GSTREAMER)
   
    # read the first frame
    ret, frame = vod.read()
    
    # as long as frames are successfully read
    while ret:
        
        cv.imshow('Display Interpipe appsink', frame)

        k = cv.waitKey(1)
        # user Esc
        if k == 27:
            break

        # continue to next frame
        ret, frame = vod.read()

    # release the capture & destroy all windows
    vod.release()
    cv.destroyAllWindows()
    pipelines_base.append(appsink_pipe)
    for pipeline in pipelines_base:
    	pipeline.stop()
    for pipeline in pipelines_base:
    	pipeline.delete()
    

if __name__ == '__main__':

 
   preprocess(appsink_pipe)

This also doesn't work and brings the following console output.

Console output errors for "Example Code 2 (changed)"
Creating pipeline: camera1
Creating pipeline: camera1_empty_pipe
Creating pipeline: display_pipe
Creating pipeline: appsink_pipe
Playing pipeline: camera1
Playing pipeline: camera1_empty_pipe
Playing pipeline: display_pipe
show display_pipe for 5 seconds in xvimagsink
go on and try to show appsink_pipe with openCV

start capturing interpipe with cv.VideoCapture 
 
Traceback (most recent call last):
  File "/home/thomas/cam/gtc-2020-demo/python-example/Test5_cleanup1.py", line 115, in <module>
    preprocess(appsink_pipe)
  File "/home/thomas/cam/gtc-2020-demo/python-example/Test5_cleanup1.py", line 84, in preprocess
    vod = cv.VideoCapture(appsink_pipe, cv.CAP_GSTREAMER)
TypeError: an integer is required (got type PipelineEntity)

If someone wants to try this, you have to stop and delete the pipelines after running the changed python script. I use the following shell script to so this.
shell script to stop and delete pipelines
#!/bin/bash


gstd-client pipeline_stop camera1
gstd-client pipeline_stop camera1_empty_pipe
gstd-client pipeline_stop display_pipe
gstd-client pipeline_stop appsink_pipe

gstd-client pipeline_delete camera1
gstd-client pipeline_delete camera1_empty_pipe
gstd-client pipeline_delete display_pipe
gstd-client pipeline_delete appsink_pipe

This example codes are based on the gtc-2020-demo code from RidgeRun.

I hope that there is a solution for this and i am just trying it the wrong way.
It would be great to get this work with your help.
Last but not least, I would like to wish you all a Merry Christmas and a Happy New Year 2021!

failed two tests

tx2 jetpack 4.4

ubuntu 18.04

folowing tutorial
https://devblogs.nvidia.com/building-multi-camera-media-server-ai-processing-jetson/

install gstinterpipe

https://developer.ridgerun.com/wiki/index.php?title=GstInterpipe_-_Building_and_Installation_Guide

====================================================
GstInterpipe 1.1.1: tests/check/test-suite.log

TOTAL: 16

PASS: 14

SKIP: 0

XFAIL: 0

FAIL: 2

XPASS: 0

ERROR: 0

.. contents:: :depth: 2

FAIL: gst/test_enable_sync

Running suite(s): Interpipe
0%: Checks: 1, Failures: 1, Errors: 0
gst/test_enable_sync.c:71:F:interpipe_enable_sync:interpipe_enable_sync:0: Failure 'error' occurred
Check suite gst_interpipe ran in 0.009s (tests failed: 1)
FAIL gst/test_enable_sync (exit status: 1)

FAIL: gst/test_interpipe_synchronization

Running suite(s): Interpipe
0%: Checks: 1, Failures: 1, Errors: 0
gst/test_interpipe_synchronization.c:107:F:interpipe_synchronization:interpipe_synchronization:0: Failure 'buffer_timestamp2 < buffer_timestam$
Check suite gst_interpipe ran in 0.014s (tests failed: 1)
FAIL gst/test_interpipe_synchronization (exit status: 1)

What can i do to get these tests to pass?

regards

7 Tests fail on TX1, R28.1, gstreamer 1.8.3

I've just compiled on a TX1 and get 7 failing tests, similar to the other bug reports as shown below. Even with the failures Interpipes appear to work correctly with gstd-client and gstd.

$ uname -a
Linux mvpone 4.4.38-test #1 SMP PREEMPT Thu Nov 9 14:56:51 PST 2017 aarch64 aarch64 aarch64 GNU/Linux

$ gst-inspect-1.0 --version
gst-inspect-1.0 version 1.8.3
GStreamer 1.8.3

$ gst-inspect-1.0 interpipe
Plugin Details:
  Name                     interpipe
  Description              Elements to communicate buffers across pipelines
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/gstreamer-1.0/libgstinterpipe.so
  Version                  1.0.2
  License                  Proprietary
  Source module            gst-interpipe
  Binary package           GstInterpipe
  Origin URL               http://www.ridgerun.com

  interpipesink: Internal pipeline sink
  interpipesrc: Inter pipeline source

  2 features:
  +-- 2 elements

-----


PASS: gst/test_buffer_properties
PASS: gst/test_node_name_removed
PASS: gst/test_hot_plug
FAIL: gst/test_block_switch
FAIL: gst/test_allow_renegotiation_property
PASS: gst/test_get_caps
FAIL: gst/test_set_caps
FAIL: gst/test_caps_renegotiation
FAIL: gst/test_interpipe_synchronization
PASS: gst/test_anonymous_connection
FAIL: gst/test_reconfigure_event
PASS: gst/test_invalid_caps
PASS: gst/test_out_of_bounds_events
PASS: gst/test_in_bounds_events
PASS: gst/test_out_of_bounds_upstream_events
FAIL: gst/test_enable_sync

====================================================
   GstInterpipe 1.0.2: tests/check/test-suite.log
====================================================

# TOTAL: 16
# PASS:  9
# SKIP:  0
# XFAIL: 0
# FAIL:  7
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: gst/test_block_switch
===========================

Running suite(s): Interpipe


Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc:src> Sticky event misordering, got 'segment' before 'caps'


Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc:src> Sticky event misordering, got 'segment' before 'caps'
0%: Checks: 2, Failures: 2, Errors: 0
gstcheck.c:79:F:block_switch_on:interpipe_block_switch_on:0: Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc:src> Sticky event misordering, got 'segment' before 'caps'
gstcheck.c:79:F:block_switch_off:interpipe_block_switch_off:0: Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc:src> Sticky event misordering, got 'segment' before 'caps'
FAIL gst/test_block_switch (exit status: 2)

FAIL: gst/test_allow_renegotiation_property
===========================================

Running suite(s): Interpipe


Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc:src> Sticky event misordering, got 'segment' before 'caps'


Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc2:src> Sticky event misordering, got 'segment' before 'stream-start'
0%: Checks: 2, Failures: 2, Errors: 0
gstcheck.c:79:F:allow_renegotiation_on:interpipe_allow_renegotiation_on:0: Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc:src> Sticky event misordering, got 'segment' before 'caps'
gstcheck.c:79:F:allow_renegotiation_off:interpipe_allow_renegotiation_off:0: Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc2:src> Sticky event misordering, got 'segment' before 'stream-start'
FAIL gst/test_allow_renegotiation_property (exit status: 2)

FAIL: gst/test_set_caps
=======================

Running suite(s): Interpipe
0%: Checks: 1, Failures: 0, Errors: 1
gst/test_set_caps.c:67:E:set_caps:interpipe_set_caps:0: (after this point) Test timeout expired
FAIL gst/test_set_caps (exit status: 1)

FAIL: gst/test_caps_renegotiation
=================================

Running suite(s): Interpipe


Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc2:src> Sticky event misordering, got 'segment' before 'stream-start'
0%: Checks: 2, Failures: 2, Errors: 0
gst/test_caps_renegotiation.c:104:F:caps_renegotiation_intersection:interpipe_caps_renegotiation_intersection:0: Failure '!gst_caps_is_equal (caps1, caps2)' occurred
gstcheck.c:79:F:caps_renegotiation_no_intersection:interpipe_caps_renegotiation_no_intersection:0: Unexpected critical/warning: gstpad.c:5064:store_sticky_event:<intersrc2:src> Sticky event misordering, got 'segment' before 'stream-start'
FAIL gst/test_caps_renegotiation (exit status: 2)

FAIL: gst/test_interpipe_synchronization
========================================

Running suite(s): Interpipe
0%: Checks: 1, Failures: 1, Errors: 0
gst/test_interpipe_synchronization.c:108:F:interpipe_synchronization:interpipe_synchronization:0: Failure 'buffer_timestamp1 == 0' occurred
FAIL gst/test_interpipe_synchronization (exit status: 1)

FAIL: gst/test_reconfigure_event
================================

Running suite(s): Interpipe
0%: Checks: 1, Failures: 1, Errors: 0
gst/test_reconfigure_event.c:117:F:reconfigure_event:reconfigure_event:0: Failure '!gst_caps_is_equal (caps1, caps2)' occurred
FAIL gst/test_reconfigure_event (exit status: 1)

FAIL: gst/test_enable_sync
==========================

Running suite(s): Interpipe


Unexpected critical/warning: g_hash_table_foreach: assertion 'version == hash_table->version' failed
0%: Checks: 1, Failures: 1, Errors: 0
gstcheck.c:79:F:interpipe_enable_sync:interpipe_enable_sync:0: Unexpected critical/warning: g_hash_table_foreach: assertion 'version == hash_table->version' failed
FAIL gst/test_enable_sync (exit status: 1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.