[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/libamf amf.cpp rtmp.cpp
From: |
Vitaly Alexeev |
Subject: |
[Gnash-commit] gnash/libamf amf.cpp rtmp.cpp |
Date: |
Wed, 16 Aug 2006 14:31:09 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Vitaly Alexeev <alexeev> 06/08/16 14:31:09
Modified files:
libamf : amf.cpp rtmp.cpp
Log message:
porting to win32
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/amf.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/rtmp.cpp?cvsroot=gnash&r1=1.5&r2=1.6
Patches:
Index: amf.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/amf.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- amf.cpp 14 Aug 2006 15:27:47 -0000 1.9
+++ amf.cpp 16 Aug 2006 14:31:09 -0000 1.10
@@ -1,4 +1,5 @@
//
+//
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or modify
@@ -44,7 +45,12 @@
#include <string>
#include <vector>
#include <iostream>
-#include <netinet/in.h>
+
+#if defined(_WIN32) || defined(WIN32)
+# include <Winsock2.h>
+#else
+# include <netinet/in.h>
+#endif
#include "log.h"
#include "tu_swap.h"
@@ -176,6 +182,7 @@
while (*x != ObjectEnd) {
x = readElement(x);
}
+ return true;
}
char *
@@ -276,6 +283,7 @@
AMF::readObject(void */* in */)
{
GNASH_REPORT_FUNCTION;
+ return true;
}
@@ -665,12 +673,14 @@
if (*in == 0) {
length = *(in+1);
}
+ return "";
}
int
AMF::extractNumber(const char */* in */)
{
GNASH_REPORT_FUNCTION;
+ return 0;
}
int
@@ -790,7 +800,10 @@
GNASH_REPORT_FUNCTION;
char *tmpptr;
- unsigned char hexint[(bytes*2)+1];
+
+// unsigned char hexint[(bytes*2)+1];
+ unsigned char* hexint;
+
char buffer[AMF_VIDEO_PACKET_SIZE];
char *name;
short length;
@@ -802,6 +815,8 @@
return -1;
}
+ hexint = (unsigned char*) malloc((bytes * 2) + 1);
+
memset(buffer, 0, AMF_VIDEO_PACKET_SIZE);
// memcpy(_amf_data +_read_size, in, AMF_VIDEO_PACKET_SIZE);
@@ -893,6 +908,8 @@
//}
}
+ free(hexint);
+
return -1;
}
Index: rtmp.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/rtmp.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- rtmp.cpp 13 Aug 2006 13:11:44 -0000 1.5
+++ rtmp.cpp 16 Aug 2006 14:31:09 -0000 1.6
@@ -40,17 +40,17 @@
// #endif
#include <iostream>
-#include <netinet/in.h>
+
+#if ! (defined(_WIN32) || defined(WIN32))
+# include <netinet/in.h>
+#endif
+
#include <new>
#include "log.h"
#include "rtmp.h"
#include "log.h"
#include "new"
-#if ! (defined(_WIN32) || defined(WIN32))
-#include <netinet/in.h>
-#endif
-
using namespace amf;
using namespace std;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/libamf amf.cpp rtmp.cpp,
Vitaly Alexeev <=