Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Steven Liu <lq@chinaffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Steven Liu <lq@chinaffmpeg.org>
Subject: [FFmpeg-devel] [PATCH v4 1/2] avformat/rtmppkt: add ff_amf_write_array for write
Date: Mon, 28 Aug 2023 10:00:34 +0800
Message-ID: <20230828020035.83831-1-lq@chinaffmpeg.org> (raw)
In-Reply-To: <c8ac4254-d6b0-3e4-d3e9-d883ea4f1890@passwd.hu>

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/rtmppkt.c | 6 ++++++
 libavformat/rtmppkt.h | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c
index 4b97c0833f..a602bf6a96 100644
--- a/libavformat/rtmppkt.c
+++ b/libavformat/rtmppkt.c
@@ -40,6 +40,12 @@ void ff_amf_write_number(uint8_t **dst, double val)
     bytestream_put_be64(dst, av_double2int(val));
 }
 
+void ff_amf_write_array_start(uint8_t **dst, uint32_t length)
+{
+    bytestream_put_byte(dst, AMF_DATA_TYPE_ARRAY);
+    bytestream_put_be32(dst, length);
+}
+
 void ff_amf_write_string(uint8_t **dst, const char *str)
 {
     bytestream_put_byte(dst, AMF_DATA_TYPE_STRING);
diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h
index a15d2a5773..7c580f2224 100644
--- a/libavformat/rtmppkt.h
+++ b/libavformat/rtmppkt.h
@@ -244,6 +244,14 @@ void ff_amf_write_null(uint8_t **dst);
  */
 void ff_amf_write_object_start(uint8_t **dst);
 
+/**
+ * Write marker and length for AMF array to buffer.
+ *
+ * @param dst pointer to the input buffer (will be modified)
+ * @param length value to write
+ */
+void ff_amf_write_array_start(uint8_t **dst, uint32_t length);
+
 /**
  * Write string used as field name in AMF object to buffer.
  *
-- 
2.40.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2023-08-28  2:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24  5:32 [FFmpeg-devel] [PATCH v1 1/2] avformat/rtmppkt: add ff_amf_write_array for write array strings Steven Liu
2023-08-24  5:32 ` [FFmpeg-devel] [PATCH v1 2/2] avformat/rtmpproto: support enhanced rtmp Steven Liu
2023-08-24 20:10   ` Tristan Matthews
2023-08-24 21:45     ` Marton Balint
2023-08-25  5:30       ` [FFmpeg-devel] [PATCH v2 1/2] avformat/rtmppkt: add ff_amf_write_array for write array strings Steven Liu
2023-08-25  5:30         ` [FFmpeg-devel] [PATCH v2 2/2] avformat/rtmpproto: support enhanced rtmp Steven Liu
2023-08-25  9:04           ` Martin Storsjö
2023-08-25  9:11             ` Steven Liu
2023-08-25  9:38               ` Martin Storsjö
2023-08-25 10:00                 ` Steven Liu
2023-08-25 10:06                   ` Martin Storsjö
2023-08-25 10:05                 ` [FFmpeg-devel] [PATCH v3 1/2] avformat/rtmppkt: add ff_amf_write_array for write Steven Liu
2023-08-25 10:05                   ` [FFmpeg-devel] [PATCH v3 2/2] avformat/rtmpproto: support enhanced rtmp Steven Liu
2023-08-25 10:09                     ` Steven Liu
2023-08-26  7:49                       ` Marton Balint
2023-08-26  8:28                         ` Steven Liu
2023-08-26  9:25                           ` Marton Balint
2023-08-28  2:00                             ` Steven Liu [this message]
2023-08-28  2:00                               ` [FFmpeg-devel] [PATCH v4 " Steven Liu
2023-08-28 19:33                                 ` Marton Balint
2023-08-29  1:06                                   ` Steven Liu
2023-08-25  5:33       ` [FFmpeg-devel] [PATCH v1 " Steven Liu
2023-08-25  5:32     ` Steven Liu
2023-08-24 20:47 ` [FFmpeg-devel] [PATCH v1 1/2] avformat/rtmppkt: add ff_amf_write_array for write array strings Marton Balint

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230828020035.83831-1-lq@chinaffmpeg.org \
    --to=lq@chinaffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git