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.

Accelerated codecs on Beagleboard inside Xorg window (omapdmaifbsink)

Other Parts Discussed in Thread: DM3730

Hi,

I'm trying to enable TI's accelerated codecs inside an Xorg window on a Beagleboard C4. I saw that this is possible by using the omapdmaifbsink

(http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines#OMAP35x) with the Angstrom linux and I'm trying to do the same using a patch I found in the argo-project:

http://arago-project.org/git/people/?p=brijesh/arago-dvsdk.git;a=blob;f=recipes/ti/gstreamer-ti/0007-add-omapdmaifbsink.patch;h=be6f899f0c7a9dc9a1a6e9c7c85a0cfe328130f7;hb=c5276694289766d13ea5a4a4fcb94087a2e9bbcd

No success yet but some errors " omapfb omapfb: setup_plane failed" reported by kernel and:

ERROR: from element /GstPipeline:pipeline0/GstOmapFbSink:omapfbsink0: failed to create dmai framecopy handle
Additional debug info:
omapfb.c(523): x_memcpy (): /GstPipeline:pipeline0/Gst/OmapFbSink:omapfbsink0  failed to create dmai framecopy handle

Does anyone tried this approach? Is this patch functional? Any hints will be welcome.

Thanks

PS: The codecs are working OK with unmodified gstreamer plugin (output not in an X window)

  • George,

    IIRC, the sink uses SDMA module to perform DMA copies from upstream to fb memory. Make sure sdma module is installed on your system. In addition to this, you can run pipeline with DMAI_DEBUG=2 to get more information. Something like.

    DMAI_DEBUG=2 gst-launch .......

    Thanks

    Brijesh

  • Hello Brijesh,

    Thanks for the advice. I have the sdmak.ko up and running. With DMAI_DEBUG=2  I've managed to find some more debugging info:

    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    @0x0039b96c:[T:0x42cff470] ti.sdo.dmai - [Framecopy] not implemented
    @0x0039bbec:[T:0x42cff470] ti.sdo.dmai - [Buffer] Set user pointer 0x4360042d (physical 0x8800042d)
    ERROR: from element /GstPipeline:pipeline0/GstOmapFbSink:omapfbsink0: failed to create dmai framecopy handle

    Does this mean than I don't have support for the framecopy feature in the dvsdk ? Or maybe I did something wrong when I modified the gstreamer plugin?

    My current dvsdk version is 4_01_00_09.

     

    Many thanks,

    George

  • George,

    If you are using DMAI from DVSDK 4.x then this version of DMAI should have framecopy implemented. The error indicates me either you are using wrong DMAI version for your build or you have not set fcAttrs.sdma = TRUE flag while creating Framecopy handle. May be you can refer well tested and support tidisplaysink2 sink from gstreamer.ti.com and make the corresponding changes in your sink.

    https://gstreamer.ti.com/gf/project/gstreamer_ti/scmsvn/?action=browse&path=%2F%2Acheckout%2A%2Ftrunk%2Fgstreamer_ti%2Fti_build%2Fticodecplugin%2Fsrc%2Fgsttidisplaysink2.c

    BTW, I am not X programming expert but it you could potentially update tidisplaysink2 to use X server API and then render the video in X server window instead of typical frame buffer. The advanatge of using tidisplaysink2 are:

    1) The sink is very well supported and maintained by gstreamer.ti.com mainline trunk.

    2) Sink support using v4l2 vs fbdev interface. The preferred is v4l2 for video. In TI we test v4l2 for video display.

    3) Sink supports peer allocation - so you no longer need DMA copy and buffers can be shared between decoder and sink. This will boost your performance and save some DDR bandwidth.

    P.S: gsttidisplaysink2 need DVSDK 4.02 and if you are considering the sink then you must migrate to newer DVSDK.

    HTH,

    Thanks

    Brijesh 

  • Dear Brijesh Singh,

         I have used your tidisplaysink2 element under DVSDK_DM3730_4_02_00_06. I have a question to ask for you:

         I found that I can't downscale som special resolution by using overlay-width and overlay-height. my usage as bellow:

    gst-launch filesrc location=/opt/nst.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! tidisplaysink2 video-standard=auto display-output=system overlay-top=100 overlay-left=100 overlay-width=352 overlay-height=288

         my video source original resolution is 720*576, if run this cmd on shell, will print following error messages:

    .....

    omapdss DISPC error: failed to set up scaling, required fclk rate = 130909090 Hz, current fclk rate = 128000000 Hz
    omapdss MANAGER error: dispc_setup_plane failed for ovl 1
    omapdss MANAGER error: configure_overlay 1 failed
    omapdss DISPC error: failed to set up scaling, required fclk rate = 130909090 Hz, current fclk rate = 128000000 Hz
    omapdss MANAGER error: dispc_setup_plane failed for ovl 1
    omapdss MANAGER error: configure_overlay 1 failed
    omapdss DISPC error: failed to set up scaling, required fclk rate = 130909090 Hz, current fclk rate = 128000000 Hz
    omapdss MANAGER error: dispc_setup_plane failed for ovl 1
    omapdss MANAGER error: configure_overlay 1 failed
    omapdss DISPC error: failed to set up scaling, required fclk rate = 130909090 Hz, current fclk rate = 128000000 Hz
    omapdss MANAGER error: dispc_setup_plane failed for ovl 1
    omapdss MANAGER error: configure_overlay 1 failed

    .....

         if overlay-width > 360, it will work fine. I want to know whether there are some rules for resize

        Thank you.

    Best regards

    everest.zhang

  • Dear Everest Zhang,

    The error indicates me that DSS is not able to downscale the specified resolution and IIRC there are some limitation on how much you can downscale -  i would recommend reading TRM to see if you notice some obvious or may be  someone from driver team can through more light on it. I am not DSS driver expert and all we are doing from  sink is to set the requested overlay values..

    Thanks

    Brijesh

  • Hi Brijesh,

        Thank for your reply.

        I think what  I only can do is to wait some update from TI driver experts.

    Best regards

    everest.zhang