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.

simultaneous encode&decode on dm368



hi,

I am using dvsdk4-dm368 and i am trying to encode & decode simultaneously on dm368 board by using the following gstreamer pipeline

gst-launch-0.10 videotestsrc  ! video/x-raw-yuv, format=\(fourcc\)NV12 ! TIVidenc1 codecName=h264enc engineName=codecServer !  TIViddec2 engineName=codecServer codecName=h264dec ! TIDmaiVideoSink displayDevice=/dev/video2 displayStd=v4L2 videoStd=D1_NTSC videoOutput=composite accelFrameCopy=FALSE sync=false

 and the problem i am facing is that i cant able to encode & decode simultaneously and it throws the error a4452.encode-decode.txts

 ti.sdo.fc.edma3 - allocAndSaveResource> Enter (index=3, devId=1003, channel=1087677668, *tcc=1005, *param=1006, nParams=1)

 

EDMA Error: EDMA_IOCREQUESTDMA error

 ti.sdo.fc.edma3 - allocAndSaveResource>  Exit (status=FALSE)

ti.sdo.fc.edma3 - allocResource> Resource allocation failed

I can also provide the debug log of gstreamer pipeline as an attachment . could any one solve my problem will be a great help
Thanks & Regards
Siva Prasad T

 

  • We are trying something very similar.  We can not seem to get the system to allow for us to connect the Encoder to the Decoder apparently.  We tested calls that encoded to file, then decoded that file.  But can't seem to combine them.  What would cause this?

    We will also need to include the audio as well.

     

    gst-launch -v v4l2src always-copy=FALSE num-buffers=800 input-src=COMPONENT ! 'video/x-raw-yuv,format=(fourcc)NV12,width=1280,height=720,framerate=30/1' ! TIVidenc1 codecName=mpeg4enc engineName=codecServer contiguousInputFrame=TRUE ! queue min-threshold-buffers=800 max-size-buffers=1000 ! TIViddec2 codecName=mpeg4dec engineName=codecServer ! queue ! TIDmaiVideoSink videoStd=720P_60 videoOutput=COMPONENT sync=FALSE hideOSD=false

     

    output:

    EDMAK Error: dma_ioctl: REQUESTDMA failed: -12
    EDMA Error: EDMA_IOCREQUESTDMA error
    ERROR: from element /GstPipeline:pipeline0/GstTIViddec2:tividdec20: failed to cr
    eate video decoder: mpeg4dec

    Additional debug info:
    gsttividdec2.c(1400): gst_tividdec2_codec_start (): /GstPipeline:pipeline0/GstTI
    Viddec2:tividdec20
    Execution ended after 1157350546 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstTIViddec2:tividdec20.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:src: caps = NULL
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
    libv4l2: error turning off stream: Invalid argumvpfe-capture vpfe-capture: devic
    e started
    ent

     

    In code we were able to create 2 pipelines 1 for audio and the other for video.  But we could not encode and decode either.

    Brent

  • Hi,

    The above error is due to lack of edma channels required by the TI codecs supported by dm368. So, to get resolve of this problem we have to make sure that what ever encoder/decoder you are using in gstreamer pipeline should share the available resources.. 

    For this you have to create the codecs in the same groupids in the config.bld file so that they will share the reources like edma,irq etc

    It solved my problem doing so...:-)

    NOTE: please remmember by using above process there is chance of that your codec performance get decreased

     

    Regards

    Siva Prasad T 

  • I really appreciate your quick response.  And I have to apologize for my lack of knowledge with this chipset.  I am kind of just starting out. 

     

    I have built an application that will kind of pass-through audio and video.  But I am hoping get some buffering in between.  So when I run the previously posted gstreamer code I was disappointed. 

    I have to say that I don't know where to look for the groupids or the config.bld file.  Will you point me in the right direction?  How do I set the groupid to share the resources.  Again sorry for my lack of experience here.

    Brent

  • Hi,

    you find the groupids in config.bld file and you find this file in gstreamer code of "dm365 dvsdk4" and you can download this binary file from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/latest/index_FDS.html... As my guess you should have crossed this... And you please have a look at gstreamer source code of this...

    So, After modifying the config.bld you please again build the gstreamer in the dvsdk4.. Then you have a shared library libgstticodecplugin.so which acts as a gstreamer plugin to get ti codec

    This info might helpful for you..

    Regards,

    Siva Prasad T

  • Hi, Siva

     

    siva prasad said:
    you find the groupids in config.bld file and you find this file in gstreamer code of "dm365 dvsdk4"

    I couldn't find the path that mentioned, can you be more explicit, please??