Embedded device and custom Gstreamer source

Nicolas Dufresne nicolas at ndufresne.ca
Fri Feb 22 18:42:13 UTC 2019


Le vendredi 22 février 2019 à 19:13 +0100, Duchassin Frederic a écrit :
> Hello,
> Yes, aiurdemux is ported on gstreamer1.0.
> On my imx8m, Tsdemux is not adviced  as it doesn't work very well. I always get glitches on my video sink using tsdemux.

You should clarify that you are likely using an ancient version of this
element (as provided by the HW vendor). This comment should not reflect
upstream status of tsdemux, and if it is, please file bugs for that.

regards,
Nicolas

> BR
> 
> Frédéric
> 
> Le 22/02/2019 à 15:28, Nicolas Dufresne a écrit :
> > 
> > Le ven. 22 févr. 2019 03 h 42, Duchassin Frederic <duchassin at sefram.fr> a écrit :
> > > Hello,
> > >  
> > > I try to make my own PCIE gstreamer source.
> > > My goal is to feed an mpeg2ts stream to gstreamer pipeline on my IMX8M som.(kernel 4.9.88)
> > > In order to do that, i've created my own source based on GstBaseSrc.
> > > On many stream i get no problem....but on others my pipeline doesn't want to work  and it seems that MPEG2 parser is the problem.
> > > This is the log of the failure :
> > > 
> > > > root at cl-som-imx8:/home/sefram/debug# gst-launch-1.0 pciesrc do-timestamp=false blocksize=4096 ! queue ! tee ! typefind ! aiurdemux
> > 
> > aiurdemux is the multicontainer demuxer by Freescale. I didn't know it was ported to 1.0. It is known to have all sort of small glitches. I would suggest to replace it by tsdemux. Same API to select the pid. This is the upstream demuxer.
> > 
> > Note that normally this type of HW is implemented as a V4L2 capture driver, and a source already exist, v4l2src. 
> > > > program-numberr=5901 name=d ! fakesink async=false
> > > > 0:00:00.409990158 13052       0x7f72d0 LOG                aiurdemux aiurdemux.c:478:gst_aiurdemux_init:<GstAiurDemux at 0x8202e0> gst_aiurdemux_init
> > > > Setting pipeline to PAUSED ...
> > > > 0:00:00.413664153 13052       0x7f72d0 LOG                aiurdemux aiurdemux.c:519:gst_aiurdemux_change_state:<d> change_state transition=a
> > > > 0:00:00.413973989 13052       0x7f72d0 DEBUG              aiurdemux aiurdemux.c:508:gst_aiurdemux_change_state:<d> change_state READY_TO_PAUSED
> > > > 0:00:00.414040469 13052       0x7f72d0 LOG                aiurdemux aiurdemux.c:894:aiurdemux_sink_activate:<d:sink> activating push
> > > > Pipeline is live and does not need PREROLL ...
> > > > Setting pipeline to PLAYING ...
> > > > 0:00:00.416130963 13052       0x7f72d0 LOG                aiurdemux aiurdemux.c:519:gst_aiurdemux_change_state:<d> change_state transition=1c
> > > > New clock: GstSystemClock
> > > > 0:00:00.417412908 13052       0x8124a0 LOG                aiurdemux aiurdemux.c:669:gst_aiurdemux_handle_sink_event:<d> gst_aiurdemux_handle_sink_event event=280e
> > > > 0:00:00.434010267 13052       0x8124a0 DEBUG              aiurdemux aiurdemux.c:1082:gst_aiurdemux_setcaps:<d> gst_aiurdemux_setcaps=video/mpegts, systemstream=(boolean)true, packetsize=(int)188
> > > > 
> > > > ====== AIUR: 4.3.5 build on Jan 21 2019 17:47:10. ======
> > > >         Core: BLN_MAD-MMLAYER_MPG2PARSER_04.05.16  build on Sep 14 2017 02:37:53
> > > >  file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm_elinux.so.3.1
> > > > 0:00:00.434538141 13052       0x8124a0 INFO               aiurdemux aiurdemux.c:1094:gst_aiurdemux_setcaps:<d> Container: MPEG
> > > > 0:00:00.434606900 13052       0x8124a0 DEBUG              aiurdemux aiurdemux.c:596:gst_aiurdemux_handle_sink_event:<d> handling new segment from0
> > > > 0:00:00.571159247 13052       0x812280 LOG                aiurdemux aiurdemux.c:1197:aiurdemux_loop_state_init:<d> aiurdemux_loop_state_init SUCCESS
> > > > 0:00:00.571239646 13052       0x812280 DEBUG              aiurdemux aiurdemux.c:1518:aiurdemux_set_readmode:<d> read mode = track mode
> > > > 0:00:00.571300125 13052       0x812280 LOG                aiurdemux aiurdemux.c:1979:aiurdemux_parse_streams:<d> aiurdemux_parse_streams ret=0
> > > > 0:00:00.571578522 13052       0x812280 LOG                aiurdemux aiurdemux.c:1308:aiurdemux_loop_state_header:<d> aiurdemux_loop_state_header SUCCESS
> > > > 0:00:00.571616321 13052       0x812280 LOG                aiurdemux aiurdemux.c:1313:aiurdemux_loop_state_header:<d> aiurdemux_loop_state_header FAILED
> > > > 0:00:00.571648601 13052       0x812280 LOG                aiurdemux aiurdemux.c:1061:aiurdemux_push_task:<d> pausing task, reason error
> > > > 
> > > > 0:00:00.571694320 13052       0x812280 WARN               aiurdemux aiurdemux.c:1068:aiurdemux_push_task:<d> error: streaming stopped, reason error, state 2
> > > > WARNING: from element /GstPipeline:pipeline0/GstAiurDemux:d: Delayed linking failed.
> > > > Additional debug info:
> > > > ../../../git/gst/parse/grammar.y(510): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstAiurDemux:d:
> > > > failed delayed linking some pad of GstAiurDemux named d to some pad of GstFakeSink named fakesink0
> > > > ERROR: from element /GstPipeline:pipeline0/GstAiurDemux:d: GStreamer encountered a general stream error.
> > > > Additional debug info:
> > > > ../../../git/plugins/aiurdemux/aiurdemux.c(1068): aiurdemux_push_task (): /GstPipeline:pipeline0/GstAiurDemux:d:
> > > > streaming stopped, reason error, state 2
> > > > Execution ended after 0:00:00.155683236
> > > > Setting pipeline to PAUSED ...
> > > > 0:00:00.572143715 13052       0x7f72d0 LOG                aiurdemux aiurdemux.c:519:gst_aiurdemux_change_state:<d> change_state transition=23
> > > > Setting pipeline to READY ...
> > > > 0:00:00.572622629 13052       0x7f72d0 LOG                aiurdemux aiurdemux.c:519:gst_aiurdemux_change_state:<d> change_state transition=1a
> > > > 0:00:01.571911494 13052       0x7f72d0 DEBUG              aiurdemux aiurdemux.c:528:gst_aiurdemux_change_state:<d> change_state PAUSED_TO_READY
> > > > Setting pipeline to NULL ...
> > > > 0:00:01.573297478 13052       0x7f72d0 LOG                aiurdemux aiurdemux.c:519:gst_aiurdemux_change_state:<d> change_state transition=11
> > > > Freeing pipeline ...
> > > > 0:00:01.573816591 13052       0x7f72d0 LOG                aiurdemux aiurdemux.c:486:gst_aiurdemux_finalize:<d> gst_aiurdemux_finalize
> > > 
> > >  
> > > I've recorder this stream . On this stream only program 5902 is working. Others programs gives errors.
> > > I just add that reading this file with "filesrc" gives no error on every programs (it just do many seek before decoding):
> > >  
> > > > root at cl-som-imx8:/home/sefram/debug# gst-launch-1.0 filesrc location=/home/sefram/TS/essai.ts ! queue ! tee ! typefind ! aiurdemux program-number=5901 name=d ! fakesink
> > > > 0:00:00.083554268 13082       0x66e460 LOG                aiurdemux aiurdemux.c:478:gst_aiurdemux_init:<GstAiurDemux at 0x670270> gst_aiurdemux_init
> > > > Setting pipeline to PAUSED ...
> > > > 0:00:00.086178037 13082       0x66e460 LOG                aiurdemux aiurdemux.c:519:gst_aiurdemux_change_state:<d> change_state transition=a
> > > > 0:00:00.086412994 13082       0x66e460 DEBUG              aiurdemux aiurdemux.c:508:gst_aiurdemux_change_state:<d> change_state READY_TO_PAUSED
> > > > 0:00:00.086458473 13082       0x66e460 LOG                aiurdemux aiurdemux.c:894:aiurdemux_sink_activate:<d:sink> activating push
> > > > Pipeline is PREROLLING ...
> > > > 0:00:00.093662346 13082       0x654cf0 LOG                aiurdemux aiurdemux.c:669:gst_aiurdemux_handle_sink_event:<d> gst_aiurdemux_handle_sink_event event=280e
> > > > 0:00:00.108879842 13082       0x654cf0 DEBUG              aiurdemux aiurdemux.c:1082:gst_aiurdemux_setcaps:<d> gst_aiurdemux_setcaps=video/mpegts, systemstream=(boolean)true, packetsize=(int)188
> > > > 
> > > > ====== AIUR: 4.3.5 build on Jan 21 2019 17:47:10. ======
> > > >         Core: BLN_MAD-MMLAYER_MPG2PARSER_04.05.16  build on Sep 14 2017 02:37:53
> > > >  file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm_elinux.so.3.1
> > > > 0:00:00.109289877 13082       0x654cf0 INFO               aiurdemux aiurdemux.c:1094:gst_aiurdemux_setcaps:<d> Container: MPEG
> > > > 0:00:00.109348556 13082       0x654cf0 DEBUG              aiurdemux aiurdemux.c:608:gst_aiurdemux_handle_sink_event:<d> Pushing newseg  rate 1, format 3, start 0:00:00.000000000, stop 99:99:99.999999999
> > > > 0:00:00.109487395 13082       0x654a30 DEBUG              aiurdemux aiurcontent.c:576:aiurcontent_query_content_info: can not mkdir /home/root/.aiur
> > > > 0:00:00.132204560 13082       0x654a30 DEBUG              aiurdemux aiurcontent.c:351:aiurcontent_callback_seek_push: seek to 0
> > > > 0:00:00.132278479 13082       0x654a30 DEBUG              aiurdemux aiurstreamcache.c:340:gst_aiur_stream_cache_seek: Flush cache, backward seek addr 0, cachestart 2814646, offset 200010
> > > > 0:00:00.132311118 13082       0x654a30 INFO               aiurdemux aiurstreamcache.c:365:gst_aiur_stream_cache_seek: stream cache try seek to 0
> > > > 0:00:01.133119765 13082       0x654cf0 DEBUG              aiurdemux aiurdemux.c:608:gst_aiurdemux_handle_sink_event:<d> Pushing newseg  rate 1, format 3, start 0:00:00.000000000, stop 99:99:99.999999999
> > > > 0:00:01.179763321 13082       0x654a30 DEBUG              aiurdemux aiurcontent.c:351:aiurcontent_callback_seek_push: seek to 0
> > > > 0:00:01.179851879 13082       0x654a30 DEBUG              aiurdemux aiurstreamcache.c:340:gst_aiur_stream_cache_seek: Flush cache, backward seek addr 0, cachestart 3666614, offset 200010
> > > > 0:00:01.179895199 13082       0x654a30 INFO               aiurdemux aiurstreamcache.c:365:gst_aiur_stream_cache_seek: stream cache try seek to 0
> > > > 0:00:02.180303771 13082       0x654cf0 DEBUG              aiurdemux aiurdemux.c:608:gst_aiurdemux_handle_sink_event:<d> Pushing newseg  rate 1, format 3, start 0:00:00.000000000, stop 99:99:99.999999999
> > > > 0:00:02.182863220 13082       0x654a30 DEBUG              aiurdemux aiurcontent.c:351:aiurcontent_callback_seek_push: seek to 130314240
> > > > 0:00:02.182958379 13082       0x654a30 INFO               aiurdemux aiurstreamcache.c:365:gst_aiur_stream_cache_seek: stream cache try seek to 130314240
> > > > 0:00:02.183825128 13082       0x654cf0 DEBUG              aiurdemux aiurdemux.c:608:gst_aiurdemux_handle_sink_event:<d> Pushing newseg  rate 1, format 3, start 0:00:00.130314240, stop 99:99:99.999999999
> > > > 0:00:02.185594987 13082       0x654a30 DEBUG              aiurdemux aiurcontent.c:351:aiurcontent_callback_seek_push: seek to 130052096
> > > > 0:00:02.185642026 13082       0x654a30 DEBUG              aiurdemux aiurstreamcache.c:340:gst_aiur_stream_cache_seek: Flush cache, backward seek addr 130052096, cachestart 130314240, offset 131072
> > > > 0:00:02.185683666 13082       0x654a30 INFO               aiurdemux aiurstreamcache.c:365:gst_aiur_stream_cache_seek: stream cache try seek to 130052096
> > > > 0:00:02.186139900 13082       0x654cf0 DEBUG              aiurdemux aiurdemux.c:608:gst_aiurdemux_handle_sink_event:<d> Pushing newseg  rate 1, format 3, start 0:00:00.130052096, stop 99:99:99.999999999
> > > > 0:00:02.192078748 13082       0x654a30 DEBUG              aiurdemux aiurcontent.c:351:aiurcontent_callback_seek_push: seek to 0
> > > > 0:00:02.192145227 13082       0x654a30 DEBUG              aiurdemux aiurstreamcache.c:340:gst_aiur_stream_cache_seek: Flush cache, backward seek addr 0, cachestart
> > > 
> > >  
> > > I hope somebody could help me because i don't really understand the problem. My custom plugin should be bad...I can send my source code if someone can look at it.
> > >  
> > > BR
> > >  
> > > Frédéric
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > gstreamer-devel at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> > 
> > 
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190222/2157b2cb/attachment.sig>


More information about the gstreamer-devel mailing list