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.

Gstreamer-ti plugin in gingerbread+dsp

Other Parts Discussed in Thread: OMAP3530

Hello, 

I am trying to build gstreamer in rowboat-gingerbread-dsp. It looks like gstreamer is not supported beyond donut.  But, I got the gstreamer plugins working (by following http://gstreamer.freedesktop.org/wiki/GstreamerAndroid_InstallInstructions#Build+the+modified+tree). However, I need to integrate gstreamer-ti plugins so that I can make use of the dsp core in my omap3evm board for doing encoding. I could see the gstreamer-ti plugin source codes available under dvsdk folder (~/rowboat-gingerbread-dsp-ti/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/gstreamer-ti_svnr884/). I modified the makefile in the external/ti-dsp folder to build the gstreamer ti plugin but I end up getting this error, 

libtool: link: /bin/grep -E -e "_*(gst_|Gst|GST_).*" ".libs/libgstticodecplugin.exp" > ".libs/libgstticodecplugin.expT" 
libtool: link: mv -f ".libs/libgstticodecplugin.expT" ".libs/libgstticodecplugin.exp" 
libtool: link: echo "{ global:" > .libs/libgstticodecplugin.ver 
libtool: link:  cat .libs/libgstticodecplugin.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libgstticodecplugin.ver 
libtool: link:  echo "local: *; };" >> .libs/libgstticodecplugin.ver 
libtool: link:  arm-none-linux-gnueabi-gcc -shared  .libs/libgstticodecplugin_la-gstticodecplugin.o .libs/libgstticodecplugin_la-gsttiauddec1.o .libs/libgstticodecplugin_la-gsttividdec2.o .libs/libgstticodecplugin_la-gsttiimgenc1.o .libs/libgstticodecplugin_la-gsttiimgdec1.o .libs/libgstticodecplugin_la-gsttidmaibuffertransport.o .libs/libgstticodecplugin_la-gsttidmaibuftab.o .libs/libgstticodecplugin_la-gstticircbuffer.o .libs/libgstticodecplugin_la-gsttidmaivideosink.o .libs/libgstticodecplugin_la-gstticodecs.o .libs/libgstticodecplugin_la-gstticodecs_platform.o .libs/libgstticodecplugin_la-gsttiquicktime_aac.o .libs/libgstticodecplugin_la-gsttiquicktime_h264.o .libs/libgstticodecplugin_la-gsttividenc1.o .libs/libgstticodecplugin_la-gsttiaudenc1.o .libs/libgstticodecplugin_la-gstticommonutils.o .libs/libgstticodecplugin_la-gsttividresize.o .libs/libgstticodecplugin_la-gsttiprepencbuf.o .libs/libgstticodecplugin_la-gsttidmaiperf.o .libs/libgstticodecplugin_la-gsttiquicktime_mpeg4.o .libs/libgstticodecplugin_la-gsttic6xcolorspace.o   -Wl,-rpath -Wl,/home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib -Wl,-rpath -Wl,/home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib -L/home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libgstvideo-0.10.so /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libgstaudio-0.10.so -ldl /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libglib-2.0.so /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libgmodule-2.0.so /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libgobject-2.0.so /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libgstbase-0.10.so /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libgstinterfaces-0.10.so /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libgstreamer-0.10.so /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libgthread-2.0.so -lpthread -lrt /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libxml2.so /home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/linux-devkit//arm-none-linux-gnueabi/usr/lib/libz.so -lm  -pthread -march=armv5t -Wl,gstticodecplugin_omap3530/linker.cmd -Wl,/home/krishnan/rowboat-gingerbread-dsp/external/ti-dsp/ti-dvsdk_omap3530-evm_4_01_00_09/c6accel_1_01_00_02/soc/c6accelw/lib/c6accelw_omap3530.a470MV -pthread -pthread   -pthread -Wl,-soname -Wl,libgstticodecplugin.so -Wl,-version-script -Wl,.libs/libgstticodecplugin.ver -o .libs/libgstticodecplugin.so 
collect2: ld terminated with signal 11 [Segmentation fault] 
make[7]: *** [libgstticodecplugin.la] Error 1 


I am not sure why this occurs. Has anyone encountered this? Do I need to patch some files in gstreamer-ti source to make it work under gingerbread



Thanks and Regards, 
Krishnan.

  • I am not sure about the gstreamer issue above since it is not supported, but rowboat-gingerbread-dsp _only_ supports DM3730EVM. There is a patch in https://groups.google.com/forum/#!topic/rowboat/g65ro4deddA to patch OMAP3530 DVSDK4.01 to build in gingerbread-dsp, Have you applied this patch?

    Please note this patch only enables compiling dvsdk for omap3530, not sure if there is any issue in video playback with DSP decoding though.

  • Hi Bin,

     

    Thanks for the reply. Yes. I used that patch to get the dsp support for omap3530 (Infact, I was the one who had queried in that forum). Now, I am trying to build gstreamer-ti plugin on top of it so that I can use it for my application. If I try to build without gstreamer-ti, everything goes fine. So, I thought TI forum could give me some clues. 

     

    Thanks,

    Krishnan. 

  • Hope someone here can help you on the gst issue, but I'm not aware of anyone working on gst on gingerbread.

    Please note that dvsdk4.01 has issue with the default v4.4.3 toolchain in gingerbread, that is why I created the patch as mentioned before to use bfd linker for dvsdk. So when you patch gst-ti for Android, please try to either specify -fuse-ld=bfd in ANDROID_LD_FLAGS, or set LD to <ld-path>/ld.bfd as similar to that in the patch, or both.

    Can you please confirm that with the patch mentioned above the video playback works fine on omap3530 with DSP codecs? If so I will go ahead check in the patch to Rowboat. Thanks.

  • Hi Bin, 

     

    Didn't realize that you are the same Bin who had helped me out! :) 

     

    i) The patch did the trick. I experimented with some videos. I tried playing a video file (480p, Mpeg4, 800 bitrate) and I could see that the default media player in android, makes use of dsp codecs and the playback is smooth. However, it doesn't always work (and it didn't support h264) and moreover the audio doesn't work at all. I tried using another media app called Rockplayer and it played both h264 and mpeg4 files with audio support. However, it doesn't make use of ti dsp codecs. Instead, it uses ffmpeg and hence the video playback is slow and lags behind audio.I have attached a file which shows the logcat of the experiments I carried out. Hope it gives you an idea of what I am talking about.

    ii) I tried setting the -fuse-ld=bfd flag, but I am still getting the error.  I am sending you the relevant makefiles that I had made some changes to build the ti-plugin. Could you please take a look and see if it looks okay.

    It would be great if I could somehow get the gstreamer-ti plugin working. Thanks for your support.

     

    Regards,

    Krishnan.

     

    4846.Video_Performace_Test_Gingerbread_DSP_Omap3530.txt

    0284.Makefile (external--ti-dsp).txt

    6505.Makefile (external--ti-dsp--ti-dvsdk_omap3530-evm_4_01_00_09).txt

    0407.Rules.make (external--ti-dsp--ti-dvsdk_omap3530-evm_4_01_00_09).txt

    1778.Makefile.am (ti-dvsdk_omap3530-evm_4_01_00_09--gstreamer-ti_svnr884--src).txt

    3771.Makefile.external(ti-dvsdk_omap3530-evm_4_01_00_09--gstreamer-ti_svnr884).txt

  • Yeah, it was me in the Rowboat mailing list ;)

    Currently the audio decoding is using ARM codecs, or Stagefright native decoding in other words. the mpeg4 clip (My_Love_mpeg4_br_800.mp4) seems have improper audio track. The log shows

    W/AACDecoder(15918): Sample rate was 44100 Hz, but now is 0 Hz

    The log misses the part that the video playback terminates, so I dont know how the DSP got cleaned up. I suspect due to the audio AAC error, DSP was not cleaned up once the video playback terminates, so you cannot play it again.

    Re the h.264 playback issue, i guess the video is not fully supported, then it fails when creating its thumbnail, so DSP is not fully cleaned up, then you cannot play it again. I need the full log to confirm that. Please capture the logcat from android bootup until play the h.264 video.

    Please note the DSP H.264 codec in OMAP3530 DVSDK4.01 only supports baseprofile. There is an open source tool called 'MediaInfo' which can dump video information. Please get that tool and paste the video info here for those two clips. (the Linux version of MediaInfo can easily get you a dump.)



  • Hi Bin,

     

    I will post the details soon. I am still working on this gstreamer-ti plugin. I have a question.

     

    i) In the Makefile.am that I had attached, the LD flag is given as 

    libgstticodecplugin_la_LDFLAGS =  $(GST_PLUGIN_LDFLAGS) -WL,$(XDC_CONFIG_BASENAME)/linker.cmd -Wl,$(C6ACCEL_LIB)

    If I remove the -WL flag and give like this,

    libgstticodecplugin_la_LDFLAGS =  $(GST_PLUGIN_LDFLAGS) $(XDC_CONFIG_BASENAME)/linker.cmd -Wl,$(C6ACCEL_LIB)

    It compiles and I could see the libgstticodecplugin.so being created in .libs folder. When I try using that .so file in my android file system and give gst-inspect TIVidenc1, it gives

    _______________________________________________________________________________________________________________________________________________

    (gst-inspect-0.10:8426): GStreamer-WARNING **: Failed to load plugin '/system/lib/gstreamer-0.10/libgstticodecplugin.so': Cannot load library: link_image[1962]:  8426 could not load needed library 'libgstvideo-0.10.so.0' for 'libgstticodecplugin.so' (load_library[1104]: Library 'libgstvideo-0.10.so.0' not found)

    No such element or plugin 'TIVidenc1'

    _______________________________________________________________________________________________________________________________________________

    I exported the GST_PLUGIN_PATH variable. But the problem is I could not see any symbolic links and there is no libgstvideo-0.10.so.0 in my lib folder. It has only the  libgstvideo-0.10.so library file. Is there anything I can do?

     

    Thanks,

    Krishnan.

     

     

  • Sorry Krishnan, I dont know much about gst, not sure if libgstvideo-0.10.so.0 is the symbolic link to libgstcideo-0.10.so created by the install routine.

  • No problem Bin. Thanks. I hope someone else can help me out. 

  • Hi Bin,

     

    I have attached the logcats and also the video details (using media info). Eventhough the dspcodec gets initialized, it doesn't play the h264 file(video+audio). As far as mpeg4 file is concerned, video plays (it takes 3-4 seconds to start) but audio doesn't play in any case. 

     

    As far as the gst ti codec plugin is concerned, the segmentation fault occured because of the toolchain. I was using arm-none-linux-gnueabi instead of arm-eabi. Now, it gets compiled but the problem is there is no .so file. Instead libgstticodecplugin.a and libgsticodecplugin.la  files are created. Is there something I should do to generate .so file? I am attaching the makefile.

     

    Thanks,

    Krishnan.

    1234.Song1_mpeg4_info.txt

    8468.Song1_mpeg4_logcat.txt

    1881.Song2_h264_info.txt

    6560.Song2_h264_logcat.txt

    4532.Makefile.external(ti-dvsdk_omap3530-evm_4_01_00_09--gstreamer-ti_svnr884).txt

    3750.Makefile.am (ti-dvsdk_omap3530-evm_4_01_00_09--gstreamer-ti_svnr884--src).txt

  • Thanks for the attachments. MediaInfo shows the H.264 clip is High Profile, but the DSP H.264 codec in OMAP3530 only supports BaseProfile. I guess that is the reason why it does not play.

    MediaInfo shows both the two clips has MP3 audio, but for some reason Android was trying to use AAC codec to decode it. I think that is why there is no audio. I will try to get a video with MP3 audio to reproduce it.

    FYI - the MPEG4 clip actually is a H.263 video, Rowboat Gingerbread will use ARM H.263 codec to decode it. Only H.264 and MPEG4 use DSP codecs on OMAP3530.

    Hope someone will help you on the Gst issues.

  • Hi Saravankrishnan, Were you able to get through the ti-gstplugin issues that you mentioned? I too decided to port gst on ginger bread over OMAP3530 platform. I'd like to know if you got GST working before I jump in to...Thanks

    -Kalai

  • Hi Kalai,

     

    Yes. I got it to work after bit of a struggle. Try to check out the froyo branch and see how ticodecplugin is implemented in that version. It helped me a lot.

     

    Regards,

    Krishnan.