gst pipeline conflict with ldb driver

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

gst pipeline conflict with ldb driver

Jump to solution
1,711 Views
danmacdonald
Contributor III

I am using the ldb driver for my display, and want to stream my video from fb0 simultaneously over RTSP using a gst pipeline.

# gst-launch fbdev do-timestamp=true ! imxipuvideotransform ! video/x-raw,format=NV12 ! imxvpuenc_mpeg4 bitrate=4000 ....

When I attempt to simultaneously use a gst pipeline and the ldb driver (which uses fbdev)

...linux/drivers/video/fbdev/mxc/ldb.c

 fbdev crashes and I cannot launch my RTSP server. 

If I disable the ldb in device tree the RTSP server is fine. 

Is there special configurations I need to set for the ldb in order to avoid this conflict?

Thanks,

Labels (1)
0 Kudos
1 Solution
1,504 Views
danmacdonald
Contributor III

I figured this one out. 

It turns out the fbdev gstreamer component had a buffer overflow problem due to my display being RGB565 and not RGB32. I was able to fix this by correcting the color space, and my assumption of the driver conflict was simply a poor naming choice of the gstreamer component.

View solution in original post

0 Kudos
7 Replies
1,505 Views
danmacdonald
Contributor III

I figured this one out. 

It turns out the fbdev gstreamer component had a buffer overflow problem due to my display being RGB565 and not RGB32. I was able to fix this by correcting the color space, and my assumption of the driver conflict was simply a poor naming choice of the gstreamer component.

0 Kudos
1,504 Views
danmacdonald
Contributor III

More interesting notes:

I have lvds connected to fb0, and hdmi connected to fb2

The following works (hdmi)

gst-launch-1.0 -e -v videotestsrc ! fbdevsink device=/dev/fb2

but when attempting to use fb0 (lvds), it doesn't not work

gst-launch-1.0 -e -v videotestsrc ! fbdevsink device=/dev/fb0
0 Kudos
1,504 Views
joanxie
NXP TechSupport
NXP TechSupport

could you share with me your uboot command ? and what detailed image do you use?

0 Kudos
1,504 Views
danmacdonald
Contributor III

This is my uEnv.txt

mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot} video=mxcfb0:dev=ldb,1280x800M@60,if=RGB24 video=mxcfb1:dev=hdmi,1280x720M@60,if=RGB24,bpp=32 ldb=dul0 fbmem=24

my image is based off yocto fido 

0 Kudos
1,504 Views
joanxie
NXP TechSupport
NXP TechSupport

do you mean coudln't play video on lvds, even doesn't use HDMI, right? try to use if=RGB666 for lvds, and could you tell me what board and bsp do you use?

0 Kudos
1,504 Views
danmacdonald
Contributor III

Let me try to rephrase:

WORKS

  • LVDS display on /dev/fb0
    • QT applications and v4l2 video can be viewed on fb0 on this display
  • HDMI display on /dev/fb2
    • I don't need the HDMI display, but I was using it for testing, and debugging the issues I'm having with fbdev
  • launching a gst pipeline with fb2 as the sink
  • gst-launch-1.0 -e -v fbdev device=/dev/fb2 ! fakesink

!!DOESN'T WORK!!

  • launching a gst pipeline with fb0 as the sink 
gst-launch-1.0 -e -v fbdev ! fakesink
  • This provides the same error in earlier post

...

Caught SIGSEGV
#0 0xb6c716f0 in poll () from /lib/libc.so.6
#1 0xb6af04c0 in ?? ()
Spinning. Please run 'gdb gst-launch-1.0 506' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

NOTES

  • If I disable the LVDS ldb device ( /dev/fb0 ) in the device tree then the gst pipeline on fb0 works , so there is clearly a conflict with the ldb device and the fbdev plugin

...linux/drivers/video/fbdev/mxc/ldb.c

  • My image is yocto fido/hummingboard image
0 Kudos
1,504 Views
danmacdonald
Contributor III

Here's a simpler pipeline that records video to a file 

# gst-launch-1.0 -e -v fbdev ! imxipuvideotransform ! video/x-raw,format=NV12 ! imxvpuenc_mpeg4 bitrate=4000 ! mpeg4videoparse ! mp4mux ! filesink location=output.mp4

This pipeline works when I don't have ldb enabled

This is the error it provides when I do have ldb enabled

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstFbDev:fbdev0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)BGRx\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fracti"
/GstPipeline:pipeline0/GstImxIpuVideoTransform:imxipuvideotransform0.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fr"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)15/1\,\ pixe"
/GstPipeline:pipeline0/GstImxVpuEncoderMPEG4:imxvpuencodermpeg4-0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(frac"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)15/1\,\ pix"
/GstPipeline:pipeline0/GstImxIpuVideoTransform:imxipuvideotransform0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)BGRx\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ interlace-mode\=\(string\)pro"
Caught SIGSEGV
#0 0xb6be86f0 in poll () from /lib/libc.so.6
#1 0xb6a674c0 in ?? ()
Spinning. Please run 'gdb gst-launch-1.0 500' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

The core and debug output from gdb are not of any use since there are no debugging symbols in the dependent libs

Reading symbols from /usr/lib/libgstvideo-1.0.so.0...(no debugging symbols found)...done.

...

0 Kudos