Development of Embedded Internet Video Application Based on IPv6

introduction

This article refers to the address: http://

The rise of interactive Internet TV (IPTV) can provide viewers with a new way to select and control their playback content. Domestic and foreign operators have invested in building their own IPTV operation platform. With the rise of Web2o, new video content service providers have broken the boundaries between IPTV content providers and content users, enabling video content to grow explosively. Websites such as YouTube, Youku, and similar are increasingly hitting traditional TV media. The popularity of these video sites has made more people pay attention to Internet video, and the video content has been greatly enriched.

Not only do viewers want to be able to receive premium IPTV content, but they also want to be able to watch it as easily as a regular TV. The development of IPv6 networks has made bandwidth more and more abundant, and the development of embedded technology provides a basis for convenient viewing of these contents. Based on this reality, this paper designs an application architecture for playing Internet video through a home set-top box, and solves the problem that playing these Internet videos must pass through the computer, making it easy to view the video content.

Technical principle

A typical Internet video site consists of several basic components: video introduction, video classification, and the video itself—usually the flv file format and related videos. Before playing the selected video through the browser or dedicated software, we must first find the corresponding video by keyword search or classified search before playing. Most video sites use streaming media playback, which allows us to play while downloading, and a few need to download before playing. The embedded application architecture we designed includes the following functional components:

· Retrieve and download video content over the web;

· Set filter classification to retrieve video content;

·Can perform video posters after downloading

Slide show:

· Codec, video and audio encoding and video synchronization of video files:

· User-friendly interface.

The basic application structure of this architecture is shown in Figure 1.

Embedded application architecture for video services


Figure 1 Embedded application architecture for video services

The composition and implementation of the application architecture

The composition of the hardware system

The streaming media codec unit is the core part of the whole system and is mainly composed of embedded system, embedded CPU and peripheral components. The embedded CPU adopts Samsung's S3C2440, 400MHz main frequency, and integrates ARM920T microprocessor and commonly used Xibuwei components, 64M SDRAM and 256MFSLH. Through the connection between the GPIO of the S3C2440 and the Ethernet controller chip DM9000, the network interface is extended and the Internet is connected. The unit structure is shown in Figure 2.

Streaming media coding unit structure


Figure 2 streaming media coding unit structure

The embedded operating system adopts Linux, which has the following characteristics: open source code, small kernel, high execution efficiency, good support for IPv6; high modularity of Linux makes components easier to load and unload; built-in network support, easy to implement Built-in web server, etc.; supports a variety of hardware platforms; provides complete development tools and SDK (Software Development Kit), providing graphical customization and configuration tools.

Software design and implementation

In the embedded network video on demand processing, real-time image processing, audio and video decoding and synchronization, network transmission, and graphical user interface four-part collaborative processing are required. In order to ensure that software development, integration, and even final testing are not overly complex, we layer these four parts. From a functional point of view, the entire software architecture consists of four parts:

· Network function library;

· Streaming media processing library;

· Audio and video decoding library;

· User interface library.

See Figure 3 for the architecture interface.

Video playback application architecture


Figure 3 video playback application architecture

Network function library

Based on the standard IPv6 protocol, the network function library is designed to process the query/retrieve audio and video content through the Internet, and is responsible for the application protocol of real-time streaming media content download. Figure 4 depicts the processing of the network function library:

Network function library flow chart


Figure 4 network function library flow chart

1 Create a NETLIB_Handler instance through NETLIB_handlerlnit() to complete the initialization work; 2 query through NETLIB_search() or NETLIB searchBylndex(); 3 the result of the search is handled by the Handler, or it can be searched again; 4NETLIB readContent ( ) or NETLIB Ì„getCount() can The specified content is read from the retrieved information of the handler; 5 the result set in the cache can be sold out by NETLIB_handl erDestroy after the retrieval.

The following describes the main function descriptions of the network function library, including the following APIs.

Int NETLIB_search(NETLIB_Handler handler, char* keyword, NETLIB_QueryType queryType, unsigned int maxCount). Description: Searches for a video of a given keyword and returns results that do not exceed the specified number of maxCount.

Int NET LIB_readContent(NETLIB_Handler handler, int index, NETLIB VideoDetail*videoDetail). Summary: The corresponding content is read from the search results according to the specified order (index).

Streaming media processing library

The streaming media processing library is responsible for processing the streaming media data, and its functions include: 1 decomposing audio and video from the real-time media stream; 2 selecting the audio and video decoding library to decode the decomposed audio and video; 3 synchronously rendering the decoded audio and video To ensure the playback effect. See Figure 5 for the process flow.

Streaming media processing library flow chart

Figure 5 flow media processing library flow chart

Audio and video decoding library

A fully functional FLV player must include the following three core functional modules.

(1) Label resolution module

Block: Ability to parse Fly documents (structure-like swf files) according to the document format specification developed by Adobe.

(2) Movie Execution Module: Ability to execute movies in a certain time sequence.

(3) ActionScript parsing engine: able to respond to user interactions and better control the behavior of Fly documents.

Considering the inconvenience of operating an interactive flv file when playing a flv video using a set-top box, the current implementation version mainly solves the problems necessary for playback. The main functional interfaces are described below.

FLVDEC_create(Engine_Handlehandle, string name); used to create an instance of the FLV decoder.

FLVDEC_control (FLVDEC_Handle, FLVDEC_Cmd id, FLVDEC ̄DynamicParams* params, FLVDEC_Status*status); for implementing FLV playback control in the ∏V decoder instance.

FLVDEC_process(FLVDEC_Handle handle, XDM_BufDesc* inBufs, XDM BufDesc* outBufs, FLVDEC InArgs* inArgs, FLVDEC_OutArgs*outArgs); FLV playback is implemented in the FLV decoder instance.

FLVDEC delete (FLVDEC_Handle handle); used to delete the FLV; decoder instance.

User interface library

The user interface library is based on DirectFB. DirectFB is a small, powerful, flexible and easy-to-use graphics system developed specifically to meet embedded device requirements and is attempting to be a new graphics standard built on Linux Framebuffer Device. It provides graphics acceleration, input device processing extraction, transparent window and multiple display layer based on FrameBuffer, which can support the embedded system GUI. It has a very simple and efficient architecture and hardware graphics acceleration compared to the popular embedded GUI system.

running result

Play smoothly on the ΛRM2440 board for testing. See Figure 6 for screenshots.

Operation effect chart


Figure 6 operation renderings

in conclusion

This paper designs and initially implements the embedded Internet video on demand application architecture in IPv6 environment. In the development of limited resource systems, the idea of ​​software system engineering is used, and the development structure is assumed with a hierarchical structure, and the test and playback are smoother in the experimental environment. In the production environment, using the auxiliary CPU with better DSP performance, and implementing the architecture with the ARM chip of this article, the network video can be played more smoothly, and the performance of the system is further improved.

Buffet Warmer

Buffet Warmer,Food Warmer,Stainless Steel Food Warmer,Unter Top Buffet Food Warmer

Shaoxing Haoda Electrical Appliance Co.,Ltd , http://www.hotplates.nl

Posted on