DMAI GStreamer Plug-In

From Texas Instruments Wiki
Jump to: navigation, search

Overview

The TI DMAI GStreamer (gst-dmai) plug-in uses the Davinci Multimedia Application Interface to simplify application use of the TI Davinci and OMAP hardware accelerators and DSP. GStreamer is run as an application on the ARM processor and through the use of DMAI is able to interact with the DSP or acceleration modules to acquire, render or transform audio and video streams. DMAI also provides portability of the code from one processor to another with minimal code changes. DMAI also takes care of using various hardware modules on the SoC to performs tasks such as frame copies using hardware acceleration.

DMAI GStreamer Plug-In System Architecture

Figure 1

Components

GStreamer is a media-processing library that provides an abstract model of a transformation that is based on a pipeline. Media flows in a defined direction from input to output. GStreamer has gained wide popularity in the digital video programming community through its ability to abstract the manipulation of different media; thus, simplifying the programming process. GStreamer makes it possible to write a general video or music player that can support many different formats and networks. Most operations are performed by plugins, rather than by the GStreamer core. Figure 2 displays this media pipeline concept:


Gstreamer example pipeline.jpg


The GStreamer package contains the following directories.

opensource_build

This directory contains the open source packages used to build GStreamer and the TI plugin. This includes packages such as glib as well as the GStreamer core libraries and plugin libraries. These packages are included in the GStreamer release for convenience so there is no need to download them from various locations, and this way developers know they have the packages that were using during development testing.

There is also a directory called patchfiles in this directory which contains various patches that are used when building these packages for TI processors. These patches may disable features that impact performance on embedded processors or work around build/configuration issues when cross-compiling for the ARM processor.


ti_build

This directory contains the TI GStreamer plugin code. The code is located at ti_build/ticodecplugin/src. The TI plugin contains multiple elements which allow for encoding/decoding of audio/video/imaging files.


gstreamer_demo

This directory contains a series of scripts that can be used to test the functionality of the various TI GStreamer elements. There is a directory for each supported processor as well as a directory for shared scripts. The scripts for the processor that the TI GStreamer plugin was build for are installed on the target file system during the build step.

Download

The TI GStreamer project is hosted at http://gstreamer.ti.com. From that page you can either checkout the SVN repository or download one of the quarterly file releases from the Files section.

System Requirements

In order to build/install the TI GStreamer package you will need the following:

  • Host PC running Linux
  • DVSDK software for your processor
  • A cross-compile toolchain. This may be the MontaVista tools provided with the EVM or CodeSourcery tools for OMAP3.
  • A target file system. You can use the sample NFS file system provided with the EVM.

Build Instructions

The build instructions for this package can be found in the README.TXT file located in the package root directory. You can also find more information on building the package on the website at http://gstreamer.ti.com. In general the steps to build the package are:

  1. Install the DVSDK software as specified in the GSG for your product
  2. Set up a target file system as specified in the GSG for your product
  3. Download the TI GStreamer package into a working directory
  4. Edit the Makefile.common file in the root of the package tree and set the following variables for your configuration:
    1. DVSDK_INSTALL_DIR - Directory where the DVSDK was installed to
    2. TARGET_ROOT_DIR - Path to the root of your target file system
    3. MVL_VERSION - The version of the MontaVista tools being used. This is either 4.0.1 or 5.0
  5. build and install the TI GStreamer package using make all install

How to Run the Demo on the Target

The previous build steps were done on the host file system. Now you can run the demo on the target file system.

  • Boot the hardware EVM. It is assumed that you have the file system mounted over NFS in U-Boot settings.
  • Once you are at the login prompt, type root and enter.
  • Go to the /opt/gstreamer_demo/<processor> directory where <processor> is the processor you have build the GStreamer package for (i.e. dm6446). This directory contains:
    • sample scripts
    • codec server files
    • kernel modules required to run the codecs such as CMEM
  • Run the loadmodules.sh file to load the kernel modules
  • Copy your media files (TS, AVI, AAC, MP3, MP4, etc) to the target file system.
  • Run the sample scripts. For each script you can see the usage commands by executing the script with the -h option.

Licensing

  • The TI GStreamer plugin is licensed under the terms of the GNU LGPL v2.1. The licensing terms are:
This program is free software; you can redistribute it and/or modify it under the terms of the  
GNU Lesser General Public License as published by the Free Software Foundation version 2.1 of the License. 
  • The DVSDK software package used by the TI GStreamer port is covered under a seperate license. Please refer to the DVSDK click-wrapped license for more information on the terms of use for the DVSDK software.


NOTE: This licensing information only covers the TI GStreamer plugin, for information about the licensing of other GStreamer components please see licensing information for that component.

Submitting Patches

You can find information on how to submit patches for bug fixes and enhancements on the project site at Submitting Changes

Roadmap

See DMAI GStreamer Plug-in Roadmap

More Information