22 #ifndef AVFORMAT_RTMPPKT_H
23 #define AVFORMAT_RTMPPKT_H
30 #define RTMP_CHANNELS 65599
100 int timestamp,
int size);
295 int strsize,
int *
length);
310 int strsize,
int *
length);
void ff_rtmp_packet_destroy(RTMPPacket *pkt)
Free RTMP packet.
const char const char void * val
int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type, int timestamp, int size)
Create new RTMP packet with given attributes.
ptrdiff_t const GLvoid * data
RTMPChannel
channels used to for RTMP packets with different purposes (i.e.
int ff_amf_read_number(GetByteContext *gbc, double *val)
Read AMF number value.
int ff_amf_read_string(GetByteContext *gbc, uint8_t *str, int strsize, int *length)
Read AMF string value.
void ff_amf_write_number(uint8_t **dst, double num)
Write number in AMF format to buffer.
RTMPPacketType type
packet payload type
void ff_amf_write_bool(uint8_t **dst, int val)
Write boolean value in AMF format to buffer.
int read
amount read, including headers
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.
int ff_amf_get_string(GetByteContext *bc, uint8_t *str, int strsize, int *length)
Get AMF string value.
int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket **prev_pkt, int *nb_prev_pkt)
Read RTMP packet sent by the server.
int size
packet payload size
int ff_amf_read_null(GetByteContext *gbc)
Read AMF NULL value.
int ff_amf_read_bool(GetByteContext *gbc, int *val)
Read AMF boolean value.
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
void ff_amf_write_string2(uint8_t **dst, const char *str1, const char *str2)
Write a string consisting of two parts in AMF format to a buffer.
int ff_rtmp_packet_write(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket **prev_pkt, int *nb_prev_pkt)
Send RTMP packet to the server.
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
uint32_t ts_field
24-bit timestamp or increment to the previous one, in milliseconds (latter only for media packets)...
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.
int ff_rtmp_packet_read_internal(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket **prev_pkt, int *nb_prev_pkt, uint8_t c)
Read internal RTMP packet sent by the server.
channel for network-related messages (bandwidth report, ping, etc)
uint32_t timestamp
packet full timestamp
uint8_t * data
packet payload
int offset
amount of data read so far
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.
int ff_rtmp_check_alloc_array(RTMPPacket **prev_pkt, int *nb_prev_pkt, int channel)
Enlarge the prev_pkt array to fit the given channel.