shithub: h264bsd

Download patch

ref: ae8d07b2a4414678e636df580ab8da52bf1ad4fb
parent: dc699e29fb98fd9e46b25cc282535c9cd204f920
author: Sam Leitch <[email protected]>
date: Mon Mar 10 19:47:46 EDT 2014

Fixed makefile and c file for Crossbridge swc.

--- a/flex/Makefile
+++ b/flex/Makefile
@@ -3,7 +3,7 @@
 FLASCC:=X
 FLEX:=X
 AS3COMPILER:=asc2.jar
-BASE_CFLAGS:=-DFLASCC -O4
+BASE_CFLAGS:=-DFLASCC -O4 -I $(FLASCC)/usr/include
 
 $?UNAME=$(shell uname -s)
 ifneq (,$(findstring CYGWIN,$(UNAME)))
@@ -30,7 +30,7 @@
 	fi
 
 swc: check
-	"$(FLASCC)/usr/bin/gcc" $(BASE_CFLAGS) $(SOURCES) -emit-swc=h264bsd -o h264bsd.swc
+	"$(FLASCC)/usr/bin/clang" $(BASE_CFLAGS) $(SOURCES) -emit-swc=h264bsd -o h264bsd.swc
 	"$(FLEX)/bin/mxmlc" -static-link-runtime-shared-libraries -compiler.omit-trace-statements=false -library-path=h264bsd.swc -debug=true h264test.as -o h264test.swf
 
 
--- a/src/h264bsd_conceal.c
+++ b/src/h264bsd_conceal.c
@@ -39,6 +39,10 @@
 #include "h264bsd_reconstruct.h"
 #include "h264bsd_dpb.h"
 
+#ifdef FLASCC
+#include "AS3/AS3.h"
+#endif /* FLASCC */
+
 /*------------------------------------------------------------------------------
     2. External compiler flags
 --------------------------------------------------------------------------------
@@ -179,11 +183,12 @@
         }
         else
         {
-#ifndef CROSSBRIDGE
+#ifndef FLASCC
             memcpy(currImage->data, refData, width*height*384);
 #else
             inline_as3(
-                "var temp:ByteArray = new ByteArray();\n"
+                "import flash.utils.ByteArray;\n"
+                "var temp:flash.utils.ByteArray = new flash.utils.ByteArray();\n"
                 "CModule.readBytes(%0, %2, temp);\n"
                 "temp.position = 0;\n"
                 "CModule.writeBytes(%1, %2, temp);" 
--- a/src/h264bsd_reconstruct.c
+++ b/src/h264bsd_reconstruct.c
@@ -43,6 +43,10 @@
 #include "armVC.h"
 #endif /* H264DEC_OMXDL */
 
+#ifdef FLASCC
+#include "AS3/AS3.h"
+#endif /* FLASCC */
+
 /*------------------------------------------------------------------------------
     2. External compiler flags
 --------------------------------------------------------------------------------
@@ -2141,10 +2145,11 @@
     ASSERT(ref);
     ASSERT(fill);
 
-#ifndef CROSSBRIDGE
+#ifndef FLASCC
     memcpy(fill, ref, center);
 #else
     inline_as3(
+        "import flash.utils.ByteArray;\n"
         "var temp:ByteArray = new ByteArray();\n"
         "CModule.readBytes(%0, %2, temp);\n"
         "temp.position = 0;\n"