On Mon, 16 Sep 2013, Josh Allmann wrote:
Audio/video are not sent on the same channel.
RTMP_AUDIO_CHANNEL was unused before this, so there is no net
effect from the enum re-numbering.
---
libavformat/rtmppkt.h | 3 +--
libavformat/rtmpproto.c | 6 +++---
2 files changed, 4 insertions(+), 5 deletions(-)
Ok, now I see you do the stuff I pointed out in patch 1/3...
I guess this looks pretty ok in general.
diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h
index ff5d171..f1ac460 100644
--- a/libavformat/rtmppkt.h
+++ b/libavformat/rtmppkt.h
@@ -36,9 +36,8 @@
enum RTMPChannel {
RTMP_NETWORK_CHANNEL = 2, ///< channel for network-related messages
(bandwidth report, ping, etc)
RTMP_SYSTEM_CHANNEL, ///< channel for sending server control messages
- RTMP_SOURCE_CHANNEL, ///< channel for sending a/v to server
- RTMP_VIDEO_CHANNEL = 8, ///< channel for video data
RTMP_AUDIO_CHANNEL, ///< channel for audio data
+ RTMP_VIDEO_CHANNEL = 8, ///< channel for video data
};
/**
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 74ca3d8..3277a4c 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -742,7 +742,7 @@ static int gen_publish(URLContext *s, RTMPContext *rt)
av_log(s, AV_LOG_DEBUG, "Sending publish command for '%s'\n", rt->playpath);
- if ((ret = ff_rtmp_packet_create(&pkt, RTMP_SOURCE_CHANNEL, RTMP_PT_INVOKE,
+ if ((ret = ff_rtmp_packet_create(&pkt, RTMP_AUDIO_CHANNEL, RTMP_PT_INVOKE,
0, 30 + strlen(rt->playpath))) < 0)
return ret;
I think this would warrant a comment saying why we use one of the channels
and not the other (or why it doesn't matter)?
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel