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.
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
- Popular Resources
- Popular amplifiers
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- ARM Embedded System Principles and Applications (Wang Xiaofeng)
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- osk5912 evaluation board example source code
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Oscilloscope testing applications in medical equipment
- Review Weekly Report 20220228: The Bear Pai Hongmeng folding development board is here, Qinheng ch582 is now available for testing
- My EEWorld 2018
- 【Android Development Learning Road】Three-- Binder Initial Implementation
- Award-winning live broadcast: ams projection lighting (MLA) enhances the communication between cars and roads
- MSP430F5529 USB Experimenter Board
- pyESP32 Pinout
- Getting Started with I2C on MSP MCUs
- 【AT-START-F425 Review】No.03 Debugging serial port, timer and main system frequency
- The most complete and easy-to-understand PPT on 5G (worth collecting)