Class MediaBufferSource
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.MediaPlayer.dll
- API Level:
- 3
Represents a media source using memory.
C#Copypublic 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
MediaBufferSource(Byte[])
Initializes a new instance of the MediaBufferSource class from the buffer.
Declaration
C#Copypublic MediaBufferSource(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The source array to be copied into the buffer. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
API Level: 3
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#Copypublic 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 |
|
ArgumentOutOfRangeException |
|
API Level: 3
MediaBufferSource(Int32)
Initializes a new instance of the MediaBufferSource class with an allocated buffer.
Declaration
C#Copypublic MediaBufferSource(int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | length | The value indicating the size of the buffer. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
API Level: 3
Properties
Declaration
C#Copypublic byte[] Buffer { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
API Level: 3
Methods
Declaration
C#Copypublic 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. |