Class MediaBufferSource

Definition

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

Represents a media source using memory.

C#
Copy
public sealed class MediaBufferSource : MediaSource
Inheritance
MediaBufferSource
Remarks

The buffer has to be filled with appropriate data which means it must be well-formatted. If you provide invalid data, you won't receive an error until Start() is called.

Constructors

View Source

MediaBufferSource(Byte[])

Initializes a new instance of the MediaBufferSource class from the buffer.

Declaration
C#
Copy
public MediaBufferSource(byte[] buffer)
Parameters
Type Name Description
System.Byte[] buffer

The source array to be copied into the buffer.

Exceptions
Type Condition
ArgumentNullException

buffer is null.

API Level: 3
View Source

MediaBufferSource(Byte[], Int32, Int32)

Initializes a new instance of the MediaBufferSource class from the buffer with the specified length and the specified offset.

Declaration
C#
Copy
public MediaBufferSource(byte[] buffer, int length, int offset = 0)
Parameters
Type Name Description
System.Byte[] buffer

The source array to be copied into the buffer.

System.Int32 length

The value indicating the number of bytes to copy from the buffer.

System.Int32 offset

The value indicating the offset in the buffer of the first byte to copy.

Exceptions
Type Condition
ArgumentNullException

buffer is null.

ArgumentOutOfRangeException

offset is less than zero.
-or-
length is equal to or less than zero.
-or-
offset+length is greater than buffer.Length.

API Level: 3
View Source

MediaBufferSource(Int32)

Initializes a new instance of the MediaBufferSource class with an allocated buffer.

Declaration
C#
Copy
public MediaBufferSource(int length)
Parameters
Type Name Description
System.Int32 length

The value indicating the size of the buffer.

Exceptions
Type Condition
ArgumentOutOfRangeException

length is zero.
-or-
length is less than zero.

API Level: 3

Properties

View Source

Buffer

Gets the byte array of this buffer.

Declaration
C#
Copy
public byte[] Buffer { get; }
Property Value
Type Description
System.Byte[]
API Level: 3

Methods

View Source

Wrap(Byte[])

Creates a MediaBufferSource that wraps a byte array.

Declaration
C#
Copy
public static MediaBufferSource Wrap(byte[] buffer)
Parameters
Type Name Description
System.Byte[] buffer

The array to be wrapped.

Returns
Type Description
MediaBufferSource

A MediaBufferSource wrapping the byte array.

API Level: 3

See Also