rkximagesink

Nicolas Dufresne nicolas at ndufresne.ca
Wed Jan 25 15:23:06 UTC 2023


Hi,

Le mercredi 25 janvier 2023 à 21:56 +0800, James via gstreamer-devel a écrit :
> I'm trying to use hardware decoding and i'm confused. If anyone can point a way forward then thanks.
> (simplifed pipeline but the error is clear)
> 
> This pipeline works
> 
> gst-launch-1.0 -v -m videotestsrc ! rkximagesink

rkximagesink is not maintained by us, you may get better support through
rockchip github ?

> 
> This pipeline works on xvimagesink
> 
> gst-launch-1.0 -v v4l2src device=/dev/video1 ! image/jpeg,framerate=30/1 \
> 	! jpegdec ! \
>         videoconvert ! \
> 	queue ! \
> 	gdkpixbufoverlay location=rennisons.png alpha=0.5 offset-x=1800 offset-y=900 ! \
> 	clockoverlay halignment=left valignment=top draw-outline=true font-desc="Sans, 12" time-format="%d %b %Y %H:%M:%S" ! \
> 	textoverlay text="This is Line 1" deltay=50  halignment=left valignment=top font-desc="Sans, 10" ! \
> 	queue ! rkximagesink sync=false
> 
> but with rksimagesink
> 
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = image/jpeg, framerate=(fraction)30/1, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = image/jpeg, framerate=(fraction)30/1, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
> ... snip
> /GstPipeline:pipeline0/GstTextOverlay:textoverlay0.GstPad:video_sink: caps = video/x-raw, width=(int)1920, height=(int)1080, 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, framerate=(fraction)30/1, format=(string)NV12
> 
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
> Additional debug info:
> ../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> streaming stopped, reason error (-5)
> Execution ended after 0:00:00.350654417
> ERROR: from element /GstPipeline:pipeline0/GstQueue:queue0: Internal data stream error.
> Setting pipeline to NULL ...
> Additional debug info:
> ../plugins/elements/gstqueue.c(990): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0:
> streaming stopped, reason error (-5)
> Freeing pipeline ...

That element did not post an error, so we have no idea what happened. Try your
luck with GST_DEBUG=2 env, and reading the element code.

On generic linux, rendering on HW layers should be delegated to your Wayland
compositors. Support for this is improving all the time, by may or may not work
yet for you. We've had good success so far on RK3399 using weston and
waylandsink (or gtkwaylandsink). What rkvximagesink does is to cheat the drm
policy (driver hack), and combine xvimagesink and kmssink code to render to a HW
layer, by-passing the video server. Its a stop-gap solution, which worked though
last time I tried ;-D

regards,
Nicolas


More information about the gstreamer-devel mailing list