Class MediaPacket
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.dll
- API Level:
- 3
Represents a packet for multimedia.
C#Copypublic abstract class MediaPacket : IDisposable
- Inheritance
-
System.ObjectMediaPacket
- Implements
-
System.IDisposable
Properties
Declaration
C#Copypublic IMediaBuffer Buffer { get; }
Property Value
Type | Description |
---|---|
IMediaBuffer | The IMediaBuffer allocated to the packet. This property will return null if the packet is in the raw video format. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
API Level: 3
Declaration
C#Copypublic MediaPacketBufferFlags BufferFlags { get; set; }
Property Value
Type | Description |
---|---|
MediaPacketBufferFlags |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
InvalidOperationException | The MediaPacket is not in the writable state, which means it is being used by another module. |
API Level: 3
Declaration
C#Copypublic int BufferWrittenLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
System.ArgumentOutOfRangeException | The value specified for this property is less than zero or greater than the length of the Buffer. |
InvalidOperationException | The MediaPacket has VideoPlanes instead of Buffer. |
API Level: 3
Dts
Gets or sets the DTS(Decoding Time Stamp) value of the current packet in nanoseconds.
Declaration
C#Copypublic ulong Dts { get; set; }
Property Value
Type | Description |
---|---|
UInt64 |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
InvalidOperationException | The MediaPacket is not in the writable state, which means it is being used by another module. |
API Level: 3
Declaration
C#Copypublic ulong Duration { get; set; }
Property Value
Type | Description |
---|---|
UInt64 |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
InvalidOperationException | The MediaPacket is not in the writable state, which means it is being used by another module. |
API Level: 6
Declaration
C#Copypublic Flips Flip { get; set; }
Property Value
Type | Description |
---|---|
Flips |
Remarks
None will be ignored in set case. It's not supported in Native FW.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The specified value to set is invalid. |
ObjectDisposedException | The MediaPacket has already been disposed of. |
InvalidOperationException | The MediaPacket is not in the writable state, which means it is being used by another module. |
API Level: 5
Declaration
C#Copypublic MediaFormat Format { get; }
Property Value
Type | Description |
---|---|
MediaFormat |
API Level: 3
Declaration
C#Copypublic bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the packet has been disposed of; otherwise, false. |
API Level: 3
Declaration
C#Copypublic bool IsEncoded { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the packet is the encoded type; otherwise, false. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
API Level: 3
Pts
Gets or sets the PTS(Presentation Time Stamp) value of the current packet in nanoseconds.
Declaration
C#Copypublic ulong Pts { get; set; }
Property Value
Type | Description |
---|---|
UInt64 |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
InvalidOperationException | The MediaPacket is not in the writable state, which means it is being used by another module. |
API Level: 3
Declaration
C#Copypublic Rotation Rotation { get; set; }
Property Value
Type | Description |
---|---|
Rotation |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The specified value to set is invalid. |
ObjectDisposedException | The MediaPacket has already been disposed of. |
InvalidOperationException | The MediaPacket is not in the writable state, which means it is being used by another module. |
API Level: 5
Declaration
C#Copypublic MediaPacketVideoPlane[] VideoPlanes { get; }
Property Value
Type | Description |
---|---|
MediaPacketVideoPlane[] | The MediaPacketVideoPlanes allocated to the packet. This property will return null if the packet is not in the raw video format. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
API Level: 3
Methods
Create(MediaFormat)
Creates an object of the MediaPacket with the specified MediaFormat.
Declaration
C#Copypublic static MediaPacket Create(MediaFormat format)
Parameters
Type | Name | Description |
---|---|---|
MediaFormat | format | The media format for the new packet. |
Returns
Type | Description |
---|---|
MediaPacket | A new MediaPacket object. |
API Level: 3
Declaration
C#Copypublic void Dispose()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaPacket can not be disposed, which means it is being used by another module. |
API Level: 3
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
API Level: 3
Declaration
C#Copyprotected void Finalize()