Class MediaPacket

Definition

Namespace:
Tizen.Multimedia
Assembly:
Tizen.Multimedia.dll
API Level:
3

Represents a packet for multimedia.

C#
Copy
public abstract class MediaPacket : IDisposable
Inheritance
MediaPacket
Implements
IDisposable

Properties

View Source

Buffer

Gets the buffer of the packet.

Declaration
C#
Copy
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.

API Level: 3
View Source

BufferFlags

Gets or sets the buffer flags of the packet.

Declaration
C#
Copy
public MediaPacketBufferFlags BufferFlags { get; set; }
Property Value
Type Description
MediaPacketBufferFlags
API Level: 3
View Source

BufferWrittenLength

Gets or sets a length of data written in the Buffer.

Declaration
C#
Copy
public int BufferWrittenLength { get; set; }
Property Value
Type Description
Int32
API Level: 3
View Source

Dts

Gets or sets the DTS(Decoding Time Stamp) value of the current packet in nanoseconds.

Declaration
C#
Copy
public ulong Dts { get; set; }
Property Value
Type Description
UInt64
API Level: 3
View Source

Duration

Gets or sets the duration value of the current packet in nanoseconds.

Declaration
C#
Copy
public ulong Duration { get; set; }
Property Value
Type Description
UInt64
API Level: 6
View Source

Flip

Gets or sets the flip value of the current packet.

Declaration
C#
Copy
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.

API Level: 5
View Source

Format

Gets the media format of the current packet.

Declaration
C#
Copy
public MediaFormat Format { get; }
Property Value
Type Description
MediaFormat
API Level: 3
View Source

IsDisposed

Gets a value indicating whether the packet has been disposed.

Declaration
C#
Copy
public bool IsDisposed { get; }
Property Value
Type Description
Boolean

true if the packet has been disposed of; otherwise, false.

API Level: 3
View Source

IsEncoded

Gets a value indicating whether the packet is the encoded type.

Declaration
C#
Copy
public bool IsEncoded { get; }
Property Value
Type Description
Boolean

true if the packet is the encoded type; otherwise, false.

API Level: 3
View Source

Pts

Gets or sets the PTS(Presentation Time Stamp) value of the current packet in nanoseconds.

Declaration
C#
Copy
public ulong Pts { get; set; }
Property Value
Type Description
UInt64
API Level: 3
View Source

Rotation

Gets or sets the rotation value of the current packet.

Declaration
C#
Copy
public Rotation Rotation { get; set; }
Property Value
Type Description
Rotation
API Level: 5
View Source

VideoPlanes

Gets the video planes of the packet.

Declaration
C#
Copy
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.

See Also
API Level: 3

Methods

View Source

Create(MediaFormat)

Creates an object of the MediaPacket with the specified MediaFormat.

Declaration
C#
Copy
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 Source

Create(MediaPacket)

Creates an object of the MediaPacket based on the original MediaPacket and increases the internal reference(hereafter ref) count by 1.

Declaration
C#
Copy
public static MediaPacket Create(MediaPacket mediaPacket)
Parameters
Type Name Description
MediaPacket mediaPacket

The media packet to increase ref count.

Returns
Type Description
MediaPacket

A MediaPacket object which is based on original MediaPacket instance.

Remarks

This method can be useful when user share MediaPacket instance to other module and don't know the exact time to dispose it.\n In this case, user creates a new instance with Create(MediaPacket) and shares it to other module.\n And then, each MediaPacket instances can be disposed independently without concerning other instance's life cycle.

API Level: 10
View Source

Dispose()

Releases all resources used by the MediaPacket object.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Dispose(Boolean)

Releases the resources used by the MediaPacket object.

Declaration
C#
Copy
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 Source

Finalize()

Finalizes an instance of the MediaPacket class.

Declaration
C#
Copy
protected void Finalize()

Implements

IDisposable

Extension Methods