[rtmpdump] r336 - in trunk: librtmp/amf.c librtmp/amf.h librtmp/hashswf.c librtmp/parseurl.c librtmp/rtmp.c librtmp/rtmp.h rtmpdump.c rtmpgw.c rtmpsrv.c rtmpsuck.c
hyc
subversion at mplayerhq.hu
Sat Mar 13 01:31:26 CET 2010
Author: hyc
Date: Sat Mar 13 01:31:24 2010
New Revision: 336
Log:
Namespace cleanup
Modified:
trunk/librtmp/amf.c
trunk/librtmp/amf.h
trunk/librtmp/hashswf.c
trunk/librtmp/parseurl.c
trunk/librtmp/rtmp.c
trunk/librtmp/rtmp.h
trunk/rtmpdump.c
trunk/rtmpgw.c
trunk/rtmpsrv.c
trunk/rtmpsuck.c
Modified: trunk/librtmp/amf.c
==============================================================================
--- trunk/librtmp/amf.c Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/librtmp/amf.c Sat Mar 13 01:31:24 2010 (r336)
@@ -329,7 +329,7 @@ AMFProp_GetNumber(AMFObjectProperty * pr
return prop->p_vu.p_number;
}
-int
+bool
AMFProp_GetBoolean(AMFObjectProperty * prop)
{
return prop->p_vu.p_number != 0;
@@ -347,7 +347,7 @@ AMFProp_GetObject(AMFObjectProperty * pr
*obj = prop->p_vu.p_object;
}
-int
+bool
AMFProp_IsValid(AMFObjectProperty * prop)
{
return prop->p_type != AMF_INVALID;
@@ -476,7 +476,7 @@ AMF3ReadString(const char *data, AVal *
int
AMF3Prop_Decode(AMFObjectProperty * prop, const char *pBuffer, int nSize,
- int bDecodeName)
+ bool bDecodeName)
{
int nOriginalSize = nSize;
AMF3DataType type;
@@ -593,7 +593,7 @@ AMF3Prop_Decode(AMFObjectProperty * prop
int
AMFProp_Decode(AMFObjectProperty * prop, const char *pBuffer, int nSize,
- int bDecodeName)
+ bool bDecodeName)
{
int nOriginalSize = nSize;
Modified: trunk/librtmp/amf.h
==============================================================================
--- trunk/librtmp/amf.h Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/librtmp/amf.h Sat Mar 13 01:31:24 2010 (r336)
@@ -25,6 +25,7 @@
*/
#include <stdint.h>
+#include <stdbool.h>
#ifdef __cplusplus
extern "C"
@@ -56,15 +57,6 @@ extern "C"
#define AVC(str) {str,sizeof(str)-1}
#define AVMATCH(a1,a2) ((a1)->av_len == (a2)->av_len && !memcmp((a1)->av_val,(a2)->av_val,(a1)->av_len))
-#ifndef __cplusplus
-#undef bool
-#undef true
-#undef false
-#define bool int
-#define true 1
-#define false 0
-#endif
-
struct AMFObjectProperty;
typedef struct AMFObject
Modified: trunk/librtmp/hashswf.c
==============================================================================
--- trunk/librtmp/hashswf.c Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/librtmp/hashswf.c Sat Mar 13 01:31:24 2010 (r336)
@@ -24,7 +24,7 @@
#include <ctype.h>
#include <time.h>
-#include "rtmp.h"
+#include "rtmp_sys.h"
#include "log.h"
#include "http.h"
Modified: trunk/librtmp/parseurl.c
==============================================================================
--- trunk/librtmp/parseurl.c Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/librtmp/parseurl.c Sat Mar 13 01:31:24 2010 (r336)
@@ -26,7 +26,7 @@
#include <assert.h>
#include <ctype.h>
-#include "rtmp.h"
+#include "rtmp_sys.h"
#include "log.h"
bool RTMP_ParseURL(const char *url, int *protocol, char **host, unsigned int *port,
Modified: trunk/librtmp/rtmp.c
==============================================================================
--- trunk/librtmp/rtmp.c Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/librtmp/rtmp.c Sat Mar 13 01:31:24 2010 (r336)
@@ -27,7 +27,7 @@
#include <string.h>
#include <assert.h>
-#include "rtmp.h"
+#include "rtmp_sys.h"
#include "log.h"
#include <openssl/ssl.h>
Modified: trunk/librtmp/rtmp.h
==============================================================================
--- trunk/librtmp/rtmp.h Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/librtmp/rtmp.h Sat Mar 13 01:31:24 2010 (r336)
@@ -26,31 +26,6 @@
#define CRYPTO
-#ifdef WIN32
-#include <winsock.h>
-#define GetSockError() WSAGetLastError()
-#define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e)
-#define EWOULDBLOCK WSAETIMEDOUT /* we don't use nonblocking, but we do use timeouts */
-#define sleep(n) Sleep(n*1000)
-#define msleep(n) Sleep(n)
-#define socklen_t int
-#define SET_RCVTIMEO(tv,s) int tv = s*1000
-#else
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/times.h>
-#include <netdb.h>
-#include <arpa/inet.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#define GetSockError() errno
-#undef closesocket
-#define closesocket(s) close(s)
-#define msleep(n) usleep(n*1000)
-#define SET_RCVTIMEO(tv,s) struct timeval tv = {s,0}
-#endif
-
#include <errno.h>
#include <stdint.h>
@@ -304,7 +279,7 @@ extern "C"
bool RTMP_FindFirstMatchingProperty(AMFObject *obj, const AVal *name,
AMFObjectProperty * p);
- bool RTMPSockBuf_Fill(RTMPSockBuf *sb);
+ int RTMPSockBuf_Fill(RTMPSockBuf *sb);
int RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len);
int RTMPSockBuf_Close(RTMPSockBuf *sb);
Modified: trunk/rtmpdump.c
==============================================================================
--- trunk/rtmpdump.c Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/rtmpdump.c Sat Mar 13 01:31:24 2010 (r336)
@@ -29,7 +29,7 @@
#include <signal.h> // to catch Ctrl-C
#include <getopt.h>
-#include "librtmp/rtmp.h"
+#include "librtmp/rtmp_sys.h"
#include "librtmp/log.h"
#ifdef WIN32
Modified: trunk/rtmpgw.c
==============================================================================
--- trunk/rtmpgw.c Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/rtmpgw.c Sat Mar 13 01:31:24 2010 (r336)
@@ -28,7 +28,7 @@
#include <assert.h>
-#include "librtmp/rtmp.h"
+#include "librtmp/rtmp_sys.h"
#include "librtmp/log.h"
#include "thread.h"
Modified: trunk/rtmpsrv.c
==============================================================================
--- trunk/rtmpsrv.c Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/rtmpsrv.c Sat Mar 13 01:31:24 2010 (r336)
@@ -33,7 +33,7 @@
#include <assert.h>
-#include "librtmp/rtmp.h"
+#include "librtmp/rtmp_sys.h"
#include "librtmp/log.h"
#include "thread.h"
Modified: trunk/rtmpsuck.c
==============================================================================
--- trunk/rtmpsuck.c Sat Mar 13 00:53:41 2010 (r335)
+++ trunk/rtmpsuck.c Sat Mar 13 01:31:24 2010 (r336)
@@ -33,7 +33,7 @@
#include <assert.h>
-#include "librtmp/rtmp.h"
+#include "librtmp/rtmp_sys.h"
#include "librtmp/log.h"
#include "thread.h"
More information about the rtmpdump
mailing list