This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: GStreamer plugin error while decoding JPEG

Part Number: AM5728

Tool/software: Linux

Hi,

I am using the SDK 03.02.00.05 and trying to decode the JPEG stream with Gstreamer pipeline and getting below error.

ERROR: Pipeline doesn't want to pause.
../git/libdce_linux.c:70: dce_init ERROR: Failed OmapDrm_FD > 0 error val -7Setting pipeline to NULL .

Am I missing something on this one ?

Thanks,

Nirav

  • Hello,

    What is the pipeline that you are using?
    Please check this guide:
    processors.wiki.ti.com/.../Processor_Training:_Multimedia

    BR
    Margarita
  • Hi,
    I am using below pipeline.
    gst-launch-1.0 filesrc location=testmjpeg.mov ! qtdemux name=demux demux.video_0 ! queue ! jpegparse ! ducatijpegdec ! fakesink

    Thanks,
    Nirav
  • Hello,

    Could you check the guide in my previous post especially the example with playbin?
    The playbin element will automatically recognize the file and play it.
    I would also recommend you when you try with playbin to add -v -gst-debug=3 for more debugging prints.

    Let me know the results.

    BR
    Margarita
  • Hi,
    Below are the results which shows with debug enabled.


    root@am57xx-evm:~# GST_DEBUG=3 gst-launch-1.0 filesrc location=testmjpeg.mov ! qtdemux name=demux demux.video_0 ! queue ! jpegparse ! ducatijpegdec ! fakesink
    Setting pipeline to PAUSED ...
    0:00:00.200158009 1016 0x74ee0 ERROR ducati gstducatividdec.c:138:engine_open:<ducatijpegdec0> dce_init() failed
    0:00:00.200236088 1016 0x74ee0 ERROR ducati gstducatividdec.c:1634:gst_ducati_viddec_change_state:<ducatijpegdec0> could not open
    ERROR: Pipeline doesn't want to pause.
    ../git/libdce_linux.c:70: dce_init ERROR: Failed OmapDrm_FD > 0 error val -7Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~#

    root@am57xx-evm:~# GST_DEBUG=3 gst-launch-1.0 -v playbin uri=file:///home/root/testmjpeg.mov video-sink=kmssink audio-sink=alsasink
    Setting pipeline to PAUSED ...
    [ 748.907860] omapdss_hdmi5 58040000.encoder: ASoC: can't open interface 58040000.encoder: -1
    0:00:00.102107949 1032 0x13fc80 WARN alsa pcm_hw.c:1590:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC0D0p' failed (-1): Operation not permitted
    0:00:00.102236620 1032 0x13fc80 WARN alsa gstalsasink.c:846:gst_alsasink_open:<alsasink0> Error -1 (Operation not permitted) calling snd_pcm_open (&alsa->handle, alsa->device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)
    0:00:00.102301524 1032 0x13fc80 WARN alsa gstalsasink.c:863:gst_alsasink_open:<alsasink0> error: Could not open audio device for playback.
    0:00:00.102334872 1032 0x13fc80 WARN alsa gstalsasink.c:863:gst_alsasink_open:<alsasink0> error: Playback open error on device 'default': Operation not permitted
    0:00:00.102513807 1032 0x13fc80 ERROR playbin gstplaybin2.c:5391:activate_group:<playbin0> failed to activate sinks
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstAlsaSink:alsasink0: Could not open audio device for playback.
    Additional debug info:
    ../../../gst-plugins-base-1.6.3/ext/alsa/gstalsasink.c(863): gst_alsasink_open (): /GstAlsaSink:alsasink0:
    Playback open error on device 'default': Operation not permitted
    Setting pipeline to NULL ...
    Freeing pipeline ...
  • Hello,

    Please try:
    GST_DEBUG=3 gst-launch-1.0 -v playbin uri=file:///home/root/testmjpeg.mov video-sink=kmssink

    or

    GST_DEBUG=3 gst-launch-1.0 -v playbin uri=file:///home/root/testmjpeg.mov video-sink=kmssink audio-sink=fakesink

    BR
    Margarita
  • Hi,
    Below is the output of the command.

    root@am57xx-evm:~# GST_DEBUG=3 gst-launch-1.0 -v playbin uri=file:///home/root/testmjpeg.mov video-sink=kmssink
    Setting pipeline to PAUSED ...
    0:00:00.089321929 1047 0x13fa80 WARN kmssink gstkmssink.c:544:gst_kms_sink_start:<kmssink0> error: omap_device_new failed
    0:00:00.089530959 1047 0x13fa80 ERROR playbin gstplaybin2.c:5391:activate_group:<playbin0> failed to activate sinks
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstKMSSink:kmssink0: GStreamer encountered a general resource error.
    Additional debug info:
    ../../../git/sys/kms/gstkmssink.c(544): gst_kms_sink_start (): /GstKMSSink:kmssink0:
    omap_device_new failed
    ../git/libdce_linux.c:70: dce_init ERROR: Failed OmapDrm_FD > 0 error val -7Setting pipeline to NULL ...


    Thanks,
    Nirav
  • Hello,

    I am sorry for the delay. I ran some tests on the EVM.
    Here is my observations:
    1. I used these pipelines to create the mjpeg stream.

    gst-launch-1.0 videotestsrc num-buffers=100 ! jpegenc ! qtmux ! filesink location=1.mov
    gst-launch-1.0 videotestsrc num-buffers=100 ! jpegenc ! multipartmux ! filesink location=2.multipart -v
    In this case you could set caps filter with resolution also.

    Here is part of the log:
    /GstPipeline:pipeline0/GstJpegEnc:jpegenc0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\ format\=\(string\)I420\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
    /GstPipeline:pipeline0/GstJpegEnc:jpegenc0.GstPad:src: caps = "image/jpeg\,\ sof-marker\=\(int\)0\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"

    As you could see on the output (src) of encoder we have image/jpeg.


    2. I played the test files:
    gst-launch-1.0 -v filesrc location=1.mov ! qtdemux ! jpegparse ! ducatijpegdec ! kmssink
    gst-launch-1.0 playbin uri=file:///usr/share/ti/video/1.mov video-sink=kmssink

    With this pipeline only the first frame is displayed only:
    gst-launch-1.0 -v -m filesrc location=1.mov ! jpegparse ! ducatijpegdec ! imagefreeze ! kmssink

    gst-launch-1.0 -v -m filesrc location=2.multipart ! multipartdemux ! jpegparse ! ducatijpegdec ! kmssink

    Here is part of the log for decoding:
    /GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:src: caps = "image/jpeg\,\ parsed\=\(boolean\)true\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)1/1"
    /GstPipeline:pipeline0/GstDucatiJpegDec:ducatijpegdec0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)1/1\,\ drm_mem\=\(boolean\)true"
    /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)1/1\,\ drm_mem\=\(boolean\)true"
    /GstPipeline:pipeline0/GstDucatiJpegDec:ducatijpegdec0.GstPad:sink: caps = "image/jpeg\,\ parsed\=\(boolean\)true\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)1/1"

    The jpegparser parse image/jpeg. On the input (sink) of the ducatijpegdec we have image/jpeg. On the output(src) raw NV12.

    I haven't observed problem.

    I would recommend you to check are you able to play your test file on PC with gstreamer or VLC for example?

    Hope this helps.

    BR
    Margarita