다음을 통해 공유


ICameraCaptureSampleSink interface for Windows Phone 8

July 21, 2014

Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 only

Exposes a method to receive encoded audio or video samples during recording.

Method

The ICameraCaptureSampleSink interface inherits from the IUnknown interface. ICameraCaptureSampleSink has this method.

Method

Description

ICameraCaptureSampleSink::OnSampleAvailable method for Windows Phone 8

Performs caller-implemented actions each time an encoded audio or video sample is captured.

Remarks

Use this sink by calling the IAudioVideoCaptureDeviceNative::SetAudioSampleSink method for Windows Phone 8 or the IAudioVideoCaptureDeviceNative::SetVideoSampleSink method for Windows Phone 8.

This sink only receives samples while the AudioVideoCaptureDevice object is recording. Recording starts when the StartRecordingToSinkAsync method is called and ends after StopRecordingAsync is called. Specify the audio and video encoding formats with the AudioEncodingFormat and VideoEncodingFormat properties, respectively.

Whether AudioVideoCaptureDevice captures audio or video is determined by which open method you use to create the capture device. Use OpenAsync for video samples with audio, OpenForAudioOnlyAsync for audio samples, and OpenForVideoOnlyAsync for video samples without audio.

Requirements

Minimum supported phone

Windows Phone 8

Header

Windows.Phone.Media.Capture.Native.h

Namespace

Windows::Phone::Media::Capture

See Also

Reference

Windows.Phone.Media.Capture

Other Resources

Advanced photo capture for Windows Phone 8

Advanced capture properties for Windows Phone 8