April 26, 2024

Design of streaming media player for IPTV set-top box

The open source code live555 is an SDK used to realize the streaming media transmission function. Use the Play Common. Cpp in the teSTProgs folder in the SDK to design the transmission module of the IP TV set-top box, and together with the playback module constitute the streaming media player of the IPTV set-top box process. playCommon. cpp is a bridge connecting the server and the client. Its working principle is that when the client requests data from the server, it obtains the SDP description information from the server URL and creates a multimedia session according to the SDP, and finally plays the data stream.

Introduced the design process of IPTV STB streaming media player, using the function of playCommON.cpp in the live555 open source code, combined with the software structure of IPTV STB to design and develop the transmission module of IPTV STB. Then the transmission module is connected to the middleware through the message queue, and at the same time is connected to the playback module through the entrance function of the playback module, and finally constitutes the streaming media player of the IPTV set-top box. The player has been tested and its performance is stable.

1 IPTV set-top box streaming media player design

1. 1 IPTV set-top box software structure

The software code of the set-top box is divided into 4 parts: hardware driver, operating system, middleware, and application layer, as shown in Figure 1.

Figure 1 Set-top box software structure

1) The hardware driver connects the underlying hardware and the upper operating system. 2) The operating system used here is free open source code Linux. 3) Middleware isolates the upper application layer from the software adaptation layer of the underlying operating system and hardware. The core modules of middleware mainly include: (1) Browser: Obtain the URL from the server and display the corresponding EPG page. (2) Graphic user interface management: Provide user interface control (such as buttons, lists) and graphic image drawing functions for applications. 4) The application layer realizes the playback of audio and frequency media files.

1. 2 IPTV STB streaming media player system structure

The playCommon.cpp in the Live555 open source code implements the function of using the computer as the receiving terminal, receiving and playing with the VLC software, and finally displaying it on the computer. The content of the research is to integrate playCommon.cpp into the software code of the set-top box, and finally realize the function of using the IPTV set-top box as the receiving terminal and playing it, and displaying it on the TV. This puts new requirements on the design of the code: on the one hand, playCommon.cpp obtains the URL of the server by entering rtsp: // local IP address: port number / file name to be played in the RTSP column of VLC Acquired. However, for IPTV set-top boxes, the URL obtained by the transmission module is the corresponding URL when the user selects the program on the EPG through the remote control. This URL is read by the browser in the middleware, so this requires connecting the middleware and the transmission module stand up. On the other hand, the data stream sent by playCommon.cpp is received and played through VLC, and for IPTV set-top boxes, the data stream sent by the transmission module is received and played through the playback module. Therefore, it is necessary to connect the transmission module and the playback module.

In order to connect the middleware, input module and playback module, a message queue is designed to realize data communication between these three modules. In addition, the program also designed pt hread create () to create the thread rt spmain (), to achieve concurrency in the program. The system architecture of the IPTV player is shown in Figure 2.

Figure 2 IPTV player system architecture

1.3 Analysis of program structure

1.3.1 Transmission module.

1) The main function (1) void initMsgQ () initializes the message queue. dataQid represents the message queue of data, contains some data transmitted on the network, and finally sends the data in the message queue to the player through the void send data to player () function. msgkeyQid represents the message queue of the message key value. The transmission module receives the remote controller key value command obtained from the middleware and sends it to the player to realize fast forward, fast rewind, stop, play and other operations. fromeMiddleQid represents the message queue of the middleware. The transmission module receives the URL sent from the middleware as the destination address when the client player requests data from the server. playerStateQid represents the message queue of the playback state. The transmission module is used to send and receive player status, and control whether the player is on-demand, live broadcast, or time-shifted. (2) phread_create (& g_session_thread_info, & tattr, (void * (*) (void *)) rtsp_main, (void *) & urlInform); Create rtsp_main () thread. Ensure that the communication of the message queue and the transmission of streaming media run simultaneously.

2) rtsp_main function. (1) recvMiddlewareMsg (fromeMiddleQid, url): pass the value of url from middleware to variable url. (The definition of url is done in middleware, so it needs to be obtained from middleware); (2) in playCommon.cpp The function: When the client sends a request to the server, the server responds to the request, creates a media session and plays the data stream. (3) main_player_entry (gTrans. First Create): The client receives the stream and calls the player's entry function to initialize the player. (4) void send_data_to_player (): call the player, send the data received from the network to the player, and start playing.

ZhenHuan's class 2 power units of desktop style single output power supplies, provides the output power range from 3watts to 100watts and output current range from 100ma to 5000ma. The desktop class 2 power supplies is equipped with three standard AC inlet options for IEC320-C8, IEC320-C6 and IEC320-C14; developed for use in led lighting and home appliances.

Desktop UL Class 2 Power Supply

UL Class 2 Power Supply,12V Power Supply,Ac-Dc Power Supply,Power Supply 24V

Shenzhenshi Zhenhuan Electronic Co Ltd , https://www.szzhpower.com