Class MediaBufferSource
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.MediaPlayer.dll
- API Level:
- 3
Represents a media source using memory.
public sealed class MediaBufferSource : MediaSource
- Inheritance
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 SourceMediaBufferSource(Byte[])
Initializes a new instance of the MediaBufferSource class from the buffer.
Declaration
public MediaBufferSource(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | buffer | The source array to be copied into the buffer. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
API Level: 3
View SourceMediaBufferSource(Byte[], Int32, Int32)
Initializes a new instance of the MediaBufferSource class from the buffer with the specified length and the specified offset.
Declaration
public MediaBufferSource(byte[] buffer, int length, int offset = 0)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | buffer | The source array to be copied into the buffer. |
Int32 | length | The value indicating the number of bytes to copy from the buffer. |
Int32 | offset | The value indicating the offset in the buffer of the first byte to copy. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ArgumentOutOfRangeException |
|
API Level: 3
View SourceMediaBufferSource(Int32)
Initializes a new instance of the MediaBufferSource class with an allocated buffer.
Declaration
public MediaBufferSource(int length)
Parameters
Type | Name | Description |
---|---|---|
Int32 | length | The value indicating the size of the buffer. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
API Level: 3
Properties
View SourceBuffer
Gets the byte array of this buffer.
Declaration
public byte[] Buffer { get; }
Property Value
Type | Description |
---|---|
Byte[] |
API Level: 3
Methods
View SourceWrap(Byte[])
Creates a MediaBufferSource that wraps a byte array.
Declaration
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. |