package ffmpeg-avcodec

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Packet.

type 'media t

Packet type

type 'media parser

Parser type

type flag = [
  1. | `Keyframe
  2. | `Corrupt
  3. | `Discard
  4. | `Trusted
  5. | `Disposable
]

Packet flags

val dup : 'media t -> 'media t

Return a fresh packet refereing the same data.

val get_flags : 'media t -> flag list

Retun the packet flags.

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.

val parse_bytes : 'media parser -> ('media t -> unit) -> bytes -> int -> unit

Same as Avcodec.Packet.parse_data with bytes array.

OCaml

Innovation. Community. Security.