From 33f28a3be3092f642778253d9529dd66fe2a014a Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Sun, 30 Dec 2012 22:38:23 +0200 Subject: rtmp: Add a function for writing AMF strings based on two substrings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids having to concatenate them into one buffer before writing them as AMF. Signed-off-by: Martin Storsjö --- libavformat/rtmppkt.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libavformat/rtmppkt.h') diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index a153ca6253..276c5608c0 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -203,6 +203,15 @@ void ff_amf_write_number(uint8_t **dst, double num); */ void ff_amf_write_string(uint8_t **dst, const char *str); +/** + * Write a string consisting of two parts in AMF format to a buffer. + * + * @param dst pointer to the input buffer (will be modified) + * @param str1 first string to write, may be null + * @param str2 second string to write, may be null + */ +void ff_amf_write_string2(uint8_t **dst, const char *str1, const char *str2); + /** * Write AMF NULL value to buffer. * -- cgit v1.2.3