Rtmpmodule Io : sig ... endI/O helper functions.
module Flv : sig ... endOperations on flv files.
module Amf : sig ... endAMF0
Low-level functions.
High-level functions.
module Message : sig ... endmodule IMap : sig ... endtype connection = {mutable start_time : float; |
mutable last_time : float; |
socket : Unix.file_descr; |
mutable chunk_size : int; |
mutable last_timestamp : Stdlib.Int32.t IMap.t; |
mutable last_message_length : int IMap.t; |
mutable last_message_stream_id : Stdlib.Int32.t IMap.t; |
mutable last_message_type_id : int IMap.t; |
mutable partial_messages : Message.t list; |
messages : Message.t Stdlib.Queue.t; |
}Parameters for a given connection.
val create_connection : Unix.file_descr -> connectionCreate a connection.
val now : connection -> int32Current timestamp.
val delta : connection -> int32Current timestamp delta.
val chunkify : connection -> chunk_stream_id:int -> timestamp:int32 -> message_type_id:int ->
message_stream_id:int32 -> string -> unitWrite a long message with chunks.
val control_message : connection -> int -> string -> unitSend a control message.
val set_chunk_size : connection -> int -> unitval abort_message : connection -> int32 -> unitval acknowledgement : connection -> int32 -> unitval user_control : connection -> int -> string -> unitSend a user control message.
val stream_begin : connection -> int32 -> unitval ping_request : connection -> int32 -> unitval ping_response : connection -> int32 -> unitval window_acknowledgement_size : connection -> int -> unitval set_peer_bandwidth : connection -> int -> [< `Dynamic | `Hard | `Soft ] -> unitval command : connection -> ?timestamp:int32 -> ?message_stream_id:int32 ->
string -> int -> Amf.t list -> unitval audio : connection -> ?timestamp:int32 -> ?message_stream_id:int32 -> string -> unitval video : connection -> ?timestamp:int32 -> ?message_stream_id:int32 -> string -> unitval data : connection -> ?message_stream_id:int32 -> Amf.t list -> unitval handshake : connection -> unitPerform handshake.
val read_chunk : connection -> unitRead a chunk.
val has_message : connection -> boolval pop_message : connection -> Stdlib.Int32.t * Stdlib.Int32.t * [> `Acknowledgement of int32 | `Audio of string | `Command of int * [> `Connect | `Create_stream | `Delete_stream of int | `On_bandwidth_done | `On_status of Amf.t | `Publish of string * string | `Result of Amf.t array | `Unhandled of string * Amf.t array ] | `Data of Amf.t list | `Peer_banddwidth of int32 * [> `Dynamic | `Hard | `Soft ] | `Set_chunk_size of int | `Video of string | `Window_acknowledgement_size of int32 ]val handle_messages : connection -> (timestamp:Stdlib.Int32.t -> stream:Stdlib.Int32.t ->
[> `Acknowledgement of int32 | `Audio of string | `Command of int * [> `Connect | `Create_stream | `Delete_stream of int | `On_bandwidth_done | `On_status of Amf.t | `Publish of string * string | `Result of Amf.t array | `Unhandled of string * Amf.t array ] | `Data of Amf.t list | `Peer_banddwidth of int32 * [> `Dynamic | `Hard | `Soft ] | `Set_chunk_size of int | `Video of string | `Window_acknowledgement_size of int32 ] -> unit) -> unitPass all available messages to a function.
val read_chunks : ?handler:(timestamp:Stdlib.Int32.t -> stream:Stdlib.Int32.t ->
[> `Acknowledgement of int32 | `Audio of string | `Command of int * [> `Connect | `Create_stream | `Delete_stream of int | `On_bandwidth_done | `On_status of Amf.t | `Publish of string * string | `Result of Amf.t array | `Unhandled of string * Amf.t array ] | `Data of Amf.t list | `Peer_banddwidth of int32 * [> `Dynamic | `Hard | `Soft ] | `Set_chunk_size of int | `Video of string | `Window_acknowledgement_size of int32 ] -> unit)
-> connection -> unitRead as many chunks as available.