Class MediaBufferSource

Definition

Namespace:
Tizen.Multimedia
Assembly:
Tizen.Multimedia.MediaPlayer.dll

Represents a media source using memory.

C#
Copy
public sealed class MediaBufferSource : MediaSource
Inheritance
object
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[], int, int)

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
byte[] buffer

The source array to be copied into the buffer.

int length

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

int offset

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

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.

Exceptions
Type Condition
System.ArgumentNullException

buffer is null.

System.ArgumentOutOfRangeException

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

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
byte[] buffer

The source array to be copied into the buffer.

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.

Exceptions
Type Condition
System.ArgumentNullException

buffer is null.

View Source

MediaBufferSource(int)

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

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

The value indicating the size of the buffer.

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.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

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

Properties

View Source

Buffer

Gets the byte array of this buffer.

Declaration
C#
Copy
public byte[] Buffer { get; }
Property Value
Type Description
byte[]
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.

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
byte[] buffer

The array to be wrapped.

Returns
Type Description
MediaBufferSource

A MediaBufferSource wrapping the byte array.

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.

See Also