Crash when trying to stop pipeline containing encodebin
Michael Guinzbourg
mguinzbourg at gmail.com
Wed May 11 06:07:07 UTC 2016
I've set GST_DEBUG to "encodebin:6". I've got all kinds of all good info
during encodebin initialization (I will copy it below my report). All the
debug messages were posted before pipeline started to run and there was
absolutely nothing until the sudden crash at the bold line in my code
below. The piece of code that produces the crash is here (in the bus
callback):
case GST_MESSAGE_EOS:
g_print("EOS received on OBJ NAME
%s\n",GST_OBJECT_NAME(msg->src));
*gst_element_set_state (pipeline, GST_STATE_READY);*
gst_element_set_state (pipeline, GST_STATE_PLAYING);
break;
If I change my encoding to H264 - this code runs normally and restart the
pipeline without any problem.
Below is the debug output - there's nothing at all after the pipeline
starts running.
Again, if I replace *gst_element_set_state (pipeline, GST_STATE_READY);*
line with *gst_element_set_state (<element_name>, GST_STATE_READY); *where
<element_name> is any element except for encodebin then gstreamer doesn't
crash. It only crashes when I command the pipeline or encodebin to stop. It
looks to me that gstreamer crashes when I try to bring encodebin to the
stopped state, which is something to do with inability to sync the
encodebin clock with the rest of the pipeline.
Below is the copy of the debug output.
Encoding parameters
Container format : MPEG-2 Transport Stream (video/mpegts,
systemstream=(boolea
n)true, packetsize=(int)188)
Video format : MPEG-2 Video (video/mpeg, mpegversion=(int)2,
systemstream=(boo
lean)false, bitrate=(int)3000000)
Audio format : MPEG-4 AAC (audio/mpeg, mpegversion=(int)4,
rate=(int)16000, bi
trate=(int)192)
0:00:01.290090655 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:2277:plugin_init: binding text domain gst-plugins-base-1.0 to locale
dir /c
/gstreamer/1.0/x86_64/share/locale
0:00:01.292118751 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:2191:gst_encode_bin_set_profile:<encodebin0> profile
(0000000001C61660) : t
est-application-profile
0:00:01.292836790 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:2172:gst_encode_bin_setup_profile: Setting up profile
0000000001C61660:test
-application-profile (type:container)
0:00:01.293517955 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1871:create_elements_and_pads: Current profile :
test-application-profile
0:00:01.294195067 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1799:_get_muxer: Getting list of muxers for format video/mpegts,
systemstre
am=(boolean)true, packetsize=(int)188
0:00:01.295206481 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1826:_get_muxer: Trying muxer mpegtsmux
0:00:01.297157181 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:905:_create_element_and_set_preset: Creating element from factory
mpegtsmux
(preset factory name: (null) preset name: (null))
0:00:01.302493849 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1903:create_elements_and_pads: Trying stream profile with presence 1
0:00:01.303809984 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1200:_create_stream_group: Creating group. format video/mpeg,
mpegversion=(
int)2, systemstream=(boolean)false, for caps (NULL)
0:00:01.305385051 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1201:_create_stream_group: avoid_reencoding:0
0:00:01.307263218 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1730:_get_formatter: Getting list of formatters for format video/mpeg,
mpeg
version=(int)2, systemstream=(boolean)false
0:00:01.308975247 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1269:_create_stream_group: Adding output capsfilter for video/mpeg,
mpegver
sion=(int)2, systemstream=(boolean)false
0:00:01.310349327 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:863:_get_parser: Getting list of parsers for format video/mpeg,
mpegversion
=(int)2, systemstream=(boolean)false
0:00:01.316105392 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1283:_create_stream_group: Got a parser mpegvparse0
0:00:01.318034210 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1325:_create_stream_group: Adding ghost pad video_0
0:00:01.319327248 1764 0000000002C2F600 LOG encodebin
gstencodeb
in.c:1379:_create_stream_group: Adding encoder
0:00:01.320683094 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:946:_get_encoder: Getting list of encoders for format video/mpeg,
mpegversi
on=(int)2, systemstream=(boolean)false
0:00:01.323295508 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:905:_create_element_and_set_preset: Creating element from factory
avenc_mpe
g2video (preset factory name: customMpeg2videoPreset preset name: (null))
0:00:01.325417614 1764 0000000002C2F600 LOG encodebin
gstencodeb
in.c:1408:_create_stream_group: Adding capsfilter for restriction caps :
(NULL)
0:00:01.326664052 1764 0000000002C2F600 LOG encodebin
gstencodeb
in.c:1440:_create_stream_group: Adding conversion elements for video stream
0:00:01.331920082 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1559:_create_stream_group: Adding ghostpad '':video_0
0:00:01.333334684 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1566:_create_stream_group: Done creating elements, adding StreamGroup
to ou
r controlled stream list
0:00:01.334781298 1764 0000000002C2F600 DEBUG encodebin
gstencodeb
in.c:1903:create_elements_and_pads: Trying stream profile with presence 0
Running...
Received new pad 'src_0' from 'source':
Link succeeded (type 'video/x-raw').
EOS received on OBJ NAME test-pipeline
On 11 May 2016 at 01:43, Sebastian Dröge <sebastian at centricular.com> wrote:
> On Di, 2016-05-10 at 22:02 -0400, Chuck Crisler wrote:
> > I can't answer your questions but I can offer some direction. Get a
> > detailed GStreamer log (debug level 5 or 6) and a backtrace when it
> > crashes. I am out of date on Windows so I can't offer advice on how
> > to get the GStreamer log, but you can find the answer with Google.
>
> You just set GST_DEBUG=6 in the environment like on other platforms, or
> call gst_debug_set_default_threshold(6) in your code.
>
> For getting a backtrace you will have to run your application in gdb
> and make it crash. You can get gdb binaries from here:
>
> https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160511/827f2f61/attachment.html>
More information about the gstreamer-devel
mailing list