MediaCaptureStopResult MediaCaptureStopResult MediaCaptureStopResult MediaCaptureStopResult MediaCaptureStopResult Class

Definition

Provides the last frame captured and the recorded duration of a media capture operation that has been stopped.

public : sealed class MediaCaptureStopResult : IClosable, IMediaCaptureStopResult
struct winrt::Windows::Media::Capture::MediaCaptureStopResult : IClosable, IMediaCaptureStopResult
public sealed class MediaCaptureStopResult : IDisposable, IMediaCaptureStopResult
Public NotInheritable Class MediaCaptureStopResult Implements IDisposable, IMediaCaptureStopResult
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
backgroundMediaRecording

Remarks

Get an instance of this class by calling StopRecordWithResultAsync.

For how-to guidance for handling the result of a paused or stopped video recording, see Basic photo, video, and audio capture with MediaCapture.

Properties

LastFrame LastFrame LastFrame LastFrame LastFrame

Gets a VideoFrame representing the last frame captured before the capture operation was stopped.

public : VideoFrame LastFrame { get; }
VideoFrame LastFrame();
public VideoFrame LastFrame { get; }
Public ReadOnly Property LastFrame As VideoFrame
var videoFrame = mediaCaptureStopResult.lastFrame;
Value
VideoFrame VideoFrame VideoFrame

The last frame captured before the capture operation was stopped.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
backgroundMediaRecording

Remarks

You can display the frame semi-transparently over the capture preview to help the user to align the camera with the last captured frame before they begin capturing again.

RecordDuration RecordDuration RecordDuration RecordDuration RecordDuration

Gets the duration of the media captured before the capture operation was stopped.

public : TimeSpan RecordDuration { get; }
TimeSpan RecordDuration();
public TimeSpan RecordDuration { get; }
Public ReadOnly Property RecordDuration As TimeSpan
var timeSpan = mediaCaptureStopResult.recordDuration;
Value
TimeSpan TimeSpan TimeSpan

The duration of the media captured before the capture operation was stopped.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
backgroundMediaRecording

Methods

Close() Close() Close() Close() Close()

Closes the object and disposes of associated resources.

public : void Close()
void Close() const;
// This member is not implemented in C#
' This member is not implemented in VB.Net
// This member is not implemented in JavaScript
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
backgroundMediaRecording

Remarks

The Close method is used by Universal Windows app using JavaScript. For apps written using the .NET Framework 4.5 in C# and VB.NET, the Close method is exposed as the Dispose() method on the MediaCaptureStopResult object. For apps written in C++, the Close method will be called when using the delete keyword on the object.

Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

// This member is not implemented in C++/CX
void Dispose()
Sub Dispose

See Also