Brief analysis on the workflow of LIVE555 Media Library

Source: Internet
Author: User

The source code for the LIVE555 project consists of four basic libraries, a variety of test codes, and media Server.

Working module

The four basic libraries are: Usageenvironment TaskScheduler, Groupsock, Livemedia and Basicusageenvironment.

The basic English of the official website is as follows:

Although it is in English, but not very difficult, can read the general meaning. Here to say a word, programmers still want to contact and learn English, after all, good technology is imported from abroad. Briefly, I understand.

Usageenvironment

This class library is an abstraction of the system environment, including Usageenvironment and TaskScheduler. Usageenvironment is mainly used for the input and output of messages and user functions, TaskScheduler to implement asynchronous processing of events, registering event handlers, and so on. It implements deferred scheduling of other registered functions by maintaining an asynchronous read source implementation, such as the handling of events such as message arrival. In addition, there is a Hashtable class that defines a generic hash table, which is used by the other code. We can customize the subclass of this class's abstract class when we use it, and then we can run it in a specific environment such as embedded or GUI. There is no need to make too many changes.

Groupsock

This class is the encapsulation of the network interface for sending and receiving packets. Groupsock is mainly for multicast data transmission, it also supports the reception of unicast data.

Livemedia

This class is the core module of live555, the encapsulation of various media and the sending of data. Where the base class is medium, the other classes derive from the class. such as Mediasession,RTP Session class, a session can also contain multiple subsession. There are more important two derived classes of source and Sink,source abstract the data to be sent, sink the sender of the abstract data, the flow of data can go through a plurality of source and sink, the two are linked through the session. In the process of development, we can implement the related functions we need by inheriting these classes.

Basicusageenvironment

This class is primarily for applications with simple consoles and uses Select to achieve the acquisition and processing of events.


Work flow

live555 First creates a RTSP service (the specific implementation can be see the services in MediaServer). During the service creation process, Setupoursocket is called to establish a TCP connection and listens for the incoming port, which waits for the interaction of the RTSP protocol that the client requests, and then passes the connection handle to the socket handle in the TaskScheduler , waiting for the event to fire.

Simple and to see some online users of the summary, drew a UML diagram to share a bit:


There are several more important classes in live555, which need to inherit some of the more important classes, such as Mediasubsession,framedsource, in the process of using live555 two times. Before the start, you need to clarify the inheritance of their class, I follow the official website of the class diagram, a few of the more important classes to separate out, to draw the UML as follows:


roughly a few important class diagram relationships are such a process. The following article continues to share how to inherit its own subclass to implement functions such as file reading and live stream playback.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Brief analysis on the workflow of LIVE555 Media Library

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.