Integrate an opensource element with TI GStreamer plugin framework

From Texas Instruments Wiki
Jump to: navigation, search


This page describes the steps taken to integrate an OpenSource element (AAC decoder) with TI GStreamer plugin framework.


Introduction

The DVSDK 2.10 (DM365) does not have AAC decoder. The mp4 container normally contains H.264 video stream and AAC audio stream. This page describes the steps taken to integrate AAC decoder (faad decoder) to TI GStreamer plugin framework.

In this exercise the free AAC decoder (faad2 version 2.7) is used.


Integration steps

Note: In the following makefile changes + at the beginning of a line means the line is added, - at the beginning of a line means the line is deleted.

  • Download the opensource encoder from [[1] SourceForge] and put it in {gst src root}/gstreamer_ti/opensource_build/distfiles directory.
  • Edit {gst src root}/gstreamer_ti/opensource_build/Packages.make to add following in "Package plugins_bad"
 PACKAGE_plugins_bad_BUILD_TARGET        = plugins_bad
 PACKAGE_plugins_bad_ARCHIVE_BASENAME    = gst-plugins-bad-0.10.12
 PACKAGE_plugins_bad_PRECONFIG_PATCHES   =
+PACKAGE_plugins_bad_CONFIGURE_OPTS      = ac_cv_openssldir=no LDFLAGS=-L$(TARGET_GSTREAMER_DIR)/lib CFLAGS=-I${TARGET_GSTREAMER_DIR}/include
 PACKAGE_plugins_bad_POSTCONFIG_PATCHES  =
 PACKAGE_plugins_bad_BUILD_DIRS          = gst/mpegdemux
+PACKAGE_plugins_bad_BUILD_DIRS          += ext/faad
 PACKAGE_plugins_bad_DESCRIPTION         = \
-    Select plugins from GStreamer bad-plugins
+    Select plugins from GStreamer bad-plugins (faad)
 PLUGIN_PACKAGES += $(PACKAGE_plugins_bad_BUILD_TARGET)
  • Edit {gst src root}/gstreamer_ti/opensource_build/Packages.make to add information about the decoder at the end of the file
+
+#------------------------------------------------------------------------------
+# Package faad
+#------------------------------------------------------------------------------
+PACKAGE_faad_BUILD_TARGET           = faad
+PACKAGE_faad_ARCHIVE_BASENAME       = faad2-2.7
+PACKAGE_faad_PRECONFIG_PATCHES      =
+PACKAGE_faad_POSTCONFIG_PATCHES     =
+PACKAGE_faad_DESCRIPTION            = AAC audio decoder library
+PLUGIN_PACKAGES += $(PACKAGE_faad_BUILD_TARGET)
  • Edit {gst src root}/gstreamer_ti/opensource_build/Makefile to add faad as to build and install as a base rule
base:
        $(CMD_PREFIX) $(MAKE) id3tag       $(BUILD_INSTALL)
        $(CMD_PREFIX) $(MAKE) mad          $(BUILD_INSTALL)
        $(CMD_PREFIX) $(MAKE) lame         $(BUILD_INSTALL)
+       $(CMD_PREFIX) $(MAKE) faad         $(BUILD_INSTALL)
        $(CMD_PREFIX) $(MAKE) plugins_base $(BUILD_INSTALL)
  • After compiled and installed on the board, following command can be used to run a mp4 clip decode_qt.sh -f <mp4 file> -a faad


Epilogue

The above steps show how to integrate a particular open source codec to the TI GStreamer plugin framework. But similar steps can be taken to add other plugins to the framework.