return prop->p_vu.p_number;
}
-int
+bool
AMFProp_GetBoolean(AMFObjectProperty * prop)
{
return prop->p_vu.p_number != 0;
*obj = prop->p_vu.p_object;
}
-int
+bool
AMFProp_IsValid(AMFObjectProperty * prop)
{
return prop->p_type != AMF_INVALID;
int
AMF3Prop_Decode(AMFObjectProperty * prop, const char *pBuffer, int nSize,
- int bDecodeName)
+ bool bDecodeName)
{
int nOriginalSize = nSize;
AMF3DataType type;
int
AMFProp_Decode(AMFObjectProperty * prop, const char *pBuffer, int nSize,
- int bDecodeName)
+ bool bDecodeName)
{
int nOriginalSize = nSize;
*/
#include <stdint.h>
+#include <stdbool.h>
#ifdef __cplusplus
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
#include <ctype.h>
#include <time.h>
-#include "rtmp.h"
+#include "rtmp_sys.h"
#include "log.h"
#include "http.h"
#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,
#include <string.h>
#include <assert.h>
-#include "rtmp.h"
+#include "rtmp_sys.h"
#include "log.h"
#include <openssl/ssl.h>
#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>
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);
#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
#include <assert.h>
-#include "librtmp/rtmp.h"
+#include "librtmp/rtmp_sys.h"
#include "librtmp/log.h"
#include "thread.h"
#include <assert.h>
-#include "librtmp/rtmp.h"
+#include "librtmp/rtmp_sys.h"
#include "librtmp/log.h"
#include "thread.h"
#include <assert.h>
-#include "librtmp/rtmp.h"
+#include "librtmp/rtmp_sys.h"
#include "librtmp/log.h"
#include "thread.h"