shithub: h264bsd

Download patch

ref: 66b48e63192e40f61cf52e2100b13315357ece4e
parent: 823d620f8315c94db90e029987e4a12771ed79f2
author: Sam Leitch <sam.leitch@calgaryscientific.com>
date: Tue Mar 18 10:20:54 EDT 2014

Updated makefile to build full lib.

--- a/flex/Makefile
+++ b/flex/Makefile
@@ -1,10 +1,11 @@
 SOURCES = $(wildcard ../src/*.c) main.c
+AS_SOURCES = $(wildcard src/h264bsd/*.as)
 
 FLASCC:=X
 FLEX:=X
 BASE_CFLAGS:=-DFLASCC -O4 -I $(FLASCC)/usr/include
 
-swc: lib/h264bsd_asm.swc
+swc: bin/h264bsd.swc
 
 test: test/h264test.swf
 
@@ -16,6 +17,14 @@
 	mkdir -p lib
 	"$(FLASCC)/usr/bin/gcc" $(BASE_CFLAGS) $(SOURCES) -emit-swc=h264bsd_asm -o lib/h264bsd_asm.swc
 
+bin/h264bsd.swc: lib/h264bsd_asm.swc $(AS_SOURCES)
+	@if [ -d "$(FLEX)/bin" ] ; then true ; \
+	else echo "Couldn't locate Flex sdk directory, please invoke make with \"make FLEX=/path/to/flex  ...\"" ; exit 1 ; \
+	fi
+
+	mkdir -p bin
+	"$(FLEX)/bin/compc" -library-path=lib/h264bsd_asm.swc -source-path=src -include-sources=src -o bin/h264bsd.swc
+
 test/h264test.swf: test/h264test.as lib/h264bsd_asm.swc
 	@if [ -d "$(FLEX)/bin" ] ; then true ; \
 	else echo "Couldn't locate Flex sdk directory, please invoke make with \"make FLEX=/path/to/flex  ...\"" ; exit 1 ; \
@@ -24,4 +33,4 @@
 	"$(FLEX)/bin/mxmlc" -static-link-runtime-shared-libraries -compiler.omit-trace-statements=false -library-path=lib/h264bsd_asm.swc -debug=true test/h264test.as -o test/h264test.swf
 
 clean:
-	rm -f test/*.swf lib/*.swc *.bc *.exe
+	rm -f test/*.swf lib/*.swc bin/*.swc *.bc *.exe
binary files a/flex/lib/h264bsd_asm.swc b/flex/lib/h264bsd_asm.swc differ
--- a/flex/src/h264bsd/Decoder.as
+++ b/flex/src/h264bsd/Decoder.as
@@ -12,9 +12,6 @@
     
     import h264bsd_asm.CModule;
     
-    import mx.logging.ILogger;
-    import mx.logging.Log;
-    
     [Event(name = "pictureReady", type = "pureweb.client.ui.H264DecoderEvent")]
     [Event(name = "headersReady", type = "pureweb.client.ui.H264DecoderEvent")]
     public class Decoder extends EventDispatcher
@@ -27,8 +24,6 @@
         public static const MEMALLOC_ERROR:int = 5;
         public static const NO_INPUT:int = 1024;
         
-        private static var _logger:ILogger = null;
-        
         private var _storagePtr:int = 0;
         private var _released:Boolean = false;
         private var _ready:Boolean = false;
@@ -253,14 +248,6 @@
             _inputPtr = 0;
             _inputOffset = 0;
             _inputLength = 0;
-        }
-        
-        private function get logger():ILogger
-        {
-            if(_logger == null)
-                _logger = Log.getLogger(getQualifiedClassName(this).replace("::", "."));
-            
-            return _logger;
         }
     }    
 }