Implementation of IPTV terminal based on UPnP discovery and multicast technology

This article refers to the address: http://

Abstract : The terminal system designed and implemented in this paper works under the mClinux operating system. By applying the SSDP service discovery protocol in UPnP, the automatic discovery of IPTV terminals in the LAN is realized, and the TV video signal and local AV are used by IP multicast technology. Video signal. After being digitized and MPEG-2 encoded, the encapsulated RTP packet is sent to the multicast address for viewing by legitimate users in the LAN.
Keywords : IPTV; UPnP; IP multicast technology; MPEG-2

introduction

IPTV is a system technology that enables audio/video content programs or signals to be transmitted or distributed securely, efficiently and securely to different users in different physical networks in an IP packet.

Based on the Simple Service Discovery Protocol (SSDP) and IP multicast technology in UPnP, a new IPTV terminal system is proposed and implemented. The system can not only convert CATV (cable network) analog signals and local AV analog signals into digital signals, but also MPEG-2 encoding, and then use RTP/RTCP protocol to multicast to the home network, and provide real-time streaming video, Local video timing storage playback and VoD (Video On Demand) service.

SSDP protocol in the UPnP protocol stack

UPnP (Universal Plug and Play) is an application layer technology standard designed for peer-to-peer interconnection in the local area network. It is designed for home, small business, public places. Provides an easy-to-use network service auto-discovery mechanism based on IP technology.

SSDP is used for service discovery, whereby the control point can locate the location of its interested resources in the network, and the device can inform their availability. The SSDP client (control point) can send a Discovery message to the SSDP port (239.255.255.250: 1900) of the locally reserved multicast address to find the SSDP service; the SSDP service (device) can also send the SSDP indication in the same way to announce its existence.

In this paper, the UPnP discovery process of the IPTV terminal, that is, the control point (the server program running on mClinux) searches for the UPnP device (the client program running on the PC) on the network, and the UPnP device also declares its existence. When a user opens a new client program on a PC, it sends a multicast discovery message via a standard local multicast address to announce the existence of a new user. The control point listens to the multicast address and obtains the available information of the user. Similarly, when a control point is added to the network, it multicasts a discovery message to search for existing clients.

IPTV terminal system design

System software architecture and

Subsystem module design

The IPTV terminal system software architecture is divided into two parts: server and client, as shown in Figure 1.

Figure 2 IPTV terminal system software architecture diagram

The server software section includes:

RTP/RTCP module: This module contains the RTP/RTCP protocol stack, which is responsible for packaging video information into RTP multicast or unicast to LAN.

Streaming module: The client user selects the local audio/video file or the audio/video file stored in the VoD server, sends it to the streaming module processed by the VLC player and forwarded to the server, and the module is grouped in the local area network. Broadcast for online legitimate users to watch.

Timing audio/video storage and playback module: The administrator selects the local audio/video file, sends it to the VLC player to process and forward it to the server's timing audio/video storage and playback module, and the module asynchronously writes to the Flash storage. . The administrator can set the time to play the stored video, the number of plays, the continuous play interval, the play length, and the end time.

User legality management module: This module checks the legality of ordinary users or system administrators when users log in, and manages all online user information in real time, and periodically displays the IP addresses of all online users.

UPnP Service Discovery Module: This module is responsible for monitoring the operation of client programs in the LAN using the Simple Service Discovery Protocol in UPnP and responding when the client program issues an SSDP Notify message.

Service Control Module: The administrator changes the server IP address, and the user changes the volume, channel, and image quality.

Hardware Driver Module: This module consists of hardware drivers on the server.

The client software section includes:

UPnP service discovery module: When the client application runs, it sends a UPnP SSDP announcement message in the local area network.

User login module: When receiving the UPnP response message from the server, run this module to check the validity of the user.

VoD upload module: Upload audio/video to the local VoD server through the VLC player and the streaming module on the server.

Remote Control Program: The system UI section provides a friendly system administrator and common user interface.

VLC Player: A powerful cross-platform media player that supports multiple audio/video formats (MPEG-1, MPEG-2, MPEG-4, DivX, MP3, ogg...), streaming protocols and streaming Multicast.

System hardware architecture design and implementation

This program is based on the hardware platform of Winbond ARM W90N740 chip, adding network module, serial interface module, tuner module, audio/video decoding and digital processing module, MPEG-2 audio/video compression module on the periphery of W90N740. And USB modules, etc. The system hardware architecture is shown in Figure 2.

Figure 2 System hardware architecture block diagram

1, the CPU part

CPU (W90N740), ROM (512KB), Flash (8MB), SDRAM (32MB), SRAM (32K × 32b) and CPLD constitute the most basic processing system. The ROM stores the BOOT program. After each RESET, the CPU runs from here. This part of the program is mainly used for hardware initialization, in preparation for running mClinux. Flash stores mClinux and user programs. SDRAM is where the program stores mClinux and user programs. SRAM is where the data is written when the PCI bridge becomes the local bus master. Since the PLX9080 cannot operate the SDRAM, an SRAM is used for data caching. CPLD mainly completes the arbitration of the PCI bus, the address decoding, the generation of the RESET signal, the summary of the interrupt signal, the chip selection of the SRAM, and the level or timing conversion of some signals. There is a switch between the CPU and SRAM data bus and address bus to solve the deadlock caused when the CPU accesses the PCI device and the PCI device accesses the SRAM. When this happens, the switch will disconnect the CPU's data bus and address bus, and at the same time output the WAIT signal, let the CPU wait, and let the PCI device first access the SRAM, and then restore the CPU access to the PCI device.

2, PLX9080 part

The PLX9080 connects the PCI bus to the local bus. It mainly provides bidirectional conversion of local address to PCI address and local control to bidirectional conversion of PCI control. After receiving the CPU command, the PLX9080 first applies to the PCI arbiter of the CPLD. After obtaining the license, it starts to read and write PCI. PCI devices (such as SAA7134) also write data to the local memory through the PLX9080. When the external device initiates a PCI write operation to the PLX9080, the PLX9080 will apply for the local bus to the CPU, the CPU releases the control of the bus, and the PLX9080 will PCI. The address translates to the local address and writes the data to the SRAM.

3, SAA7134HL part

The SAA7134HL mainly decodes, samples, and digitizes the SIF and CVBS signals, and combines the video data of the ITU-R BT.656 format and the audio data of the I2S format to the MPEG-2 compression, and the receiving MPEG-2 compressor has been compressed. After the buffer stream data is buffered, the data is written into the SRAM through the PLX9080. Upon completion, the CPU issues an interrupt to the CPU for processing. The SAA7134HL also includes an I2C MASTER bus controller that controls the tuner and the SAA6752HS.

4. SAA6752HS part

The SAA6752HS mainly compresses the video and audio data sent by the SAA7134HL according to the MPEG-2 standard. After compression, the data is sent back to the SAA7134HL for transmission.

The hardware functions are described as follows:

* Tuner: This part is to demodulate the TV RF signal received from the antenna or coaxial cable to output video signal and audio signal.

* Video, audio decoding and digitization: This part decodes the composite video signal (CVBS), takes out the Y, U, V component signals, and then samples the signals for A/D conversion, and then combines these data to meet the ITU. -R BT.656 data, output to the MPEG-2 compression section. At the same time, the audio signal is also sampled for A/D conversion, and the data is combined into I2S format data for output to the MPEG-2 compression portion.

* MPEG-2 compression part: This part compresses the audio data of the video data and I2S format that meet the requirements of ITU-R BT.656 according to the MPEG-2 standard, and generates the MPEG-2 transport stream output to the PCI transmission part.

* PCI transmission part: This part buffers the data of the MPEG-2 transport stream, writes it to the system's memory through the PCI bus, and then sends an interrupt to the processor to inform it that there is data to be processed.

*PCI Bridge: The PCI bridge is the component that connects the processor's local bus and PCI bus. It mainly completes the application of PCI bus and local bus, and the conversion between PCI bus address and local bus address, PCI bus address and local. Conversion of control timing between buses.

* Processor and its peripheral components: This part is mainly composed of the CPU and basic peripheral devices that can run it. Including address decoding, SDRAM, Flash, ROM devices.

* Interface section: The interface for communicating with the outside, consisting of two Ethernet ports and one RS-232, and one USB port.

Test operation

Server platform configuration: CPU (W90N740), ROM (512KB), Flash (8MB), SDRAM (32MB), SRAM (32K × 32b), and mClinux operating system.

Client platform configuration: Pentium CPU (2.4GHz), memory (256MB), Windows XP operating system.

In the test, the ordinary user uses the IPTV terminal to receive and smoothly play the CATV TV, the local AV in the local area network, watch the real-time streaming or the time-storage stored audio/video, and perform VoD on-demand through the terminal system normally. The system administrator can set the server IP address, the range of receiving TV channels, the maximum number of common users allowed, the user password, real-time streaming, timed storage, and the audio/video file path uploaded to the server.

While playing, the user can set the playback color, picture quality, volume, channel and AV->TV->VoD->AV cycle switching through the remote control program.

System operation performance indicators:

(1) Packet loss rate

Packet loss rate = (theoretical number of packets - the actual number of packets received) / theoretical number of packets

The system can dynamically calculate the transmission packet loss rate according to the above formula during operation, and automatically disconnect the user from the server when any user packet loss rate is greater than 10%.

(2) Delay

While the system is running, users can smoothly watch TV/AV/VoD video streams online.

As shown in Figure 3, as the number of users increases from 1 to 10, the delay will increase from 2ms to 4.2ms.

Figure 3 Relationship between number of users and time delay

Conclusion

With the rapid development of the network, the terminal system is applied in a wireless environment, and a service supporting wide area network access can be provided. Supporting MPEG-4 video coding is a next step to be done.

references:

1. UPnP Forum, http://

2.Walko, J. I Love My IPTV. IEE Communications Engineer, pp. 16-19, Dec. 2005

3. Jerry C., Whitaker. Interactive TV Demystified. Mc-Graw Hill, 2001

LED Touch Lamp

LED Touch Lamp,Touch Table Lamps ,Touch Bedside Lamps ,LED Desk Lamp

Table Lamp & Reading Light Co., Ltd. , http://www.nbledlamp.com