After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748809 - playbin: tries to plug videoconvert although GST_PLAY_FLAG_NATIVE_VIDEO flag is set
playbin: tries to plug videoconvert although GST_PLAY_FLAG_NATIVE_VIDEO flag ...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-02 20:47 UTC by Athanasios Oikonomou
Modified: 2018-11-03 11:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check if converter_caps has value before ref and merge (1.40 KB, patch)
2015-05-02 21:10 UTC, Athanasios Oikonomou
none Details | Review
Warn about No volume control only when flag GST_PLAY_FLAG_SOFT_VOLUME is set (877 bytes, patch)
2015-05-03 09:41 UTC, Athanasios Oikonomou
none Details | Review

Description Athanasios Oikonomou 2015-05-02 20:47:16 UTC
Testing latest HEAD of GStreamer with OpenPLi Enigma2 (framebuffer UI for embedded STB) we notice that some HLS streams return the following errors (and those errors did not exist in 1.4.5).

(gst-launch-1.0:2785): GStreamer-CRITICAL **: gst_mini_object_ref: assertion 'mini_object != NULL' failed
(gst-launch-1.0:2785): GStreamer-CRITICAL **: gst_caps_merge: assertion 'GST_IS_CAPS (caps2)' failed

A backtrace was created using G_DEBUG=fatal_warnings gst-launch-1.0 playbin uri=http://megahdlive1-f.akamaihd.net/i/live_1@105260/master.m3u8 and is available here (bt, bt full, thread apply all bt): http://pastebin.com/1TVPYChu

At first we identified that commit "h264parse: expose compatible profiles to downstream" http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/gst/videoparsers/gsth264parse.c?id=542c77ab3831388f162a78878ba8902cd5c4d9f9 introduced above error.

Further looking on the backtrace we found that responsible was "gst_play_sink_convert_bin_getcaps" http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/playback/gstplaysinkconvertbin.c?id=2434af3d31b544071543684867fdfcf3d254f3c0#n405

As suggested on the gstreamer irc channel after installing videoconvert the error on gst-launch gone away [although Enigma2 has limited resources and it should play video only using the hw sink (dvbmediasink)]. With videconvert installed Enigma2 UI was still getting the same error. So it was suggested to find what is the difference between gst-launch and Enigma2. 

The difference is the GST_PLAY_FLAG_NATIVE_VIDEO flag that Enigma2 uses. Running gst-launch with the same flags as Enigma2 the following appears:

GST_DEBUG=playsinkvideoconvert:6,playsinkconvertbin:4 gst-launch-1.0 playbin uri=http://megahdlive1-f.akamaihd.net/i/live_1@105260/master.m3u8
 flags=0x657
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:02.220740999  2803 0x75842090 DEBUG   playsinkvideoconvert gstplaysinkvideoconvert.c:55:gst_play_sink_video_convert_add_conversion_elements:<GstPlaySinkVideoConvert@0x74f0d270> Building video conversion with use-converters 0, use-balance 0
0:00:02.223045480  2803 0x75842090 INFO      playsinkconvertbin gstplaysinkconvertbin.c:555:gst_play_sink_convert_bin_cache_converter_caps:<GstPlaySinkVideoConvert@0x74f0d270> No conversion elements
0:00:02.223544554  2803 0x75842090 LOG     playsinkvideoconvert gstplaysinkvideoconvert.c:122:gst_play_sink_video_convert_set_property:<vconv> locking from thread 0x75842090
0:00:02.225476258  2803 0x75842090 LOG     playsinkvideoconvert gstplaysinkvideoconvert.c:122:gst_play_sink_video_convert_set_property:<vconv> locked from thread 0x75842090
0:00:02.225849518  2803 0x75842090 LOG     playsinkvideoconvert gstplaysinkvideoconvert.c:150:gst_play_sink_video_convert_set_property:<vconv> unlocking from thread 0x75842090
0:00:02.226183332  2803 0x75842090 LOG     playsinkvideoconvert gstplaysinkvideoconvert.c:122:gst_play_sink_video_convert_set_property:<vconv> locking from thread 0x75842090
0:00:02.226445184  2803 0x75842090 LOG     playsinkvideoconvert gstplaysinkvideoconvert.c:122:gst_play_sink_video_convert_set_property:<vconv> locked from thread 0x75842090
0:00:02.226782962  2803 0x75842090 DEBUG   playsinkvideoconvert gstplaysinkvideoconvert.c:144:gst_play_sink_video_convert_set_property:<vconv> Rebuilding converter bin
0:00:02.227041703  2803 0x75842090 DEBUG   playsinkvideoconvert gstplaysinkvideoconvert.c:55:gst_play_sink_video_convert_add_conversion_elements:<vconv> Building video conversion with use-converters 0, use-balance 1
0:00:02.227329628  2803 0x75842090 INFO      playsinkconvertbin gstplaysinkconvertbin.c:555:gst_play_sink_convert_bin_cache_converter_caps:<vconv> No conversion elements
0:00:02.227560702  2803 0x75842090 LOG     playsinkvideoconvert gstplaysinkvideoconvert.c:150:gst_play_sink_video_convert_set_property:<vconv> unlocking from thread 0x75842090
0:00:02.272502517  2803 0x75842090 INFO      playsinkconvertbin gstplaysinkconvertbin.c:555:gst_play_sink_convert_bin_cache_converter_caps:<GstPlaySinkAudioConvert@0x74f0d3c8> No conversion elements
0:00:02.393034592  2803 0x75842090 INFO      playsinkconvertbin gstplaysinkconvertbin.c:568:gst_play_sink_convert_bin_cache_converter_caps:<aconv> Converter caps: audio/x-raw, format=(string){ F32LE, F64LE, S32LE, S24LE, S16LE, S8 }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved; audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, channels=(int)[ 1, 2147483647 ]
0:00:02.399684703  2803 0x75842090 INFO      playsinkconvertbin gstplaysinkconvertbin.c:568:gst_play_sink_convert_bin_cache_converter_caps:<aconv> Converter caps: audio/x-raw, format=(string){ F32LE, F64LE, S32LE, S24LE, S16LE, S8 }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved; audio/x-raw, rate=(int)[ 1, 2147483647 ], layout=(string)interleaved, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, channels=(int)[ 1, 2147483647 ]
WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink: No volume control found
Additional debug info:
/opt/openpli/openpligst/build/tmp/work/mips32el-oe-linux/gstreamer1.0-plugins-base/1.4.5.26+gitAUTOINC+6af56187e8-r3/git/gst/playback/gstplaysink.c(2861): gen_audio_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink:
Volume/mute is not available

(gst-launch-1.0:2803): GStreamer-CRITICAL **: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(gst-launch-1.0:2803): GStreamer-CRITICAL **: gst_caps_merge: assertion 'GST_IS_CAPS (caps2)' failed

(gst-launch-1.0:2803): GStreamer-CRITICAL **: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(gst-launch-1.0:2803): GStreamer-CRITICAL **: gst_caps_merge: assertion 'GST_IS_CAPS (caps2)' failed
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...


It seems that playsinkvideoconvert tries to create video(convert|scale) element.

0:00:02.227041703  2803 0x75842090 DEBUG   playsinkvideoconvert gstplaysinkvideoconvert.c:55:gst_play_sink_video_convert_add_conversion_elements:<vconv> Building video conversion with use-converters 0, use-balance 1
..
0:00:02.272502517  2803 0x75842090 INFO      playsinkconvertbin gstplaysinkconvertbin.c:555:gst_play_sink_convert_bin_cache_converter_caps:<GstPlaySinkAudioConvert@0x74f0d3c8> No conversion elements


Adding a simple NULL check in gst_play_sink_convert_bin_getcaps makes the error go away.

diff --git a/gst/playback/gstplaysinkconvertbin.c b/gst/playback/gstplaysinkconvertbin.c
index 04fd4e9..36e6ef4 100644
--- a/gst/playback/gstplaysinkconvertbin.c
+++ b/gst/playback/gstplaysinkconvertbin.c
@@ -402,9 +402,11 @@ gst_play_sink_convert_bin_getcaps (GstPad * pad, GstCaps * filter)
             gst_caps_append_structure (downstream_filter, s);
           }
         }
-        downstream_filter =
-            gst_caps_merge (downstream_filter,
-            gst_caps_ref (self->converter_caps));
+        if (self->converter_caps) {
+          downstream_filter =
+              gst_caps_merge (downstream_filter,
+              gst_caps_ref (self->converter_caps));
+        }
       }

       peer_caps = gst_pad_query_caps (peer, downstream_filter);


Although the problem fix most probaly is to honor the GST_PLAY_FLAG_NATIVE_VIDEO flag and not try to create video(convert|scale) elements at all.
Comment 1 Athanasios Oikonomou 2015-05-02 21:10:55 UTC
Created attachment 302774 [details] [review]
check if converter_caps has value before ref and merge
Comment 2 Athanasios Oikonomou 2015-05-03 09:41:41 UTC
Created attachment 302792 [details] [review]
Warn about No volume control only when flag GST_PLAY_FLAG_SOFT_VOLUME is set

The following warning is displayed when playing anything with playbin although flag GST_PLAY_FLAG_SOFT_VOLUME is not set (hardware controls volume)! 

# gst-launch-1.0 playbin uri=... flags=0x47
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink: No volume control found
Additional debug info:
/opt/openpli/openpligst/build/tmp/work/mips32el-oe-linux/gstreamer1.0-plugins-base/1.4.5.26+gitAUTOINC+6af56187e8-r3/git/gst/playback/gstplaysink.c(2861): gen_audio_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink:
Volume/mute is not available
Prerolled, waiting for buffering to finish...

With the patch applied warning is displayed only when GST_PLAY_FLAG_SOFT_VOLUME is set.

# gst-launch-1.0 playbin uri=.. flags=0x47 (without GST_PLAY_FLAG_SOFT_VOLUE)
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Buffering, setting pipeline to PAUSED ...
Done buffering, setting pipeline to PLAYING ...

# gst-launch-1.0 playbin uri=.. flags=0x51 (without GST_PLAY_FLAG_SOFT_VOLUME)
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Buffering, setting pipeline to PAUSED ...
Done buffering, setting pipeline to PLAYING ...

# gst-launch-1.0 playbin uri=... flags=0x57 (without GST_PLAY_FLAG_SOFT_VOLUME)
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink: No volume control found
Additional debug info:
/opt/openpli/openpligst/build/tmp/work/mips32el-oe-linux/gstreamer1.0-plugins-base/1.4.5.27+gitAUTOINC+6af56187e8-r3/git/gst/playback/gstplaysink.c(2861): gen_audio_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink:
Volume/mute is not available
Prerolled, waiting for buffering to finish...
Pipeline is PREROLLED ...
Comment 3 GStreamer system administrator 2018-11-03 11:37:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/185.