[rtmpdump] r407 - in trunk/librtmp: rtmp.c rtmp.h
hyc
subversion at mplayerhq.hu
Sat Mar 27 21:20:15 CET 2010
Author: hyc
Date: Sat Mar 27 21:20:14 2010
New Revision: 407
Log:
All timestamps are 32 bit ints
Modified:
trunk/librtmp/rtmp.c
trunk/librtmp/rtmp.h
Modified: trunk/librtmp/rtmp.c
==============================================================================
--- trunk/librtmp/rtmp.c Sat Mar 27 07:46:04 2010 (r406)
+++ trunk/librtmp/rtmp.c Sat Mar 27 21:20:14 2010 (r407)
@@ -876,10 +876,14 @@ SocksNegotiate(RTMP *r)
}
bool
-RTMP_ConnectStream(RTMP *r, double seekTime)
+RTMP_ConnectStream(RTMP *r, int seekTime)
{
RTMPPacket packet = { 0 };
- if (seekTime >= -2.0)
+
+ /* seekTime was already set by SetupStream / SetupURL.
+ * This is only needed by ReconnectStream.
+ */
+ if (seekTime > 0)
r->Link.seekTime = seekTime;
r->m_mediaChannel = 0;
@@ -908,7 +912,7 @@ RTMP_ConnectStream(RTMP *r, double seekT
}
bool
-RTMP_ReconnectStream(RTMP *r, double seekTime)
+RTMP_ReconnectStream(RTMP *r, int seekTime)
{
RTMP_DeleteStream(r);
@@ -1677,7 +1681,7 @@ SendDeleteStream(RTMP *r, double dStream
SAVC(pause);
bool
-RTMP_SendPause(RTMP *r, bool DoPause, double dTime)
+RTMP_SendPause(RTMP *r, bool DoPause, int dTime)
{
RTMPPacket packet;
char pbuf[256], *pend = pbuf + sizeof(pbuf);
@@ -1706,7 +1710,7 @@ RTMP_SendPause(RTMP *r, bool DoPause, do
SAVC(seek);
bool
-RTMP_SendSeek(RTMP *r, double dTime)
+RTMP_SendSeek(RTMP *r, int dTime)
{
RTMPPacket packet;
char pbuf[256], *pend = pbuf + sizeof(pbuf);
@@ -1723,7 +1727,7 @@ RTMP_SendSeek(RTMP *r, double dTime)
enc = AMF_EncodeString(enc, pend, &av_seek);
enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes);
*enc++ = AMF_NULL;
- enc = AMF_EncodeNumber(enc, pend, dTime);
+ enc = AMF_EncodeNumber(enc, pend, (double)dTime);
packet.m_nBodySize = enc - packet.m_body;
Modified: trunk/librtmp/rtmp.h
==============================================================================
--- trunk/librtmp/rtmp.h Sat Mar 27 07:46:04 2010 (r406)
+++ trunk/librtmp/rtmp.h Sat Mar 27 21:20:14 2010 (r407)
@@ -276,8 +276,8 @@ extern "C"
double RTMP_GetDuration(RTMP *r);
bool RTMP_ToggleStream(RTMP *r);
- bool RTMP_ConnectStream(RTMP *r, double seekTime);
- bool RTMP_ReconnectStream(RTMP *r, double seekTime);
+ bool RTMP_ConnectStream(RTMP *r, int seekTime);
+ bool RTMP_ReconnectStream(RTMP *r, int seekTime);
void RTMP_DeleteStream(RTMP *r);
int RTMP_GetNextMediaPacket(RTMP *r, RTMPPacket *packet);
int RTMP_ClientPacket(RTMP *r, RTMPPacket *packet);
@@ -289,7 +289,7 @@ extern "C"
bool RTMP_SendCtrl(RTMP *r, short nType, unsigned int nObject,
unsigned int nTime);
- bool RTMP_SendPause(RTMP *r, bool DoPause, double dTime);
+ bool RTMP_SendPause(RTMP *r, bool DoPause, int dTime);
bool RTMP_FindFirstMatchingProperty(AMFObject *obj, const AVal *name,
AMFObjectProperty * p);
@@ -298,7 +298,7 @@ extern "C"
int RTMPSockBuf_Close(RTMPSockBuf *sb);
bool RTMP_SendCreateStream(RTMP *r);
- bool RTMP_SendSeek(RTMP *r, double dTime);
+ bool RTMP_SendSeek(RTMP *r, int dTime);
bool RTMP_SendServerBW(RTMP *r);
bool RTMP_SendClientBW(RTMP *r);
void RTMP_DropRequest(RTMP *r, int i, bool freeit);
More information about the rtmpdump
mailing list