Long time not updated blog, from the company resigned years ago, this six months, has been to do some outsourcing app to feed themselves! is also to achieve their own years ago set goals! But also think that can not always do outsourcing it, so decided to do some of their own feel interesting app, hang to the App Store and Ap
To use mediaplayer to play audio and video, you must first understand the status of mediaplayer. The following figure shows the status of the mediaplayer provided by Google. You only need to understand the status of the mediaplayer. It won't go wrong.
For more information, see the APIS provided by Google.
To use the audio playing program written by mediaplayer to be robust, you must not only understand th
Android supports playing audio in two ways: SoundPool and MediaPlayer. The former is suitable for scenarios with short promotion but high response speed requirements (such as explosion in the game), while the latter is suitable for cases with low time requirements (such as background music in the game ). Example:First, create a project Sound, and create a directory named raw under res to store the Sound fil
IpCamera. It can access the camera and modify the monitoring configuration through the webpage, you can also obtain real-time monitoring audio and video through http or rtsp. The code structure shows that, spydroid has implemented RTSPServer, RTSPClient, RTP, RTCP, H264, AAC... and so on. In short, all the Utility we need is ready. We only need to combine these functions to meet our live broadcast needs.
Figure-IPCamera implemented by
Mediarecord can be used for recording in Android, which is easy to operate. However, it is not professional enough to Process audio. If you want to process audio in real time or encapsulate the audio
You can use audiorecord for recording.
Here is a piece of code. Audio Recor
How Android audio and video instant messaging software can be quickly implemented with JNIAudio and Video communicationAs an independent developer or a company that wants to shorten the audio and video development cycle, you want toAndroidThe quickest way to achieve audio and video communication under the platform is t
To play an audio file, you can use the built-in Music function to play the audio file) "function of the application-that is, use the built-in or installed music player to play the specified audio file.
This example is relatively simple. The source code is provided below:
Layout file activity_main:
Code File MainActivity:
Package com. mutime
First, Vitamio Introduction
What is 1.1 Vitamio?
Vitamio is the Android platform video audio playback component, supporting the playback of almost format video as well as the mainstream network video streaming (HTTP/RTSP/MMS, etc.), detailed Chinese introduction: here.
Vitamio Official website: http://vitamio.org/
Vitamio Weibo: Http://weibo.com/vitamio
Vplayer Official website: http://vplayer.net
Vit
Android development-control mobile audio
This example uses MediaPlayer to play a piece of music and use AudioManager to control the mobile audio. For more information about AudioManager, see AudioManager for Android development.
Program running:
Instance code:
Package com. jph. audiomanagerdemo; import
Compatible with mainstream hardware devices such as Google, HTC, Xiaomi, Samsung, Huawei, etc.
Enables interoperability between devices such as iOS, Web, PC, and Android
Video session, the front camera is turned on by default;
Can have Java audio and video capture, display driver, compatible with more Android devices;
to achieve
First, paste the program running result of this article. The above is the playing/stopping audio, and the progress can be adjusted using SeekBar. below is the playing/stopping video, and the progress is also adjusted using SeekBar:
Source code of main. xml:
The sou
Android audio and video goes deep into thirteen OpenSL ES to create a music player, which can pause and adjust the volume (with source code download), androidopensl
Project addressHttps://github.com/979451341/OpenSLAudioOpenSL ES is a public audio API developed based on NDK, that is, the underlying C language. It can be used to achieve standardized, high-performa
If you implement an audio file playback, the simplest way to provide the ability to play audio files in your application is to take advantage of the features of the built-in "music" app-even if you use the system's own or installed music player to play the specified audio file.This example is relatively simple, the fol
: Provides an average change to decode audio and video through the filter chain.Libavdevice: Provides abstract access to capture and replay devices.Libswresample: Implement audio blending and resampling programs.Libswscale: Implements color conversion and scaling programs.2. Environment configurationPaste Jnilibs and CPP from the downloaded project into the main folder of the project you createdI also need
: Provides an average change to decode audio and video through the filter chain.Libavdevice: Provides abstract access to capture and replay devices.Libswresample: Implement audio blending and resampling programs.Libswscale: Implements color conversion and scaling programs.2. Environment configurationPaste Jnilibs and CPP from the downloaded project into the main folder of the project you createdI also need
Android microphone audio sampling and usage
Some codes of Android phone microphone sampling are found online.
Sample results and functional code of your app:
1. In some apps, You need to obtain and use the audio input of the microphone, for example, a hot skirt;
2. Sampling
Given the ability to play an audio file, the simplest way to provide the ability to play audio files in your application is to take advantage of the features of the built-in "music" app-even if you use the system's own or installed music player to play the specified audio file.This example is relatively simple, the fol
browser.2.2. Demonstration steps:2.2.1.2 computers open with Chrome browser Rtcurl2.2.2. Computer A on the page enter the user name: PC1, and then click on the "Start" button, click the Start button, in the Browser dialog box, select Allow to use the camera.2.2.3. Computer B Click on the "Refresh" button, you will see the PC1 just logged in, click on "Call", and in the Browser dialog box select Allow the use of the camera.2.2.4. A little wait, you can succeed.2.3. The following drawingsFigure 1
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.