VLC Framework summary (i) VLC source code and modules function introduction

Source: Internet
Author: User
Tags ftp protocol

In general, playing a audio and video is divided into 4 steps 1, Access Access 2, Demux 3, decode decoding 4, output access : Access

Can be understood as receiving, acquiring, and obtaining data resources, including resolving access sources (URLs),
Use HTTP protocol, RTSP protocol, FTP protocol, establish connection, get data. Demux: Solution multiplexing

It's the separation of audio and video that usually fits together, and of course it's possible to have subtitles. By analyzing the data header to determine what data file, need to use what decoding format.

Why need Demux

In fact, the reason why need to Demux, is because the audio and video in the production of the time is actually independent code, get is separate data, in order to facilitate transmission, must be in some way together, this has a variety of packaging formats, there are demux. Decode decoding

Includes audio and video decoding, or software decoding and hardware decoding. Out output

Audio and video output (Aout and Vout)

For example, a MPEG TS stream that plays a UDP multicast,
The Access section is responsible for receiving multicast streaming from the network, putting it into the player's memory buffer, and the access module is concerned with IP protocols, such as whether IPV6, multicast addresses, multicast protocols, ports, and so on. If the RTP protocol is detected (RTP is a simple plus 12 bytes in the UDP header)
The Demux section first parses the information of TS streaming media. TS format is part of the MPEG2 protocol, generally TS are fixed 188-byte packet, a TS stream can contain more than one program (show), one can contain multiple video, audio, and text information es stream, each es stream will have different PID ID, In order to be able to analyze these ES streams, TS has a number of fixed PID intervals for sending program and ES streaming tables, Pat and PMT tables.
For VLC players, use LIBDVBPSI to parse and encode TS streams. (Call code can refer to/MODULES/DEMUX/TS.C)

Demux separate audio and video streams are sent to the audio decoder and video decoder, because the original audio and video are occupied a lot of space. And a high degree of redundancy in data. Usually some kind of compression is done when making it. This is the audio and video coding format that we know, h.264,rmvb,mkv. The function of audio and video decoder is to restore the compressed data into the original audio and video data. (VLC codec modules are in the/modules/codec directory).

Last output module, video decoder output is a picture of a bitmap-like format, but to let people see from the screen, also need a video output module. As shown in SDL. Audio is the same, you need to convert PCM and other data into sound. VLC Source

VLC (video Lan clent) is a complete multimedia framework, with the greatest feature of dynamically loading many plug-in modules as needed, supporting the transmission, encapsulation, and encoding of videos. The core of the framework is the use of programs to link the modules. For input media data, after each module processing output.

VLC directory structure: Doc: Help document INCLUDE:VLC header file LIB:VLC function directory, with SRC use M4:automake and autoconf macros file MODULES:VLC plug-in directory share: icon, script src: source Contrib: Storing possible third-party software information Compat: Storing functions that may be used

Access Dshow:directshow get Plug-ins for WinDOS platform DVB: Using V4L2API input module for dvb-s/c/t media streaming MMS: MMS and HTTP Capture module TCP,UDP for RTSP: Based on real-time streaming transport protocol Screen: Get the image of the input module VCD: Get the VCD data input module VCDX: Get the VCD input module, you can navigate, still

Audio-filter Channel-mixer: Various mixers, decoders, such as dobly decoder converter: fixed-point or floating-point audio format conversion resample: various audio resampling modules

Audio-mixer

Audio-output

Codec DMO: A Directmediaobject decoder avcodec: Contains FFmpeg library many audio and video decoder Spudec:rle DVD small title decoding

Control

Plugins control the various interfaces of the player: gestures, hotkeys, remote control, and Telnet

Demux: Different multiplexing program ASF:ASF solution multiplexer Avi:avi Solution multiplexer mp4:mp4 multiplexer mpeg:mpeg multiplexer Playlist: Playlist import module.

Packetizer: Packaging module for H264/AVC and MPEG 4 audio and video streaming

Video-chroma: Image format to replace, such as YUV to RGB

Video-filter: A variety of video filter modules, such as Deinterlace,transform,wall,crop.

Video-output: Video Output module

SRC Module LIBVLC: It is to provide the interface of the library, such as to provide functional interface to VLC: stream input, audio and video output, plug-in management, threading system. Interface: Contains code that interacts with the user, such as keystrokes and device pop-ups. Playlist: Manages the interaction of playlists, such as stopping, pausing, next, or playing randomly. Input: Open an input component, read the package, parse them, and pass the basic stream of the restore to the decoder. Video_output: Initialize the video display. Get all the pictures and sub pictures from the decoder. Replace them with YUV or RGB for playback. Audio_output: Initialize audio mixer. If you find the correct playback frequency, then recreate the audio frames received from the decoder. Stream_output: Similar to audio_output Misc: Miscellaneous used by other parts of LIBVLC. such as thread system, Message Queuing, CPU detection, object query system,

Video output: Available via Driectx,x11,xvideo,sdl,framebuffer,ascii

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.