This article implements the Android system camera call to take photos
The layout of the project is fairly simple, with only one button:
First open the list file under the Packages\apps\camera folder and find the following code:
The relevant code is as follows:
public class Mainactivity extends activity {
@Override
protected void onCreate (Bundle savedinstancestate) {
This article implements the Android system camera call to take photos
The layout of the project is fairly simple, with only one button:
First open the list file under the Packages\apps\camera folder and find the following code:
The relevant code is as follows:
public class Mainactivity extends activity {
@Override
protected void onCreate (Bundle savedinstancestate) {
first obtain and initialize the icapturegraphbuilder2 interface, and then select an appropriate video capturing device. After the device is selected, create a capture filter for the device, and then call addfilter to add the capture filter to the filter graph.
If you only want to use a camera for real-time monitoring, you only need to call icapturegraphbuilder2: renderstream on the basis of the above:
: v4l2_fmt_flag_compressed, otherwise 0__u8 description[32]; Description of the image format, such as YUV 4:2:2 (YUYV)__u32 PixelFormat; The supported formats. such as: V4l2_pix_fmt_uyvy__u32 Reserved[4];};This way, you know what image format the current hardware supports. Next, you can set the image. Of course, you can also read the current default settings before setting.3. Get and set image format:vidioc_g_fmt, vidioc_s_fmt:3.1: Get the current image Format:struct V4l2_format format;memset (f
Generally, you can use mediarecorder to record videos. Video data can also be displayed on surfaceview, but data must be written to the storage device. In addition, if our project is video chat, media cannot be used.
I found the information online and changed it myself:
Public class cameravedioactivity extends activity {Private Static final string tag = "cameravedioactivity"; private
Let's play the video function of the mobile phone. Do a demo.
look at the recording process:
Copy Code code as follows:
Mediarecorder = new Mediarecorder ();//Create Mediarecorder Object
Set the recording video source to camera (camera)
Mediarecorder.setvideosource (MediaRecorder.VideoSource.CAMERA);
S
Some friends may have met on the "My Computer" when the camera to open the prompt "failed to create a video preview, please check the device connection," but can be through the QQ video, this is how it? How to solve?
Killing virus
Generally encountered such problems, first of all, to the computer antivirus, if it is a virus to cause file damage, need to kill
Analog camera, AV video signal line decoding, PAL system NTSC, input decoding display, finally fix, record!We commonly used cameras, monitoring, and so on, most of them are AV signals, domestic standards are pal, using coaxial, transmission, the advantage is that the transmission distance can be very long, and simple line. AV cameras are also used mostly in video
You can use uiimagepickercontroller to record or take a video from the camera. However, uiimagepickercontroller will display its own interface, but sometimes we do not want to display this interface, you can use another method to obtain the data obtained by the camera.
First, you need to introduce a package # import
-(Void) captureoutput :( avcaptureoutput *) c
The application of video chat can be shown in the following block diagram. So we need to get video data (YUV420SP) from camera, compress it into h264/mpeg4/h263 package, and then pass it to the other side. Receive the other party's compression package, extract it to display on the LCD.In Android, you can get YUV data for each Peview frame by setting the Previewca
The first thing to consider when making a live video is the bandwidth issue, where the player must have enough bandwidth to support multiple people watching live. If you have 1000 customers per customer with 512Kb bandwidth, you will have at least 50M of bandwidth at the end of your playback.Next to see, to consider the video live platform function, whether to support the server cluster, or else can not sup
We commonly used cameras, monitoring, and so on, most of them are AV signals, domestic standards are pal, using coaxial, transmission, the advantage is that the transmission distance can be very long, and simple line. AV cameras are also used mostly in video arrays.Commonly used set-top boxes, televisions, STB final output of the image signal to the TV, most of them are cvbs, mixed signals, wherein the video
Android audio and video goes deep into the 16 FFmpeg streaming mobile phone camera to achieve live broadcast (with source code download), androidffmpeg
Source Code addressHttps://github.com/979451341/RtmpCamera/tree/masterAfter configuring the RMTP server, paste it here.1. Configure the RTMP Server
I don't want to post two blogs on mac and windows respectively.Set up an RTMP server on MACHttps://www.jianshu
To the photographic enthusiasts for detailed analysis to share the Canon 1100D camera support does not support the 1080P video shooting problem.
Analytical sharing:
Canon 1100D does not have full HD video capture capabilities, does not support 1080p (1920x1080) video capture, supports 720p (1280x720)
Original address: http://blog.csdn.net/chenhongwu666/article/details/41965801Connect the camera device, you need to introduceAforge.video;AForge.Video.DirectShow;AForge.Video.FFMPEG;You also need to add a reference, Aforge.dll,aforge.video,aforge.video.directshow,aforge.control,aforge.video.ffmpeg,You also need to add Aforge.control in the Toolbox, and then find Videosourceplayer this control to add to the interfaceThen define the variablesPrivate Fil
Original address: http://blog.csdn.net/yanzi1225627/article/details/8605061#Many times, the Android camera module not only previews, take pictures so simple, but need to preview the video, can make some detection, such as the most common face detection. Before the camera button is pressed, the face is detected and the rectangle is marked, followed by the photo. S
To the photographic enthusiasts for detailed analysis to share the Canon SX240 HS camera Support video shooting problem.
Analytical sharing:
Canon SX240 HS supports 1080p (1920x1080,24 frame/sec), 720p (1280x720,30 frame/sec), 640x480 (30 frames/sec, 120 frames/sec), 320x240 (240 frames/sec) video shoot.
Well, the above information is small set to all of y
To the photographic enthusiasts for detailed analysis to share the Canon 6D camera support video shooting problem.
Analytical sharing:
Canon 6D supports 1920x1080 (29.97fps,25fps,23.976fps), 1280x720 (59.94fps,50fps) and 640x480 (30fps,25fps) video shots.
Well, the above information is small set to all the photography enthusiasts brought to the
To the photographic enthusiasts for detailed analysis to share the Canon IXUS510 HS camera Support does not support 1080P video problems.
Analytical sharing:
Canon IXUS510 HS supports 1080p (1920x1080,24 frame/sec) video shooting and playback.
Well, the above information is small knitting to all of you photography enthusiasts brought to the deta
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.