Design of media player based on ARM9

Publisher:悦耳旋律Latest update time:2012-06-19 Source: 有线电视技术Keywords:ARM9  TQ2440 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

The rapid development of computer multimedia technology and network technology has made multimedia applications based on streaming media also used in many fields, especially in network videophone, remote monitoring, and video on demand. With the maturity of computer multimedia compression technology and the development of network transmission technology, the development of real-time, reliable, multi-functional, digital, and easy-to-operate networked streaming media players based on computer network communication technology and multimedia applications has become one of the main directions of technological development in the fields of computer, communication, and consumer electronics (3C industry - Computer, Communication, Consumer Electronics).

2 System Hardware Design

This article uses the TQ2440 development board as the hardware platform.

S3C2440AL is the control core, responsible for controlling all auxiliary devices. The memory uses two types of SDRAM and Flash, which can meet the needs of system operation and debugging. The basic ports include Ethernet interface, USB interface, and two RS232 serial ports. A/D and D/A modules are mainly used for field data collection and control signal output. The DC/DC module is mainly responsible for the power supply of the entire system.

S3C 2440AL is a CPU based on the RISC ARM9 core designed and developed by Samsung. The operating frequency can reach 400MHz and it has a rich set of internal devices, including: memory management unit MMU, 16kB instruction buffer and 16kB data buffer, memory controller (SDRAM controller), NANDFlash and NOR Flash controller, 4-channel external DMA request control, 3 serial ports, SD memory card reading interface, USB host, USB device, 5 pulse width modulation timers. At present, S3C2440AL has been widely used in PDA, smart phones, digital multimedia and other aspects.

3 System software design

The software components of the system include: embedded Linux operating system, device drivers, graphical interface and browser program, which are only the key parts of IPTV set-top box software.

3.1 Selection and transplantation of embedded operating system

This system uses Linux as the operating system, and uses the Linux 2.6 kernel to port it to the embedded microprocessor S3C2410. The specific porting method is as follows:

(1) Prepare the necessary files for Linux 2.6 kernel porting (kernel compressed package linux-2.6.tar.bz2 and cross compiler arm-linuxgcc-3.4.1.tar.bz2). These files can be downloaded for free from the Linux official website.

(2) Use Linux commands (mkdir, tar, mv and export) to install the cross compiler arm-linux-gcc-3.4.1.

(3) Modify the Makefile file and related hardware files. Since the kernel is compiled according to the instructions of the Makefile file, the Makefile file organizes the relationship between the various modules of the kernel and records the mutual connection and dependency between the modules. Therefore, the developer must first modify the Makefile file in the root directory of Linux2.6. The main content of the modification is the type of target code and specifying a compiler for compiling the kernel.

(4) Use the Make command to compile the kernel to generate the kernel image file zImage file, and use the corresponding fixing software to fix this file in the corresponding memory of the system to complete the porting of the Linux2.6 kernel on the ARM microprocessor.

3.2 Overall Architecture of Media Player

System implementation principle: Under the control of the embedded microprocessor S3C2440AL, the TQ2440 development board receives audio and video broadcast information from the content service provider through the network interface, then runs the graphical interface program to obtain the audio and video information, and generates an audio and video program list based on this, transmits the signal to the display screen for display, and presents the program to the user. The user uses the graphical interface and browser provided by the display system to control and watch the program with the keyboard and mouse. The overall architecture is shown in Figure 1.

Figure 1 Overall architecture of the media player

3.2.1 Implementation of media player and network interface

The biggest feature of the media player when playing multimedia files on the network is the "streaming" feature of downloading and playing at the same time. In IPTV applications, because the streaming feature of multimedia data requires information exchange between the media player and the media server, they must follow a common interactive protocol standard. The player of this system uses the RTSP protocol to establish and manage RTSP sessions with the server, and receives media data from the network through the network transmission protocol. The data receiving process of the media player is shown in Figure 2. [page]

Figure 2 Media player data receiving process

3.2.2 TS stream parsing implementation

In the MPEG-2 system, two composite information streams are defined according to the quality of the transmission media: transport stream (TS) and program stream (PS). The difference between TS and PS is that the packet structure of TS is fixed-length, while the packet structure of PS is variable-length. This difference in the structure of PS and TS packets makes TS more resistant to transmission errors than PS. Therefore, the network multimedia data in this design adopts the TS encapsulation format. The structure of TS packet is shown in Figure 3. It consists of two parts: the header and the packet data. The header length is 4B, and the adaptation area and the packet data occupy a total of 184B. The length of the entire TS packet is equivalent to 4 ATM packets.

Figure 3 TS packet structure

Because a lot of things can be put into a TS stream, the organization that develops the TS stream standard stipulates the PSI (Program Specific Information) table, whose function is to correctly find a specific program from a TS stream that carries multiple programs.

The PSI table consists of the following four tables:

(1) PAT (Program Association Table) is the program association table. Its main function is to indicate the transport stream ID, as well as the MAP table and PID of the network information table of the corresponding program streams in the transport stream.

(2) PMT (Program Map Table) is the program mapping table. The PID of this table is provided by PAT. Through this table, the information contained in a program can be obtained.

(3) CAT table (Conditional Access Table) is the conditional access table, and its PID is 0x01. CAT carries the private information of the server (the CA system needs to use this table to decrypt the program).

(4) NIT (Network Information Table) This table includes the physical transmission network information of all transport streams in the digital TV network, including the channel tuning parameters, frequency, symbol rate, etc. of the program. This information enables the receiver to change the channel and tuning parameters with little or no delay according to the user's selection and correctly decode the TS.

Therefore, the TS stream parsing process is shown in Figure 4: first receive a data packet with PAT in the payload, find a PMT packet ID in the entire data packet. Then receive a data packet containing PMT, find the ID of the data type filled in this data packet. Then find the payload content containing this ID in the received TS packet, which is the filled information. According to the different IDs of the filled data type, multiple information is compounded in the TS stream, and the PES packet of audio and video can be decoded by decoding the transport packet with this information, and finally the audio stream and video stream can be decoded. [page]

Figure 4 TS stream parsing process

Due to limited time and resources, this design transplants the mature QT/Embedded library to the embedded system of the set-top box as its graphical interface class library. Qt/Embedded uses frame buffer as the underlying graphical interface. At the same time, the external input device is abstracted as keyboard and mouse input events. Qt/Embedded applications can directly write kernel buffer frames, which avoids developers using the cumbersome XLIB/Server system. The interface program flow chart is shown in Figure 5.

Figure 5 Interface program flow chart

4 Conclusion

This system takes advantage of the TQ2440 hardware platform, transplants the Linux2.6.14 kernel to the development board, designs and implements a set-top box streaming media player based on embedded Linux, completes the implementation of its network interface, and provides support for mainstream MPEG-2, MPEG-4, H.264 and other format files through TS stream analysis. The system has good portability and scalability, and can meet the changing market demand.

Keywords:ARM9  TQ2440 Reference address:Design of media player based on ARM9

Previous article:Design of vehicle-mounted HMI terminal based on ARM and Qt/E
Next article:Digital ward call system based on ARM

Recommended ReadingLatest update time:2024-11-17 00:40

TQ2440 Study Notes—— 29. Porting U-Boot [U-Boot compilation and linking process]
U-Boot compilation and linking process After configuration, execute "make all" to compile. From the Makefile, you can understand which files U-Boot uses, which file is executed first, and the memory occupied by the executable file. First determine which files are used. The following shows the ARM-related part of t
[Microcontroller]
TQ2440 Study Notes—— 29. Porting U-Boot [U-Boot compilation and linking process]
Design and implementation of USB based on embedded ARM9 S3C2440A
introduction USB (Universal Serial Bus) is the abbreviation of universal serial bus. It has become the mainstream interface of computers because of its convenience, dynamic bandwidth allocation, excellent fault tolerance and high cost performance. With the widespread application of embedded systems, various small
[Microcontroller]
Design and implementation of USB based on embedded ARM9 S3C2440A
Design of portable cerebral blood oxygen monitor based on ARM9 and its Ethernet interface
Oxygen is an important substance for human metabolism, and brain tissue consumes the most oxygen. If there is a lack of monitoring means for brain tissue oxygen supply during the clinical rescue and treatment of patients with cardiovascular and cerebrovascular diseases and brain trauma, it may cause loss or damage o
[Industrial Control]
Design of portable cerebral blood oxygen monitor based on ARM9 and its Ethernet interface
Design of a simple DC electronic load based on ARM9TDMI
0 Preface In real life, the load is more complex, mostly dynamic loads, such as: the power consumed by the load is a function of time; or the load works at a constant current and constant resistance; the load is an instantaneous short-circuit load; and when testing the instrument, if you want to conduct a reliable, co
[Microcontroller]
Design of a simple DC electronic load based on ARM9TDMI
Design and implementation of logistics terminal positioning function based on ARM9
introduction The selection of logistics positioning solutions and technologies has an important impact on improving the efficiency of modern logistics distribution management and reducing operating costs. Logistics terminal positioning requires high positioning accuracy, can provide all-weather continuous positionin
[Microcontroller]
Application of ARM9-based temperature control system in high-precision biochemical analyzer
1 Introduction ARM9 is increasingly widely used in various bioelectronic instruments, and fully automatic biochemical analyzers are a typical application. Temperature has a great influence on the test results during the detection and analysis process of biochemical analyzers. The reliability of biochemical test
[Microcontroller]
Application of ARM9-based temperature control system in high-precision biochemical analyzer
Arm9 (TQ2440) transplantation summary --- environment construction
It has been a month since I got the board and started the transplantation. Now I will look back and summarize it for future reference. Phase 1: Building the environment (vmware + redhat linux 9)       1. There is no problem installing the virtual machine. Here is the process of installing Linux on the virtual machin
[Microcontroller]
Arm9 (TQ2440) transplantation summary --- environment construction
Design of ZigBee Industrial Ethernet Gateway Based on ARM9 Processor
   Introduction:   At present, there are more and more applications where multiple standards and protocols coexist, and the gateway, which acts as a bridge for protocol conversion, plays a key role. The two most popular local wireless technologies are undoubtedly Wi-Fi and Bluetooth. However, for low-power, low-bandw
[Microcontroller]
Design of ZigBee Industrial Ethernet Gateway Based on ARM9 Processor
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号