annotate rtmppkt.h @ 6290:a1500faf3a7e libavformat

Check the status code of each server responses, and fail if it indicates a problem. Patch by Zhentan Feng <spyfeng gmail com>.
author rbultje
date Tue, 20 Jul 2010 15:01:06 +0000
parents ccb05424c391
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
1 /*
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
2 * RTMP packet utilities
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
3 * Copyright (c) 2009 Kostya Shishkov
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
4 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
5 * This file is part of FFmpeg.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
6 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
11 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
15 * Lesser General Public License for more details.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
16 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
20 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
21
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
22 #ifndef AVFORMAT_RTMPPKT_H
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
23 #define AVFORMAT_RTMPPKT_H
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
24
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
25 #include "avformat.h"
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
26
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
27 /** maximum possible number of different RTMP channels */
5297
53688cb639b0 Support more than 64 channels in RTMP input
kostya
parents: 5123
diff changeset
28 #define RTMP_CHANNELS 65599
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
29
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
30 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
31 * channels used to for RTMP packets with different purposes (i.e. data, network
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
32 * control, remote procedure calls, etc.)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
33 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
34 enum RTMPChannel {
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
35 RTMP_NETWORK_CHANNEL = 2, ///< channel for network-related messages (bandwidth report, ping, etc)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
36 RTMP_SYSTEM_CHANNEL, ///< channel for sending server control messages
5408
6f86cffa86aa Add another known RTMP channel ID to enum.
kostya
parents: 5297
diff changeset
37 RTMP_SOURCE_CHANNEL, ///< channel for sending a/v to server
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
38 RTMP_VIDEO_CHANNEL = 8, ///< channel for video data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
39 RTMP_AUDIO_CHANNEL, ///< channel for audio data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
40 };
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
41
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
42 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
43 * known RTMP packet types
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
44 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
45 typedef enum RTMPPacketType {
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
46 RTMP_PT_CHUNK_SIZE = 1, ///< chunk size change
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
47 RTMP_PT_BYTES_READ = 3, ///< number of bytes read
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
48 RTMP_PT_PING, ///< ping
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
49 RTMP_PT_SERVER_BW, ///< server bandwidth
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
50 RTMP_PT_CLIENT_BW, ///< client bandwidth
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
51 RTMP_PT_AUDIO = 8, ///< audio packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
52 RTMP_PT_VIDEO, ///< video packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
53 RTMP_PT_FLEX_STREAM = 15, ///< Flex shared stream
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
54 RTMP_PT_FLEX_OBJECT, ///< Flex shared object
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
55 RTMP_PT_FLEX_MESSAGE, ///< Flex shared message
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
56 RTMP_PT_NOTIFY, ///< some notification
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
57 RTMP_PT_SHARED_OBJ, ///< shared object
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
58 RTMP_PT_INVOKE, ///< invoke some stream action
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
59 RTMP_PT_METADATA = 22, ///< FLV metadata
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
60 } RTMPPacketType;
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
61
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
62 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
63 * possible RTMP packet header sizes
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
64 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
65 enum RTMPPacketSize {
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
66 RTMP_PS_TWELVEBYTES = 0, ///< packet has 12-byte header
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
67 RTMP_PS_EIGHTBYTES, ///< packet has 8-byte header
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
68 RTMP_PS_FOURBYTES, ///< packet has 4-byte header
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
69 RTMP_PS_ONEBYTE ///< packet is really a next chunk of a packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
70 };
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
71
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
72 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
73 * structure for holding RTMP packets
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
74 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
75 typedef struct RTMPPacket {
5413
25a21f96f863 5l trocadero: RTMP channel ID lies in range 3-65599, uint8_t is too small for it
kostya
parents: 5410
diff changeset
76 int channel_id; ///< RTMP channel ID (nothing to do with audio/video channels though)
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
77 RTMPPacketType type; ///< packet payload type
5410
f66e3c131106 RTMP packets with one-byte header use previous packet timestamp difference, so
kostya
parents: 5408
diff changeset
78 uint32_t timestamp; ///< packet full timestamp
f66e3c131106 RTMP packets with one-byte header use previous packet timestamp difference, so
kostya
parents: 5408
diff changeset
79 uint32_t ts_delta; ///< timestamp increment to the previous one in milliseconds (latter only for media packets)
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
80 uint32_t extra; ///< probably an additional channel ID used during streaming data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
81 uint8_t *data; ///< packet payload
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
82 int data_size; ///< packet payload size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
83 } RTMPPacket;
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
84
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
85 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
86 * Create new RTMP packet with given attributes.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
87 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
88 * @param pkt packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
89 * @param channel_id packet channel ID
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
90 * @param type packet type
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
91 * @param timestamp packet timestamp
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
92 * @param size packet size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
93 * @return zero on success, negative value otherwise
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
94 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
95 int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type,
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
96 int timestamp, int size);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
97
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
98 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
99 * Free RTMP packet.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
100 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
101 * @param pkt packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
102 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
103 void ff_rtmp_packet_destroy(RTMPPacket *pkt);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
104
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
105 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
106 * Read RTMP packet sent by the server.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
107 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
108 * @param h reader context
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
109 * @param p packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
110 * @param chunk_size current chunk size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
111 * @param prev_pkt previously read packet headers for all channels
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
112 * (may be needed for restoring incomplete packet header)
5604
81b2509db2ad Make RTMP send/receive packet functions report number of bytes read or sent.
kostya
parents: 5432
diff changeset
113 * @return number of bytes read on success, negative value otherwise
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
114 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
115 int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p,
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
116 int chunk_size, RTMPPacket *prev_pkt);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
117
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
118 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
119 * Send RTMP packet to the server.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
120 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
121 * @param h reader context
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
122 * @param p packet to send
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
123 * @param chunk_size current chunk size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
124 * @param prev_pkt previously sent packet headers for all channels
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
125 * (may be used for packet header compressing)
5604
81b2509db2ad Make RTMP send/receive packet functions report number of bytes read or sent.
kostya
parents: 5432
diff changeset
126 * @return number of bytes written on success, negative value otherwise
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
127 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
128 int ff_rtmp_packet_write(URLContext *h, RTMPPacket *p,
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
129 int chunk_size, RTMPPacket *prev_pkt);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
130
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
131 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
132 * Print information and contents of RTMP packet.
5432
f282f7758d6e Dump RTMP packet contents in debug mode
kostya
parents: 5413
diff changeset
133 *
6215
ccb05424c391 Fix misspelled parameter names in Doxygen documentation.
diego
parents: 6199
diff changeset
134 * @param ctx output context
5432
f282f7758d6e Dump RTMP packet contents in debug mode
kostya
parents: 5413
diff changeset
135 * @param p packet to dump
f282f7758d6e Dump RTMP packet contents in debug mode
kostya
parents: 5413
diff changeset
136 */
f282f7758d6e Dump RTMP packet contents in debug mode
kostya
parents: 5413
diff changeset
137 void ff_rtmp_packet_dump(void *ctx, RTMPPacket *p);
f282f7758d6e Dump RTMP packet contents in debug mode
kostya
parents: 5413
diff changeset
138
f282f7758d6e Dump RTMP packet contents in debug mode
kostya
parents: 5413
diff changeset
139 /**
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
140 * @defgroup amffuncs functions used to work with AMF format (which is also used in .flv)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
141 * @see amf_* funcs in libavformat/flvdec.c
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
142 * @{
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
143 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
144
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
145 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
146 * Calculate number of bytes taken by first AMF entry in data.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
147 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
148 * @param data input data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
149 * @param data_end input buffer end
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
150 * @return number of bytes used by first AMF entry
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
151 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
152 int ff_amf_tag_size(const uint8_t *data, const uint8_t *data_end);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
153
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
154 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
155 * Retrieve value of given AMF object field in string form.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
156 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
157 * @param data AMF object data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
158 * @param data_end input buffer end
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
159 * @param name name of field to retrieve
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
160 * @param dst buffer for storing result
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
161 * @param dst_size output buffer size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
162 * @return 0 if search and retrieval succeeded, negative value otherwise
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
163 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
164 int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end,
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
165 const uint8_t *name, uint8_t *dst, int dst_size);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
166
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
167 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
168 * Write boolean value in AMF format to buffer.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
169 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
170 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
171 * @param val value to write
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
172 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
173 void ff_amf_write_bool(uint8_t **dst, int val);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
174
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
175 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
176 * Write number in AMF format to buffer.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
177 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
178 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
179 * @param num value to write
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
180 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
181 void ff_amf_write_number(uint8_t **dst, double num);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
182
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
183 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
184 * Write string in AMF format to buffer.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
185 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
186 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
187 * @param str string to write
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
188 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
189 void ff_amf_write_string(uint8_t **dst, const char *str);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
190
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
191 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
192 * Write AMF NULL value to buffer.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
193 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
194 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
195 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
196 void ff_amf_write_null(uint8_t **dst);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
197
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
198 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
199 * Write marker for AMF object to buffer.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
200 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
201 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
202 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
203 void ff_amf_write_object_start(uint8_t **dst);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
204
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
205 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
206 * Write string used as field name in AMF object to buffer.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
207 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
208 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
209 * @param str string to write
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
210 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
211 void ff_amf_write_field_name(uint8_t **dst, const char *str);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
212
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
213 /**
6199
fa244b4fe683 Fix grammar errors in documentation
mru
parents: 5604
diff changeset
214 * Write marker for end of AMF object to buffer.
5123
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
215 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
216 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
217 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
218 void ff_amf_write_object_end(uint8_t **dst);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
219
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
220 /** @} */ // AMF funcs
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
221
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
222 #endif /* AVFORMAT_RTMPPKT_H */