From: hyc Date: Sat, 13 Mar 2010 04:42:28 +0000 (+0000) Subject: Private header file X-Git-Tag: v2.4~194 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca2be25ff44ab6cd48ea854fb2d3748daf251604;p=rtmpdump Private header file git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@341 400ebc74-4327-4243-bc38-086b20814532 --- diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h new file mode 100644 index 0000000..e24692b --- /dev/null +++ b/librtmp/rtmp_sys.h @@ -0,0 +1,53 @@ +#ifndef __RTMP_SYS_H__ +#define __RTMP_SYS_H__ +/* + * Copyright (C) 2010 Howard Chu + * + * This file is part of librtmp. + * + * librtmp is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1, + * or (at your option) any later version. + * + * librtmp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with librtmp see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/lgpl.html + */ + +#define CRYPTO + +#ifdef WIN32 +#include +#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 +#include +#include +#include +#include +#include +#include +#include +#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 "rtmp.h" + +#endif