Camcorder Multimedia Framework with Linux and Gstreamer

Camcorder Multimedia Framework with Linux and Gstreamer

Camcorder multimedia framework with Linux and GStreamer W. H. Lee, E. K. Kim, J. J. Lee , S. H. Kim, S. S. Park SWL, Samsung Electronics [email protected] Abstract Application Applications Layer Along with recent rapid technical advances, user expec- Multimedia Middleware Sequencer Graphics UI Connectivity DVD FS tations for multimedia devices have been changed from Layer basic functions to many intelligent features. In order to GStreamer meet such requirements, the product requires not only a OSAL HAL OS Layer powerful hardware platform, but also a software frame- Device Software Linux Kernel work based on appropriate OS, such as Linux, support- Drivers codecs Hardware Camcorder hardware platform ing many rich development features. Layer In this paper, a camcorder framework is introduced that is designed and implemented by making use of open Figure 1: Architecture diagram of camcorder multime- source middleware in Linux. Many potential develop- dia framework ers can be referred to this multimedia framework for camcorder and other similar product development. The The three software layers on any hardware platform are overall framework architecture as well as communica- application, middleware, and OS. The architecture and tion mechanisms are described in detail. Furthermore, functional operation of each layer is discussed. Addi- many methods implemented to improve the system per- tionally, some design and implementation issues are ad- formance are addressed as well. dressed from the perspective of system performance. The overall software architecture of a multimedia 1 Introduction framework is described in Section 2. The framework design and its operation are introduced in detail in Sec- It has recently become very popular to use the internet to tion 3. Development environments, implementation, express ourselves to everyone in the world. In addition and performance issues are represented and discussed to blogs, the emerging motion video service provided by in Section 4. Finally, we present some concluding re- such companies as YouTube and Metacafe help us to use moarks in Section 5. internet in this way. The question is, how can we record the video content we want to express? 2 Multimedia Framework Overview Digital camcorders, cameras and even mobile phones can be used for making movies. But the quality gen- erated by mobile phones or digital cameras is gener- The three layers of the multimedia framework are ap- ally not as good as that of a digital camcorder. If users plication, middleware and OS. The architecture of the want to make higher quality content they must use digi- multimedia framework is shown in Figure 1. tal camcorders. 2.1 Application layer In this paper we introduce a camcorder multimedia framework with Linux and GStreamer. We take into account portability and reusability in the design of this There are many programs, such as players and recorders framework. To achieve portability and reusability we for movie and still pictures, User Interface (UI) man- adopt a layered and modular architecture. agers, USB control, navigator and camera manager in • 239 • 240 • Camcorder multimedia framework with Linux and GStreamer Multimedia Sequencer the application layer. The player and recorder are sim- Sequencer API ilar to the general media player and recorder present in Sequencer Main DVDFS Navigation standard platforms, however they have additional fea- Sequencer Buffer Pack Main Thread Manager tures in order to support DVD media. The UI manager Generator interacts with camcorders through the keypad, sound GStreamer and display. USB control manages USB connections. Users can browse DVD titles and select a particular clip HAL with the navigator module. All camera specific func- Device Drivers Software Codecs tions such as Image Stabilizer and Auto Focusing are implemented inside the camera manager. Because the Figure 2: Structure of the multimedia sequencer application layer outside of this paper’s scope, we will not discuss it further. SoC chip supports multimedia oriented operations such as MPEG-2 coding, multiplexing and de-multiplexing 2.2 Middleware layer of the DVD stream, and IO operations to the DVD disc. In this paper, an application product is assumed to be The Middleware layer is categorized into four functional a camcorder. The supporting board has NOR flash, groups: multimedia, connectivity, UI, and DVDFS SDRAM, DVD loader, LCD screen, key pad, camera (DVD File System). The multimedia module includes module and so on. the DVD sequencer, GStreamer and many media spe- cific plugins. USB specific functions are implemented in the connectivity module and are further broken into 3 Architecture design three major functional blocks: USB Mass Storage (UMS), Digital Print Solution (DPS) and PC Camera 3.1 Multimedia subsystem (PC-Cam). The UI module includes FLTK and Nano- X. DVDFS is the module that controls the DVD disk 3.1.1 Sequencer file system. The multimedia sequencer is a middleware module that 2.3 OS layer has functions related to the multimedia control, such as playback and recording. The OS layer plays an important role in system manage- ment, OS services, and hardware abstraction. It consists The architecture of the multimedia sequencer is de- of OSAL (OS Abstraction Layer), HAL (Hardware Ab- scribed in Figure 2. straction Layer), Linux kernel, device drivers and soft- ware codecs. The OSAL provides the middleware an The multimedia sequencer is configured using interfaces abstraction eliminating the OS dependency. The HAL such as the sequencer API layer, sequencer main mod- also provides the middleware with an abstraction elimi- ule, and GStreamer multimedia engine. The GStreamer nating the hardware dependency. The role of the Linux plugins call the device drivers or the software codecs kernel is the management of the system and the support through the HAL APIs. A developer can create and of the general OS environment. The device drivers are maintain the plugin codes easily using the HAL APIs. used to control the hardware. The multimedia codecs The DVDFS module is used for reading and writing not supported by hardware in the platform are imple- a DVD disc in the sequencer. It is used in both the mented by software. DVDSrc plugin and the buffer manager block. For playback, the DVDSrc plugin reads the stream data stored in a DVD disc using the DVDFS. For record- 2.4 Hardware layer ing, the buffer manager uses the DVDFS for writing the recorded stream data to the DVD disc. In this paper, the hardware layer represents the cam- corder hardware platform including a camcorder spe- In the sequencer API layer, there are functions related cific multimedia SoC chip and its supporting board. The to creation, initialization and control of the sequencer. 2008 Linux Symposium, Volume One • 241 CREATE INIT START change as described in Figure 3. Each state can be man- aged and set to in the multimedia sequencer based on NULL CREATED INITIALIZED RUN the state of the GStreamer core. DESTROY DEINIT STOP 3.1.2 Interface between GStreamer and sequencer Figure 3: State diagram of multimedia sequencer In this section, we describe the interface between GStreamer and the multimedia sequencer. The The application can create, destroy, initialize, and de- GStreamer pipeline configuration for DVD playback initialize the multimedia sequencer. There are three and recording is also discussed. modes and two types in the multimedia sequencer. The modes are categorized as DVD-Video, DVD+VR and When the multimedia sequencer is initialized, the DVD-VR, and the two types are playback and record. gst_init() function is called for GStreamer framework For example, if the application initializes the multi- initialization.[1] After the GStreamer framework is ini- media sequencer using DVD-Video mode and play- tialized, shared libraries for plugins are loaded using back type, then the sequencer is set for the DVD-Video the gst_plugin_load_file() function. After loading plu- player. The sequencer API also supplies control func- gin libraries, the sequencer creates a pipeline using tions. Using these control functions, the application can gst_pipeline_new() function. start, stop, pause and resume the sequencer. And the ap- plication can register callback function pointers to the To monitor the state of the GStreamer framework, the sequencer using the init function. The sequencer can sequencer creates an event loop thread that checks mes- send information to the application at any time using sages from the GStreamer framework. In this thread, this registered callback function. the sequencer gets a bus from the created pipeline and checks the GstMessage from the GStreamer framework In the main layer of the sequencer, the three function using gst_bus_poll() function. To send the GstMessage blocks are the thread block, buffer manager and nav- to the application, the sequencer uses the registered call- igation pack generator. In the main thread block, the back function. thread routine reads and processes messages in a queue. When the sequencer API is called by the application, the When the application calls the start() function of the se- API function is converted to a message. This converted quencer, the loaded GStreamer plugins are registered us- message is sent back to the message queue in the main ing gst_element_factory_make() function and then the thread block of the sequencer. pipeline is configured. After the pipeline is configured, the properties of plugins are set using g_object_set() When the sequencer is operating as a DVD recorder, function. the buffer manager and the navigation pack generator are activated. In the DVD recorder, VOB data has to To change the GStreamer state, the sequencer calls be recorded on the DVD disc. VOB data contains the the gst_element_set_state() function. When the play- presentation data and part of the navigation data. VOB back or recording operation is started, the state of data may be divided into CELL’s, which are made up GStreamer is changed to GST_STATE_PLAYING. To of VOBU’s. The video and audio data is packed and pause the GStreamer framework, the state is changed to recorded as a VOBU unit.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us