GStreamer issueshttps://gitlab.freedesktop.org/groups/gstreamer/-/issues2020-10-07T09:59:04Zhttps://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/122Undefined symbol when loading plugin2020-10-07T09:59:04ZElie GénardUndefined symbol when loading pluginHello,
First of all thank you for your work on this project, being able to use GStreamer through Rust is just amazing!
I'm currently writing some custom plugins and I'm having an issue that I can't seem to debug myself.
I built my plugi...Hello,
First of all thank you for your work on this project, being able to use GStreamer through Rust is just amazing!
I'm currently writing some custom plugins and I'm having an issue that I can't seem to debug myself.
I built my plugin without any issue but it doesn't want to be loaded because of a missing symbol when I inspect it:
```
$ gst-inspect-1.0 ../target/debug/libgstgbt.so
(gst-inspect-1.0:134149): GStreamer-WARNING **: 19:48:02.112: Failed to load plugin '../target/debug/libgstgbt.so': ../target/debug/libgstgbt.so: undefined symbol: _ZN58_$LT$glib..value..GetError$u20$as$u20$core..fmt..Debug$GT$3fmt17h65361abc613071b3E
Could not load plugin file: Opening module failed: ../target/debug/libgstgbt.so: undefined symbol: _ZN58_$LT$glib..value..GetError$u20$as$u20$core..fmt..Debug$GT$3fmt17h65361abc613071b3E
```
Running `ldd` on the plugin gives me this, which seems normal:
```
$ ldd ../target/debug/libgstgbt.so
linux-vdso.so.1 (0x00007fff21b31000)
libgstmeta.so => $HOME/gbt/target/debug/libgstmeta.so (0x00007f2ffb08b000)
libstd-672309112770bee9.so => $HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-672309112770bee9.so (0x00007f2ffad99000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2ffab87000)
libgstvideo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0 (0x00007f2feb92d000)
libgstbase-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007f2feb8af000)
libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007f2feb768000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f2feb708000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f2feb5df000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2feb5ba000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2feb59f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2feb3ad000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2ffc1e1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2feb25e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2feb258000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2feb24b000)/lib/libgomp-75eea7e8.so.1 (0x00007f2feb026000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007f2feafa3000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f2feaf9d000)
libffi.so.7 => /usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007f2feaf91000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f2feaf1e000)
```
I don't know if that's relevant but I created a dynamic library with Meta APIs (`libgstmeta.so`) so I can share it between different plugins.
My guess is that it has to do with something I don't know about the way dynamic linking works.
Any tip about how to debug this would be highly appreciated :)https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/590gStreamer memory leak observed when restarting the pipeline multiple times2022-12-14T12:09:39ZSuraj Ketan SamalgStreamer memory leak observed when restarting the pipeline multiple timesHi,
I have a simple program which has the following pipeline:
rtspsrc ! decodebin ! videoconvert ! videorate ! appsink
The pipeline is started using gst_parse_launch(). For every input job received (new rtsp camera stream to be analyzed...Hi,
I have a simple program which has the following pipeline:
rtspsrc ! decodebin ! videoconvert ! videorate ! appsink
The pipeline is started using gst_parse_launch(). For every input job received (new rtsp camera stream to be analyzed), the pipeline is recreated and restarted and we read the input frames from the appsink. However, everytime the pipeline is restarted, the memory usage of the application shoots up. I have attached the sample program below.
[main2.cpp](/uploads/fea9504210ae027ff3cabb9f83431e73/main2.cpp)
[gstCapture.h](/uploads/0721f620975cb594f378ff2ef455aea3/gstCapture.h)
[gstCapture.cpp](/uploads/6c6b768dd13daf786da5331257763e13/gstCapture.cpp)
I have also tried to create the pipeline dynamically, i.e to create each element at run time and link them and making sure to free each and every gstreamer resource at the end, but the mem leak observed there is even more.
GStreamer and its plugin versions are : v1.17
OS: Ubuntu 18.04 x86_64
Thanks
Surajhttps://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/767multifilesink: add handling of seeking query2023-10-24T10:40:44ZApp Teammultifilesink: add handling of seeking queryFor a pipeline writing a playable file, we can use filesink as the pipeline's sink but obviously it would be nice if we could use multifilesink instead for its extra abilities.
The reason multifilesink can't be used currently is because ...For a pipeline writing a playable file, we can use filesink as the pipeline's sink but obviously it would be nice if we could use multifilesink instead for its extra abilities.
The reason multifilesink can't be used currently is because it doesnt handle the seeking query that an upstream element such as mp4mux(actually qtmux internally) sends to it and therefore there is an internal data stream error.https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/issues/54Build error: ninja msgfmt: cannot locate ITS rules for gst-devtools/debug-vie...2020-07-21T05:34:55ZSefa Nuri ÖdemişBuild error: ninja msgfmt: cannot locate ITS rules for gst-devtools/debug-viewer/poI run meson, then run ninja. Ninja compiles most of the way then fails once it reaches debug-viewer. AFAIK the reason is something is wrong or missing about **po or xml files.** This is the following problem I am encountering. I guess I ...I run meson, then run ninja. Ninja compiles most of the way then fails once it reaches debug-viewer. AFAIK the reason is something is wrong or missing about **po or xml files.** This is the following problem I am encountering. I guess I need something special for gettext?
```
[10/124] Generating org.freedesktop.GstDebugViewer.appdata.xml_subprojects@gst-devtools@debug-viewer_merge with a custom command.
FAILED: subprojects/gst-devtools/debug-viewer/org.freedesktop.GstDebugViewer.appdata.xml
"C:/Users/sefa/AppData/Roaming/Python/Python37/Scripts/meson" "--internal" "msgfmthelper" "../subprojects/gst-devtools/debug-viewer/org.freedesktop.GstDebugViewer.appdata.xml.in" "subprojects/gst-devtools/debug-viewer/org.freedesktop.GstDebugViewer.appdata.xml" "xml" "../subprojects/gst-devtools/debug-viewer/po"
msgfmt: cannot locate ITS rules for ../subprojects/gst-devtools/debug-viewer/org.freedesktop.GstDebugViewer.appdata.xml.in
[19/124] Compiling C object subprojects/gst-editing-services/ges/f71a697@@ges-1.0@sha/ges-audio-uri-source.c.obj.
ninja: build stopped: subcommand failed.
```
Here is the attached [meson-log.txt](/uploads/6c569e1e3383747dc302356627823942/meson-log.txt).https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/589Adding a new element2020-07-20T08:09:16ZApp TeamAdding a new elementHi, I would like to add a new element that i've written to the gstreamer library:
rabbitmqsrc - an element that receives data from a RabbitMQ server.
I tried finding online how to add an element to the gstreamer library but couldn't find...Hi, I would like to add a new element that i've written to the gstreamer library:
rabbitmqsrc - an element that receives data from a RabbitMQ server.
I tried finding online how to add an element to the gstreamer library but couldn't find much so i decide to open this issue hoping that someone will help me out here.
Would love to get someone's email to talk about the process!
thanks!https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1366waylandsink won't with tee in DMAbuf , assert in diposing of buffer2020-07-18T11:55:43ZRandy Liwaylandsink won't with tee in DMAbuf , assert in diposing of bufferI tried wl shm, it would work well as long as two waylandsink instance actually would a different buffer which is copied from the origin one.
But DMAbuf would lead
`ext/wayland/wlbuffer.c:152:gstbuffer_disposed: assertion failed: (!sel...I tried wl shm, it would work well as long as two waylandsink instance actually would a different buffer which is copied from the origin one.
But DMAbuf would lead
`ext/wayland/wlbuffer.c:152:gstbuffer_disposed: assertion failed: (!self->used_by_compositor)`https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/588info: Non-English characters could be broken on Windows2022-11-10T09:21:04ZSeungha Yangseungha@centricular.cominfo: Non-English characters could be broken on WindowsSee the title. At least I can see broken Korean strings.
Note that `g_print` family has a consideration for Windows code page but `gst_debug_log_default` doesn't (we use `fprintf` directly).See the title. At least I can see broken Korean strings.
Note that `g_print` family has a consideration for Windows code page but `gst_debug_log_default` doesn't (we use `fprintf` directly).https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/266vaapi: Cannot decode correctly for HEVC 8bit 422 (UYVY), VP9 (AYUV) & VP9 10-...2020-12-24T02:45:26ZHazwan Arif Mazlanvaapi: Cannot decode correctly for HEVC 8bit 422 (UYVY), VP9 (AYUV) & VP9 10-bit 444 (Y410)Format affected: HEVC 8bit 422 (UYVY), VP9 (AYUV) & VP9 10-bit 444 (Y410)
Platform: TGL
**Commit ID:**
Gstreamer: cecb29126331
GST plugin base: 93cb325fa133
GST plugin bad: 495ed45d056c
GST plugin good: 5a7275220bd1
GST plugin ug...Format affected: HEVC 8bit 422 (UYVY), VP9 (AYUV) & VP9 10-bit 444 (Y410)
Platform: TGL
**Commit ID:**
Gstreamer: cecb29126331
GST plugin base: 93cb325fa133
GST plugin bad: 495ed45d056c
GST plugin good: 5a7275220bd1
GST plugin ugly: de77207bfa57
Gstreamer Vaapi: b1832223ffb7
iHD/Media driver: 97e2ea997675
**AYUV**
Encode - gst-launch-1.0 filesrc location= /media/RAWS/test_03_640x480_AYUV.yuv ! videoparse width=640 height=480 format=vuya ! vaapivp9enc ! matroskamux ! filesink location=/tmp/GSTVAAPI_ENC-VP9-AYUV-VME-001_output.mkv
Decode - gst-launch-1.0 filesrc location=/tmp/GSTVAAPI_ENC-VP9-AYUV-VME-001_output.mkv ! matroskademux ! vaapivp9dec ! vaapipostproc ! glimagesink
**444 (Y410)**
Encode - gst-launch-1.0 -v filesrc location=/media/RAWS/test_03_640x480_Y410.yuv ! videoparse width=640 format=y410 height=480 ! vaapivp9enc ! matroskamux ! filesink location=/tmp/GSTVAAPI_ENC-VP9-10bit-Y410-VME-001_output.mkv
Decode - gst-launch-1.0 filesrc location=/tmp/GSTVAAPI_ENC-VP9-10bit-Y410-VME-001_output.mkv ! matroskademux ! vaapivp9dec ! vaapipostproc ! glimagesink
**422 (UYVY)**
Encode - gst-launch-1.0 filesrc location= /media/RAWS/UYVY_Prog_Packed_352x288.yuv ! videoparse width=352 height=288 format=uyvy ! vaapih265enc ! h265parse ! matroskamux ! filesink location=/tmp/UYVY_Prog_Packed_352x288.mkv
Decode - gst-launch-1.0 filesrc location=/tmp/UYVY_Prog_Packed_352x288.mkv ! matroskademux ! vaapih265dec ! vaapipostproc ! glimagesink
![screenshot-1](/uploads/d76e82493b6c0f025b860a80b3a256bd/screenshot-1.png)https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1362msdk: Unable to decode/render the encoded output of VP9 10-bit 444 (Y410)2020-07-20T01:12:29ZHazwan Arif Mazlanmsdk: Unable to decode/render the encoded output of VP9 10-bit 444 (Y410)**Commit IDs:**
Gstreamer: cecb29126331
GST plugin base: 93cb325fa133
GST plugin bad: 495ed45d056c
GST plugin good: 5a7275220bd1
GST plugin ugly: de77207bfa57
Platform: TGL
**GST commands**
Encode - gst-launch-1...**Commit IDs:**
Gstreamer: cecb29126331
GST plugin base: 93cb325fa133
GST plugin bad: 495ed45d056c
GST plugin good: 5a7275220bd1
GST plugin ugly: de77207bfa57
Platform: TGL
**GST commands**
Encode - gst-launch-1.0 filesrc location=/media/RAWS/test_03_640x480_Y410.yuv ! videoparse width=640 height=480 format=y410 ! msdkvp9enc ! filesink location=/tmp/test_03_640x480_Y410_GSTMSDK.vp9
Decode - gst-launch-1.0 filesrc location= /tmp/test_03_640x480_Y410_GSTMSDK.vp9 ! msdkvp9dec ! msdkvpp ! glimagesink
**Error message:**
*Setting pipeline to PAUSED ...
libva info: VA-API version 1.8.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
Pipeline is PREROLLING ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'msdkvpp0': gst.msdk.Context=context, gst.msdk.Context=(GstMsdkContext)"\(GstMsdkContext\)\ msdkcontext0";
0:00:00.081090430 6681 0x55bde65d8ed0 ERROR msdkdec gstmsdkdec.c:924:gst_msdkdec_negotiate:<msdkvp9dec0> Failed to re-negotiate
ERROR: from element /GstPipeline:pipeline0/GstMsdkVP9Dec:msdkvp9dec0: Could not negotiate the stream
Additional debug info:
../git/sys/msdk/gstmsdkdec.c(1068): gst_msdkdec_handle_frame (): /GstPipeline:pipeline0/GstMsdkVP9Dec:msdkvp9dec0
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data stream error.
Additional debug info:
../git/libs/gst/base/gstbasesrc.c(3070): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstMsdkVP9Dec:msdkvp9dec0: No valid frames decoded before end of stream
Additional debug info:
../git/gst-libs/gst/video/gstvideodecoder.c(1213): gst_video_decoder_sink_event_default (): /GstPipeline:pipeline0/GstMsdkVP9Dec:msdkvp9dec0:
no valid frames found
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...*https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1361Stream latency issue2020-07-15T13:28:34Zkaran tandelStream latency issueI have aPC application which receives Video stream using JPEG over RTP and also create webrtc audio call with Android application.
All this media pipeline is implemented using gstreamer.
But there is a strange issue running the applicat...I have aPC application which receives Video stream using JPEG over RTP and also create webrtc audio call with Android application.
All this media pipeline is implemented using gstreamer.
But there is a strange issue running the application:
when I get only JPEG stream on PC using this pipeline,
Android: udpsrc port=49199 buffer-size=100000 ! queue ! jpegparse ! tee name=t ! queue ! jpegdec ! videoconvert ! queue ! glimagesink qos=false sync=false t. ! queue ! rtpjpegpay ! udpsink host=pc_ip port=5000 sync=false
PC: udpsrc port=5000 ! rtpjitterbuffer ! rtpjpegdepay ! videoconvert ! queue ! autovideosink -v
For Audio Call:
Android : openslessrc ! queue ! audioconvert ! audioresample ! audiorate ! audio/x-raw,format=S16LE,channels=2,rate=48000 ! queue ! opusenc ! rtpopuspay ! queue ! wbebrtcbin,
PC: autoaudiosrc ! queue ! audioconvert ! audioresample ! audiorate ! audio/x-raw,format=S16LE,channels=2,rate=48000 ! queue ! opusenc ! rtpopuspay ! queue ! wbebrtcbin,
Both pipelines are working fine when I run only one application - either video streaming or audio call.
But when both run applications run together, I am receiving non consistent JPEG stream, and the stream is delayed version.
I have profiled application on both CPU and Android Side. At PC side the usage is 20% and Android Side 70%. Also I checked the network usage and it is spiking up.
Am I missing something in running pipeline?
Do you have any idea what the issue can be?https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/265Using gstreamer-vaapi API. Remove hidden visibility for functional.2020-08-03T14:56:38ZDmitry S.Using gstreamer-vaapi API. Remove hidden visibility for functional.Hello there,
In the problem I'm solving, I need to get a frame to process it. GstBuffer contains frame in VASurface type of memory. I would like to use the gstreamer-vaapi API to get VA display and VA surface_id from the GstBuffer’s met...Hello there,
In the problem I'm solving, I need to get a frame to process it. GstBuffer contains frame in VASurface type of memory. I would like to use the gstreamer-vaapi API to get VA display and VA surface_id from the GstBuffer’s metadata. The `gst_vaapi_video_meta_get_display()` and `gst_vaapi_surface_proxy_get_surface_id()` functions exist for this purpose, but unfortunately they are not available for calling from libgstvaapi.so because of the corresponding `G_GNUC_INTERNAL` macro.
Please tell me, is it possible to remove these qualifiers so that I can use the implemented functionality?https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/issues/109rtspclientsink does not support URI queries2023-10-17T17:33:56ZTobias Morellrtspclientsink does not support URI queriesThe `rtspclientsink` does not support queries, as it simply concatenates the `stream=X` onto the url.
## Steps to reproduce
Configure a `rtspclientsink` to use a location, which contains a query, e.g.
```
rtspclientsink location=rtsp:...The `rtspclientsink` does not support queries, as it simply concatenates the `stream=X` onto the url.
## Steps to reproduce
Configure a `rtspclientsink` to use a location, which contains a query, e.g.
```
rtspclientsink location=rtsp://127.0.0.1/test?filename=my_file.ts
```
The `rtspclientsink` will attempt to connect stream 0 to: `rtsp://127.0.0.1/test?filename=my_file.ts/stream=0`, rather than `rtsp://127.0.0.1/test/stream=0?filename=my_file.ts`.https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1360webrtcbin: datachannels critical error in 1.162023-05-16T04:12:49ZRazvan Grigorewebrtcbin: datachannels critical error in 1.16It seems the datachannel implementation in 1.16 works only one way, e.g. from python to browser but not the other way around.
Here is a stack trace from 1.16.2:
```
** (python3:20643): CRITICAL **: 21:14:54.492: _data_channel_have_sampl...It seems the datachannel implementation in 1.16 works only one way, e.g. from python to browser but not the other way around.
Here is a stack trace from 1.16.2:
```
** (python3:20643): CRITICAL **: 21:14:54.492: _data_channel_have_sample: assertion 'channel->sctp_transport != NULL' failed
Thread 62 "sctpdec1:src_1" received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x7f4e7fc1e0 (LWP 20720)]
__GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
50 in ../sysdeps/unix/sysv/linux/raise.c
(gdb) info stack
#0 __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x0000007fb61e0980 in g_logv () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#2 0x0000007fb61e0b50 in g_log () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#3 0x0000007fb53befec in _data_channel_have_sample (error=0x7f4e7fb348, sample=0xfccac0, channel=0x7f78018830) at webrtcdatachannel.c:587
#4 on_sink_sample (sink=<optimized out>, user_data=0x7f78018830) at webrtcdatachannel.c:701
#5 0x0000007fb5389f64 in gst_app_sink_render_common (psink=0x7f7801ba00, data=0x7f3c006a20, is_list=<optimized out>) at gstappsink.c:935
#6 0x0000007fb53330ec in () at /usr/lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#7 0x0000007fb5333e94 in () at /usr/lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#8 0x0000007fb549a208 in () at /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#9 0x0000007fb549be10 in () at /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#10 0x0000007fb54a3374 in gst_pad_push () at /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#11 0x0000007f981c2d38 in gst_sctp_data_srcpad_loop (pad=0x7f780161c0) at gstsctpdec.c:382
#12 0x0000007fb54d56fc in () at /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#13 0x0000007fb62038f8 in () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#14 0x0000007fb6202f64 in () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#15 0x0000007fb7e0a4fc in start_thread (arg=0x7f9affa59f) at pthread_create.c:477
#16 0x0000007fb7f05f2c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
(gdb)
```
For simple demo, I added https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/19https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/275Convenience function for creating GhostPads2020-07-21T07:53:11ZJan Alexander SteffensConvenience function for creating GhostPadsThe latest release removed the convenient `GhostPad::new(name, target)`, which has to be replaced with `GhostPad::builder(name, direction).build_with_target(target)`. It would be nice if it could be restored.
`GhostPad::new_no_target(na...The latest release removed the convenient `GhostPad::new(name, target)`, which has to be replaced with `GhostPad::builder(name, direction).build_with_target(target)`. It would be nice if it could be restored.
`GhostPad::new_no_target(name, direction)` was also removed, but `GhostPad::builder(name, direction).build()` is not as much added verbosity.https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/764qmlglsink ordering problem (with webrtc stream)2020-07-10T11:46:30Zdejan cotraqmlglsink ordering problem (with webrtc stream)I using: Ubuntu 20.4, Gstreamer 1.16.2 and QT 5.14.2 (https://download.qt.io/archive/qt/5.14/5.14.2/)
I installed all plugins and needed libraries with command:
sudo apt-get install -y gstreamer1.0-tools gstreamer1.0-nice gstreamer1.0-p...I using: Ubuntu 20.4, Gstreamer 1.16.2 and QT 5.14.2 (https://download.qt.io/archive/qt/5.14/5.14.2/)
I installed all plugins and needed libraries with command:
sudo apt-get install -y gstreamer1.0-tools gstreamer1.0-nice gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-plugins-good libgstreamer1.0-dev git libglib2.0-dev libgstreamer-plugins-bad1.0-dev libsoup2.4-dev libjson-glib-dev gstreamer1.0-libav
libgstqmlgl.so I build by my self (in attachment), steps:
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-good
cd ext/qt/
I changed qtplugin.pro set defines like: DEFINES += HAVE_QT_X11
and build
In attachment you can find also application, steps to run:
/opt/Qt5.14.2/5.14.2/gcc_64/bin/qmake
make
in browser open https://webrtc.nirbheek.in/ on page you will find ID
run app ./sample_app ID
function where incoming video stream is handled is handle_media_stream. If you use qmlsink as last element blackscreen appears
if last element in pipeline is glsinkbin than greenscreen appears (and sometimes incoming stream for split second)
aslo I used main_test.cpp to verify that qmlsink is working with some local mp4 file.
If you need something else @ystreet please let me know.
[sample_app.zip](/uploads/e6c951ebe448ce7fc7170df980053810/sample_app.zip)
Br,
Dejanhttps://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/763souphttpsrc: Fails to reconnect to live source2020-09-14T07:14:52Zgotsringsouphttpsrc: Fails to reconnect to live source~"1.16"
When viewing live MJPEG stream from IP camera, any break in communication with the camera causes souphttpsrc reconnect attempts to fail and stop the pipeline. This appears to be due to a request for a specific stream position, i...~"1.16"
When viewing live MJPEG stream from IP camera, any break in communication with the camera causes souphttpsrc reconnect attempts to fail and stop the pipeline. This appears to be due to a request for a specific stream position, i.e. to continue where the camera left off. This should not happen if `is-live` is set.
Pipeline used to test/log the issue (location URL is to local IP camera).
`gst-launch-1.0.exe --gst-debug=souphttpsrc:7 souphttpsrc location='http://192.168.10.100/mjpeg?res=half&fps=10&x0=0&y0=0&x1=960&y1=540' is-live=true retries=-1 ! queue ! decodebin ! d3dvideosink`
Relevant GStreamer output, log starts right before disconnecting CAT6. Trimmed log is attached, if needed.
[httpsrc.log](/uploads/026b4c174a26e0c0131b687eb1a90172/httpsrc.log)
```
0:00:34.180909200 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1836:gst_soup_http_src_create:<souphttpsrc0> Returning 0 ok
0:00:34.181173500 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1724:gst_soup_http_src_read_buffer:<souphttpsrc0> Read 2900 bytes from http input
0:00:34.181195200 9588 e11960 LOG souphttpsrc gstsouphttpsrc.c:1642:gst_soup_http_src_check_update_blocksize:<souphttpsrc0> Checking to update blocksize. Read: 2900 bytes, blocksize: 4096 bytes, time since last read: 0:00:00.000285000
0:00:34.181214400 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1836:gst_soup_http_src_create:<souphttpsrc0> Returning 0 ok
0:00:49.185736600 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1724:gst_soup_http_src_read_buffer:<souphttpsrc0> Read -1 bytes from http input
0:00:49.185772100 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1836:gst_soup_http_src_create:<souphttpsrc0> Returning -100 custom-error
0:00:49.185893800 9588 e11960 LOG souphttpsrc gstsouphttpsrc.c:1583:gst_soup_http_src_do_request:<souphttpsrc0> Running request for method: GET
0:01:06.526178200 9588 e11960 INFO souphttpsrc gstsouphttpsrc.c:1129:gst_soup_http_src_got_headers:<souphttpsrc0> got headers
0:01:06.526261200 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1836:gst_soup_http_src_create:<souphttpsrc0> Returning -100 custom-error
0:01:06.526282300 9588 e11960 LOG souphttpsrc gstsouphttpsrc.c:1583:gst_soup_http_src_do_request:<souphttpsrc0> Running request for method: GET
0:01:23.866718100 9588 e11960 INFO souphttpsrc gstsouphttpsrc.c:1129:gst_soup_http_src_got_headers:<souphttpsrc0> got headers
0:01:23.866804100 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1836:gst_soup_http_src_create:<souphttpsrc0> Returning -100 custom-error
0:01:23.866824000 9588 e11960 LOG souphttpsrc gstsouphttpsrc.c:1583:gst_soup_http_src_do_request:<souphttpsrc0> Running request for method: GET
0:01:26.210788100 9588 e11960 INFO souphttpsrc gstsouphttpsrc.c:1129:gst_soup_http_src_got_headers:<souphttpsrc0> got headers
0:01:26.210878100 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1270:gst_soup_http_src_got_headers:<souphttpsrc0> Content-Type: multipart/x-mixed-replace
0:01:26.210898300 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1556:gst_soup_http_src_send_message:<souphttpsrc0> Successfully got a reply
0:01:26.211036100 9588 e11960 WARN souphttpsrc gstsouphttpsrc.c:1615:gst_soup_http_src_do_request:<souphttpsrc0> error: Server does not support seeking.
0:01:26.211057000 9588 e11960 WARN souphttpsrc gstsouphttpsrc.c:1615:gst_soup_http_src_do_request:<souphttpsrc0> error: Server does not accept Range HTTP header, URL: http://192.168.18.101/mjpeg?res=half&fps=10&x0=0&y0=0&x1=960&y1=540, Redirect to: (NULL)
0:01:26.211098700 9588 e11960 DEBUG souphttpsrc gstsouphttpsrc.c:1836:gst_soup_http_src_create:<souphttpsrc0> Returning -5 error
ERROR: from element /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: Server does not support seeking.
Additional debug info:
../gst-plugins-good-1.16.2/ext/soup/gstsouphttpsrc.c(1615): gst_soup_http_src_do_request (): /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0:
Server does not accept Range HTTP header, URL: http://192.168.18.101/mjpeg?res=half&fps=10&x0=0&y0=0&x1=960&y1=540, Redirect to: (NULL)
Execution ended after 0:01:26.103642700
Setting pipeline to PAUSED ...
```
HTTP GET request during re-connection attempt from Wireshark capture. Contains Range field, which should not be included when `is-live=true`.
```
// Initial Connection
GET /mjpeg?res=half&fps=10&x0=0&y0=0&x1=960&y1=540 HTTP/1.1
Host: 192.168.18.101
User-Agent: GStreamer souphttpsrc 1.16.2 libsoup/2.70.0
icy-metadata: 1
Connection: Keep-Alive
...
// View from camera, then break in network communication (me removing CAT6 cable for a second)
...
// Reconnection GET attempt
GET /mjpeg?res=half&fps=10&x0=0&y0=0&x1=960&y1=540 HTTP/1.1
Host: 192.168.18.101
User-Agent: GStreamer souphttpsrc 1.16.2 libsoup/2.70.0
icy-metadata: 1
Connection: Keep-Alive
Range: bytes=3980361-
```https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/790videoconvert: New checks are too strict breaking padded allocation cases2020-07-09T20:58:11ZNicolas Dufresnevideoconvert: New checks are too strict breaking padded allocation casesPassing padded width/height is getting more and more common. This is achieve by giving padded width/height to the allocator, this was first used by the gstreamer-vaapi plugins. The side effect is that the VideoMeta represent the padded w...Passing padded width/height is getting more and more common. This is achieve by giving padded width/height to the allocator, this was first used by the gstreamer-vaapi plugins. The side effect is that the VideoMeta represent the padded width/height while the caps represent the display width/height. As this is just padding, element using VideoMeta should have to be aware hence should not fail on such a difference.
The following discussion from !696 should be addressed:
- [ ] @ndufresne started a [discussion](https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/696#note_564668):
> This check is too strict. In my case I got a in-frame that has display of 1920x1080, but has been allocated at 1920x1088, the converter should not be affected by this padding.Jan SchmidtJan Schmidthttps://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1358Not an issue, a question: Is GST passing any kind of status, like ICE negotia...2020-07-09T17:36:46ZNeil YoungNot an issue, a question: Is GST passing any kind of status, like ICE negotiation status?...preferably via the Python APIs?
TIA...preferably via the Python APIs?
TIAhttps://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1357waylandsink: wayland_threads example application segfault2022-11-10T15:55:29ZDamian Hobson-Garciadamian@hobsong.comwaylandsink: wayland_threads example application segfaultThe application (tests/examples/waylandsink/wayland-threads.c) crashes with a seg fault after a few seconds.
It looks like the failure happens after the pipeline(s) transition to NULL and back to PLAYING.
Looking at the valgrind log, ...The application (tests/examples/waylandsink/wayland-threads.c) crashes with a seg fault after a few seconds.
It looks like the failure happens after the pipeline(s) transition to NULL and back to PLAYING.
Looking at the valgrind log, it seems like one thread is trying to read from the `wl_display`’s event queue after it has been destroyed.
The valgrind log:
```
==23326== Memcheck, a memory error detector
==23326== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==23326== Using Valgrind-3.16.0.GIT and LibVEX; rerun with -h for copyright info
==23326== Command: ./wayland_threads
==23326== Parent PID: 22774
==23326==
==23326== Thread 4 GstWlDisplay:
==23326== Invalid read of size 8
==23326== at 0x4F99E1E: wl_display_read_events (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA4F3: gst_wl_display_thread_run (wldisplay.c:279)
==23326== by 0x4E89180: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6200.4)
==23326== by 0x52FB668: start_thread (pthread_create.c:479)
==23326== by 0x50C62B2: clone (clone.S:95)
==23326== Address 0x6ad40d0 is 0 bytes inside a block of size 24 free'd
==23326== at 0x4A3A078: free (vg_replace_malloc.c:538)
==23326== by 0x4F98CC0: wl_event_queue_destroy (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DF9F2F: gst_wl_display_finalize (wldisplay.c:118)
==23326== by 0x4F4FC0D: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.4)
==23326== by 0x4DF5832: gst_wayland_sink_change_state (gstwaylandsink.c:421)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== by 0x4CC9C30: gst_element_set_state_func (gstelement.c:3000)
==23326== by 0x4CC97C0: gst_element_set_state (gstelement.c:2901)
==23326== by 0x4C950FC: gst_bin_element_set_state (gstbin.c:2615)
==23326== by 0x4C96981: gst_bin_change_state_func (gstbin.c:2957)
==23326== by 0x4D03F38: gst_pipeline_change_state (gstpipeline.c:525)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== Block was alloc'd at
==23326== at 0x4A38ECB: malloc (vg_replace_malloc.c:307)
==23326== by 0x4F98CE7: wl_display_create_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA6E7: gst_wl_display_new_existing (wldisplay.c:323)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== by 0x4C9A2B1: gst_bin_handle_message_func (gstbin.c:4057)
==23326==
==23326== Invalid read of size 8
==23326== at 0x4F9CC14: wl_list_insert (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F99E2C: wl_display_read_events (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA4F3: gst_wl_display_thread_run (wldisplay.c:279)
==23326== by 0x4E89180: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6200.4)
==23326== by 0x52FB668: start_thread (pthread_create.c:479)
==23326== by 0x50C62B2: clone (clone.S:95)
==23326== Address 0x6ad40d8 is 8 bytes inside a block of size 24 free'd
==23326== at 0x4A3A078: free (vg_replace_malloc.c:538)
==23326== by 0x4F98CC0: wl_event_queue_destroy (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DF9F2F: gst_wl_display_finalize (wldisplay.c:118)
==23326== by 0x4F4FC0D: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.4)
==23326== by 0x4DF5832: gst_wayland_sink_change_state (gstwaylandsink.c:421)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== by 0x4CC9C30: gst_element_set_state_func (gstelement.c:3000)
==23326== by 0x4CC97C0: gst_element_set_state (gstelement.c:2901)
==23326== by 0x4C950FC: gst_bin_element_set_state (gstbin.c:2615)
==23326== by 0x4C96981: gst_bin_change_state_func (gstbin.c:2957)
==23326== by 0x4D03F38: gst_pipeline_change_state (gstpipeline.c:525)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== Block was alloc'd at
==23326== at 0x4A38ECB: malloc (vg_replace_malloc.c:307)
==23326== by 0x4F98CE7: wl_display_create_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA6E7: gst_wl_display_new_existing (wldisplay.c:323)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== by 0x4C9A2B1: gst_bin_handle_message_func (gstbin.c:4057)
==23326==
==23326== Invalid write of size 8
==23326== at 0x4F9CC1F: wl_list_insert (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F99E2C: wl_display_read_events (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA4F3: gst_wl_display_thread_run (wldisplay.c:279)
==23326== by 0x4E89180: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6200.4)
==23326== by 0x52FB668: start_thread (pthread_create.c:479)
==23326== by 0x50C62B2: clone (clone.S:95)
==23326== Address 0x6ad40d8 is 8 bytes inside a block of size 24 free'd
==23326== at 0x4A3A078: free (vg_replace_malloc.c:538)
==23326== by 0x4F98CC0: wl_event_queue_destroy (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DF9F2F: gst_wl_display_finalize (wldisplay.c:118)
==23326== by 0x4F4FC0D: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.4)
==23326== by 0x4DF5832: gst_wayland_sink_change_state (gstwaylandsink.c:421)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== by 0x4CC9C30: gst_element_set_state_func (gstelement.c:3000)
==23326== by 0x4CC97C0: gst_element_set_state (gstelement.c:2901)
==23326== by 0x4C950FC: gst_bin_element_set_state (gstbin.c:2615)
==23326== by 0x4C96981: gst_bin_change_state_func (gstbin.c:2957)
==23326== by 0x4D03F38: gst_pipeline_change_state (gstpipeline.c:525)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== Block was alloc'd at
==23326== at 0x4A38ECB: malloc (vg_replace_malloc.c:307)
==23326== by 0x4F98CE7: wl_display_create_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA6E7: gst_wl_display_new_existing (wldisplay.c:323)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== by 0x4C9A2B1: gst_bin_handle_message_func (gstbin.c:4057)
==23326==
==23326== Invalid write of size 8
==23326== at 0x4F9CC27: wl_list_insert (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F99E2C: wl_display_read_events (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA4F3: gst_wl_display_thread_run (wldisplay.c:279)
==23326== by 0x4E89180: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6200.4)
==23326== by 0x52FB668: start_thread (pthread_create.c:479)
==23326== by 0x50C62B2: clone (clone.S:95)
==23326== Address 0x6ad40d0 is 0 bytes inside a block of size 24 free'd
==23326== at 0x4A3A078: free (vg_replace_malloc.c:538)
==23326== by 0x4F98CC0: wl_event_queue_destroy (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DF9F2F: gst_wl_display_finalize (wldisplay.c:118)
==23326== by 0x4F4FC0D: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.4)
==23326== by 0x4DF5832: gst_wayland_sink_change_state (gstwaylandsink.c:421)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== by 0x4CC9C30: gst_element_set_state_func (gstelement.c:3000)
==23326== by 0x4CC97C0: gst_element_set_state (gstelement.c:2901)
==23326== by 0x4C950FC: gst_bin_element_set_state (gstbin.c:2615)
==23326== by 0x4C96981: gst_bin_change_state_func (gstbin.c:2957)
==23326== by 0x4D03F38: gst_pipeline_change_state (gstpipeline.c:525)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== Block was alloc'd at
==23326== at 0x4A38ECB: malloc (vg_replace_malloc.c:307)
==23326== by 0x4F98CE7: wl_display_create_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA6E7: gst_wl_display_new_existing (wldisplay.c:323)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== by 0x4C9A2B1: gst_bin_handle_message_func (gstbin.c:4057)
==23326==
==23326== Thread 1:
==23326== Invalid read of size 8
==23326== at 0x4F99E1E: wl_display_read_events (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F9A378: wl_display_dispatch_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F9A5DE: wl_display_roundtrip_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA761: gst_wl_display_new_existing (wldisplay.c:330)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== Address 0x72e58f0 is 0 bytes inside a block of size 24 free'd
==23326== at 0x4A3A078: free (vg_replace_malloc.c:538)
==23326== by 0x4F98CC0: wl_event_queue_destroy (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DF9F2F: gst_wl_display_finalize (wldisplay.c:118)
==23326== by 0x4F4FC0D: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.4)
==23326== by 0x4DF5832: gst_wayland_sink_change_state (gstwaylandsink.c:421)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== by 0x4CC9C30: gst_element_set_state_func (gstelement.c:3000)
==23326== by 0x4CC97C0: gst_element_set_state (gstelement.c:2901)
==23326== by 0x4C950FC: gst_bin_element_set_state (gstbin.c:2615)
==23326== by 0x4C96981: gst_bin_change_state_func (gstbin.c:2957)
==23326== by 0x4D03F38: gst_pipeline_change_state (gstpipeline.c:525)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== Block was alloc'd at
==23326== at 0x4A38ECB: malloc (vg_replace_malloc.c:307)
==23326== by 0x4F98CE7: wl_display_create_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA6E7: gst_wl_display_new_existing (wldisplay.c:323)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== by 0x4C9A2B1: gst_bin_handle_message_func (gstbin.c:4057)
==23326==
==23326== Invalid read of size 8
==23326== at 0x4F9CC14: wl_list_insert (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F99E2C: wl_display_read_events (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F9A378: wl_display_dispatch_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F9A5DE: wl_display_roundtrip_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA761: gst_wl_display_new_existing (wldisplay.c:330)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== Address 0x72e58f8 is 8 bytes inside a block of size 24 free'd
==23326== at 0x4A3A078: free (vg_replace_malloc.c:538)
==23326== by 0x4F98CC0: wl_event_queue_destroy (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DF9F2F: gst_wl_display_finalize (wldisplay.c:118)
==23326== by 0x4F4FC0D: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.4)
==23326== by 0x4DF5832: gst_wayland_sink_change_state (gstwaylandsink.c:421)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== by 0x4CC9C30: gst_element_set_state_func (gstelement.c:3000)
==23326== by 0x4CC97C0: gst_element_set_state (gstelement.c:2901)
==23326== by 0x4C950FC: gst_bin_element_set_state (gstbin.c:2615)
==23326== by 0x4C96981: gst_bin_change_state_func (gstbin.c:2957)
==23326== by 0x4D03F38: gst_pipeline_change_state (gstpipeline.c:525)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== Block was alloc'd at
==23326== at 0x4A38ECB: malloc (vg_replace_malloc.c:307)
==23326== by 0x4F98CE7: wl_display_create_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA6E7: gst_wl_display_new_existing (wldisplay.c:323)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== by 0x4C9A2B1: gst_bin_handle_message_func (gstbin.c:4057)
==23326==
==23326== Invalid write of size 8
==23326== at 0x4F9CC1F: wl_list_insert (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F99E2C: wl_display_read_events (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F9A378: wl_display_dispatch_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F9A5DE: wl_display_roundtrip_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA761: gst_wl_display_new_existing (wldisplay.c:330)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== Address 0x72e58f8 is 8 bytes inside a block of size 24 free'd
==23326== at 0x4A3A078: free (vg_replace_malloc.c:538)
==23326== by 0x4F98CC0: wl_event_queue_destroy (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DF9F2F: gst_wl_display_finalize (wldisplay.c:118)
==23326== by 0x4F4FC0D: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.4)
==23326== by 0x4DF5832: gst_wayland_sink_change_state (gstwaylandsink.c:421)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== by 0x4CC9C30: gst_element_set_state_func (gstelement.c:3000)
==23326== by 0x4CC97C0: gst_element_set_state (gstelement.c:2901)
==23326== by 0x4C950FC: gst_bin_element_set_state (gstbin.c:2615)
==23326== by 0x4C96981: gst_bin_change_state_func (gstbin.c:2957)
==23326== by 0x4D03F38: gst_pipeline_change_state (gstpipeline.c:525)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== Block was alloc'd at
==23326== at 0x4A38ECB: malloc (vg_replace_malloc.c:307)
==23326== by 0x4F98CE7: wl_display_create_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA6E7: gst_wl_display_new_existing (wldisplay.c:323)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== by 0x4C9A2B1: gst_bin_handle_message_func (gstbin.c:4057)
==23326==
==23326== Invalid write of size 8
==23326== at 0x4F9CC27: wl_list_insert (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F99E2C: wl_display_read_events (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F9A378: wl_display_dispatch_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4F9A5DE: wl_display_roundtrip_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA761: gst_wl_display_new_existing (wldisplay.c:330)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== Address 0x72e58f0 is 0 bytes inside a block of size 24 free'd
==23326== at 0x4A3A078: free (vg_replace_malloc.c:538)
==23326== by 0x4F98CC0: wl_event_queue_destroy (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DF9F2F: gst_wl_display_finalize (wldisplay.c:118)
==23326== by 0x4F4FC0D: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.4)
==23326== by 0x4DF5832: gst_wayland_sink_change_state (gstwaylandsink.c:421)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== by 0x4CC9C30: gst_element_set_state_func (gstelement.c:3000)
==23326== by 0x4CC97C0: gst_element_set_state (gstelement.c:2901)
==23326== by 0x4C950FC: gst_bin_element_set_state (gstbin.c:2615)
==23326== by 0x4C96981: gst_bin_change_state_func (gstbin.c:2957)
==23326== by 0x4D03F38: gst_pipeline_change_state (gstpipeline.c:525)
==23326== by 0x4CC9ED4: gst_element_change_state (gstelement.c:3046)
==23326== Block was alloc'd at
==23326== at 0x4A38ECB: malloc (vg_replace_malloc.c:307)
==23326== by 0x4F98CE7: wl_display_create_queue (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0)
==23326== by 0x4DFA6E7: gst_wl_display_new_existing (wldisplay.c:323)
==23326== by 0x4DF519E: gst_wayland_sink_set_display_from_context (gstwaylandsink.c:314)
==23326== by 0x4DF593A: gst_wayland_sink_set_context (gstwaylandsink.c:445)
==23326== by 0x4CCB978: gst_element_set_context (gstelement.c:3557)
==23326== by 0x10A9AE: bus_sync_handler (wayland-threads.c:82)
==23326== by 0x4CA654F: gst_bus_post (gstbus.c:359)
==23326== by 0x4CC75F6: gst_element_post_message_default (gstelement.c:2080)
==23326== by 0x4C962C0: gst_bin_post_message (gstbin.c:2815)
==23326== by 0x4CC78C1: gst_element_post_message (gstelement.c:2123)
==23326== by 0x4C9A2B1: gst_bin_handle_message_func (gstbin.c:4057)
```https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/274Help Wanted on Using a GValueArray with the Audioiirfilter Element2020-07-22T17:02:41ZMateus AminHelp Wanted on Using a GValueArray with the Audioiirfilter ElementI would like to make a GValueArray of GDouble in Rust to set the gStreamer element [property](https://gstreamer.freedesktop.org/documentation/audiofx/audioiirfilter.html?gi-language=c#properties). I would sincerely appreciate any help. I...I would like to make a GValueArray of GDouble in Rust to set the gStreamer element [property](https://gstreamer.freedesktop.org/documentation/audiofx/audioiirfilter.html?gi-language=c#properties). I would sincerely appreciate any help. I can do it in C as shown in the examples below.
<s> Currently, in rust I am stuck at trying to make GValue. </s>
Now stuck at the audioiirfilter.set_property("a", &a); call.
```rust
let mut gv: gobject_sys::GValue;
let v: Box<gobject_sys::GValue> = Box::new(gv);
let v: *mut gobject_sys::GValue = Box::into_raw(v);
gobject_sys::g_value_init(v, gobject_sys::G_TYPE_DOUBLE);
gobject_sys::g_value_set_double(v, 1.0);
let a = gobject_sys::g_value_array_new(2);
gobject_sys::g_value_array_append(a, v);
audioiirfilter.set_property("a", &a); #Error
```
```output
error[E0277]: the trait bound `*mut gobject_sys::GValueArray: glib::value::SetValue` is not satisfied
--> src/main.rs:64:38
|
64 | audioiirfilter.set_property("a", &a);
| ^^ the trait `glib::value::SetValue` is not implemented for `*mut gobject_sys::GValueArray`
|
= note: required because of the requirements on the impl of `glib::value::ToValue` for `*mut gobject_sys::GValueArray`
= note: required for the cast to the object type `dyn glib::value::ToValue`
```
Without context in C:
```c
GValueArray *va;
GValue v = {
0,
};
gdouble a_kernel[2];
a_kernel[0] = 1;
a_kernel[1] = -0.05095288;
va = g_value_array_new(1);
g_value_init(&v, G_TYPE_DOUBLE);
for (int i = 0; i < 2; i++)
{
g_value_set_double(&v, a_kernel[i]);
g_value_array_append(va, &v);
g_value_reset(&v);
}
```
With context in C:
```c
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <gst/gst.h>
int main(int argc, char *argv[])
{
GstElement *pipeline, *source, *sink, *audioiirfilter;
GstBus *bus;
GstMessage *msg;
GstStateChangeReturn ret;
/* Initialize GStreamer */
gst_init(&argc, &argv);
/* Create the elements */
source = gst_element_factory_make("audiotestsrc", "source");
sink = gst_element_factory_make("autoaudiosink", "sink");
audioiirfilter = gst_element_factory_make("audioiirfilter", "audioiirfilter");
/* Create the empty pipeline */
pipeline = gst_pipeline_new("test-pipeline");
if (!pipeline || !source || !sink)
{
g_printerr("Not all elements could be created.\n");
return -1;
}
/* Build the pipeline */
gst_bin_add_many(GST_BIN(pipeline), source, audioiirfilter, sink, NULL);
if (gst_element_link(source, audioiirfilter) != TRUE)
{
g_printerr("Elements could not be linked.\n");
gst_object_unref(pipeline);
return -1;
}
if (gst_element_link(audioiirfilter, sink) != TRUE)
{
g_printerr("Elements could not be linked.\n");
gst_object_unref(pipeline);
return -1;
}
GValueArray *va;
GValue v = {
0,
};
gdouble a_kernel[2];
a_kernel[0] = 1;
a_kernel[1] = -0.05095288;
va = g_value_array_new(1);
g_value_init(&v, G_TYPE_DOUBLE);
for (int i = 0; i < 2; i++)
{
g_value_set_double(&v, a_kernel[i]);
g_value_array_append(va, &v);
g_value_reset(&v);
}
g_object_set(audioiirfilter, "a", va, NULL);
g_value_array_free(va);
/* Start playing */
ret = gst_element_set_state(pipeline, GST_STATE_PLAYING);
if (ret == GST_STATE_CHANGE_FAILURE)
{
g_printerr("Unable to set the pipeline to the playing state.\n");
gst_object_unref(pipeline);
return -1;
}
/* Wait until error or EOS */
bus = gst_element_get_bus(pipeline);
msg = gst_bus_timed_pop_filtered(bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
/* Free resources */
gst_object_unref(bus);
gst_element_set_state(pipeline, GST_STATE_NULL);
gst_object_unref(pipeline);
return 0;
}
```
If you want to run. Paste the with context example to c.c and run the following after following setup guidelines for gstreamer:
```sh
gcc c.c -o c `pkg-config --cflags --libs gstreamer-1.0` && ./c
```