The business of Android multimedia system

Source: Internet
Author: User

Please support the original, respect for the original, reproduced please indicate the source: Http://blog.csdn.net/kangweijian (from Kangweijian's CSDN blog)

The main business of Android multimedia applications
    1. Music Player
    2. Video Player
    3. Camera
    4. Sound Recorder
    5. Videocamera
    6. Media Metadate
Media Player Structure

Media Player is one of the most important aspects of multimedia, media Player involves the following content:

    • Media Player section in the local media frame
    • Pvplayer (Core code of implementation)
    • Audio, video codec module (optional)
    • Audio output link
    • Video output link (surface system or overlay)
    • Android.media.MediaPlayer class
    • Android.view.Surface class
    • Android.widget.VideoView class
    • Music app package and camera app package (Movieview class for video playback)

    • Typical data streams run in Android Media Player: Upper-level Java applications set the media's URI (which can be media files and streaming media) as input to the media player, through the Java framework, the JNI, and the local framework, all the time, in the context of Pvplayer. In this process, only the media URI path is passed, and no data stream is passed. After parsing by Pvplayer, the media is divided into the audio stream (MP3, AMR, AAC, etc.) and the video stream (H263, H264, MPEG4, etc.), after the codec processing and synchronization (Avsync), converted to raw data (audio is generally PCM, Video is usually in YUV or RGB format). The audio and video raw data will be fed into the output link of the video.
    • In the process of implementation, the media player may have some changes: only audio data, only need to do audio decoding, and do not need to do video synchronization work: The hardware decoding link can be used as a pvplayer plug-in to complete the codec work; The standard implementation is decoded after decoding, The original data of the audio and video is passed from the user control to the audio and video output, but if the hardware decoder is used, the original data of the audio and video can be input directly to the hardware device without the user control, and as the output device of the video, Can be based on a common surface interface or overlay system in Android.
Camera System Structure

The camera is a relatively independent link in multimedia, the camera involves the following:

    • The framework of the local camera;
    • Image encoding module (optional);
    • Video output link (surface system or overlay);
    • Android.hardware.Camera class;
    • Android.view.Surface class;
    • Camera application Package.

The Android camera system has two main business types: the viewfinder (viewfinder) and the photo shoot. The viewfinder has a preview function, the output of the photo is the photo file, and the output of the viewfinder preview is Android surface. The camera typically only needs to encode the JPEG data without the need for video stream encoding, so it is usually not packetvideo.

Tape recorder system Structure

The Sound Recorder system only designs the audio part, its structure is relatively simple. The contents of the recorder include the following:

    • Media Logger section in the local media framework
    • Pvauthor (core part of implementation)
    • Audio encoding module (optional)
    • Audio input Link
    • Android. Media. Mediarecorder class
    • Soundrecorder Bag

    • Android Recorder function is relatively single, its data flow operation is usually from the audio input link to obtain the PCM data, after Pvauthor encoding, encoding and adding the media header information to form an audio media file. The encoding of the recording can also use the hardware encoding link.

    • The audio recorder's Java application Soundrecorder has the playback function after recording, so you need to call both the media logger portion of the Java framework and the Media Player section.
Camera System Structure

The camera is a more complex part of the multimedia, the camera involves the following:

    • Media Logger section in the local media framework;
    • Pvauthor (core part of implementation);
    • Audio/Video Coding module (optional);
    • audio input link;
    • Camera's local interface (as a video input link);
    • Video output link (surface system or overlay);
    • Android.media.MediaRecorder class;
    • Android.view.Surface class;
    • Android.widget.VideoView class;
    • Music packs and camera packs.

    • Android Camera System has 3 aspects of business: Video preview, video recording, audio recording. Camera system simple video preview function and the camera preview basically consistent. In the process of recording, in fact, video preview and recording, audio recording at the same time, the video raw data from the camera hardware and hardware abstraction layer sent, will be sent to the video output system and Pvauthor, audio raw data from the audio input device, was also sent to play cards Pvauthor, pvauthor the audio data after synchronization and encoding, increase the media file header information, written to the media file. In this process, the coding link can also use hardware-implemented plug-in modules to improve the performance of the system.
    • The process of media recording and media playback is essentially the opposite, but there is more to the video preview.
    • The Java application of the camera is the videocamera in the camera package, and the video playback application is also included in the camera package, based on the Videoview implementation.
《Android系统原理及开发要点详解》笔记   by2015.2.23晚

Please support the original, respect for the original, reproduced please indicate the source: Http://blog.csdn.net/kangweijian (from Kangweijian's CSDN blog)

The business of Android multimedia system

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.