Class MediaStreamSource

Definition

Namespace:
Tizen.Multimedia
Assembly:
Tizen.Multimedia.MediaPlayer.dll
API Level:
3

Provides the ability to push packets as the source of Player.

C#
Copy
public sealed class MediaStreamSource : MediaSource
Inheritance
System.Object
MediaStreamSource
Remarks

The source must be set as a source to a player before pushing.

Constructors

View Source

MediaStreamSource(AudioMediaFormat)

Initializes a new instance of the MediaStreamSource class with the specified AudioMediaFormat.

Declaration
C#
Copy
public MediaStreamSource(AudioMediaFormat audioMediaFormat)
Parameters
Type Name Description
AudioMediaFormat audioMediaFormat

The AudioMediaFormat for this source.

Remarks

AAC is supported.

Exceptions
Type Condition
System.ArgumentNullException

audioMediaFormat is null.

System.ArgumentException

audioMediaFormat is not supported.

API Level: 3
View Source

MediaStreamSource(AudioMediaFormat, VideoMediaFormat)

Initializes a new instance of the MediaStreamSource class with the specified AudioMediaFormat and VideoMediaFormat.

Declaration
C#
Copy
public MediaStreamSource(AudioMediaFormat audioMediaFormat, VideoMediaFormat videoMediaFormat)
Parameters
Type Name Description
AudioMediaFormat audioMediaFormat

The AudioMediaFormat for this source.

VideoMediaFormat videoMediaFormat

The VideoMediaFormat for this source.

Remarks

AAC and H.264 are supported.

Exceptions
Type Condition
System.ArgumentNullException

Both audioMediaFormat and videoMediaFormat are null.

System.ArgumentException

audioMediaFormat is not supported.
-or-
videoMediaFormat is not supported.

API Level: 3
View Source

MediaStreamSource(VideoMediaFormat)

Initializes a new instance of the MediaStreamSource class with the specified VideoMediaFormat.

Declaration
C#
Copy
public MediaStreamSource(VideoMediaFormat videoMediaFormat)
Parameters
Type Name Description
VideoMediaFormat videoMediaFormat

The VideoMediaFormat for this source.

Remarks

H.264 is supported.

Exceptions
Type Condition
System.ArgumentNullException

videoMediaFormat is null.

System.ArgumentException

videoMediaFormat is not supported.

API Level: 3

Properties

View Source

AudioConfiguration

Gets the audio configuration, or null if no AudioMediaFormat is specified in the constructor.

Declaration
C#
Copy
public MediaStreamConfiguration AudioConfiguration { get; }
Property Value
Type Description
MediaStreamConfiguration
API Level: 3
View Source

Player

Gets the Player that this source is assigned to as a source, or null if this source is not assigned.

Declaration
C#
Copy
public Player Player { get; }
Property Value
Type Description
Player
API Level: 3
View Source

SupportedAudioTypes

Gets all supported audio types.

Declaration
C#
Copy
public static IEnumerable<MediaFormatAudioMimeType> SupportedAudioTypes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<MediaFormatAudioMimeType>
API Level: 3
View Source

SupportedVideoTypes

Gets all supported video types.

Declaration
C#
Copy
public static IEnumerable<MediaFormatVideoMimeType> SupportedVideoTypes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<MediaFormatVideoMimeType>
API Level: 3
View Source

VideoConfiguration

Gets the video configuration, or null if no VideoMediaFormat is specified in the constructor.

Declaration
C#
Copy
public MediaStreamConfiguration VideoConfiguration { get; }
Property Value
Type Description
MediaStreamConfiguration
API Level: 3

Methods

View Source

Push(MediaPacket)

Pushes elementary stream to decode audio or video.

Declaration
C#
Copy
public void Push(MediaPacket packet)
Parameters
Type Name Description
MediaPacket packet

The MediaPacket to decode.

Remarks

This source must be set as a source to a player and the player must be in the Ready, Playing, or Paused state.

Exceptions
Type Condition
System.InvalidOperationException

This source is not set as a source to a player.
-or-
The player is not in the valid state.

System.ArgumentNullException

packet is null.

ObjectDisposedException

packet has been disposed of.

System.ArgumentException

packet is neither video nor audio type.
-or-
The format of packet is not matched with the specified format in the constructor.

NoBufferSpaceException

The internal buffer has reached its limits.

API Level: 3

See Also