sig
exception Error of string
exception Timeout
exception Stopped
exception Failed
exception End_of_stream
val init : ?argv:string array -> unit -> unit
val deinit : unit -> unit
val version : unit -> int * int * int * int
val version_string : unit -> string
type data =
(int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
module Format :
sig
type t = Undefined | Default | Bytes | Time | Buffers | Percent
val to_string : Gstreamer.Format.t -> string
end
module Event :
sig
type seek_flag =
Seek_flag_none
| Seek_flag_flush
| Seek_flag_accurate
| Seek_flag_key_unit
| Seek_flag_segment
| Seek_flag_skip
| Seek_flag_snap_before
| Seek_flag_snap_after
| Seek_flag_snap_nearest
end
module Element :
sig
type t
val set_property_string :
Gstreamer.Element.t -> string -> string -> unit
val set_property_int : Gstreamer.Element.t -> string -> string -> unit
val set_property_bool : Gstreamer.Element.t -> string -> string -> unit
type state =
State_void_pending
| State_null
| State_ready
| State_paused
| State_playing
val string_of_state : Gstreamer.Element.state -> string
type state_change =
State_change_success
| State_change_async
| State_change_no_preroll
val set_state :
Gstreamer.Element.t ->
Gstreamer.Element.state -> Gstreamer.Element.state_change
val get_state :
Gstreamer.Element.t ->
Gstreamer.Element.state_change * Gstreamer.Element.state *
Gstreamer.Element.state
val link : Gstreamer.Element.t -> Gstreamer.Element.t -> unit
val link_many : Gstreamer.Element.t list -> unit
val position :
Gstreamer.Element.t -> Gstreamer.Format.t -> Stdlib.Int64.t
val duration :
Gstreamer.Element.t -> Gstreamer.Format.t -> Stdlib.Int64.t
val seek_simple :
Gstreamer.Element.t ->
Gstreamer.Format.t ->
Gstreamer.Event.seek_flag list -> Stdlib.Int64.t -> unit
end
module Element_factory :
sig
type t = Gstreamer.Element.t
val make : string -> string -> Gstreamer.Element_factory.t
end
module Loop :
sig
type t
val create : unit -> Gstreamer.Loop.t
val run : Gstreamer.Loop.t -> unit
val quit : Gstreamer.Loop.t -> unit
end
module Bus :
sig
type t
type message_type =
[ `Any
| `Application
| `Async_done
| `Async_start
| `Buffering
| `Clock_lost
| `Clock_provide
| `Duration_changed
| `Element
| `End_of_stream
| `Error
| `Have_context
| `Info
| `Latency
| `Need_context
| `New_clock
| `Progress
| `Qos
| `Request_state
| `Reset_time
| `Segment_done
| `Segment_start
| `State_changed
| `State_dirty
| `Step_done
| `Step_start
| `Stream_start
| `Stream_status
| `Structure_change
| `Tag
| `Toc
| `Unknown
| `Warning ]
type message_payload =
[ `Application
| `Async_done
| `Async_start
| `Buffering of int
| `Clock_lost
| `Clock_provide
| `Duration_changed
| `Element
| `End_of_stream
| `Error of string
| `Have_context
| `Info of string
| `Latency
| `Need_context
| `New_clock
| `Progress
| `Qos
| `Request_state
| `Reset_time
| `Segment_done
| `Segment_start
| `State_changed of
Gstreamer.Element.state * Gstreamer.Element.state *
Gstreamer.Element.state
| `State_dirty
| `Step_done
| `Step_start
| `Stream_start
| `Stream_status
| `Structure_change
| `Tag of (string * string list) list
| `Toc
| `Unknown
| `Warning of string ]
type message = {
source : string;
payload : Gstreamer.Bus.message_payload;
}
val of_element : Gstreamer.Element.t -> Gstreamer.Bus.t
val pop_filtered :
Gstreamer.Bus.t ->
Gstreamer.Bus.message_type list -> Gstreamer.Bus.message option
val timed_pop_filtered :
Gstreamer.Bus.t ->
?timeout:Stdlib.Int64.t ->
Gstreamer.Bus.message_type list -> Gstreamer.Bus.message
end
module Bin :
sig
type t = Gstreamer.Element.t
val of_element : Gstreamer.Element.t -> Gstreamer.Bin.t
val add : Gstreamer.Bin.t -> Gstreamer.Element.t -> unit
val add_many : Gstreamer.Bin.t -> Gstreamer.Element.t list -> unit
val get_by_name : Gstreamer.Bin.t -> string -> Gstreamer.Element.t
end
module Pipeline :
sig
type t = Gstreamer.Element.t
val create : string -> Gstreamer.Pipeline.t
val parse_launch : string -> Gstreamer.Pipeline.t
end
module Buffer :
sig
type t
val of_string : string -> int -> int -> Gstreamer.Buffer.t
val of_data : Gstreamer.data -> int -> int -> Gstreamer.Buffer.t
val set_presentation_time :
Gstreamer.Buffer.t -> Stdlib.Int64.t -> unit
val set_decoding_time : Gstreamer.Buffer.t -> Stdlib.Int64.t -> unit
val set_duration : Gstreamer.Buffer.t -> Stdlib.Int64.t -> unit
end
module App_src :
sig
type t
val to_element : Gstreamer.App_src.t -> Gstreamer.Element.t
val of_element : Gstreamer.Element.t -> Gstreamer.App_src.t
val push_buffer : Gstreamer.App_src.t -> Gstreamer.Buffer.t -> unit
val push_buffer_bytes :
Gstreamer.App_src.t ->
?presentation_time:Stdlib.Int64.t ->
?duration:Stdlib.Int64.t -> bytes -> int -> int -> unit
val push_buffer_data :
Gstreamer.App_src.t ->
?presentation_time:Stdlib.Int64.t ->
?duration:Stdlib.Int64.t -> Gstreamer.data -> int -> int -> unit
val on_need_data : Gstreamer.App_src.t -> (int -> unit) -> unit
val end_of_stream : Gstreamer.App_src.t -> unit
val set_format : Gstreamer.App_src.t -> Gstreamer.Format.t -> unit
end
module App_sink :
sig
type t
val of_element : Gstreamer.Element.t -> Gstreamer.App_sink.t
val pull_buffer_data : Gstreamer.App_sink.t -> Gstreamer.data
val pull_buffer_string : Gstreamer.App_sink.t -> string
val emit_signals : Gstreamer.App_sink.t -> unit
val is_eos : Gstreamer.App_sink.t -> bool
val on_new_sample : Gstreamer.App_sink.t -> (unit -> unit) -> unit
val set_max_buffers : Gstreamer.App_sink.t -> int -> unit
end
module Caps : sig type t val to_string : Gstreamer.Caps.t -> string end
module Type_find_element :
sig
type t
val of_element : Gstreamer.Element.t -> Gstreamer.Type_find_element.t
val on_have_type :
Gstreamer.Type_find_element.t ->
(int -> Gstreamer.Caps.t -> unit) -> unit
end
module Tag_setter :
sig
type t
type merge_mode =
Undefined
| Replace_all
| Replace
| Append
| Prepend
| Keep
| Keep_all
| Count
val of_element : Gstreamer.Element.t -> Gstreamer.Tag_setter.t
val add_tag :
Gstreamer.Tag_setter.t ->
Gstreamer.Tag_setter.merge_mode -> string -> string -> unit
end
end