Hope the following information is helpful to you.
mfw_isink plugin for gstreamer is a IPU lib based sink element which provides multi-overlay support of video playback. It means several video playback can run the same time on the same display device or different one, eg. DVI and/or TV and DVI and/or WVGA* , each video can setting the display windows size and position. Currently, mfw_isink plugin is only available on i.MX51 and i.MX53 platform.
NOTE
Default setting for mfw_isink is DVI and TV, if you want use DVI and WVGA please replace vssconfig with vssconfig.div_wvga under /usr/share directory.
Each mfw_isink supports 2 configs for the same input video. It can also construct more gstreamer pipelines with mfw_isink to support different video playback contents.
In multi-overlay case, the video maybe not be smoothly due to performance limitation. Generally, i.MX51/ i.MX53 can support 2-way D1 resolution video playback smoothly.
How to use mfw_isink
As a standard gstreamer plugin, gst-launch tool and gstreamer-based application (like totem) can use mfw_isink as video sink element.
Since mfw_isink need access IPU and framebuffer devices, please use as root user or run following command in a terminal window to change corresponding device permission. chmod 666 /dev/mxc_ipu /dev/fb0 /dev/fb1 /dev/fb2 /sys/class/graphics/fb1/mode /sys/class/graphics/fb1/pan /sys/class/graphics/fb2/pan
mfw_isink default use fb2 as display frame buffer on LCD. Since fb2 is default invisible, Please run following command in a terminal window to enable mfw_isink local alpha feature when use mfw_isink with gst-launch "export VSALPHA=1"
A.1.1 gst-launch
The following command illustrates a complete pipe to playback an avi file by mfw_isink as a video sink element with advanced property settings. It will playback video on LCD and video position start at (100, 100) with window size 640x480. gst-launch filesrc location=test.avi typefind=true ! aiurdemux ! mfw_vpudecoder ! mfw_isink axis-top=100 axis-left=100 disp-width=640 disp-height=480
or gst-launch playbin2 uri=file:///test.avi video-sink=”mfw_isink axis-top=100 axis-left=100 disp-width=640 disp-height=480”
mfw_isink also support other properties for display settings. Please use gst-inspect mfw_isink
to get detail support property list
Following are the detailed information of some of the properties
display: set display device(name) for config 0 (Setting for DVI and TV case is “DVI” or “TV”, please refer vssconfig file under /usr/share for detail output device name).
axis-top: y position for top-left corner of video window in pixel for config 0
axis-left: x position for top-left corner of video window in pixel for config 0
disp-width: width of display window in pixel for config 0
disp-height: height of display window in pixel for config 0
mode: display mode for config 0(available value please refer “mode” section in vssconfig file under /usr/share)
display-1: set display device(name) for config 1 (Setting for DVI and TV case is “DVI” or “TV”, please refer vssconfig file under /usr/share for detail output device name).
axis-top-1: y position for top-left corner of video window in pixel for config 1
axis-left-1: x position for top-left corner of video window in pixel for config 1
disp-width-1: width of display window in pixel for config 1
disp-height-1: height of display window in pixel for config 1
mode-1: display mode for config 1(available value please refer “mode” section in vssconfig file under /usr/share)
Run the several gst-launch command with mfw_isink will show several videos.
Following command illustrate some cases
Playback one video in same display, PIP gst-launch playbin2 uri=file:///1.avi video-sink=”mfw_isink display=DVI display-1=DVI axis-top=100 axis-left=100 disp-width=640 disp-height=480”
Playback two videos in two displays gst-launch playbin2 uri=file:///1.avi video-sink=”mfw_isink display=DVI” playbin2 uri=file:///2.avi video-sink=”mfw_isink display=TV”