Win8 Metro MediaCapture Class

Source: Internet
Author: User

Recent projects in contact with Win8 Metro camera. Among the more important class is the Mediacapture class, now introduce the Mediacapture class, but also summarize some of their own project experience:

Here are some method invocations of the Mediacapture class:

Using system;using windows.foundation;using windows.foundation.collections;using windows.foundation.metadata;using Windows.media;using windows.media.devices;using windows.media.mediaproperties;using Windows.Storage;using Windows.storage.streams;namespace windows.media.capture{//Summary://provides functionality for capturing pho    TOS, audio, and videos from a capture//device, such as a webcam.    [Activatable (100794368)]    [Dualapipartition (Version = 100794368)]    [Marshalingbehavior (Marshalingtype.standard)]    [Threading (THREADINGMODEL.MTA)] [Version (100794368)] public sealed class Mediacapture:idisposable {//Create an instance of a MediaCapture object pub        Lic MediaCapture (); Returns an object that controls microphone settings.        The Audiodevicecontroller object is the object that controls microphone settings public Audiodevicecontroller Audiodevicecontroller {get;} The Mediacapturesettings object includes settings for the mediacapture. This function returns the setting of the Mediacapture object public mediacapturesettings mediacapturesettings {get;} Returns an object that controls the settings of the video camera, Videodevicecontroller is the object public Videodevicecontroller Videodeviceco        Ntroller {get;} Summary://This is the Events of the Mediacapture class.        This event occurs when an error occurs while media is captured public event Mediacapturefailedeventhandler Failed; Summary://This is also the events of the Mediacapture class, which triggers this event when the record limit is exceeded Recordlimitationexceededeve        Nthandler recordlimitationexceeded;        Summary://Adds an audio or video effect. Parameters://Mediastreamtype://Specifies the streams to which the effect would be APPL        Ied.         Effectactivationid://The class identifier of the Activatable runtime class that implements the Effect.        The runtime class must implement the Imediaextension interface.        Effectsettings://Configuration parameters for the effect.    Returns:    Returns an Iasyncaction object, which is used to control the asynchronous operation. Public iasyncaction Addeffectasync (Mediastreamtype mediastreamtype, string Effectactivationid, Ipropertyset        Effectsettings);        Summary://Captures a photo to a storage file.        Parameters://Type://The encoding properties for the output image.        File://The storage file where the image is saved.        Returns://Returns an Iasyncaction object which is used to control the asynchronous operation.        Public iasyncaction Capturephototostoragefileasync (imageencodingproperties type, istoragefile file);        Summary://Captures a photo to a random-access stream.        Parameters://Type://The encoding properties for the output image. Stream://The stream where the Image data is written.        Returns://Returns an Iasyncaction object which is used to control the asynchronous operation.        Public iasyncaction Capturephototostreamasync (imageencodingproperties type, Irandomaccessstream stream);        Summary://Removes all audio and video effects from a stream.        Parameters://Mediastreamtype://The stream from which to remove the effects.        Returns://Returns A Iasyncaction object that's used to control the asynchronous operation.        Public iasyncaction Cleareffectsasync (Mediastreamtype mediastreamtype);     Summary://performs tasks associated with freeing, releasing, or resetting unmanaged//        Resources.        public void Dispose ();        Summary://Gets The value of a encoding property. Parameters://Mediastreamtype://     Specifies the stream to a query for the encoding property.        PropertyId://The Encoding property to retrieve.        Returns://Returns The value of the Encoding property.        public Object Getencoderproperty (Mediastreamtype mediastreamtype, Guid PropertyId);        Summary://Queries whether the video stream is mirrored horizontally. Returns://True if mirroring is enabled;        False otherwise.        public bool Getpreviewmirroring ();        Summary://Gets The rotation of the video preview stream.        Returns://The amount by which, the video preview stream is rotated.        Public videorotation getpreviewrotation ();        Summary://Gets The rotation of the recorded video.        Returns://The amount by which, the recorded video is rotated. Public VideorotatiOn Getrecordrotation ();        Summary://Initializes the MediaCapture object, using default settings.        Returns://Returns A Iasyncaction object that's used to control the asynchronous operation.        [Overload ("Initializeasync")] public iasyncaction initializeasync ();        Summary://initializes the MediaCapture object.        Parameters://Mediacaptureinitializationsettings://The initialization settings. //

Win8 Metro MediaCapture class

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.