Avcodec.Packet
Packet.
type side_data = [
| `Replaygain of replaygain
| `Strings_metadata of (string * string) list
| `Metadata_update of (string * string) list
]
Packet side_data (incomplete)
val get_size : 'media t -> int
Return the size of the packet.
val get_stream_index : 'media t -> int
Return the stream index of the packet.
val set_stream_index : 'media t -> int -> unit
Set the stream index of the packet.
val get_pts : 'media t -> Stdlib.Int64.t option
Return the packet PTS (Presentation Time) in its stream's base_time unit.
val set_pts : 'media t -> Stdlib.Int64.t option -> unit
Set the packet PTS (Presentation Time) in its stream's base_time unit.
val get_dts : 'media t -> Stdlib.Int64.t option
Return the packet DTS (Decoding Time) in its stream's base_time unit.
val set_dts : 'media t -> Stdlib.Int64.t option -> unit
Set the packet DTS (Decoding Time) in its stream's base_time unit.
val get_duration : 'media t -> Stdlib.Int64.t option
Return the packet duration in its stream's base_time unit.
val set_duration : 'media t -> Stdlib.Int64.t option -> unit
Set the packet duration in its stream's base_time unit.
val get_position : 'media t -> Stdlib.Int64.t option
Return the packet byte position in stream.
val set_position : 'media t -> Stdlib.Int64.t option -> unit
Set the packet byte position in stream.
val to_bytes : 'media t -> bytes
Return a fresh bytes array containing a copy of packet datas.
val parse_data : 'media parser -> ('media t -> unit) -> Avutil.data -> unit
Avcodec.Packet.parse_data parser f data
applies function f
to the parsed packets frome the data
array according to the parser
configuration.
Raise Error if the parsing failed.
Same as Avcodec.Packet.parse_data
with bytes array.
val create : string -> 'media t
Advanced users: create a packet with the given data.
val content : 'media t -> string
Advanced users: return the packet's content.