22 #ifndef AVFORMAT_RTMPPKT_H
23 #define AVFORMAT_RTMPPKT_H
29 #define RTMP_CHANNELS 65599
97 int timestamp,
int size);
166 const uint8_t *
name, uint8_t *dst,
int dst_size);
void ff_rtmp_packet_destroy(RTMPPacket *pkt)
Free RTMP packet.
int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type, int timestamp, int size)
Create new RTMP packet with given attributes.
int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket *prev_pkt)
Read RTMP packet sent by the server.
RTMPChannel
channels used to for RTMP packets with different purposes (i.e.
struct RTMPPacket RTMPPacket
structure for holding RTMP packets
void ff_amf_write_number(uint8_t **dst, double num)
Write number in AMF format to buffer.
RTMPPacketType type
packet payload type
channel for sending a/v to server
void ff_amf_write_bool(uint8_t **dst, int val)
Write boolean value in AMF format to buffer.
int ff_rtmp_packet_write(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket *prev_pkt)
Send RTMP packet to the server.
uint32_t extra
probably an additional channel ID used during streaming data
void ff_amf_write_null(uint8_t **dst)
Write AMF NULL value to buffer.
uint32_t ts_delta
timestamp increment to the previous one in milliseconds (latter only for media packets) ...
int size
packet payload size
void ff_amf_write_string(uint8_t **dst, const char *str)
Write string in AMF format to buffer.
void ff_amf_write_field_name(uint8_t **dst, const char *str)
Write string used as field name in AMF object to buffer.
packet has 12-byte header
int ff_amf_tag_size(const uint8_t *data, const uint8_t *data_end)
Calculate number of bytes taken by first AMF entry in data.
RTMPPacketSize
possible RTMP packet header sizes
RTMPPacketType
known RTMP packet types
int ff_amf_match_string(const uint8_t *data, int size, const char *str)
Match AMF string with a NULL-terminated string.
channel for sending server control messages
void ff_rtmp_packet_dump(void *ctx, RTMPPacket *p)
Print information and contents of RTMP packet.
int channel_id
RTMP channel ID (nothing to do with audio/video channels though)
void ff_amf_write_object_start(uint8_t **dst)
Write marker for AMF object to buffer.
int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end, const uint8_t *name, uint8_t *dst, int dst_size)
Retrieve value of given AMF object field in string form.
channel for network-related messages (bandwidth report, ping, etc)
uint32_t timestamp
packet full timestamp
uint8_t * data
packet payload
packet is really a next chunk of a packet
structure for holding RTMP packets
unbuffered private I/O API
invoke some stream action
void ff_amf_write_object_end(uint8_t **dst)
Write marker for end of AMF object to buffer.