annotate rtmppkt.h @ 5362:6f5a1064e48a libavformat

Add a channels field to MPEG4AudioConfig.
author alexc
date Wed, 11 Nov 2009 20:24:23 +0000
parents 53688cb639b0
children 6f86cffa86aa
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
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
37 RTMP_VIDEO_CHANNEL = 8, ///< channel for video data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
38 RTMP_AUDIO_CHANNEL, ///< channel for audio data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
39 };
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 * known RTMP packet types
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
43 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
44 typedef enum RTMPPacketType {
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
45 RTMP_PT_CHUNK_SIZE = 1, ///< chunk size change
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
46 RTMP_PT_BYTES_READ = 3, ///< number of bytes read
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
47 RTMP_PT_PING, ///< ping
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
48 RTMP_PT_SERVER_BW, ///< server bandwidth
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
49 RTMP_PT_CLIENT_BW, ///< client bandwidth
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
50 RTMP_PT_AUDIO = 8, ///< audio packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
51 RTMP_PT_VIDEO, ///< video packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
52 RTMP_PT_FLEX_STREAM = 15, ///< Flex shared stream
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
53 RTMP_PT_FLEX_OBJECT, ///< Flex shared object
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
54 RTMP_PT_FLEX_MESSAGE, ///< Flex shared message
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
55 RTMP_PT_NOTIFY, ///< some notification
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
56 RTMP_PT_SHARED_OBJ, ///< shared object
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
57 RTMP_PT_INVOKE, ///< invoke some stream action
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
58 RTMP_PT_METADATA = 22, ///< FLV metadata
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
59 } RTMPPacketType;
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
60
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
61 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
62 * possible RTMP packet header sizes
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
63 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
64 enum RTMPPacketSize {
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
65 RTMP_PS_TWELVEBYTES = 0, ///< packet has 12-byte header
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
66 RTMP_PS_EIGHTBYTES, ///< packet has 8-byte header
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
67 RTMP_PS_FOURBYTES, ///< packet has 4-byte header
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
68 RTMP_PS_ONEBYTE ///< packet is really a next chunk of a packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
69 };
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 * structure for holding RTMP packets
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
73 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
74 typedef struct RTMPPacket {
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
75 uint8_t channel_id; ///< RTMP channel ID (nothing to do with audio/video channels though)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
76 RTMPPacketType type; ///< packet payload type
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
77 uint32_t timestamp; ///< packet full timestamp or timestamp increment to the previous one in milliseconds (latter only for media packets)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
78 uint32_t extra; ///< probably an additional channel ID used during streaming data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
79 uint8_t *data; ///< packet payload
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
80 int data_size; ///< packet payload size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
81 } RTMPPacket;
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
82
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
83 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
84 * Creates new RTMP packet with given attributes.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
85 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
86 * @param pkt packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
87 * @param channel_id packet channel ID
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
88 * @param type packet type
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
89 * @param timestamp packet timestamp
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
90 * @param size packet size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
91 * @return zero on success, negative value otherwise
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
92 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
93 int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type,
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
94 int timestamp, int size);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
95
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
96 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
97 * Frees RTMP packet.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
98 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
99 * @param pkt packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
100 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
101 void ff_rtmp_packet_destroy(RTMPPacket *pkt);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
102
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
103 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
104 * Reads RTMP packet sent by the server.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
105 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
106 * @param h reader context
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
107 * @param p packet
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
108 * @param chunk_size current chunk size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
109 * @param prev_pkt previously read packet headers for all channels
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
110 * (may be needed for restoring incomplete packet header)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
111 * @return zero on success, negative value otherwise
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
112 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
113 int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p,
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
114 int chunk_size, RTMPPacket *prev_pkt);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
115
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
116 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
117 * Sends RTMP packet to the server.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
118 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
119 * @param h reader context
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
120 * @param p packet to send
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
121 * @param chunk_size current chunk size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
122 * @param prev_pkt previously sent packet headers for all channels
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
123 * (may be used for packet header compressing)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
124 * @return zero on success, negative value otherwise
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
125 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
126 int ff_rtmp_packet_write(URLContext *h, RTMPPacket *p,
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
127 int chunk_size, RTMPPacket *prev_pkt);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
128
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
129 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
130 * @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
131 * @see amf_* funcs in libavformat/flvdec.c
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
132 * @{
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
133 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
134
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
135 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
136 * Calculates number of bytes taken by first AMF entry in data.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
137 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
138 * @param data input data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
139 * @param data_end input buffer end
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
140 * @return number of bytes used by first AMF entry
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
141 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
142 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
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 * Retrieves value of given AMF object field in string form.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
146 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
147 * @param data AMF object data
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
148 * @param data_end input buffer end
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
149 * @param name name of field to retrieve
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
150 * @param dst buffer for storing result
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
151 * @param dst_size output buffer size
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
152 * @return 0 if search and retrieval succeeded, negative value otherwise
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
153 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
154 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
155 const uint8_t *name, uint8_t *dst, int dst_size);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
156
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
157 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
158 * Writes boolean value in AMF format to buffer.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
159 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
160 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
161 * @param val value to write
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
162 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
163 void ff_amf_write_bool(uint8_t **dst, int val);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
164
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
165 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
166 * Writes number in AMF format to buffer.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
167 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
168 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
169 * @param num value to write
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
170 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
171 void ff_amf_write_number(uint8_t **dst, double num);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
172
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
173 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
174 * Writes string in AMF format to buffer.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
175 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
176 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
177 * @param str string to write
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
178 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
179 void ff_amf_write_string(uint8_t **dst, const char *str);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
180
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
181 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
182 * Writes AMF NULL value to buffer.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
183 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
184 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
185 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
186 void ff_amf_write_null(uint8_t **dst);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
187
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
188 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
189 * Writes marker for AMF object to buffer.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
190 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
191 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
192 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
193 void ff_amf_write_object_start(uint8_t **dst);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
194
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
195 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
196 * Writes string used as field name in AMF object to buffer.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
197 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
198 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
199 * @param str string to write
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
200 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
201 void ff_amf_write_field_name(uint8_t **dst, const char *str);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
202
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
203 /**
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
204 * Writes marker for end of AMF object to buffer.
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
205 *
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
206 * @param dst pointer to the input buffer (will be modified)
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
207 */
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
208 void ff_amf_write_object_end(uint8_t **dst);
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
209
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
210 /** @} */ // AMF funcs
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
211
cc34279f0fab RTMP protocol support (as a client)
kostya
parents:
diff changeset
212 #endif /* AVFORMAT_RTMPPKT_H */