Class MediaPacket
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.dll
- API Level:
- 3
Represents a packet for multimedia.
public abstract class MediaPacket : IDisposable
- Inheritance
-
MediaPacket
- Implements
Properties
View SourceBuffer
Gets the buffer of the packet.
Declaration
public 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. |
See Also
API Level: 3
View SourceBufferFlags
Gets or sets the buffer flags of the packet.
Declaration
public 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
View SourceBufferWrittenLength
Gets or sets a length of data written in the Buffer.
Declaration
public int BufferWrittenLength { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The MediaPacket has already been disposed of. |
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
View SourceDts
Gets or sets the DTS(Decoding Time Stamp) value of the current packet in nanoseconds.
Declaration
public 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
View SourceDuration
Gets or sets the duration value of the current packet in nanoseconds.
Declaration
public 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
View SourceFlip
Gets or sets the flip value of the current packet.
Declaration
public 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 |
---|---|
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
View SourceFormat
Gets the media format of the current packet.
Declaration
public MediaFormat Format { get; }
Property Value
Type | Description |
---|---|
MediaFormat |
API Level: 3
View SourceIsDisposed
Gets a value indicating whether the packet has been disposed of.
Declaration
public bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the packet has been disposed of; otherwise, false. |
API Level: 3
View SourceIsEncoded
Gets a value indicating whether the packet is the encoded type.
Declaration
public bool IsEncoded { get; }
Property Value
Type | Description |
---|---|
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
View SourcePts
Gets or sets the PTS(Presentation Time Stamp) value of the current packet in nanoseconds.
Declaration
public 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
View SourceRotation
Gets or sets the rotation value of the current packet.
Declaration
public Rotation Rotation { get; set; }
Property Value
Type | Description |
---|---|
Rotation |
Exceptions
Type | Condition |
---|---|
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
View SourceVideoPlanes
Gets the video planes of the packet.
Declaration
public 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. |
See Also
API Level: 3
Methods
View SourceCreate(MediaFormat)
Creates an object of the MediaPacket with the specified MediaFormat.
Declaration
public 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
View SourceDispose()
Releases all resources used by the MediaPacket object.
Declaration
public void Dispose()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The MediaPacket can not be disposed, which means it is being used by another module. |
API Level: 3
View SourceDispose(Boolean)
Releases the resources used by the MediaPacket object.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
API Level: 3
View SourceFinalize()
Finalizes an instance of the MediaPacket class.
Declaration
protected void Finalize()