Freescale / gstreamer-imx

GStreamer 1.0 plugins for i.MX platforms
Other
182 stars 127 forks source link

assertions from imxv4l2videosrc and h264 decode/encode #304

Closed hrc-amilcar closed 2 years ago

hrc-amilcar commented 2 years ago

Hello,

I have a pipeline that is reporting some assertions when connecting to the videorate plugin, imxvpudec_h264, and/or imxvpuenc_h264. I'm on a VAR-SOM-SOLO IMX6 and 2655bea for gstreamer-imx.

The video plays ok, but I wonder if there are any underlying issues or potential for crashes or leaks.

  1. videorate: The assert may be coming from a call to gst_buffer_pool_has_option on line 554 of gstimxv4l2videosrc.c. But perhaps the assert stems somewhere else in relation to videorate. Though I don't see a call to it in gstvideorate.c.
  2. h264: Not sure what is causing this one. Perhaps GstImxVpuEncH264. See object unref assert below.

(gst-launch-1.0:11207): GStreamer-CRITICAL : 18:31:45.840: gst_buffer_pool_has_option: assertion 'GST_IS_BUFFER_POOL (pool)' failed (gst-launch-1.0:11207): GStreamer-CRITICAL : 18:31:45.842: gst_object_unref: assertion 'object != NULL' failed

^Chandling interrupt. Interrupt: Stopping pipeline ... Execution ended after 0:00:07.400684667 Setting pipeline to NULL ... Freeing pipeline ...


- h264 test:

gst-launch-1.0 -v imxv4l2videosrc ! video/x-raw, width=640, height=480 ! imxvpuenc_h264 ! h264parse ! imxvpudec_h264 ! imxg2dvideosink

Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock /GstPipeline:pipeline0/GstImxV4L2VideoSrc:imxv4l2videosrc0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 [INFO] ringBufferEnable 0, chromaInterleave 0, mapType 0, linear2TiledEnable 1 [WARN] VPU iram is less than needed, some parts don't use iram /GstPipeline:pipeline0/GstImxVpuEncH264:imxvpuench264-0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1

(gst-launch-1.0:11218): GStreamer-CRITICAL **: 18:36:35.707: gst_object_unref: assertion 'object != NULL' failed

/GstPipeline:pipeline0/GstImxVpuEncH264:imxvpuench264-0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)4, profile=(string)constrained-baseline, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)4, profile=(string)constrained-baseline, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, parsed=(boolean)true [INFO] bitstreamMode 1, chromaInterleave 1, mapType 1, tiled2LinearEnable 0 /GstPipeline:pipeline0/GstImxVpuDecH264:imxvpudech264-0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)4, profile=(string)constrained-baseline, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, parsed=(boolean)true /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)4, profile=(string)constrained-baseline, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3, profile=(string)constrained-baseline, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true [INFO] bitstreamMode 1, chromaInterleave 1, mapType 1, tiled2LinearEnable 0 /GstPipeline:pipeline0/GstImxVpuDecH264:imxvpudech264-0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3, profile=(string)constrained-baseline, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true [WARN] VPU iram is less than needed, some parts don't use iram /GstPipeline:pipeline0/GstImxVpuDecH264:imxvpudech264-0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 /GstPipeline:pipeline0/GstImxG2DVideoSink:imxg2dvideosink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 ^Chandling interrupt. Interrupt: Stopping pipeline ... Execution ended after 0:00:03.867390334 Setting pipeline to NULL ... Freeing pipeline ...

dv1 commented 2 years ago

I added a fix for the first assertion (the one from imxv4l2videosrc). The cause was that gst_query_parse_nth_allocation_pool() returns a NULL buffer_pool. Fixed in 4a489e6da3cb88a3908bf0008e4443aa1bc41f2d . The second assertion is still WIP.

dv1 commented 2 years ago

Fixed second assertion. It had a similar cause (allocator can be NULL in the allocation params). Closing this now. Feel free to reopen if this still happens to you.