Dela via


AppBroadcastStreamReader Class

Definition

Provides methods and events for obtaining audio and video frames from an app broadcast stream.

Note

This API requires the appBroadcast and appBroadcastSettings capability which is not available to all Windows apps. Unless your developer account is specially provisioned by Microsoft, calls to this API will fail at runtime.

public ref class AppBroadcastStreamReader sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Media.Capture.AppBroadcastContract, 65536)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AppBroadcastStreamReader final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Media.Capture.AppBroadcastContract), 65536)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AppBroadcastStreamReader
Public NotInheritable Class AppBroadcastStreamReader
Inheritance
Object Platform::Object IInspectable AppBroadcastStreamReader
Attributes

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.15063.0)
API contract
Windows.Media.Capture.AppBroadcastContract (introduced in v1.0)
App capabilities
appBroadcast appBroadcastSettings

Remarks

Get an instance of this class by accessing the AppBroadcastBackgroundServiceStreamInfo.BroadcastStreamReader

This API may throw an error if the background service has shut down due to idle timeout.

Properties

AudioAacSequence

Gets a buffer containing the sequence header for the AAC audio stream.

AudioBitrate

Gets the bitrate of the audio stream associated with the AppBroadcastStreamReader, in bits per second.

AudioChannels

Gets the number of channels in the audio stream associated with the AppBroadcastStreamReader.

AudioSampleRate

Gets the sample rate of the audio stream associated with the AppBroadcastStreamReader.

VideoBitrate

Gets the bitrate of the video stream associated with the AppBroadcastStreamReader, in bits per second.

VideoHeight

Gets the height of the frames in the video stream associated with the AppBroadcastStreamReader.

VideoWidth

Gets the width of the frames in the video stream associated with the AppBroadcastStreamReader.

Methods

TryGetNextAudioFrame()

Attempts to obtain an AppBroadcastStreamAudioFrame object representing the latest audio frame from the broadcast stream.

TryGetNextVideoFrame()

Attempts to obtain an AppBroadcastStreamVideoFrame object representing the latest video frame from the broadcast stream.

Events

AudioFrameArrived

Raised when a new audio frame from the broadcast stream arrives.

VideoFrameArrived

Raised when a new video frame from the broadcast stream arrives.

Applies to