arm_multimedia: add kmssink support
PATCH v2 1/1 arm_multimedia: add kmssink support
- use kmssink as video sink for AM4 and AM6 SoCs
- cleanup indentations
Signed-off-by Eric Ruei <[email protected]>
--- .../arm_multimedia_h264dec/runH264Dec.sh | 15 ++++++- .../arm_multimedia_mpeg4aacdec/runMpeg4AacDec.sh | 52 +++++++++++++--------- .../arm_multimedia_mpeg4dec/runMpeg4Dec.sh | 13 +++++- 3 files changed, 55 insertions(+), 25 deletions(-)
multimedia_apps/arm_multimedia_h264dec/runH264Dec.sh +13 -2
@@ -1,7 +1,9 @@ #!/bin/sh machine_type="`cat /etc/hostname`" +platform="default" if [ "$machine_type" = "am335x-evm" ] || [ "$machine_type" = "am335x-hs-evm" ]; then + platform="am35xx" resolution="`fbset | awk '/geometry/ {print $2"x"$3}'`" if [ "$resolution" = "480x272" ]; then filename="/usr/share/ti/video/TearOfSteel-Short-400x240.264"
@@ -25,7 +27,8 @@ then fi elif [ "$machine_type" = "am65xx-evm" ] then - filename="/usr/share/ti/video/TearOfSteel-Short-1280x540.h264" + platform="am65xx" + filename="/usr/share/ti/video/TearOfSteel-Short-720x406.264" else default_display="`cat /sys/devices/platform/omapdss/manager0/display`" if [ "$default_display" = "dvi" ]; then
@@ -50,4 +53,12 @@ echo "" echo "Launch GStreamer pipeline" echo "" echo "Length of video clip: 21 seconds" -gst-launch-1.0 filesrc location=$filename ! queue ! h264parse ! avdec_h264 ! videoconvert ! fbdevsink device=/dev/fb0 +if [ "$platform" = "am35xx" ] +then + gst-launch-1.0 filesrc location=$filename ! queue ! h264parse ! avdec_h264 ! videoconvert ! fbdevsink device=/dev/fb0 +elif [ "$platform" = "am65xx" ] +then + gst-launch-1.0 filesrc location=$filename ! queue ! h264parse ! avdec_h264 ! videoconvert ! 'video/x-raw, format=(string)BGRA' ! kmssink +else + gst-launch-1.0 filesrc location=$filename ! queue ! h264parse ! avdec_h264 ! videoconvert ! kmssink +fi
multimedia_apps/arm_multimedia_mpeg4aacdec/runMpeg4AacDec.sh +31 -21
78 lines not on this page · raw message
multimedia_apps/arm_multimedia_mpeg4dec/runMpeg4Dec.sh +11 -2
@@ -1,7 +1,9 @@ #!/bin/sh machine_type="`cat /etc/hostname`" +platform="default" if [ "$machine_type" = "am335x-evm" ] || [ "$machine_type" = "am335x-hs-evm" ]; then + platform="am35xx" resolution="`fbset | awk '/geometry/ {print $2"x"$3}'`" if [ "$resolution" = "480x272" ]; then filename="/usr/share/ti/video/TearOfSteel-Short-400x240.m4v"
@@ -25,7 +27,8 @@ then fi elif [ "$machine_type" = "am65xx-evm" ] then - filename="/usr/share/ti/video/TearOfSteel-Short-1280x540.m4v" + platform="am65xx" + filename="/usr/share/ti/video/TearOfSteel-Short-720x406.m4v" else default_display="`cat /sys/devices/platform/omapdss/manager0/display`" if [ "$default_display" = "dvi" ]; then
@@ -46,4 +49,10 @@ if [ ! -f $filename ]; then echo "Video clip not found" exit 1 fi -gst-launch-1.0 playbin uri=file://$filename video-sink=fbdevsink audio-sink=fakesink +if [ "$platform" = "am35xx" ]; then + gst-launch-1.0 playbin uri=file://$filename video-sink=fbdevsink audio-sink=fakesink +elif [ "$platform" = "am65xx" ]; then + gst-launch-1.0 filesrc location=$filename ! queue ! qtdemux name=demux demux.video_0 ! queue ! avdec_mpeg4 ! videoconvert ! 'video/x-raw, format=(string)BGRA' ! kmssink +else + gst-launch-1.0 filesrc location=$filename ! queue ! qtdemux name=demux demux.video_0 ! queue ! avdec_mpeg4 ! videoconvert ! kmssink +fi
Signature · 1 line
1.9.1