winlin

merge from allspace, to srs-librtmp, for vs2010

@@ -300,7 +300,9 @@ GDBDebug=" -g -O0" @@ -300,7 +300,9 @@ GDBDebug=" -g -O0"
300 # the warning level. 300 # the warning level.
301 WarnLevel=" -Wall" 301 WarnLevel=" -Wall"
302 # the compile standard. 302 # the compile standard.
303 -CppStd="-ansi" 303 +if [ "$MSYSTEM" != "MINGW32" -a "$MSYSTEM" != "MINGW64" ]; then
  304 + CppStd="-ansi"
  305 +fi
304 # for library compile 306 # for library compile
305 LibraryCompile=" -fPIC" 307 LibraryCompile=" -fPIC"
306 # performance of gprof 308 # performance of gprof
@@ -355,7 +357,7 @@ if [ $SRS_MIPS_UBUNTU12 = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lgcc_eh @@ -355,7 +357,7 @@ if [ $SRS_MIPS_UBUNTU12 = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lgcc_eh
355 MODULE_ID="CORE" 357 MODULE_ID="CORE"
356 MODULE_DEPENDS=() 358 MODULE_DEPENDS=()
357 ModuleLibIncs=(${SRS_OBJS_DIR}) 359 ModuleLibIncs=(${SRS_OBJS_DIR})
358 -MODULE_FILES=("srs_core" "srs_core_autofree") 360 +MODULE_FILES=("srs_core" "srs_core_autofree" "srs_platform")
359 CORE_INCS="src/core"; MODULE_DIR=${CORE_INCS} . auto/modules.sh 361 CORE_INCS="src/core"; MODULE_DIR=${CORE_INCS} . auto/modules.sh
360 CORE_OBJS="${MODULE_OBJS[@]}" 362 CORE_OBJS="${MODULE_OBJS[@]}"
361 # 363 #
@@ -85,7 +85,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -85,7 +85,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
85 85
86 // generated by configure. 86 // generated by configure.
87 #include <srs_auto_headers.hpp> 87 #include <srs_auto_headers.hpp>
88 - 88 +#include <srs_platform.hpp>
89 // free the p and set to NULL. 89 // free the p and set to NULL.
90 // p must be a T*. 90 // p must be a T*.
91 #define srs_freep(p) \ 91 #define srs_freep(p) \
  1 +#include <stdlib.h>
  2 +#include <stdio.h>
  3 +#include <sys/types.h>
  4 +#include "srs_platform.hpp"
  5 +
  6 +
  7 +#if defined(_WIN32) && !defined(__CYGWIN__)
  8 +
  9 +int socket_setup()
  10 +{
  11 + WORD wVersionRequested;
  12 + WSADATA wsaData;
  13 + int err;
  14 +
  15 + /* Use the MAKEWORD(lowbyte, highbyte) macro declared in Windef.h */
  16 + wVersionRequested = MAKEWORD(2, 2);
  17 +
  18 + err = WSAStartup(wVersionRequested, &wsaData);
  19 + if (err != 0) {
  20 + /* Tell the user that we could not find a usable */
  21 + /* Winsock DLL. */
  22 + //printf("WSAStartup failed with error: %d\n", err);
  23 + return -1;
  24 + }
  25 + return 0;
  26 +}
  27 +
  28 +int socket_cleanup()
  29 +{
  30 + WSACleanup();
  31 + return 0;
  32 +}
  33 +
  34 + int gettimeofday(struct timeval* tv, struct timezone* tz)
  35 + {
  36 + time_t clock;
  37 + struct tm tm;
  38 + SYSTEMTIME win_time;
  39 +
  40 + GetLocalTime(&win_time);
  41 +
  42 + tm.tm_year = win_time.wYear - 1900;
  43 + tm.tm_mon = win_time.wMonth - 1;
  44 + tm.tm_mday = win_time.wDay;
  45 + tm.tm_hour = win_time.wHour;
  46 + tm.tm_min = win_time.wMinute;
  47 + tm.tm_sec = win_time.wSecond;
  48 + tm.tm_isdst = -1;
  49 +
  50 + clock = mktime(&tm);
  51 +
  52 + tv->tv_sec = (long)clock;
  53 + tv->tv_usec = win_time.wMilliseconds * 1000;
  54 +
  55 + return 0;
  56 + }
  57 +
  58 + pid_t getpid(void)
  59 + {
  60 + return (pid_t)GetCurrentProcessId();
  61 + }
  62 +
  63 + int usleep(useconds_t usec)
  64 + {
  65 + Sleep((DWORD)(usec / 1000));
  66 + return 0;
  67 + }
  68 +
  69 + ssize_t writev(int fd, const struct iovec *iov, int iovcnt)
  70 + {
  71 + ssize_t nwrite = 0;
  72 + for (int i = 0; i < iovcnt; i++) {
  73 + const struct iovec* current = iov + i;
  74 +
  75 + int nsent = ::send(fd, (char*)current->iov_base, current->iov_len, 0);
  76 + if (nsent < 0) {
  77 + return nsent;
  78 + }
  79 +
  80 + nwrite += nsent;
  81 + if (nsent == 0) {
  82 + return nwrite;
  83 + }
  84 + }
  85 + return nwrite;
  86 + }
  87 +
  88 + //////////////////////// strlcpy.c (modified) //////////////////////////
  89 +
  90 + /* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
  91 +
  92 + /*-
  93 + * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
  94 + *
  95 + * Permission to use, copy, modify, and distribute this software for any
  96 + * purpose with or without fee is hereby granted, provided that the above
  97 + * copyright notice and this permission notice appear in all copies.
  98 + *
  99 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  100 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  101 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  102 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  103 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  104 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  105 + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  106 + */
  107 +
  108 + //#include <sys/cdefs.h> // ****
  109 + //#include <cstddef> // ****
  110 + // __FBSDID("$FreeBSD: stable/9/sys/libkern/strlcpy.c 243811 2012-12-03 18:08:44Z delphij $"); // ****
  111 +
  112 + // #include <sys/types.h> // ****
  113 + // #include <sys/libkern.h> // ****
  114 +
  115 + /*
  116 + * Copy src to string dst of size siz. At most siz-1 characters
  117 + * will be copied. Always NUL terminates (unless siz == 0).
  118 + * Returns strlen(src); if retval >= siz, truncation occurred.
  119 + */
  120 +
  121 + //#define __restrict // ****
  122 +
  123 + size_t strlcpy(char * __restrict dst, const char * __restrict src, size_t siz)
  124 + {
  125 + char *d = dst;
  126 + const char *s = src;
  127 + size_t n = siz;
  128 +
  129 + /* Copy as many bytes as will fit */
  130 + if (n != 0) {
  131 + while (--n != 0) {
  132 + if ((*d++ = *s++) == '\0')
  133 + break;
  134 + }
  135 + }
  136 +
  137 + /* Not enough room in dst, add NUL and traverse rest of src */
  138 + if (n == 0) {
  139 + if (siz != 0)
  140 + *d = '\0'; /* NUL-terminate dst */
  141 + while (*s++)
  142 + ;
  143 + }
  144 +
  145 + return(s - src - 1); /* count does not include NUL */
  146 + }
  147 +
  148 + // http://www.cplusplus.com/forum/general/141779///////////////////////// inet_ntop.c (modified) //////////////////////////
  149 + /*
  150 + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
  151 + * Copyright (c) 1996-1999 by Internet Software Consortium.
  152 + *
  153 + * Permission to use, copy, modify, and distribute this software for any
  154 + * purpose with or without fee is hereby granted, provided that the above
  155 + * copyright notice and this permission notice appear in all copies.
  156 + *
  157 + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
  158 + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  159 + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
  160 + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  161 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  162 + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  163 + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  164 + */
  165 +
  166 + // #if defined(LIBC_SCCS) && !defined(lint) // ****
  167 + //static const char rcsid[] = "$Id: inet_ntop.c,v 1.3.18.2 2005/11/03 23:02:22 marka Exp $";
  168 + // #endif /* LIBC_SCCS and not lint */ // ****
  169 + // #include <sys/cdefs.h> // ****
  170 + // __FBSDID("$FreeBSD: stable/9/sys/libkern/inet_ntop.c 213103 2010-09-24 15:01:45Z attilio $"); // ****
  171 +
  172 + //#define _WIN32_WINNT _WIN32_WINNT_WIN8 // ****
  173 + //#include <Ws2tcpip.h> // ****
  174 + //#pragma comment(lib, "Ws2_32.lib") // ****
  175 + //#include <cstdio> // ****
  176 +
  177 + // #include <sys/param.h> // ****
  178 + // #include <sys/socket.h> // ****
  179 + // #include <sys/systm.h> // ****
  180 +
  181 + // #include <netinet/in.h> // ****
  182 +
  183 + /*%
  184 + * WARNING: Don't even consider trying to compile this on a system where
  185 + * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
  186 + */
  187 +
  188 + static char *inet_ntop4(const u_char *src, char *dst, socklen_t size);
  189 + static char *inet_ntop6(const u_char *src, char *dst, socklen_t size);
  190 +
  191 + /* char *
  192 + * inet_ntop(af, src, dst, size)
  193 + * convert a network format address to presentation format.
  194 + * return:
  195 + * pointer to presentation format address (`dst'), or NULL (see errno).
  196 + * author:
  197 + * Paul Vixie, 1996.
  198 + */
  199 + const char* inet_ntop(int af, const void *src, char *dst, socklen_t size)
  200 + {
  201 + switch (af) {
  202 + case AF_INET:
  203 + return (inet_ntop4( (unsigned char*)src, (char*)dst, size)); // ****
  204 + #ifdef AF_INET6
  205 + //#error "IPv6 not supported"
  206 + //case AF_INET6:
  207 + // return (char*)(inet_ntop6( (unsigned char*)src, (char*)dst, size)); // ****
  208 + #endif
  209 + default:
  210 + // return (NULL); // ****
  211 + return 0 ; // ****
  212 + }
  213 + /* NOTREACHED */
  214 + }
  215 +
  216 + /* const char *
  217 + * inet_ntop4(src, dst, size)
  218 + * format an IPv4 address
  219 + * return:
  220 + * `dst' (as a const)
  221 + * notes:
  222 + * (1) uses no statics
  223 + * (2) takes a u_char* not an in_addr as input
  224 + * author:
  225 + * Paul Vixie, 1996.
  226 + */
  227 + static char * inet_ntop4(const u_char *src, char *dst, socklen_t size)
  228 + {
  229 + static const char fmt[128] = "%u.%u.%u.%u";
  230 + char tmp[sizeof "255.255.255.255"];
  231 + int l;
  232 +
  233 + l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]); // ****
  234 + if (l <= 0 || (socklen_t) l >= size) {
  235 + return (NULL);
  236 + }
  237 + strlcpy(dst, tmp, size);
  238 + return (dst);
  239 + }
  240 +
  241 + /* const char *
  242 + * inet_ntop6(src, dst, size)
  243 + * convert IPv6 binary address into presentation (printable) format
  244 + * author:
  245 + * Paul Vixie, 1996.
  246 + */
  247 + static char * inet_ntop6(const u_char *src, char *dst, socklen_t size)
  248 + {
  249 + /*
  250 + * Note that int32_t and int16_t need only be "at least" large enough
  251 + * to contain a value of the specified size. On some systems, like
  252 + * Crays, there is no such thing as an integer variable with 16 bits.
  253 + * Keep this in mind if you think this function should have been coded
  254 + * to use pointer overlays. All the world's not a VAX.
  255 + */
  256 + char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
  257 + struct { int base, len; } best, cur;
  258 + #define NS_IN6ADDRSZ 16
  259 + #define NS_INT16SZ 2
  260 + u_int words[NS_IN6ADDRSZ / NS_INT16SZ];
  261 + int i;
  262 +
  263 + /*
  264 + * Preprocess:
  265 + * Copy the input (bytewise) array into a wordwise array.
  266 + * Find the longest run of 0x00's in src[] for :: shorthanding.
  267 + */
  268 + memset(words, '\0', sizeof words);
  269 + for (i = 0; i < NS_IN6ADDRSZ; i++)
  270 + words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
  271 + best.base = -1;
  272 + best.len = 0;
  273 + cur.base = -1;
  274 + cur.len = 0;
  275 + for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
  276 + if (words[i] == 0) {
  277 + if (cur.base == -1)
  278 + cur.base = i, cur.len = 1;
  279 + else
  280 + cur.len++;
  281 + } else {
  282 + if (cur.base != -1) {
  283 + if (best.base == -1 || cur.len > best.len)
  284 + best = cur;
  285 + cur.base = -1;
  286 + }
  287 + }
  288 + }
  289 + if (cur.base != -1) {
  290 + if (best.base == -1 || cur.len > best.len)
  291 + best = cur;
  292 + }
  293 + if (best.base != -1 && best.len < 2)
  294 + best.base = -1;
  295 +
  296 + /*
  297 + * Format the result.
  298 + */
  299 + tp = tmp;
  300 + for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
  301 + /* Are we inside the best run of 0x00's? */
  302 + if (best.base != -1 && i >= best.base &&
  303 + i < (best.base + best.len)) {
  304 + if (i == best.base)
  305 + *tp++ = ':';
  306 + continue;
  307 + }
  308 + /* Are we following an initial run of 0x00s or any real hex? */
  309 + if (i != 0)
  310 + *tp++ = ':';
  311 + /* Is this address an encapsulated IPv4? */
  312 + if (i == 6 && best.base == 0 && (best.len == 6 ||
  313 + (best.len == 7 && words[7] != 0x0001) ||
  314 + (best.len == 5 && words[5] == 0xffff))) {
  315 + if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
  316 + return (NULL);
  317 + tp += strlen(tp);
  318 + break;
  319 + }
  320 + tp += sprintf(tp, "%x", words[i]); // ****
  321 + }
  322 + /* Was it a trailing run of 0x00's? */
  323 + if (best.base != -1 && (best.base + best.len) ==
  324 + (NS_IN6ADDRSZ / NS_INT16SZ))
  325 + *tp++ = ':';
  326 + *tp++ = '\0';
  327 +
  328 + /*
  329 + * Check for overflow, copy, and we're done.
  330 + */
  331 + if ((socklen_t)(tp - tmp) > size) {
  332 + return (NULL);
  333 + }
  334 + strcpy(dst, tmp);
  335 + return (dst);
  336 + }
  337 +
  338 +#define Set_errno(num) SetLastError((num))
  339 +
  340 +/* INVALID_SOCKET == INVALID_HANDLE_VALUE == (unsigned int)(~0) */
  341 +/* SOCKET_ERROR == -1 */
  342 +//#define ENOTSOCK WSAENOTSOCK
  343 +//#define EINTR WSAEINTR
  344 +//#define ENOBUFS WSAENOBUFS
  345 +//#define EWOULDBLOCK WSAEWOULDBLOCK
  346 +#define EAFNOSUPPORT WSAEAFNOSUPPORT
  347 +/* from public\sdk\inc\crt\errno.h */
  348 +#define ENOSPC 28
  349 +
  350 +/*
  351 + *
  352 + */
  353 +/*
  354 +#ifndef INET_ADDRSTRLEN
  355 +#define INET_ADDRSTRLEN 16
  356 +#endif
  357 +
  358 +static const char *
  359 +inet_ntop_v4 (const void *src, char *dst, size_t size)
  360 +{
  361 + const char digits[] = "0123456789";
  362 + int i;
  363 + struct in_addr *addr = (struct in_addr *)src;
  364 + u_long a = ntohl(addr->s_addr);
  365 + const char *orig_dst = dst;
  366 +
  367 + if (size < INET_ADDRSTRLEN) {
  368 + Set_errno(ENOSPC);
  369 + return NULL;
  370 + }
  371 + for (i = 0; i < 4; ++i) {
  372 + int n = (a >> (24 - i * 8)) & 0xFF;
  373 + int non_zerop = 0;
  374 +
  375 + if (non_zerop || n / 100 > 0) {
  376 + *dst++ = digits[n / 100];
  377 + n %= 100;
  378 + non_zerop = 1;
  379 + }
  380 + if (non_zerop || n / 10 > 0) {
  381 + *dst++ = digits[n / 10];
  382 + n %= 10;
  383 + non_zerop = 1;
  384 + }
  385 + *dst++ = digits[n];
  386 + if (i != 3)
  387 + *dst++ = '.';
  388 + }
  389 + *dst++ = '\0';
  390 + return orig_dst;
  391 +}
  392 +
  393 +const char *
  394 +inet_ntop(int af, const void *src, char *dst, size_t size)
  395 +{
  396 + switch (af) {
  397 + case AF_INET :
  398 + return inet_ntop_v4 (src, dst, size);
  399 + default :
  400 + Set_errno(EAFNOSUPPORT);
  401 + return NULL;
  402 + }
  403 +}
  404 +
  405 +*/
  406 +#endif
  407 +
  1 +#ifndef SRS_WIN_PORTING_H
  2 +#define SRS_WIN_PORTING_H
  3 +
  4 +#if !defined(_WIN32) || defined(__CYGWIN__) /*not on windows or it's cygwin. _WIN32 includes both 32-bit and 64-bit*/
  5 +
  6 +#define SOCKET_ETIME ETIME
  7 +#define SOCKET_ECONNRESET ECONNRESET
  8 +
  9 +#define SOCKET int
  10 +#define SOCKET_ERRNO() errno
  11 +#define SOCKET_RESET(x) x=-1
  12 +#define SOCKET_CLOSE(x) if(x>=0){::close(x);x=-1;}
  13 +#define SOCKET_VALID(x) (x>=0)
  14 +#define SOCKET_SETUP() {}
  15 +#define SOCKET_CLEANUP() {}
  16 +
  17 +#else /*on windows, but not on cygwin*/
  18 +
  19 +#include <sys/stat.h>
  20 +#include <time.h>
  21 +#include <winsock2.h>
  22 +#include <stdint.h>
  23 +
  24 +#ifdef _MSC_VER //for VS2010
  25 +#include <io.h>
  26 +#include <fcntl.h>
  27 +#define S_IRUSR _S_IREAD
  28 +#define S_IWUSR _S_IWRITE
  29 +#define open _open
  30 +#define close _close
  31 +#define lseek _lseek
  32 +#define write _write
  33 +#define read _read
  34 +
  35 +typedef int ssize_t;
  36 +typedef int pid_t;
  37 +typedef int mode_t;
  38 +typedef int64_t useconds_t;
  39 +#endif
  40 +
  41 +#define S_IRGRP 0
  42 +#define S_IWGRP 0
  43 +#define S_IXGRP 0
  44 +#define S_IRWXG 0
  45 +#define S_IROTH 0
  46 +#define S_IWOTH 0
  47 +#define S_IXOTH 0
  48 +#define S_IRWXO 0
  49 +
  50 +#define PRId64 "lld"
  51 +
  52 +#define SOCKET_ETIME WSAETIMEDOUT
  53 +#define SOCKET_ECONNRESET WSAECONNRESET
  54 +#define SOCKET_ERRNO() WSAGetLastError()
  55 +#define SOCKET_RESET(x) x=INVALID_SOCKET
  56 +#define SOCKET_CLOSE(x) if(x!=INVALID_SOCKET){::closesocket(x);x=INVALID_SOCKET;}
  57 +#define SOCKET_VALID(x) (x!=INVALID_SOCKET)
  58 +#define SOCKET_BUFF(x) ((char*)x)
  59 +#define SOCKET_SETUP() socket_setup()
  60 +#define SOCKET_CLEANUP() socket_cleanup()
  61 +
  62 +typedef uint32_t u_int32_t;
  63 +typedef uint8_t u_int8_t;
  64 +typedef int socklen_t;
  65 +struct iovec {
  66 + void* iov_base; /* Starting address */
  67 + size_t iov_len; /* Length in bytes */
  68 +};
  69 +
  70 +#define snprintf _snprintf
  71 +ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
  72 +const char* inet_ntop(int af, const void *src, char *dst, socklen_t size);
  73 +int gettimeofday(struct timeval* tv, struct timezone* tz);
  74 +pid_t getpid(void);
  75 +int usleep(useconds_t usec);
  76 +int socket_setup();
  77 +int socket_cleanup();
  78 +#endif
  79 +
  80 +#endif //SRS_WIN_PORTING_H
@@ -31,7 +31,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 #include <srs_core.hpp> 31 #include <srs_core.hpp>
32 32
33 // success, ok 33 // success, ok
  34 +#if !defined(_WIN32) || defined(__CYGWIN__) //avoid redefine error on Windows
34 #define ERROR_SUCCESS 0 35 #define ERROR_SUCCESS 0
  36 +#else
  37 +#include <windows.h>
  38 +#endif
35 39
36 /////////////////////////////////////////////////////// 40 ///////////////////////////////////////////////////////
37 // system error. 41 // system error.
@@ -45,22 +45,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -45,22 +45,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45 45
46 SimpleSocketStream::SimpleSocketStream() 46 SimpleSocketStream::SimpleSocketStream()
47 { 47 {
48 - fd = -1; 48 + //fd = -1;
  49 + SOCKET_RESET(fd);
49 send_timeout = recv_timeout = ST_UTIME_NO_TIMEOUT; 50 send_timeout = recv_timeout = ST_UTIME_NO_TIMEOUT;
50 recv_bytes = send_bytes = 0; 51 recv_bytes = send_bytes = 0;
  52 + SOCKET_SETUP();
51 } 53 }
52 54
53 SimpleSocketStream::~SimpleSocketStream() 55 SimpleSocketStream::~SimpleSocketStream()
54 { 56 {
55 - if (fd != -1) {  
56 - ::close(fd);  
57 - fd = -1;  
58 - } 57 + //if (fd != -1) {
  58 + // ::close(fd);
  59 + // fd = -1;
  60 + //}
  61 + SOCKET_CLOSE(fd);
  62 + SOCKET_CLEANUP();
59 } 63 }
60 64
61 int SimpleSocketStream::create_socket() 65 int SimpleSocketStream::create_socket()
62 { 66 {
63 - if((fd = ::socket(AF_INET, SOCK_STREAM, 0)) < 0){ 67 + //if((fd = ::socket(AF_INET, SOCK_STREAM, 0)) < 0){
  68 + fd = ::socket(AF_INET, SOCK_STREAM, 0);
  69 + if(!SOCKET_VALID(fd)){
64 return ERROR_SOCKET_CREATE; 70 return ERROR_SOCKET_CREATE;
65 } 71 }
66 72
@@ -95,12 +101,12 @@ int SimpleSocketStream::read(void* buf, size_t size, ssize_t* nread) @@ -95,12 +101,12 @@ int SimpleSocketStream::read(void* buf, size_t size, ssize_t* nread)
95 // On success a non-negative integer indicating the number of bytes actually read is returned 101 // On success a non-negative integer indicating the number of bytes actually read is returned
96 // (a value of 0 means the network connection is closed or end of file is reached). 102 // (a value of 0 means the network connection is closed or end of file is reached).
97 if (nb_read <= 0) { 103 if (nb_read <= 0) {
98 - if (nb_read < 0 && errno == ETIME) { 104 + if (nb_read < 0 && SOCKET_ERRNO() == SOCKET_ETIME) {
99 return ERROR_SOCKET_TIMEOUT; 105 return ERROR_SOCKET_TIMEOUT;
100 } 106 }
101 107
102 if (nb_read == 0) { 108 if (nb_read == 0) {
103 - errno = ECONNRESET; 109 + errno = SOCKET_ECONNRESET;
104 } 110 }
105 111
106 return ERROR_SOCKET_READ; 112 return ERROR_SOCKET_READ;
@@ -158,7 +164,7 @@ int SimpleSocketStream::writev(const iovec *iov, int iov_size, ssize_t* nwrite) @@ -158,7 +164,7 @@ int SimpleSocketStream::writev(const iovec *iov, int iov_size, ssize_t* nwrite)
158 // returned, and errno is set appropriately. 164 // returned, and errno is set appropriately.
159 if (nb_write <= 0) { 165 if (nb_write <= 0) {
160 // @see https://github.com/winlinvip/simple-rtmp-server/issues/200 166 // @see https://github.com/winlinvip/simple-rtmp-server/issues/200
161 - if (nb_write < 0 && errno == ETIME) { 167 + if (nb_write < 0 && SOCKET_ERRNO() == SOCKET_ETIME) {
162 return ERROR_SOCKET_TIMEOUT; 168 return ERROR_SOCKET_TIMEOUT;
163 } 169 }
164 170
@@ -215,7 +221,7 @@ int SimpleSocketStream::write(void* buf, size_t size, ssize_t* nwrite) @@ -215,7 +221,7 @@ int SimpleSocketStream::write(void* buf, size_t size, ssize_t* nwrite)
215 221
216 if (nb_write <= 0) { 222 if (nb_write <= 0) {
217 // @see https://github.com/winlinvip/simple-rtmp-server/issues/200 223 // @see https://github.com/winlinvip/simple-rtmp-server/issues/200
218 - if (nb_write < 0 && errno == ETIME) { 224 + if (nb_write < 0 && SOCKET_ERRNO() == SOCKET_ETIME) {
219 return ERROR_SOCKET_TIMEOUT; 225 return ERROR_SOCKET_TIMEOUT;
220 } 226 }
221 227
@@ -43,7 +43,7 @@ private: @@ -43,7 +43,7 @@ private:
43 int64_t send_timeout; 43 int64_t send_timeout;
44 int64_t recv_bytes; 44 int64_t recv_bytes;
45 int64_t send_bytes; 45 int64_t send_bytes;
46 - int fd; 46 + SOCKET fd;
47 public: 47 public:
48 SimpleSocketStream(); 48 SimpleSocketStream();
49 virtual ~SimpleSocketStream(); 49 virtual ~SimpleSocketStream();
@@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */ 22 */
23 23
24 #include <srs_librtmp.hpp> 24 #include <srs_librtmp.hpp>
25 - 25 +#include <srs_platform.hpp>
26 #include <stdlib.h> 26 #include <stdlib.h>
27 27
28 // for srs-librtmp, @see https://github.com/winlinvip/simple-rtmp-server/issues/213 28 // for srs-librtmp, @see https://github.com/winlinvip/simple-rtmp-server/issues/213
@@ -109,30 +109,8 @@ struct Context @@ -109,30 +109,8 @@ struct Context
109 109
110 // for srs-librtmp, @see https://github.com/winlinvip/simple-rtmp-server/issues/213 110 // for srs-librtmp, @see https://github.com/winlinvip/simple-rtmp-server/issues/213
111 #ifdef _WIN32 111 #ifdef _WIN32
112 - int gettimeofday(struct timeval* tv, struct timezone* tz)  
113 - {  
114 - time_t clock;  
115 - struct tm tm;  
116 - SYSTEMTIME win_time;  
117 -  
118 - GetLocalTime(&win_time);  
119 -  
120 - tm.tm_year = win_time.wYear - 1900;  
121 - tm.tm_mon = win_time.wMonth - 1;  
122 - tm.tm_mday = win_time.wDay;  
123 - tm.tm_hour = win_time.wHour;  
124 - tm.tm_min = win_time.wMinute;  
125 - tm.tm_sec = win_time.wSecond;  
126 - tm.tm_isdst = -1;  
127 -  
128 - clock = mktime(&tm);  
129 -  
130 - tv->tv_sec = (long)clock;  
131 - tv->tv_usec = win_time.wMilliseconds * 1000;  
132 -  
133 - return 0;  
134 - }  
135 - 112 +
  113 +/*
136 int open(const char *pathname, int flags) 114 int open(const char *pathname, int flags)
137 { 115 {
138 return open(pathname, flags, 0); 116 return open(pathname, flags, 0);
@@ -175,286 +153,8 @@ struct Context @@ -175,286 +153,8 @@ struct Context
175 { 153 {
176 return (ssize_t)fread(buf, count, 1, (FILE*)fd); 154 return (ssize_t)fread(buf, count, 1, (FILE*)fd);
177 } 155 }
178 -  
179 - pid_t getpid(void)  
180 - {  
181 - return (pid_t)GetCurrentProcessId();  
182 - }  
183 -  
184 - int usleep(useconds_t usec)  
185 - {  
186 - Sleep((DWORD)(usec / 1000));  
187 - return 0;  
188 - }  
189 -  
190 - ssize_t writev(int fd, const struct iovec *iov, int iovcnt)  
191 - {  
192 - ssize_t nwrite = 0;  
193 - for (int i = 0; i < iovcnt; i++) {  
194 - const struct iovec* current = iov + i;  
195 -  
196 - int nsent = ::send(fd, (char*)current->iov_base, current->iov_len, 0);  
197 - if (nsent < 0) {  
198 - return nsent;  
199 - }  
200 -  
201 - nwrite += nsent;  
202 - if (nsent == 0) {  
203 - return nwrite;  
204 - }  
205 - }  
206 - return nwrite;  
207 - }  
208 -  
209 - //////////////////////// strlcpy.c (modified) //////////////////////////  
210 -  
211 - /* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */  
212 -  
213 - /*-  
214 - * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>  
215 - *  
216 - * Permission to use, copy, modify, and distribute this software for any  
217 - * purpose with or without fee is hereby granted, provided that the above  
218 - * copyright notice and this permission notice appear in all copies.  
219 - *  
220 - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES  
221 - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF  
222 - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR  
223 - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES  
224 - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN  
225 - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF  
226 - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  
227 - */  
228 -  
229 - //#include <sys/cdefs.h> // ****  
230 - //#include <cstddef> // ****  
231 - // __FBSDID("$FreeBSD: stable/9/sys/libkern/strlcpy.c 243811 2012-12-03 18:08:44Z delphij $"); // ****  
232 -  
233 - // #include <sys/types.h> // ****  
234 - // #include <sys/libkern.h> // ****  
235 -  
236 - /*  
237 - * Copy src to string dst of size siz. At most siz-1 characters  
238 - * will be copied. Always NUL terminates (unless siz == 0).  
239 - * Returns strlen(src); if retval >= siz, truncation occurred.  
240 - */  
241 -  
242 - //#define __restrict // ****  
243 -  
244 - std::size_t strlcpy(char * __restrict dst, const char * __restrict src, size_t siz)  
245 - {  
246 - char *d = dst;  
247 - const char *s = src;  
248 - size_t n = siz;  
249 -  
250 - /* Copy as many bytes as will fit */  
251 - if (n != 0) {  
252 - while (--n != 0) {  
253 - if ((*d++ = *s++) == '\0')  
254 - break;  
255 - }  
256 - }  
257 -  
258 - /* Not enough room in dst, add NUL and traverse rest of src */  
259 - if (n == 0) {  
260 - if (siz != 0)  
261 - *d = '\0'; /* NUL-terminate dst */  
262 - while (*s++)  
263 - ;  
264 - }  
265 -  
266 - return(s - src - 1); /* count does not include NUL */  
267 - }  
268 -  
269 - // http://www.cplusplus.com/forum/general/141779///////////////////////// inet_ntop.c (modified) //////////////////////////  
270 - /*  
271 - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")  
272 - * Copyright (c) 1996-1999 by Internet Software Consortium.  
273 - *  
274 - * Permission to use, copy, modify, and distribute this software for any  
275 - * purpose with or without fee is hereby granted, provided that the above  
276 - * copyright notice and this permission notice appear in all copies.  
277 - *  
278 - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES  
279 - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF  
280 - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR  
281 - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES  
282 - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN  
283 - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT  
284 - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  
285 - */  
286 -  
287 - // #if defined(LIBC_SCCS) && !defined(lint) // ****  
288 - //static const char rcsid[] = "$Id: inet_ntop.c,v 1.3.18.2 2005/11/03 23:02:22 marka Exp $";  
289 - // #endif /* LIBC_SCCS and not lint */ // ****  
290 - // #include <sys/cdefs.h> // ****  
291 - // __FBSDID("$FreeBSD: stable/9/sys/libkern/inet_ntop.c 213103 2010-09-24 15:01:45Z attilio $"); // ****  
292 -  
293 - //#define _WIN32_WINNT _WIN32_WINNT_WIN8 // ****  
294 - //#include <Ws2tcpip.h> // ****  
295 - #pragma comment(lib, "Ws2_32.lib") // ****  
296 - //#include <cstdio> // ****  
297 -  
298 - // #include <sys/param.h> // ****  
299 - // #include <sys/socket.h> // ****  
300 - // #include <sys/systm.h> // ****  
301 -  
302 - // #include <netinet/in.h> // ****  
303 -  
304 - /*%  
305 - * WARNING: Don't even consider trying to compile this on a system where  
306 - * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.  
307 - */  
308 -  
309 - static char *inet_ntop4(const u_char *src, char *dst, socklen_t size);  
310 - static char *inet_ntop6(const u_char *src, char *dst, socklen_t size);  
311 -  
312 - /* char *  
313 - * inet_ntop(af, src, dst, size)  
314 - * convert a network format address to presentation format.  
315 - * return:  
316 - * pointer to presentation format address (`dst'), or NULL (see errno).  
317 - * author:  
318 - * Paul Vixie, 1996.  
319 - */  
320 - const char* inet_ntop(int af, const void *src, char *dst, socklen_t size)  
321 - {  
322 - switch (af) {  
323 - case AF_INET:  
324 - return (inet_ntop4( (unsigned char*)src, (char*)dst, size)); // ****  
325 - #ifdef AF_INET6  
326 - #error "IPv6 not supported"  
327 - //case AF_INET6:  
328 - // return (char*)(inet_ntop6( (unsigned char*)src, (char*)dst, size)); // ****  
329 - #endif  
330 - default:  
331 - // return (NULL); // ****  
332 - return 0 ; // ****  
333 - }  
334 - /* NOTREACHED */  
335 - }  
336 -  
337 - /* const char *  
338 - * inet_ntop4(src, dst, size)  
339 - * format an IPv4 address  
340 - * return:  
341 - * `dst' (as a const)  
342 - * notes:  
343 - * (1) uses no statics  
344 - * (2) takes a u_char* not an in_addr as input  
345 - * author:  
346 - * Paul Vixie, 1996.  
347 - */  
348 - static char * inet_ntop4(const u_char *src, char *dst, socklen_t size)  
349 - {  
350 - static const char fmt[128] = "%u.%u.%u.%u";  
351 - char tmp[sizeof "255.255.255.255"];  
352 - int l;  
353 -  
354 - l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]); // ****  
355 - if (l <= 0 || (socklen_t) l >= size) {  
356 - return (NULL);  
357 - }  
358 - strlcpy(dst, tmp, size);  
359 - return (dst);  
360 - }  
361 -  
362 - /* const char *  
363 - * inet_ntop6(src, dst, size)  
364 - * convert IPv6 binary address into presentation (printable) format  
365 - * author:  
366 - * Paul Vixie, 1996.  
367 - */  
368 - static char * inet_ntop6(const u_char *src, char *dst, socklen_t size)  
369 - {  
370 - /*  
371 - * Note that int32_t and int16_t need only be "at least" large enough  
372 - * to contain a value of the specified size. On some systems, like  
373 - * Crays, there is no such thing as an integer variable with 16 bits.  
374 - * Keep this in mind if you think this function should have been coded  
375 - * to use pointer overlays. All the world's not a VAX.  
376 - */  
377 - char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;  
378 - struct { int base, len; } best, cur;  
379 - #define NS_IN6ADDRSZ 16  
380 - #define NS_INT16SZ 2  
381 - u_int words[NS_IN6ADDRSZ / NS_INT16SZ];  
382 - int i;  
383 -  
384 - /*  
385 - * Preprocess:  
386 - * Copy the input (bytewise) array into a wordwise array.  
387 - * Find the longest run of 0x00's in src[] for :: shorthanding.  
388 - */  
389 - memset(words, '\0', sizeof words);  
390 - for (i = 0; i < NS_IN6ADDRSZ; i++)  
391 - words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));  
392 - best.base = -1;  
393 - best.len = 0;  
394 - cur.base = -1;  
395 - cur.len = 0;  
396 - for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {  
397 - if (words[i] == 0) {  
398 - if (cur.base == -1)  
399 - cur.base = i, cur.len = 1;  
400 - else  
401 - cur.len++;  
402 - } else {  
403 - if (cur.base != -1) {  
404 - if (best.base == -1 || cur.len > best.len)  
405 - best = cur;  
406 - cur.base = -1;  
407 - }  
408 - }  
409 - }  
410 - if (cur.base != -1) {  
411 - if (best.base == -1 || cur.len > best.len)  
412 - best = cur;  
413 - }  
414 - if (best.base != -1 && best.len < 2)  
415 - best.base = -1;  
416 -  
417 - /*  
418 - * Format the result.  
419 - */  
420 - tp = tmp;  
421 - for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {  
422 - /* Are we inside the best run of 0x00's? */  
423 - if (best.base != -1 && i >= best.base &&  
424 - i < (best.base + best.len)) {  
425 - if (i == best.base)  
426 - *tp++ = ':';  
427 - continue;  
428 - }  
429 - /* Are we following an initial run of 0x00s or any real hex? */  
430 - if (i != 0)  
431 - *tp++ = ':';  
432 - /* Is this address an encapsulated IPv4? */  
433 - if (i == 6 && best.base == 0 && (best.len == 6 ||  
434 - (best.len == 7 && words[7] != 0x0001) ||  
435 - (best.len == 5 && words[5] == 0xffff))) {  
436 - if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))  
437 - return (NULL);  
438 - tp += strlen(tp);  
439 - break;  
440 - }  
441 - tp += std::sprintf(tp, "%x", words[i]); // ****  
442 - }  
443 - /* Was it a trailing run of 0x00's? */  
444 - if (best.base != -1 && (best.base + best.len) ==  
445 - (NS_IN6ADDRSZ / NS_INT16SZ))  
446 - *tp++ = ':';  
447 - *tp++ = '\0';  
448 -  
449 - /*  
450 - * Check for overflow, copy, and we're done.  
451 - */  
452 - if ((socklen_t)(tp - tmp) > size) {  
453 - return (NULL);  
454 - }  
455 - strcpy(dst, tmp);  
456 - return (dst);  
457 - } 156 +*/
  157 +
458 #endif 158 #endif
459 159
460 int srs_librtmp_context_parse_uri(Context* context) 160 int srs_librtmp_context_parse_uri(Context* context)
@@ -30,8 +30,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -30,8 +30,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 30
31 #include <sys/types.h> 31 #include <sys/types.h>
32 32
  33 +
33 // for srs-librtmp, @see https://github.com/winlinvip/simple-rtmp-server/issues/213 34 // for srs-librtmp, @see https://github.com/winlinvip/simple-rtmp-server/issues/213
34 -#ifdef _WIN32 35 +#if 0
35 #define _CRT_SECURE_NO_WARNINGS 36 #define _CRT_SECURE_NO_WARNINGS
36 typedef unsigned long long u_int64_t; 37 typedef unsigned long long u_int64_t;
37 typedef long long int64_t; 38 typedef long long int64_t;
@@ -72,6 +73,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -72,6 +73,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72 int usleep(useconds_t usec); 73 int usleep(useconds_t usec);
73 #endif 74 #endif
74 75
  76 +#if defined(_WIN32) && !defined(__CYGWIN__)
  77 +#include <stdint.h>
  78 +typedef uint32_t u_int32_t;
  79 +#endif
  80 +
75 /** 81 /**
76 * srs-librtmp is a librtmp like library, 82 * srs-librtmp is a librtmp like library,
77 * used to play/publish rtmp stream from/to rtmp server. 83 * used to play/publish rtmp stream from/to rtmp server.
  1 +LIBRARY
  2 +EXPORTS
  3 +srs_rtmp_create
  4 +srs_rtmp_create2
  5 +srs_rtmp_destroy
  6 +srs_rtmp_handshake
  7 +srs_rtmp_connect_app
  8 +srs_rtmp_connect_app2
  9 +srs_rtmp_play_stream
  10 +srs_rtmp_publish_stream
  11 +srs_rtmp_read_packet
  12 +srs_rtmp_write_packet
  13 +srs_version_major
  14 +srs_version_minor
  15 +srs_version_revision
  16 +srs_utils_parse_timestamp
  17 +srs_human_format_time
  18 +srs_human_print_rtmp_packet
  19 +srs_rtmp_bandwidth_check
  20 +;
  21 +__srs_rtmp_do_simple_handshake
  22 +__srs_rtmp_connect_server
  23 +__srs_rtmp_dns_resolve
  24 +
  25 +;;;;;;;;for flv read/write;;;;;;;;
  26 +srs_flv_open_read
  27 +srs_flv_open_write
  28 +srs_flv_close
  29 +srs_flv_read_header
  30 +srs_flv_read_tag_header
  31 +srs_flv_read_tag_data
  32 +srs_flv_write_header
  33 +srs_flv_write_tag
  34 +srs_flv_size_tag
  35 +srs_flv_tellg
  36 +srs_flv_lseek
  37 +srs_flv_is_eof
  38 +srs_flv_is_sequence_header
  39 +srs_flv_is_keyframe
  40 +
  41 +;;;;;;;;for h264 read/write;;;;;;;;
  42 +srs_h264_write_raw_frames
  43 +srs_h264_is_dvbsp_error
  44 +srs_h264_is_duplicated_sps_error
  45 +srs_h264_is_duplicated_pps_error
  46 +srs_h264_startswith_annexb
  1 +
  2 +Microsoft Visual Studio Solution File, Format Version 11.00
  3 +# Visual Studio 2010
  4 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "srs-librtmp", "srs-librtmp_vs2010.vcxproj", "{051CC3D8-5A99-4534-90EE-AED40EDDEEB2}"
  5 +EndProject
  6 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "srs_play", "srs_play.vcxproj", "{5149B9A9-5085-4A10-AD6F-23FBE6854390}"
  7 +EndProject
  8 +Global
  9 + GlobalSection(SolutionConfigurationPlatforms) = preSolution
  10 + Debug|Win32 = Debug|Win32
  11 + Release|Win32 = Release|Win32
  12 + EndGlobalSection
  13 + GlobalSection(ProjectConfigurationPlatforms) = postSolution
  14 + {051CC3D8-5A99-4534-90EE-AED40EDDEEB2}.Debug|Win32.ActiveCfg = Debug|Win32
  15 + {051CC3D8-5A99-4534-90EE-AED40EDDEEB2}.Debug|Win32.Build.0 = Debug|Win32
  16 + {051CC3D8-5A99-4534-90EE-AED40EDDEEB2}.Release|Win32.ActiveCfg = Release|Win32
  17 + {051CC3D8-5A99-4534-90EE-AED40EDDEEB2}.Release|Win32.Build.0 = Release|Win32
  18 + {5149B9A9-5085-4A10-AD6F-23FBE6854390}.Debug|Win32.ActiveCfg = Debug|Win32
  19 + {5149B9A9-5085-4A10-AD6F-23FBE6854390}.Debug|Win32.Build.0 = Debug|Win32
  20 + {5149B9A9-5085-4A10-AD6F-23FBE6854390}.Release|Win32.ActiveCfg = Release|Win32
  21 + {5149B9A9-5085-4A10-AD6F-23FBE6854390}.Release|Win32.Build.0 = Release|Win32
  22 + EndGlobalSection
  23 + GlobalSection(SolutionProperties) = preSolution
  24 + HideSolutionNode = FALSE
  25 + EndGlobalSection
  26 +EndGlobal
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3 + <ItemGroup Label="ProjectConfigurations">
  4 + <ProjectConfiguration Include="Debug|Win32">
  5 + <Configuration>Debug</Configuration>
  6 + <Platform>Win32</Platform>
  7 + </ProjectConfiguration>
  8 + <ProjectConfiguration Include="Release|Win32">
  9 + <Configuration>Release</Configuration>
  10 + <Platform>Win32</Platform>
  11 + </ProjectConfiguration>
  12 + </ItemGroup>
  13 + <ItemGroup>
  14 + <ClCompile Include="..\src\core\srs_core.cpp" />
  15 + <ClCompile Include="..\src\core\srs_core_autofree.cpp" />
  16 + <ClCompile Include="..\src\core\srs_platform.cpp" />
  17 + <ClCompile Include="..\src\kernel\srs_kernel_buffer.cpp" />
  18 + <ClCompile Include="..\src\kernel\srs_kernel_codec.cpp" />
  19 + <ClCompile Include="..\src\kernel\srs_kernel_consts.cpp" />
  20 + <ClCompile Include="..\src\kernel\srs_kernel_error.cpp" />
  21 + <ClCompile Include="..\src\kernel\srs_kernel_file.cpp" />
  22 + <ClCompile Include="..\src\kernel\srs_kernel_flv.cpp" />
  23 + <ClCompile Include="..\src\kernel\srs_kernel_log.cpp" />
  24 + <ClCompile Include="..\src\kernel\srs_kernel_stream.cpp" />
  25 + <ClCompile Include="..\src\kernel\srs_kernel_utility.cpp" />
  26 + <ClCompile Include="..\src\libs\srs_librtmp.cpp" />
  27 + <ClCompile Include="..\src\libs\srs_lib_bandwidth.cpp" />
  28 + <ClCompile Include="..\src\libs\srs_lib_simple_socket.cpp" />
  29 + <ClCompile Include="..\src\rtmp\srs_protocol_amf0.cpp" />
  30 + <ClCompile Include="..\src\rtmp\srs_protocol_handshake.cpp" />
  31 + <ClCompile Include="..\src\rtmp\srs_protocol_io.cpp" />
  32 + <ClCompile Include="..\src\rtmp\srs_protocol_msg_array.cpp" />
  33 + <ClCompile Include="..\src\rtmp\srs_protocol_rtmp.cpp" />
  34 + <ClCompile Include="..\src\rtmp\srs_protocol_stack.cpp" />
  35 + <ClCompile Include="..\src\rtmp\srs_protocol_utility.cpp" />
  36 + </ItemGroup>
  37 + <ItemGroup>
  38 + <ClInclude Include="..\src\core\srs_core.hpp" />
  39 + <ClInclude Include="..\src\core\srs_core_autofree.hpp" />
  40 + <ClInclude Include="..\src\core\srs_platform.hpp" />
  41 + <ClInclude Include="..\src\kernel\srs_kernel_buffer.hpp" />
  42 + <ClInclude Include="..\src\kernel\srs_kernel_codec.hpp" />
  43 + <ClInclude Include="..\src\kernel\srs_kernel_consts.hpp" />
  44 + <ClInclude Include="..\src\kernel\srs_kernel_error.hpp" />
  45 + <ClInclude Include="..\src\kernel\srs_kernel_file.hpp" />
  46 + <ClInclude Include="..\src\kernel\srs_kernel_flv.hpp" />
  47 + <ClInclude Include="..\src\kernel\srs_kernel_log.hpp" />
  48 + <ClInclude Include="..\src\kernel\srs_kernel_stream.hpp" />
  49 + <ClInclude Include="..\src\kernel\srs_kernel_utility.hpp" />
  50 + <ClInclude Include="..\src\libs\srs_librtmp.hpp" />
  51 + <ClInclude Include="..\src\libs\srs_lib_bandwidth.hpp" />
  52 + <ClInclude Include="..\src\libs\srs_lib_simple_socket.hpp" />
  53 + <ClInclude Include="..\src\rtmp\srs_protocol_amf0.hpp" />
  54 + <ClInclude Include="..\src\rtmp\srs_protocol_handshake.hpp" />
  55 + <ClInclude Include="..\src\rtmp\srs_protocol_io.hpp" />
  56 + <ClInclude Include="..\src\rtmp\srs_protocol_msg_array.hpp" />
  57 + <ClInclude Include="..\src\rtmp\srs_protocol_rtmp.hpp" />
  58 + <ClInclude Include="..\src\rtmp\srs_protocol_stack.hpp" />
  59 + <ClInclude Include="..\src\rtmp\srs_protocol_utility.hpp" />
  60 + </ItemGroup>
  61 + <ItemGroup>
  62 + <None Include="srs-librtmp.def" />
  63 + </ItemGroup>
  64 + <PropertyGroup Label="Globals">
  65 + <ProjectGuid>{051CC3D8-5A99-4534-90EE-AED40EDDEEB2}</ProjectGuid>
  66 + <Keyword>Win32Proj</Keyword>
  67 + <RootNamespace>srslibrtmp</RootNamespace>
  68 + <ProjectName>srs-librtmp</ProjectName>
  69 + </PropertyGroup>
  70 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  71 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
  72 + <ConfigurationType>DynamicLibrary</ConfigurationType>
  73 + <UseDebugLibraries>true</UseDebugLibraries>
  74 + <CharacterSet>Unicode</CharacterSet>
  75 + </PropertyGroup>
  76 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
  77 + <ConfigurationType>DynamicLibrary</ConfigurationType>
  78 + <UseDebugLibraries>false</UseDebugLibraries>
  79 + <WholeProgramOptimization>true</WholeProgramOptimization>
  80 + <CharacterSet>Unicode</CharacterSet>
  81 + </PropertyGroup>
  82 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  83 + <ImportGroup Label="ExtensionSettings">
  84 + </ImportGroup>
  85 + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  86 + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  87 + </ImportGroup>
  88 + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  89 + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  90 + </ImportGroup>
  91 + <PropertyGroup Label="UserMacros" />
  92 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  93 + <LinkIncremental>true</LinkIncremental>
  94 + </PropertyGroup>
  95 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  96 + <LinkIncremental>false</LinkIncremental>
  97 + </PropertyGroup>
  98 + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  99 + <ClCompile>
  100 + <PrecompiledHeader>
  101 + </PrecompiledHeader>
  102 + <WarningLevel>Level3</WarningLevel>
  103 + <Optimization>Disabled</Optimization>
  104 + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SRSLIBRTMP_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  105 + <AdditionalIncludeDirectories>..\src\rtmp;..\src\libs;..\src\kernel;..\src\core;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  106 + </ClCompile>
  107 + <Link>
  108 + <SubSystem>Windows</SubSystem>
  109 + <GenerateDebugInformation>true</GenerateDebugInformation>
  110 + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
  111 + <ModuleDefinitionFile>srs-librtmp.def</ModuleDefinitionFile>
  112 + </Link>
  113 + </ItemDefinitionGroup>
  114 + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  115 + <ClCompile>
  116 + <WarningLevel>Level3</WarningLevel>
  117 + <PrecompiledHeader>
  118 + </PrecompiledHeader>
  119 + <Optimization>MaxSpeed</Optimization>
  120 + <FunctionLevelLinking>true</FunctionLevelLinking>
  121 + <IntrinsicFunctions>true</IntrinsicFunctions>
  122 + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SRSLIBRTMP_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  123 + <AdditionalIncludeDirectories>..\src\rtmp;..\src\libs;..\src\kernel;..\src\core;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  124 + </ClCompile>
  125 + <Link>
  126 + <SubSystem>Windows</SubSystem>
  127 + <GenerateDebugInformation>true</GenerateDebugInformation>
  128 + <EnableCOMDATFolding>true</EnableCOMDATFolding>
  129 + <OptimizeReferences>true</OptimizeReferences>
  130 + <ModuleDefinitionFile>srs-librtmp.def</ModuleDefinitionFile>
  131 + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
  132 + </Link>
  133 + </ItemDefinitionGroup>
  134 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  135 + <ImportGroup Label="ExtensionTargets">
  136 + </ImportGroup>
  137 +</Project>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3 + <ItemGroup>
  4 + <Filter Include="core">
  5 + <UniqueIdentifier>{8e33c6db-7a35-4d09-92d0-cc28491abbd6}</UniqueIdentifier>
  6 + </Filter>
  7 + <Filter Include="kernel">
  8 + <UniqueIdentifier>{eac81f26-3b4f-4905-85c5-2c0b915107b0}</UniqueIdentifier>
  9 + </Filter>
  10 + <Filter Include="libs">
  11 + <UniqueIdentifier>{cbb45db3-c682-48bd-9a8c-1ae081aeddbf}</UniqueIdentifier>
  12 + </Filter>
  13 + <Filter Include="rtmp">
  14 + <UniqueIdentifier>{6a284cec-b287-4aeb-b991-e11ebb4be6ec}</UniqueIdentifier>
  15 + </Filter>
  16 + </ItemGroup>
  17 + <ItemGroup>
  18 + <ClCompile Include="..\src\core\srs_core.cpp">
  19 + <Filter>core</Filter>
  20 + </ClCompile>
  21 + <ClCompile Include="..\src\core\srs_core_autofree.cpp">
  22 + <Filter>core</Filter>
  23 + </ClCompile>
  24 + <ClCompile Include="..\src\core\srs_platform.cpp">
  25 + <Filter>core</Filter>
  26 + </ClCompile>
  27 + <ClCompile Include="..\src\kernel\srs_kernel_buffer.cpp">
  28 + <Filter>kernel</Filter>
  29 + </ClCompile>
  30 + <ClCompile Include="..\src\kernel\srs_kernel_codec.cpp">
  31 + <Filter>kernel</Filter>
  32 + </ClCompile>
  33 + <ClCompile Include="..\src\kernel\srs_kernel_consts.cpp">
  34 + <Filter>kernel</Filter>
  35 + </ClCompile>
  36 + <ClCompile Include="..\src\kernel\srs_kernel_error.cpp">
  37 + <Filter>kernel</Filter>
  38 + </ClCompile>
  39 + <ClCompile Include="..\src\kernel\srs_kernel_file.cpp">
  40 + <Filter>kernel</Filter>
  41 + </ClCompile>
  42 + <ClCompile Include="..\src\kernel\srs_kernel_flv.cpp">
  43 + <Filter>kernel</Filter>
  44 + </ClCompile>
  45 + <ClCompile Include="..\src\kernel\srs_kernel_log.cpp">
  46 + <Filter>kernel</Filter>
  47 + </ClCompile>
  48 + <ClCompile Include="..\src\kernel\srs_kernel_stream.cpp">
  49 + <Filter>kernel</Filter>
  50 + </ClCompile>
  51 + <ClCompile Include="..\src\kernel\srs_kernel_utility.cpp">
  52 + <Filter>kernel</Filter>
  53 + </ClCompile>
  54 + <ClCompile Include="..\src\libs\srs_lib_bandwidth.cpp">
  55 + <Filter>libs</Filter>
  56 + </ClCompile>
  57 + <ClCompile Include="..\src\libs\srs_lib_simple_socket.cpp">
  58 + <Filter>libs</Filter>
  59 + </ClCompile>
  60 + <ClCompile Include="..\src\libs\srs_librtmp.cpp">
  61 + <Filter>libs</Filter>
  62 + </ClCompile>
  63 + <ClCompile Include="..\src\rtmp\srs_protocol_amf0.cpp">
  64 + <Filter>rtmp</Filter>
  65 + </ClCompile>
  66 + <ClCompile Include="..\src\rtmp\srs_protocol_handshake.cpp">
  67 + <Filter>rtmp</Filter>
  68 + </ClCompile>
  69 + <ClCompile Include="..\src\rtmp\srs_protocol_io.cpp">
  70 + <Filter>rtmp</Filter>
  71 + </ClCompile>
  72 + <ClCompile Include="..\src\rtmp\srs_protocol_msg_array.cpp">
  73 + <Filter>rtmp</Filter>
  74 + </ClCompile>
  75 + <ClCompile Include="..\src\rtmp\srs_protocol_rtmp.cpp">
  76 + <Filter>rtmp</Filter>
  77 + </ClCompile>
  78 + <ClCompile Include="..\src\rtmp\srs_protocol_stack.cpp">
  79 + <Filter>rtmp</Filter>
  80 + </ClCompile>
  81 + <ClCompile Include="..\src\rtmp\srs_protocol_utility.cpp">
  82 + <Filter>rtmp</Filter>
  83 + </ClCompile>
  84 + </ItemGroup>
  85 + <ItemGroup>
  86 + <ClInclude Include="..\src\core\srs_core.hpp">
  87 + <Filter>core</Filter>
  88 + </ClInclude>
  89 + <ClInclude Include="..\src\core\srs_core_autofree.hpp">
  90 + <Filter>core</Filter>
  91 + </ClInclude>
  92 + <ClInclude Include="..\src\core\srs_platform.hpp">
  93 + <Filter>core</Filter>
  94 + </ClInclude>
  95 + <ClInclude Include="..\src\kernel\srs_kernel_buffer.hpp">
  96 + <Filter>kernel</Filter>
  97 + </ClInclude>
  98 + <ClInclude Include="..\src\kernel\srs_kernel_codec.hpp">
  99 + <Filter>kernel</Filter>
  100 + </ClInclude>
  101 + <ClInclude Include="..\src\kernel\srs_kernel_consts.hpp">
  102 + <Filter>kernel</Filter>
  103 + </ClInclude>
  104 + <ClInclude Include="..\src\kernel\srs_kernel_error.hpp">
  105 + <Filter>kernel</Filter>
  106 + </ClInclude>
  107 + <ClInclude Include="..\src\kernel\srs_kernel_file.hpp">
  108 + <Filter>kernel</Filter>
  109 + </ClInclude>
  110 + <ClInclude Include="..\src\kernel\srs_kernel_flv.hpp">
  111 + <Filter>kernel</Filter>
  112 + </ClInclude>
  113 + <ClInclude Include="..\src\kernel\srs_kernel_log.hpp">
  114 + <Filter>kernel</Filter>
  115 + </ClInclude>
  116 + <ClInclude Include="..\src\kernel\srs_kernel_stream.hpp">
  117 + <Filter>kernel</Filter>
  118 + </ClInclude>
  119 + <ClInclude Include="..\src\kernel\srs_kernel_utility.hpp">
  120 + <Filter>kernel</Filter>
  121 + </ClInclude>
  122 + <ClInclude Include="..\src\libs\srs_lib_bandwidth.hpp">
  123 + <Filter>libs</Filter>
  124 + </ClInclude>
  125 + <ClInclude Include="..\src\libs\srs_lib_simple_socket.hpp">
  126 + <Filter>libs</Filter>
  127 + </ClInclude>
  128 + <ClInclude Include="..\src\libs\srs_librtmp.hpp">
  129 + <Filter>libs</Filter>
  130 + </ClInclude>
  131 + <ClInclude Include="..\src\rtmp\srs_protocol_amf0.hpp">
  132 + <Filter>rtmp</Filter>
  133 + </ClInclude>
  134 + <ClInclude Include="..\src\rtmp\srs_protocol_handshake.hpp">
  135 + <Filter>rtmp</Filter>
  136 + </ClInclude>
  137 + <ClInclude Include="..\src\rtmp\srs_protocol_io.hpp">
  138 + <Filter>rtmp</Filter>
  139 + </ClInclude>
  140 + <ClInclude Include="..\src\rtmp\srs_protocol_msg_array.hpp">
  141 + <Filter>rtmp</Filter>
  142 + </ClInclude>
  143 + <ClInclude Include="..\src\rtmp\srs_protocol_rtmp.hpp">
  144 + <Filter>rtmp</Filter>
  145 + </ClInclude>
  146 + <ClInclude Include="..\src\rtmp\srs_protocol_stack.hpp">
  147 + <Filter>rtmp</Filter>
  148 + </ClInclude>
  149 + <ClInclude Include="..\src\rtmp\srs_protocol_utility.hpp">
  150 + <Filter>rtmp</Filter>
  151 + </ClInclude>
  152 + </ItemGroup>
  153 + <ItemGroup>
  154 + <None Include="srs-librtmp.def" />
  155 + </ItemGroup>
  156 +</Project>
  1 +// auto generated by configure
  2 +#ifndef SRS_AUTO_HEADER_HPP
  3 +#define SRS_AUTO_HEADER_HPP
  4 +
  5 +#define SRS_AUTO_BUILD_TS "1416731672"
  6 +#define SRS_AUTO_BUILD_DATE "2014-11-23 16:34:32"
  7 +#define SRS_AUTO_UNAME "WIN_NT-6.1 WZY-PC2 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 WINNT"
  8 +#define SRS_AUTO_USER_CONFIGURE "--x86-x64 --export-librtmp-project=../srs-librtmp"
  9 +#define SRS_AUTO_CONFIGURE "--prefix=/usr/local/srs --without-hls --without-dvr --without-nginx --without-ssl --without-ffmpeg --without-transcode --without-ingest --without-stat --without-http-callback --without-http-server --without-http-api --with-librtmp --with-research --without-utest --without-gperf --without-gmc --without-gmp --without-gcp --without-gprof --without-arm-ubuntu12 --without-mips-ubuntu12 --log-trace"
  10 +
  11 +#define SRS_AUTO_EMBEDED_TOOL_CHAIN "normal x86/x64 gcc"
  12 +
  13 +#undef SRS_AUTO_HTTP_PARSER
  14 +#undef SRS_AUTO_HTTP_SERVER
  15 +#undef SRS_AUTO_HTTP_API
  16 +#undef SRS_AUTO_NGINX
  17 +#undef SRS_AUTO_DVR
  18 +#undef SRS_AUTO_HLS
  19 +#undef SRS_AUTO_HTTP_CALLBACK
  20 +#undef SRS_AUTO_SSL
  21 +#undef SRS_AUTO_FFMPEG_TOOL
  22 +#define SRS_AUTO_FFMPEG_STUB
  23 +#undef SRS_AUTO_TRANSCODE
  24 +#undef SRS_AUTO_INGEST
  25 +#undef SRS_AUTO_STAT
  26 +#undef SRS_AUTO_GPERF
  27 +#undef SRS_AUTO_GPERF_MC
  28 +#undef SRS_AUTO_GPERF_MP
  29 +#undef SRS_AUTO_GPERF_CP
  30 +#undef SRS_AUTO_EMBEDED_CPU
  31 +#undef SRS_AUTO_ARM_UBUNTU12
  32 +#undef SRS_AUTO_MIPS_UBUNTU12
  33 +
  34 +#undef SRS_AUTO_VERBOSE
  35 +#undef SRS_AUTO_INFO
  36 +#define SRS_AUTO_TRACE
  37 +
  38 +#define SRS_AUTO_PREFIX "/usr/local/srs"
  39 +
  40 +#define SRS_AUTO_CONSTRIBUTORS "\
  41 +winlin<winlin@vip.126.com> \
  42 +wenjie.zhao<740936897@qq.com> \
  43 +xiangcheng.liu<liuxc0116@foxmail.com> \
  44 +naijia.liu<youngcow@youngcow.net> \
  45 +alcoholyi<alcoholyi@qq.com> \
  46 +byteman<wangchen2011@gmail.com> \
  47 +chad.wang<chad.wang.cn@gmail.com> \
  48 +suhetao<suhetao@gmail.com> \
  49 +Johnny<fengjihu@163.com> \
  50 +karthikeyan<keyanmca@gmail.com> \
  51 +StevenLiu<lq@chinaffmpeg.org> \
  52 +zhengfl<zhengfl_1989@126.com> \
  53 +"
  54 +
  55 +#endif
  56 +
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3 + <ItemGroup Label="ProjectConfigurations">
  4 + <ProjectConfiguration Include="Debug|Win32">
  5 + <Configuration>Debug</Configuration>
  6 + <Platform>Win32</Platform>
  7 + </ProjectConfiguration>
  8 + <ProjectConfiguration Include="Release|Win32">
  9 + <Configuration>Release</Configuration>
  10 + <Platform>Win32</Platform>
  11 + </ProjectConfiguration>
  12 + </ItemGroup>
  13 + <PropertyGroup Label="Globals">
  14 + <ProjectGuid>{5149B9A9-5085-4A10-AD6F-23FBE6854390}</ProjectGuid>
  15 + <Keyword>Win32Proj</Keyword>
  16 + <RootNamespace>srs_play</RootNamespace>
  17 + </PropertyGroup>
  18 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  19 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
  20 + <ConfigurationType>Application</ConfigurationType>
  21 + <UseDebugLibraries>true</UseDebugLibraries>
  22 + <CharacterSet>Unicode</CharacterSet>
  23 + </PropertyGroup>
  24 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
  25 + <ConfigurationType>Application</ConfigurationType>
  26 + <UseDebugLibraries>false</UseDebugLibraries>
  27 + <WholeProgramOptimization>true</WholeProgramOptimization>
  28 + <CharacterSet>Unicode</CharacterSet>
  29 + </PropertyGroup>
  30 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  31 + <ImportGroup Label="ExtensionSettings">
  32 + </ImportGroup>
  33 + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  34 + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  35 + </ImportGroup>
  36 + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  37 + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  38 + </ImportGroup>
  39 + <PropertyGroup Label="UserMacros" />
  40 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  41 + <LinkIncremental>true</LinkIncremental>
  42 + </PropertyGroup>
  43 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  44 + <LinkIncremental>false</LinkIncremental>
  45 + </PropertyGroup>
  46 + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  47 + <ClCompile>
  48 + <PrecompiledHeader>
  49 + </PrecompiledHeader>
  50 + <WarningLevel>Level3</WarningLevel>
  51 + <Optimization>Disabled</Optimization>
  52 + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  53 + <AdditionalIncludeDirectories>..\src\core;..\src\libs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  54 + </ClCompile>
  55 + <Link>
  56 + <SubSystem>Console</SubSystem>
  57 + <GenerateDebugInformation>true</GenerateDebugInformation>
  58 + <AdditionalDependencies>srs-librtmp.lib;%(AdditionalDependencies)</AdditionalDependencies>
  59 + <AdditionalLibraryDirectories>./debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
  60 + </Link>
  61 + </ItemDefinitionGroup>
  62 + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  63 + <ClCompile>
  64 + <WarningLevel>Level3</WarningLevel>
  65 + <PrecompiledHeader>
  66 + </PrecompiledHeader>
  67 + <Optimization>MaxSpeed</Optimization>
  68 + <FunctionLevelLinking>true</FunctionLevelLinking>
  69 + <IntrinsicFunctions>true</IntrinsicFunctions>
  70 + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  71 + </ClCompile>
  72 + <Link>
  73 + <SubSystem>Console</SubSystem>
  74 + <GenerateDebugInformation>true</GenerateDebugInformation>
  75 + <EnableCOMDATFolding>true</EnableCOMDATFolding>
  76 + <OptimizeReferences>true</OptimizeReferences>
  77 + </Link>
  78 + </ItemDefinitionGroup>
  79 + <ItemGroup>
  80 + <ClCompile Include="..\research\librtmp\srs_play.c" />
  81 + </ItemGroup>
  82 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  83 + <ImportGroup Label="ExtensionTargets">
  84 + </ImportGroup>
  85 +</Project>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3 + <ItemGroup>
  4 + <Filter Include="Source Files">
  5 + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
  6 + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
  7 + </Filter>
  8 + <Filter Include="Header Files">
  9 + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
  10 + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
  11 + </Filter>
  12 + <Filter Include="Resource Files">
  13 + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
  14 + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
  15 + </Filter>
  16 + </ItemGroup>
  17 + <ItemGroup>
  18 + <ClCompile Include="..\research\librtmp\srs_play.c">
  19 + <Filter>Source Files</Filter>
  20 + </ClCompile>
  21 + </ItemGroup>
  22 +</Project>