Framebuffer setting and i.MX6 Gstreamer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Framebuffer setting and i.MX6 Gstreamer

6,701 Views
ronylim
Contributor II

Hello Community,

I have a question regarding framebuffer setting (depth) that is changed after I run a gstreamer pipeline. Before I use the gstreamer, my system has been configured to 24 bit color. After running the gstreamer, the color depth is changed to 16 bit. I am guessing the display plugin (mfw_v4lsink) is configuring the framebuffer to 16bit. I wonder if anyone has similiar issues and have a solution/hint for it. Below is my system information and the testing procedure. Thank you.

Best,

Ronny Lim


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

root@bcr:~# uname -a

Linux bcr 3.10.17-7910 #1 SMP Tue Oct 14 13:24:00 EDT 2014 armv7l GNU/Linux

root@bcr:~# fbset -fb /dev/fb2

mode "1280x768-60"

        # D: 75.426 MHz, H: 47.981 kHz, V: 59.976 Hz

        geometry 1280 768 1280 768 24

        timings 13258 96 96 10 10 100 12

        accel false

        rgba 8/16,8/8,8/0,0/0

endmode

I run gstreamer pipeline.

gst-launch -v videotestsrc ! mfw_v4lsink device=/dev/video18

I stopped the pipeline and the depth of framebuffer configuration is no longer 24 bit.

root@bcr:~# fbset -fb /dev/fb2

mode "1280x768-60"

        # D: 75.426 MHz, H: 47.981 kHz, V: 59.976 Hz

        geometry 1280 768 1280 2304 16

        timings 13258 96 96 10 10 100 12

        accel false

        rgba 5/11,6/5,5/0,0/0

endmode

Labels (1)
3 Replies

1,210 Views
Yuri
NXP Employee
NXP Employee

   The output framebuffer in Gstreamer is configured according to video format ;
usually video format is YUV and it's bpp is 16. So, if needed, the framebuffer bpp
should  be changed after video playback completes.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,210 Views
ronylim
Contributor II

Thank you for the answer Yuri.

I am trying to set the videotestsrc to produce a video test with rgb format, bpp 24 and depth 24. But, I still see the depth of the framebuffer configuration changed to 16 bit. Here is the pipeline:

gst-launch -v videotestsrc ! video/x-raw-rgb,depth=24,bpp=24 ! mfw_v4lsink device=/dev/video18

Please correct me if I am doing it wrong. Thank you.

Best,

Ronny Lim

0 Kudos

1,210 Views
Yuri
NXP Employee
NXP Employee

  When mfw_v4lsink element in Gstreamer pipeline is applied without option "device=/dev/video16",
the output framebuffer is overlay one (FB1), and it's default bpp is 16. That doesn't change FB0
configuration.
With "device=/dev/video16", the video outputs to FB0 directly. Then FB0 is configured to bpp 16
because of the coming video format.

  Below is console log to demonstrate this feature.

# set bpp = 16

root@imx6qdlsolo:~# echo 16 > /sys/class/graphics/fb0/bits_per_pixel

root@imx6qdlsolo:~# cat /sys/class/graphics/fb0/bits_per_pixel

16

# run gst, mfw_v4lsink without option "device=/dev/video16"

root@imx6qdlsolo:~# gst-launch -v videotestsrc ! video/x-raw-rgb,depth=24,bpp=24 ! mfw_v4lsink

MFW_GST_V4LSINK_PLUGIN 3.0.11 build on Apr  5 2014 06:42:34.

[...]

Freeing pipeline ...

[--->FINALIZE v4l_sink


root@imx6qdlsolo:~# cat /sys/class/graphics/fb0/bits_per_pixel

16


# bpp was not changed

# set bpp =32

root@imx6qdlsolo:~# echo 32 > /sys/class/graphics/fb0/bits_per_pixel

root@imx6qdlsolo:~# cat /sys/class/graphics/fb0/bits_per_pixel

32

# run gst, mfw_v4lsink without option "device=/dev/video16"

root@imx6qdlsolo:~# gst-launch -v videotestsrc ! video/x-raw-rgb,depth=24,bpp=24 ! mfw_v4lsink

MFW_GST_V4LSINK_PLUGIN 3.0.11 build on Apr  5 2014 06:42:34.

[...]

Freeing pipeline ...

[--->FINALIZE v4l_sink

root@imx6qdlsolo:~# cat /sys/class/graphics/fb0/bits_per_pixel

32

# bpp was not changed

# run gst, mfw_v4lsink with option "device=/dev/video16"

root@imx6qdlsolo:~# gst-launch -v videotestsrc ! video/x-raw-rgb,depth=24,bpp=24 ! mfw_v4lsink device=/dev/video16

root@imx6qdlsolo:~# cat /sys/class/graphics/fb0/bits_per_pixel

16


# bpp changed !!!


~Yuri.