22 #ifndef AVFORMAT_RTMPPKT_H 23 #define AVFORMAT_RTMPPKT_H 25 #include "libavcodec/bytestream.h" 30 #define RTMP_CHANNELS 65599 37 RTMP_NETWORK_CHANNEL = 2,
40 RTMP_VIDEO_CHANNEL = 6,
41 RTMP_SOURCE_CHANNEL = 8,
47 typedef enum RTMPPacketType {
48 RTMP_PT_CHUNK_SIZE = 1,
49 RTMP_PT_BYTES_READ = 3,
51 RTMP_PT_WINDOW_ACK_SIZE,
55 RTMP_PT_FLEX_STREAM = 15,
61 RTMP_PT_METADATA = 22,
68 RTMP_PS_TWELVEBYTES = 0,
160 void ff_rtmp_packet_dump(
void *ctx,
RTMPPacket *p);
169 int ff_rtmp_check_alloc_array(
RTMPPacket **prev_pkt,
int *nb_prev_pkt,
185 int ff_amf_tag_size(
const uint8_t *
data,
const uint8_t *data_end);
197 int ff_amf_get_field_value(
const uint8_t *
data,
const uint8_t *data_end,
198 const uint8_t *name, uint8_t *dst,
int dst_size);
206 void ff_amf_write_bool(uint8_t **dst,
int val);
214 void ff_amf_write_number(uint8_t **dst,
double num);
222 void ff_amf_write_string(uint8_t **dst,
const char *str);
231 void ff_amf_write_string2(uint8_t **dst,
const char *str1,
const char *str2);
238 void ff_amf_write_null(uint8_t **dst);
245 void ff_amf_write_object_start(uint8_t **dst);
253 void ff_amf_write_field_name(uint8_t **dst,
const char *str);
260 void ff_amf_write_object_end(uint8_t **dst);
295 int strsize,
int *length);
310 int strsize,
int *length);
326 int ff_amf_match_string(
const uint8_t *
data,
int size,
const char *str);
Definition: bytestream.h:33
RTMPPacketType type
packet payload type
Definition: rtmppkt.h:79
int read
amount read, including headers
Definition: rtmppkt.h:86
uint32_t extra
probably an additional channel ID used during streaming data
Definition: rtmppkt.h:82
int size
packet payload size
Definition: rtmppkt.h:84
uint32_t ts_field
24-bit timestamp or increment to the previous one, in milliseconds (latter only for media packets)...
Definition: rtmppkt.h:81
int channel_id
RTMP channel ID (nothing to do with audio/video channels though)
Definition: rtmppkt.h:78
uint32_t timestamp
packet full timestamp
Definition: rtmppkt.h:80
uint8_t * data
packet payload
Definition: rtmppkt.h:83
int offset
amount of data read so far
Definition: rtmppkt.h:85
channel
Use these values when setting the channel map with ebur128_set_channel().
Definition: ebur128.h:39
structure for holding RTMP packets
Definition: rtmppkt.h:77
unbuffered private I/O API