[svn-commits] phsultan: branch phsultan/rtmp-support r295360 - /team/phsultan/rtmp-support/...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Nov 17 07:48:02 CST 2010
Author: phsultan
Date: Wed Nov 17 07:47:58 2010
New Revision: 295360
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=295360
Log:
Add timing info to the RTMP packets we send.
This is needed to cut the delay that is experienced on Flash clients (10.x).
Thanks to Dele Olajide from red5phone for the patch!
Modified:
team/phsultan/rtmp-support/channels/chan_rtmp.c
Modified: team/phsultan/rtmp-support/channels/chan_rtmp.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/rtmp-support/channels/chan_rtmp.c?view=diff&rev=295360&r1=295359&r2=295360
==============================================================================
--- team/phsultan/rtmp-support/channels/chan_rtmp.c (original)
+++ team/phsultan/rtmp-support/channels/chan_rtmp.c Wed Nov 17 07:47:58 2010
@@ -106,6 +106,7 @@
* Read from pipe[0], write to pipe[1]
*/
int pipe[2];
+ int timestamp;
};
static struct ast_channel *rtmp_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause);
@@ -283,6 +284,7 @@
RTMP_Init(p->rtmpout);
p->thread = AST_PTHREADT_NULL;
+ p->timestamp = time(NULL) * 1000;
return p;
}
@@ -656,7 +658,7 @@
packet.m_nChannel = 0x06;
packet.m_headerType = RTMP_PACKET_SIZE_LARGE;
packet.m_packetType = RTMP_PACKET_TYPE_AUDIO;
- packet.m_nTimeStamp = 0;
+ packet.m_nTimeStamp = (time(NULL) * 1000) - p->timestamp;
packet.m_nInfoField2 = p->rtmpout->m_stream_id;
packet.m_hasAbsTimestamp = 0;
packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE;
More information about the svn-commits
mailing list