Imported Upstream version 0.5.0~dfsg0
authorAlessio Treglia <alessio@debian.org>
Sun, 27 May 2012 09:22:52 +0000 (11:22 +0200)
committerAlessio Treglia <alessio@debian.org>
Sun, 27 May 2012 09:22:52 +0000 (11:22 +0200)
79 files changed:
Changelog
INSTALLME
Makefile
README
TODO
applications/Makefile
applications/mp42ts/Makefile
applications/mp42ts/main.c
applications/mp4box/Makefile
applications/mp4box/filedump.c
applications/mp4box/fileimport.c
applications/mp4box/live.c
applications/mp4box/main.c
bin/smartphone 2003 (armv4)/release/install/archive.bat
bin/smartphone 2003 (armv4)/release/install/build_installer.bat
bin/smartphone 2003 (armv4)/release/install/gpac.inf
bin/smartphone 2003 (armv4)/release/install/readme.txt
bin/win32/release/nsis_install/gpac_installer.nsi
configure
doc/GPAC UPnP.doc
doc/INSTALL.gcc
doc/INSTALL.gpe
doc/INSTALL.symbian
doc/INSTALL.w32
doc/INSTALL.wCE
doc/ISO 639-2 codes.txt
doc/configuration.html
doc/doxyfile
doc/man/gpac.1
gpac.spec
include/gpac/crypt.h
include/gpac/internal/bifs_tables.h
include/gpac/internal/compositor_dev.h
include/gpac/internal/m3u8.h
include/gpac/internal/media_dev.h
include/gpac/internal/vobsub.h
include/gpac/ismacryp.h
include/gpac/media_tools.h
include/gpac/modules/hardcoded_proto.h [new file with mode: 0644]
include/gpac/mpegts.h
include/gpac/nodes_mpeg4.h
include/gpac/nodes_x3d.h
include/gpac/tools.h
modules/Makefile
modules/ffmpeg_in/ffmpeg_in.h
modules/platinum/GPACPlatinum.cpp
modules/platinum/GenericDevice.cpp
modules/platinum/GenericDevice.h
regression_tests/svg/all_syntaxes_1.1F2.svg
regression_tests/svg/utfscript.svg
regression_tests/utfscript.svg
src/Makefile
src/bifs/bifs_node_tables.c
src/compositor/compositor.c
src/compositor/hardcoded_protos.c
src/compositor/mpeg4_grouping_2d.c
src/compositor/mpeg4_viewport.c
src/export.cpp
src/laser/lsr_tables.c
src/mcrypt/sha1.c [deleted file]
src/media_tools/av_parsers.c
src/media_tools/dvb.c [deleted file]
src/media_tools/ismacryp.c
src/media_tools/isom_tools.c
src/media_tools/m3u8.c
src/media_tools/media_export.c
src/media_tools/media_import.c
src/media_tools/mpegts.c
src/media_tools/saf.c
src/odf/descriptors.c
src/scenegraph/base_scenegraph.c
src/scenegraph/mpeg4_nodes.c
src/scenegraph/x3d_nodes.c
src/terminal/media_object.c
src/terminal/terminal.c
src/utils/cache.c
src/utils/color.c
src/utils/downloader.c
src/utils/sha1.c [new file with mode: 0644]

index 5506b0fd8d4e2f80d2015363124adb5ed5e3378f..78660d9c752b559567aeaf241551b88aaea0fe0c 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,14 +1,23 @@
-27/08/09:
-  - Added overwrite of profile and level of AVC streams when adding tracks in mp4box(from ISOFF or .264). Use ":profile=X" and ":level=Z" when importing
-  - Fixed chapters and text tracks handling for iTunes. Using the -ipd option in MP4Box should fix all subtitles tracks.
-    When adding a track (including subtitle), it is now possible to override the track layout. For example:
-      MP4Box -add test.srt:layout=0x20x0x-1 test.mp4
-     will set the track box to be max width of the file tracks, 20 pixels height, translated by 0 pixels left and aligned to the bottom (max height - 20)
-    To add a chapter track, you simply have to add ":chap" in the -add command. 
-  - Added modular compilation of most libgpac features. See configure or include/gpac/configuration
-  - Fixed streaming interoperability with Live555 
-  - More fixed and speed improvement in VRML/BIFS scripting
-  - Added support for PBuffers on Win32/DirectX
+Full Changelog is available here:
+https://sourceforge.net/apps/trac/gpac/log/
+
+25/05/2012: GPAC 0.5.0
+  - MPEG-DASH and Apple HLS support in GPAC Clients
+  - MPEG-DASH segmenter for ISO files and MPEG-2 TS in MP4Box
+  - MP42TS generator now supports HLS output
+  - Support for MPEG-U and W3C widgets
+  - UPnP and DLNA support in the player through Platinum libraries, interfaced in JavaScript
+  - Better support for AVC and SVC muxing in MP4
+  - Support for OpenSVC decoder
+  - Stereo and Multi-view renderer for auto-stereoscopic screens
+  - iOS and Android support (but Symbian support has been dropped)
+  - Camera input through "camera://default" URLs on Windows, OSX 32bit, Linux V4L v1 and Android 
+  - experimental audio filters
+  - Better T-DMB support 
+  - experimental DVB-MPE and DSM-CC support
+  - BIFS ExtendedCore2D profile support
+  - more work on GUI
+  - and many many fixes and improvements in players and MP4Box 
 
 02/12/08: GPAC 0.4.5
   - Support for AC3 in ISO Media, AC3 decoder (liba52) RTP hinting
index ae0f038a4f0acbb6c781b897eb490addcfe9a09f..d648caeb8faac35a22f711defc8def6035924720 100644 (file)
--- a/INSTALLME
+++ b/INSTALLME
@@ -1,7 +1,9 @@
-Installation instructions for latest GPAC svn version:
+Installation instructions for latest GPAC svn version and GPAC release 0.5.0 - May 2012:
 
 For Windows, Linux and Mac OS X versions, follow the instructions on http://gpac.sourceforge.net/home_download.php
 
+For Android, follow the instructions in gpac/build/android/README
+
 For WindowsMobile platform, get the latest package of gpac extra libs available on GPAC svn:
 http://gpac.svn.sourceforge.net/viewvc/gpac/trunk/gpac_extra_libs/gpac_extra_libs.zip
 and follow the instructions in gpac/doc/INSTALL.wCE
@@ -9,7 +11,7 @@ and follow the instructions in gpac/doc/INSTALL.wCE
 
 
 
-Installation instructions for GPAC 0.4.5 - December 2008:
+Other Installation instructions for GPAC
 
 
 * Foreword
@@ -18,7 +20,9 @@ Installation instructions for GPAC 0.4.5 - December 2008:
 limited (no still image, no audio, no video, no text, no scripting). It is therefore recommended to download the 
 extra lib package available at http://sourceforge.net/projects/gpac. Compilation instructions for these libraries 
 are provided per library in the package. 
-       The current extra_lib package to use with gpac 0.4.5 is gpac_extra_libs 0.4.5.
+
+       The current extra_lib package to use with gpac 0.5.0 is gpac_extra_libs available at sourceforge: 
+http://gpac.svn.sourceforge.net/viewvc/gpac/trunk/gpac_extra_libs/gpac_extra_libs.zip?view=log 
 
        In case you have some of these libs already installed on your system, the detailed list of dependencies is
        * freetype2 from version 2.1.4 on.
@@ -32,19 +36,17 @@ are provided per library in the package.
        * faad2, version 2.0 or above (2.6.1 working)
        * liba52, version 0.7.4
        * OpenJPEG, version 1.3
-
-       Windows user are invited to download and install the Microsoft Platform SDK at
-               http://www.microsoft.com/msdownload/platformsdk/sdkupdate
-       If you don't have enough bandwidth (it's big) the GDIplus SDK is also included in the gpac_extra_lib package
+       * OpenSVCDecoder, version 1.3
 
 * Installing GPAC
 
 /!\ GPAC won't compile if the 'svnversion' command (shipped with every Subversion package) is not in your path /!\
 
+!!OUTDATED - please see online instructions instead!!
 Detailed instruction for Win32 MSVC Compilation are available in gpac/doc/INSTALL.w32
 
 Detailed instruction for WinCE eVC Compilation are available in gpac/doc/INSTALL.wCE
-
+s
 Detailed instruction for GCC Compilation are available in gpac/doc/INSTALL.gcc
 
 Detailed instruction for GCC cross-compilation for familiar+GPE systems are available in gpac/doc/INSTALL.gpe
index 0d13ebb7ed2320fc91d890753c7127542d1be73c..13b25331ee57cbe29089b1778dd29cec1e60df40 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ all:  version
        $(MAKE) -C modules all
 
 version:
-       @if which svnversion >/dev/null; then echo "#define GPAC_SVN_REVISION   \"$(shell svnversion $(SRC_PATH) )\"" > $(SRC_PATH)/include/gpac/version.h ; else  echo "No SVN Version found"; fi
+       @if [ -d ".svn" ]; then if which svnversion >/dev/null; then echo "#define GPAC_SVN_REVISION    \"$(shell svnversion $(SRC_PATH) )\"" > $(SRC_PATH)/include/gpac/version.h ; else  echo "No SVN Version found"; fi; fi
 
 lib:   version
        $(MAKE) -C src all
@@ -60,7 +60,9 @@ install:
 ifeq ($(DISABLE_ISOFF), no)
        $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/MP4Box "$(DESTDIR)$(prefix)/bin"
 endif
+ifeq ($(DISABLE_PLAYER), no)
        $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/MP4Client "$(DESTDIR)$(prefix)/bin"
+endif
        if [ -d  $(DESTDIR)$(prefix)/$(libdir)/pkgconfig ] ; then \
        $(INSTALL) $(INSTFLAGS) -m 644 gpac.pc "$(DESTDIR)$(prefix)/$(libdir)/pkgconfig" ; \
        fi
diff --git a/README b/README
index 4addd3f438c5726c9dfd0013cf69bcb3bd8f9282..ab1c8cd719a2e32058081824685d71e650e69ec1 100644 (file)
--- a/README
+++ b/README
@@ -1,10 +1,10 @@
-README for GPAC version 0.4.5, December 2008.
+README for GPAC version 0.5.0, May 2012.
 
 GPAC is a multimedia framework oriented towards rich media and distributed under the LGPL license (see COPYING).
 GPAC supports many multimedia formats, from simple audiovisual containers (avi, mov, mpg) to complex 
 presentation formats (MPEG-4 Systems, SVG Tiny 1.2, VRML/X3D). GPAC supports scripting of presentation for MPEG4/VRML/X3D through
 mozilla SpiderMonkey javascript engine.
-GPAC currently supports local playback, http download and play and RTP/RTSP streaming over UDP (unicast or multicast) or TCP.
+GPAC currently supports local playback, http progressive download, Adaptive HTTP Streaming (MPEG-DASH, HLS), RTP/RTSP streaming over UDP (unicast or multicast) or TCP and TS demuxing (from file, IP or DVB4Linux).
 GPAC also features MP4Box, a multimedia swiss-army knife for the prompt.
 
 For compilation and installation instruction, check INSTALL file
diff --git a/TODO b/TODO
index 3478c943c8efcae0e4bbe6417871d62743b4a586..35861870359f7c7581419c74af4722b60dded407 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,27 +1,7 @@
-todo items as of version 0.4.5:
-       * more refinement for several top scenes support (display overlays & co).
-
-utopic roadmap
-v0.5.0:
-       * maybe support for glyph-based texturing rather than string-based
-       * SMIL support ?
-       
-v0.6.0:
-       * M4Flex (ex FlexMux) support
-       * Flexible IPMP integration
-       * JNI interfacing and MPEG-J APIs
-       * native SWF support in client ?
-
-v1.0.0:
-       * full rendering (MPEG-4 AFX ?)
-
-Future work on authoring tools is not still well defined. The current state has bt/vrml/XMT-A support, it could be interesting to have XMT-O support. The SWF converter
-still needs lots of work to support ActionScript and co but this will likely not be developed by your servitor. Other graphics converter are more-or-less droped.
-The main authoring focus should now be a better V4Studio-like app, to create simple content as well as act as a live studio.
-
-
-droped items:
-* Hardware accelerated 2D raster: from most doc on OpenGL and co, there is no waranty of any kind that backbuffer content is not altered when swaping buffers. 
-This is a big issue since the 2D renderer main strength is to compute diffs between frames... 2D acceleration is however available with the 3D renderer
-* MatteTexture fix: given the lack of acceleration in 2D, the matteTexture in the 2D renderer will be just to slow to be usable, and therefore won't be fixed
-for a while... MatteTexture with the 3D renderer will be fixed however, trying to use openGL texenv stuff and multitexturing
+todo items as of version 0.5.0:
+       * more work on DASH support
+       * improve stereo/multiview renderer and texture+depth support
+       * more work on DIMS/RME and scene generation support
+       * rearchitecture of modules
+       * more SVG support (filter , SVG 2.0)
+       
\ No newline at end of file
index 4683ad535beb2d59e2060bb91689e0b37f71f3be..16b0b7a024697635e964ca0fefc923e0d68e1e15 100644 (file)
@@ -1,15 +1,17 @@
 include ../config.mak
 
-APPDIRS=mp4client 
+APPDIRS=
+
+ifeq ($(DISABLE_PLAYER), no)
+APPDIRS+=mp4client 
+endif
 
 ifeq ($(DISABLE_ISOFF), no)
 APPDIRS+=mp4box
 ifeq ($(DISABLE_M2TS), no)
-ifeq ($(DISABLE_SENG), no)
 APPDIRS+=mp42ts
 endif
 endif
-endif
 
 V4STUDIODIR=
 INSTDIRS=mp4client
index 9b99262b488c78f3da0543c064f9143a348bfce1..f41ae96a6f741a9cfdda3c399814f11b0d33a643 100644 (file)
@@ -2,7 +2,7 @@ include ../../config.mak
 
 vpath %.c $(SRC_PATH)/applications/mp42ts
 
-CFLAGS= $(OPTFLAGS) -I"$(SRC_PATH)/include"
+CFLAGS= $(OPTFLAGS) -DGPAC_HAVE_CONFIG_H -I"$(SRC_PATH)/include"
 
 ifeq ($(DEBUGBUILD), yes)
 CFLAGS+=-g
index 57e1c480aa55233b65f643cbbe7d2140656bf944..64bd04375971be12abacdc660e73ceba435cc6cb 100644 (file)
 #include <gpac/media_tools.h>
 #include <gpac/constants.h>
 #include <gpac/base_coding.h>
+#include <gpac/mpegts.h>
+
+#ifndef GPAC_DISABLE_STREAMING
 #include <gpac/ietf.h>
+#endif
+
+#ifndef GPAC_DISABLE_SENG
 #include <gpac/scene_engine.h>
-#include <gpac/mpegts.h>
+#endif
 
 
 #ifdef GPAC_DISABLE_ISOM
@@ -104,7 +110,9 @@ typedef struct
        u32 nb_streams, pcr_idx;
        GF_ESInterface streams[40];
        GF_Descriptor *iod;
+#ifndef GPAC_DISABLE_SENG
        GF_SceneEngine *seng;
+#endif
        GF_Thread *th;
        char *src_name;
        u32 rate;
@@ -153,7 +161,10 @@ typedef struct
 } GF_SimpleDataDescriptor;
 
 //TODO: find a clean way to save this data
+#ifndef GPAC_DISABLE_PLAYER
 static u32 audio_OD_stream_id = (u32)-1;
+#endif
+
 #define AUDIO_OD_ESID  100
 #define AUDIO_DATA_ESID        101
 #define VIDEO_DATA_ESID        105
@@ -164,7 +175,9 @@ enum
        GF_MP42TS_FILE, /*open mpeg2ts file*/
        GF_MP42TS_UDP,  /*open udp socket*/
        GF_MP42TS_RTP,  /*open rtp socket*/
+#ifndef GPAC_DISABLE_PLAYER
        GF_MP42TS_HTTP, /*open http downloader*/
+#endif
 };
 
 static GF_Err mp4_input_ctrl(GF_ESInterface *ifce, u32 act_type, void *param)
@@ -433,6 +446,7 @@ static void fill_isom_es_ifce(M2TSProgram *prog, GF_ESInterface *ifce, GF_ISOFil
 }
 
 
+#ifndef GPAC_DISABLE_SENG
 static GF_Err seng_input_ctrl(GF_ESInterface *ifce, u32 act_type, void *param)
 {
        if (act_type==GF_ESI_INPUT_DESTROY) {
@@ -445,6 +459,8 @@ static GF_Err seng_input_ctrl(GF_ESInterface *ifce, u32 act_type, void *param)
 
        return GF_OK;
 }
+#endif
+
 
 #ifndef GPAC_DISABLE_STREAMING
 typedef struct
@@ -512,6 +528,8 @@ static GF_Err void_input_ctrl(GF_ESInterface *ifce, u32 act_type, void *param)
 }
 
 /*AAC import features*/
+#ifndef GPAC_DISABLE_PLAYER
+
 void *audio_prog = NULL;
 static void SampleCallBack(void *calling_object, u16 ESID, char *data, u32 size, u64 ts);
 #define DONT_USE_TERMINAL_MODULE_API
@@ -557,6 +575,9 @@ static GF_Err encode_audio_desc(GF_ESD *esd, GF_SimpleDataDescriptor *audio_desc
        return GF_OK;
 }
 
+#endif
+
+
 static void SampleCallBack(void *calling_object, u16 ESID, char *data, u32 size, u64 ts)
 {              
        u32 i;
@@ -565,6 +586,7 @@ static void SampleCallBack(void *calling_object, u16 ESID, char *data, u32 size,
        if (calling_object) {
                M2TSProgram *prog = (M2TSProgram *)calling_object;
 
+#ifndef GPAC_DISABLE_PLAYER
                if (ESID == AUDIO_DATA_ESID) {
                        if (audio_OD_stream_id != (u32)-1) {
                                /*this is the first time we get some audio data. Therefore we are sure we can retrieve the audio descriptor. Then we'll
@@ -641,7 +663,7 @@ static void SampleCallBack(void *calling_object, u16 ESID, char *data, u32 size,
                        /*overwrite timing as it is flushed to 0 on discontinuities*/
                        ts += audio_discontinuity_offset;
                }
-
+#endif
                i=0;
                while (i<prog->nb_streams){
                        if (prog->streams[i].output_ctrl==NULL) {
@@ -683,6 +705,7 @@ static void SampleCallBack(void *calling_object, u16 ESID, char *data, u32 size,
 
 static volatile Bool run = 1;
 
+#ifndef GPAC_DISABLE_SENG
 static GF_ESIStream * set_broadcast_params(M2TSProgram *prog, u16 esid, u32 period, u32 ts_delta, u16 aggregate_on_stream, Bool adjust_carousel_time, Bool force_rap, Bool aggregate_au, Bool discard_pending, Bool signal_rap, Bool signal_critical, Bool version_inc)
 {
        u32 i=0;
@@ -732,9 +755,11 @@ static GF_ESIStream * set_broadcast_params(M2TSProgram *prog, u16 esid, u32 peri
        } else {
                esi->repeat_rate = 0;
        }
-
        return priv;
 }
+#endif
+
+#ifndef GPAC_DISABLE_SENG
 
 static Bool seng_output(void *param)
 {
@@ -914,6 +939,8 @@ static Bool seng_output(void *param)
        
        return e ? 1 : 0;
 }
+#endif
+
 
 #ifndef GPAC_DISABLE_STREAMING
 static void rtp_sl_packet_cbk(void *udta, char *payload, u32 size, GF_SLHeader *hdr, GF_Err e)
@@ -1033,6 +1060,7 @@ static void fill_rtp_es_ifce(GF_ESInterface *ifce, GF_SDPMedia *media, GF_SDPInf
 }
 #endif /*GPAC_DISABLE_STREAMING*/
 
+#ifndef GPAC_DISABLE_SENG
 void fill_seng_es_ifce(GF_ESInterface *ifce, u32 i, GF_SceneEngine *seng, u32 period)
 {
        GF_Err e = GF_OK;
@@ -1062,6 +1090,7 @@ void fill_seng_es_ifce(GF_ESInterface *ifce, u32 i, GF_SceneEngine *seng, u32 pe
        ifce->input_ctrl = seng_input_ctrl;
 
 }
+#endif
 
 static Bool open_program(M2TSProgram *prog, char *src, u32 carousel_rate, u32 mpeg4_signaling, char *update, char *audio_input_ip, u16 audio_input_port, char *video_buffer, Bool force_real_time, u32 bifs_use_pes)
 {
@@ -1069,7 +1098,6 @@ static Bool open_program(M2TSProgram *prog, char *src, u32 carousel_rate, u32 mp
        GF_SDPInfo *sdp;
 #endif
        u32 i;
-       GF_Err e;
        
        memset(prog, 0, sizeof(M2TSProgram));
        prog->mpeg4_signaling = mpeg4_signaling;
@@ -1225,6 +1253,7 @@ static Bool open_program(M2TSProgram *prog, char *src, u32 carousel_rate, u32 mp
                GF_X_Attribute *att;
                char *sdp_buf;
                u32 sdp_size;
+               GF_Err e;
                FILE *_sdp = fopen(src, "rt");
                if (!_sdp) {
                        fprintf(stderr, "Error opening %s - no such file\n", src);
@@ -1290,6 +1319,8 @@ static Bool open_program(M2TSProgram *prog, char *src, u32 carousel_rate, u32 mp
                return 2;
        } else 
 #endif /*GPAC_DISABLE_STREAMING*/
+
+#ifndef GPAC_DISABLE_SENG
        if (strstr(src, ".bt")) //open .bt file
        {
                u32 load_type=0;
@@ -1430,7 +1461,9 @@ static Bool open_program(M2TSProgram *prog, char *src, u32 carousel_rate, u32 mp
                prog->src_name = update;
                gf_th_run(prog->th, seng_output, prog);
                return 1;
-       } else {
+       } else
+#endif
+       {
                FILE *f = fopen(src, "rt");
                if (f) {
                        fclose(f);
@@ -1510,8 +1543,10 @@ static GFINLINE GF_Err parse_args(int argc, char **argv, u32 *mux_rate, u32 *car
                                        *audio_input_type = GF_MP42TS_UDP;
                                else if (!strnicmp(arg, "rtp://", 6))
                                        *audio_input_type = GF_MP42TS_RTP;
+#ifndef GPAC_DISABLE_PLAYER
                                else if (!strnicmp(arg, "http://", 7))
                                        *audio_input_type = GF_MP42TS_HTTP;
+#endif
                                /*http needs to get the complete URL*/
                                switch(*audio_input_type) {
                                        case GF_MP42TS_UDP:
@@ -1527,11 +1562,13 @@ static GFINLINE GF_Err parse_args(int argc, char **argv, u32 *mux_rate, u32 *car
                                                        *audio_input_ip = gf_strdup(arg+6);
                                                }
                                                break;
+#ifndef GPAC_DISABLE_PLAYER
                                        case GF_MP42TS_HTTP:
                                                /* No need to dup since it may come from argv */
                                                *audio_input_ip = arg;
                                                assert(audio_input_port != 0);
                                                break;
+#endif
                                        default:
                                                assert(0);
                                }
@@ -1855,7 +1892,9 @@ int main(int argc, char **argv)
        prev_seg_time.sec = 0;
        prev_seg_time.nanosec = 0;
        video_buffer_size = 0;
+#ifndef GPAC_DISABLE_PLAYER
        aac_reader = AAC_Reader_new();
+#endif
        muxer = NULL;
        single_au_pes = 0;
        bifs_use_pes = 0;
@@ -1991,10 +2030,12 @@ int main(int argc, char **argv)
                        /*TODO: not implemented*/
                        assert(0);
                        break;
+#ifndef GPAC_DISABLE_PLAYER
                case GF_MP42TS_HTTP:
                        audio_prog = (void*)&progs[nb_progs-1];
                        aac_download_file(aac_reader, audio_input_ip);
                        break;
+#endif
                case GF_MP42TS_FILE:
                        assert(0); /*audio live input is restricted to realtime/streaming*/
                        break;
@@ -2042,7 +2083,7 @@ int main(int argc, char **argv)
        /*****************/
        last_print_time = gf_sys_clock();
        while (run) {
-               u32 ts, status;
+               u32 status;
 
                /*check for some audio input from the network*/
                if (audio_input_ip) {
@@ -2055,6 +2096,7 @@ int main(int argc, char **argv)
                                                SampleCallBack((void*)&progs[nb_progs-1], AUDIO_DATA_ESID, audio_input_buffer, read, gf_m2ts_get_sys_clock(muxer));
                                        }
                                        break;
+#ifndef GPAC_DISABLE_PLAYER
                                case GF_MP42TS_HTTP:
                                        /*nothing to do: AAC_OnLiveData is called automatically*/
                                        /*check we're still alive*/
@@ -2070,6 +2112,7 @@ int main(int argc, char **argv)
                                                gf_odf_desc_del((GF_Descriptor *)esd);
                                        }
                                        break;
+#endif
                                default:
                                        assert(0);
                        }
@@ -2125,6 +2168,7 @@ int main(int argc, char **argv)
                        }
 #ifndef GPAC_DISABLE_STREAMING
                        if (ts_output_rtp != NULL) {
+                               u32 ts;
                                hdr.SequenceNumber++;
                                /*muxer clock at 90k*/
                                ts = muxer->time.sec*90000 + muxer->time.nanosec*9/100000;
@@ -2201,7 +2245,9 @@ exit:
 #ifndef GPAC_DISABLE_STREAMING
        if (rtp_out) gf_free(rtp_out);
 #endif
+#ifndef GPAC_DISABLE_PLAYER
        if (aac_reader) AAC_Reader_del(aac_reader);
+#endif
        if (muxer) gf_m2ts_mux_del(muxer);
        
        for (i=0; i<nb_progs; i++) {
@@ -2219,10 +2265,12 @@ exit:
                }
                if (progs[i].iod) gf_odf_desc_del((GF_Descriptor*)progs[i].iod);
                if (progs[i].mp4) gf_isom_close(progs[i].mp4);
+#ifndef GPAC_DISABLE_SENG
                if (progs[i].seng){
                    gf_seng_terminate(progs[i].seng);
                    progs[i].seng = NULL;
                }
+#endif
                if (progs[i].th) gf_th_del(progs[i].th);
        }
        gf_sys_close();
index ded9d7b32b9f702fd7b6512aa62476e220ed4932..c82e22b196a10b9a76408e64d9e1ae972d1b3571 100644 (file)
@@ -2,7 +2,7 @@ include ../../config.mak
 
 vpath %.c $(SRC_PATH)/applications/mp4box
 
-CFLAGS= $(OPTFLAGS) -I"$(SRC_PATH)/include"
+CFLAGS= $(OPTFLAGS) -DGPAC_HAVE_CONFIG_H -I"$(SRC_PATH)/include"
 
 ifeq ($(DEBUGBUILD), yes)
 CFLAGS+=-g
@@ -14,15 +14,6 @@ CFLAGS+=-pg
 LDFLAGS+=-pg
 endif
 
-#file format is read-only
-ifeq ($(GPACREADONLY), yes)
-CFLAGS+= -DGPAC_READ_ONLY
-endif
-
-ifeq ($(DISABLE_SVG), yes)
-CFLAGS+=-DGPAC_DISABLE_SVG
-endif
-
 #common obj
 OBJS= main.o filedump.o fileimport.o live.o
 
index 9f14702553d9a38f1b2f73a19dcfeb2d4ea9d4a4..e7289b831f20c72f1e4ee70ff567f3e6760afed5 100644 (file)
@@ -22,7 +22,7 @@
  *
  */
 
-#include <gpac/scene_manager.h>
+#include <gpac/tools.h>
 
 #if defined(GPAC_DISABLE_ISOM) || defined(GPAC_DISABLE_ISOM_WRITE)
 
 
 #else
 
+#ifndef GPAC_DISABLE_X3D
 #include <gpac/nodes_x3d.h>
+#endif
+#ifndef GPAC_DISABLE_BIFS
 #include <gpac/internal/bifs_dev.h>
+#endif
 #include <gpac/constants.h>
 #include <gpac/avparse.h>
 #include <gpac/media_tools.h>
@@ -41,6 +45,9 @@
 #include <gpac/iso639.h>
 #include <gpac/mpegts.h>
 
+#ifndef GPAC_DISABLE_SMGR
+#include <gpac/scene_manager.h>
+#endif
 
 extern u32 swf_flags;
 extern Float swf_flatten_angle;
@@ -682,6 +689,7 @@ void PrintNode(const char *name, u32 graph_type)
 
 void PrintBuiltInNodes(u32 graph_type)
 {
+#if !defined(GPAC_DISABLE_VRML) && !defined(GPAC_DISABLE_X3D) && !defined(GPAC_DISABLE_SVG)
        GF_Node *node;
        GF_SceneGraph *sg;
        u32 i, nb_in, nb_not_in, start_tag, end_tag;
@@ -740,6 +748,9 @@ void PrintBuiltInNodes(u32 graph_type)
        } else {
                fprintf(stdout, "\n%d nodes supported - %d nodes not supported\n", nb_in, nb_not_in);
        }
+#else
+       fprintf(stdout, "\nNo scene graph enabled in this MP4Box build\n");
+#endif
 }
 
 #ifndef GPAC_DISABLE_ISOM_DUMP
index 0745ed8e684de70e0b10ffaf89fb8211ebfbb329..e7ccf0340ad2d7dd69f446d6ea4cb791e1b35c3b 100644 (file)
  */
 
 
-#include <gpac/scene_manager.h>
-#include <gpac/bifs.h>
+#include <gpac/tools.h>
 #include <gpac/media_tools.h>
 #include <gpac/constants.h>
-#include <gpac/scenegraph.h>
 
+#if !defined(GPAC_DISABLE_VRML) && !defined(GPAC_DISABLE_X3D) && !defined(GPAC_DISABLE_SVG)
+#include <gpac/scenegraph.h>
+#endif
+#ifndef GPAC_DISABLE_SMGR
+#include <gpac/scene_manager.h>
+#endif
 
+#ifndef GPAC_DISABLE_BIFS
+#include <gpac/bifs.h>
+#endif
 #ifndef GPAC_DISABLE_ISOM_WRITE
 
 #include <gpac/xml.h>
index e0ddba561406a962b728cf03e9634f5d21ccf108..0b577c830f03cfe400a55fdd299a75cb2bd9f107 100644 (file)
  */
 
 
-#include <gpac/filestreamer.h>
 #include <gpac/constants.h>
 #include <gpac/isomedia.h>
+
+#ifndef GPAC_DISABLE_SENG
 #include <gpac/scene_engine.h>
+#endif
+#ifndef GPAC_DISABLE_STREAMING
+#include <gpac/filestreamer.h>
 #include <gpac/rtp_streamer.h>
+#endif
 
 #if defined(GPAC_DISABLE_ISOM) || defined(GPAC_DISABLE_ISOM_WRITE)
 
@@ -450,7 +455,6 @@ int live_session(int argc, char **argv)
        u32 period, ts_delta, signal_critical;
        u16 es_id;
        e = GF_OK;
-       /* souchay : needs to initialize those two vars... */
        aggregate_au = 1;
        es_id = 0;
        no_rap = 0;
index fc806c5966cfeb22d0fca687e09aa9f5716cda4d..54e0e0e086ac56cb7ca637b74dca7fdff03c13f4 100644 (file)
  */
 
 
-#include <gpac/scene_manager.h>
 #include <gpac/download.h>
 
+#ifndef GPAC_DISABLE_SMGR
+#include <gpac/scene_manager.h>
+#endif
+
 #ifdef GPAC_DISABLE_ISOM
 
 #error "Cannot compile MP4Box if GPAC is not built with ISO File Format support"
 #else
 
 #include <gpac/media_tools.h>
+
 /*RTP packetizer flags*/
+#ifndef GPAC_DISABLE_STREAMING
 #include <gpac/ietf.h>
+#endif
+
+#ifndef GPAC_DISABLE_MCRYPT
 #include <gpac/ismacryp.h>
+#endif
+
 #include <gpac/constants.h>
 
 #include <gpac/internal/mpd.h>
 #define BUFFSIZE       8192
 
 /*in fileimport.c*/
+
+#ifndef GPAC_DISABLE_MEDIA_IMPORT
+void convert_file_info(char *inName, u32 trackID);
+#endif
+
 #ifndef GPAC_DISABLE_ISOM_WRITE
 
 GF_Err import_file(GF_ISOFile *dest, char *inName, u32 import_flags, Double force_fps, u32 frames_per_sample);
 GF_Err split_isomedia_file(GF_ISOFile *mp4, Double split_dur, u32 split_size_kb, char *inName, Double InterleavingTime, Double chunk_start, Bool adjust_split_end, char *outName, const char *tmpdir);
 GF_Err cat_isomedia_file(GF_ISOFile *mp4, char *fileName, u32 import_flags, Double force_fps, u32 frames_per_sample, char *tmp_dir, Bool force_cat);
 
-#if !defined(GPAC_DISABLE_MEDIA_IMPORT) && !defined(GPAC_DISABLE_SCENE_ENCODER)
-void convert_file_info(char *inName, u32 trackID);
+#if !defined(GPAC_DISABLE_SCENE_ENCODER)
 GF_Err EncodeFile(char *in, GF_ISOFile *mp4, GF_SMEncodeOptions *opts, FILE *logs);
 GF_Err EncodeFileChunk(char *chunkFile, char *bifs, char *inputContext, char *outputContext, const char *tmpdir);
 #endif
@@ -999,9 +1013,6 @@ typedef struct
        u32 item_id;
 } MetaAction;
 
-/*for SDP_EX, AddTrack and RemTrack*/
-#define MAX_CUMUL_OPS  20
-
 #ifndef GPAC_DISABLE_ISOM_WRITE
 static Bool parse_meta_args(MetaAction *meta, char *opts)
 {
@@ -1082,7 +1093,7 @@ typedef struct
        u32 switchGroupID;
 } TSELAction;
 
-static Bool parse_tsel_args(TSELAction *tsel_list, char *opts, u32 *nb_tsel_act)
+static Bool parse_tsel_args(TSELAction **__tsel_list, char *opts, u32 *nb_tsel_act)
 {
        u32 act;
        u32 refTrackID = 0;
@@ -1092,6 +1103,7 @@ static Bool parse_tsel_args(TSELAction *tsel_list, char *opts, u32 *nb_tsel_act)
        u32 nb_criteria = 0;
        TSELAction *tsel_act;
        char szSlot[1024], *next;
+       TSELAction *tsel_list = *__tsel_list;
 
        has_switch_id = 0;
        act = tsel_list[*nb_tsel_act].act_type;
@@ -1132,10 +1144,9 @@ static Bool parse_tsel_args(TSELAction *tsel_list, char *opts, u32 *nb_tsel_act)
                        }
                }
                else if (!strnicmp(szSlot, "trackID=", 8) || !strchr(szSlot, '=') ) {
-                       if (*nb_tsel_act>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d track selection operations allowed\n", MAX_CUMUL_OPS); 
-                               return 0; 
-                       }
+                       __tsel_list = realloc(__tsel_list, sizeof(TSELAction) * (*nb_tsel_act + 1));
+                       tsel_list = *__tsel_list;
+
                        tsel_act = &tsel_list[*nb_tsel_act];
                        memset(tsel_act, 0, sizeof(TSELAction));
                        tsel_act->act_type = act;
@@ -1157,10 +1168,7 @@ static Bool parse_tsel_args(TSELAction *tsel_list, char *opts, u32 *nb_tsel_act)
 }
 
 
-#define CHECK_NEXT_ARG if (i+1==(u32)argc) { fprintf(stdout, "Missing arg - please check usage\n"); return 1; }
-
-#define CHECK_META_OPS CHECK_NEXT_ARG if (nb_meta_act>=MAX_CUMUL_OPS) { fprintf(stdout, "Sorry - no more than %d meta operations allowed\n", MAX_CUMUL_OPS); return 1; }
-
+#define CHECK_NEXT_ARG if (i+1==(u32)argc) { fprintf(stdout, "Missing arg - please check usage\n"); MP4BOX_EXIT_WITH_CODE(1); }
 
 typedef struct
 {
@@ -1194,8 +1202,15 @@ enum
        GF_ISOM_CONV_TYPE_PSP
 };
 
-/*for dash*/
-#define MAX_DASH_REP   30
+#define MP4BOX_EXIT_WITH_CODE(__ret_code)      \
+       if (sdp_lines) free(sdp_lines); \
+       if (metas) free(metas); \
+       if (tracks) free(tracks); \
+       if (tsel_acts) free(tsel_acts); \
+       if (brand_add) free(brand_add); \
+       if (brand_rem) free(brand_rem); \
+       if (dash_inputs) free(dash_inputs); \
+       return __ret_code; \
 
 int mp4boxMain(int argc, char **argv)
 {
@@ -1204,20 +1219,27 @@ int mp4boxMain(int argc, char **argv)
 #ifndef GPAC_DISABLE_SCENE_ENCODER
        GF_SMEncodeOptions opts;
 #endif
-#if !defined(GPAC_DISABLE_STREAMING) && !defined(GPAC_DISABLE_SENG)
-       SDPLine sdp_lines[MAX_CUMUL_OPS];
-#endif
+       SDPLine *sdp_lines = NULL;
        Double InterleavingTime, split_duration, split_start, import_fps, dash_duration;
-       MetaAction metas[MAX_CUMUL_OPS];
-       TrackAction tracks[MAX_CUMUL_OPS];
-       TSELAction tsel_acts[MAX_CUMUL_OPS];
+       MetaAction *metas = NULL;
+       TrackAction *tracks = NULL;
+       TSELAction *tsel_acts = NULL;
        u64 movie_time;
        s32 subsegs_per_sidx;
-       u32 brand_add[MAX_CUMUL_OPS];
-       u32 i, MTUSize, stat_level, hint_flags, info_track_id, import_flags, nb_add, nb_cat, ismaCrypt, agg_samples, nb_sdp_ex, max_ptime, raw_sample_num, split_size, nb_meta_act, nb_track_act, rtp_rate, major_brand, nb_alt_brand_add, nb_alt_brand_rem, old_interleave, car_dur, minor_version, conv_type, nb_tsel_acts, program_number;
-       Bool HintIt, needSave, FullInter, Frag, HintInter, dump_std, dump_rtp, dump_mode, regular_iod, trackID, HintCopy, remove_sys_tracks, remove_hint, force_new, remove_root_od, import_subtitle, dump_chap;
-       Bool print_sdp, print_info, open_edit, track_dump_type, dump_isom, dump_cr, force_ocr, encode, do_log, do_flat, dump_srt, dump_ttxt, chunk_mode, dump_ts, do_saf, do_mpd, dump_m2ts, dump_cart, do_hash, verbose, force_cat, pack_wgt, single_group;
+       u32 *brand_add = NULL;
+       u32 *brand_rem = NULL;
+       u32 i, stat_level, hint_flags, info_track_id, import_flags, nb_add, nb_cat, ismaCrypt, agg_samples, nb_sdp_ex, max_ptime, raw_sample_num, split_size, nb_meta_act, nb_track_act, rtp_rate, major_brand, nb_alt_brand_add, nb_alt_brand_rem, old_interleave, car_dur, minor_version, conv_type, nb_tsel_acts, program_number;
+       Bool HintIt, needSave, FullInter, Frag, HintInter, dump_std, dump_rtp, dump_mode, regular_iod, trackID, remove_sys_tracks, remove_hint, force_new, remove_root_od, import_subtitle, dump_chap;
+       Bool print_sdp, print_info, open_edit, track_dump_type, dump_isom, dump_cr, force_ocr, encode, do_log, do_flat, dump_srt, dump_ttxt, dump_ts, do_saf, do_mpd, dump_m2ts, dump_cart, do_hash, verbose, force_cat, pack_wgt, single_group;
        char *inName, *outName, *arg, *mediaSource, *tmpdir, *input_ctx, *output_ctx, *drm_file, *avi2raw, *cprt, *chap_file, *pes_dump, *itunes_tags, *pack_file, *raw_cat, *seg_name, *dash_ctx;
+
+#ifndef GPAC_DISABLE_SCENE_ENCODER
+       Bool chunk_mode=0;
+#endif
+#ifndef GPAC_DISABLE_ISOM_HINTING
+       Bool HintCopy=0;
+       u32 MTUSize = 1450;
+#endif
        GF_ISOFile *file;
        Bool stream_rtp=0;
        Bool live_scene=0;
@@ -1228,14 +1250,14 @@ int mp4boxMain(int argc, char **argv)
        Bool use_url_template=0;
        Bool seg_at_rap =0;
        Bool adjust_split_end = 0;
-       char *dash_inputs[MAX_DASH_REP];
+       char **dash_inputs = NULL;
        u32 nb_dash_inputs = 0;
        char *gf_logs = NULL;
        char *seg_ext = NULL;
 
        if (argc < 2) {
                PrintUsage();
-               return 1;
+               MP4BOX_EXIT_WITH_CODE(1);
        }
 
        nb_tsel_acts = nb_add = nb_cat = nb_track_act = nb_sdp_ex = max_ptime = raw_sample_num = nb_meta_act = rtp_rate = major_brand = nb_alt_brand_add = nb_alt_brand_rem = car_dur = minor_version = 0;
@@ -1248,9 +1270,8 @@ int mp4boxMain(int argc, char **argv)
        import_flags = 0;
        split_size = 0;
        movie_time = 0;
-       MTUSize = 1450;
-       HintCopy = FullInter = HintInter = encode = do_log = old_interleave = do_saf = do_mpd = do_hash = verbose = 0;
-       chunk_mode = dump_mode = Frag = force_ocr = remove_sys_tracks = agg_samples = remove_hint = keep_sys_tracks = remove_root_od = single_group = 0;
+       FullInter = HintInter = encode = do_log = old_interleave = do_saf = do_mpd = do_hash = verbose = 0;
+       dump_mode = Frag = force_ocr = remove_sys_tracks = agg_samples = remove_hint = keep_sys_tracks = remove_root_od = single_group = 0;
        conv_type = HintIt = needSave = print_sdp = print_info = regular_iod = dump_std = open_edit = dump_isom = dump_rtp = dump_cr = dump_chap = dump_srt = dump_ttxt = force_new = dump_ts = dump_m2ts = dump_cart = import_subtitle = force_cat = pack_wgt = 0;
        subsegs_per_sidx = 0;
        track_dump_type = 0;
@@ -1269,7 +1290,9 @@ int mp4boxMain(int argc, char **argv)
        do_flat = 0;
        inName = outName = mediaSource = input_ctx = output_ctx = drm_file = avi2raw = cprt = chap_file = pack_file = raw_cat = NULL;
 
+#ifndef GPAC_DISABLE_SWF_IMPORT
        swf_flags = GF_SM_SWF_SPLIT_TIMELINE;
+#endif
        swf_flatten_angle = 0.0f;
        tmpdir = NULL;
        
@@ -1281,29 +1304,28 @@ int mp4boxMain(int argc, char **argv)
                if (arg[0] != '-') {
                        if (argc < 3) {
                                fprintf(stdout, "Error - only one input file found as argument, please check usage\n"); 
-                               return 1
+                               MP4BOX_EXIT_WITH_CODE(1)
                        } else if (inName) { 
                                if (dash_duration) {
                                        if (!nb_dash_inputs) {
+                                               dash_inputs = realloc(dash_inputs, sizeof(char *) * (nb_dash_inputs+1) );
                                                dash_inputs[nb_dash_inputs] = inName;
                                                nb_dash_inputs++;
                                        }
-                                       if (MAX_DASH_REP<=nb_dash_inputs) {
-                                               fprintf(stdout, "Error - Max %d representations can be DASH'ed\n", MAX_DASH_REP);
-                                               return 1; 
-                                       }
+                                       dash_inputs = realloc(dash_inputs, sizeof(char *) * (nb_dash_inputs+1) );
+
                                        dash_inputs[nb_dash_inputs] = arg;
                                        nb_dash_inputs++;                                       
                                } else {
                                        fprintf(stdout, "Error - 2 input names specified, please check usage\n");
-                                       return 1
+                                       MP4BOX_EXIT_WITH_CODE(1)
                                }
                        } else {
                                inName = arg;
                        }
                }
-               else if (!stricmp(arg, "-?")) { PrintUsage(); return 0; }
-               else if (!stricmp(arg, "-version")) { PrintVersion(); return 0; }
+               else if (!stricmp(arg, "-?")) { PrintUsage(); MP4BOX_EXIT_WITH_CODE(0); }
+               else if (!stricmp(arg, "-version")) { PrintVersion(); MP4BOX_EXIT_WITH_CODE(0); }
                else if (!stricmp(arg, "-sdp")) print_sdp = 1;
                else if (!stricmp(arg, "-quiet")) quiet = 2;
                else if (!stricmp(arg, "-logs")) {
@@ -1348,7 +1370,7 @@ int mp4boxMain(int argc, char **argv)
                                if (strlen(argv[i+1])==5) trackID = 2;
                                else trackID = 1 + atoi(argv[i+1] + 5);
                        }
-                       else { fprintf(stdout, "Usage: \"-aviraw video\" or \"-aviraw audio\"\n"); return 1; }
+                       else { fprintf(stdout, "Usage: \"-aviraw video\" or \"-aviraw audio\"\n"); MP4BOX_EXIT_WITH_CODE(1); }
                        track_dump_type = GF_EXPORT_AVI_NATIVE;
                        i++;
                }
@@ -1398,14 +1420,14 @@ int mp4boxMain(int argc, char **argv)
                        dump_iod = 1;
                }
 #ifndef GPAC_DISABLE_VRML
-               else if (!stricmp(arg, "-node")) { CHECK_NEXT_ARG PrintNode(argv[i+1], 0); return (0); }
-               else if (!stricmp(arg, "-xnode")) { CHECK_NEXT_ARG PrintNode(argv[i+1], 1); return (0); }
-               else if (!stricmp(arg, "-nodes")) { PrintBuiltInNodes(0); return (0); }
-               else if (!stricmp(arg, "-xnodes")) { PrintBuiltInNodes(1); return (0); } 
+               else if (!stricmp(arg, "-node")) { CHECK_NEXT_ARG PrintNode(argv[i+1], 0); MP4BOX_EXIT_WITH_CODE(0); }
+               else if (!stricmp(arg, "-xnode")) { CHECK_NEXT_ARG PrintNode(argv[i+1], 1); MP4BOX_EXIT_WITH_CODE(0); }
+               else if (!stricmp(arg, "-nodes")) { PrintBuiltInNodes(0); MP4BOX_EXIT_WITH_CODE(0); }
+               else if (!stricmp(arg, "-xnodes")) { PrintBuiltInNodes(1); MP4BOX_EXIT_WITH_CODE(0); } 
 #endif
 #ifndef GPAC_DISABLE_SVG
-               else if (!stricmp(arg, "-snode")) { CHECK_NEXT_ARG PrintNode(argv[i+1], 2); return (0); }
-               else if (!stricmp(arg, "-snodes")) { PrintBuiltInNodes(2); return (0); } 
+               else if (!stricmp(arg, "-snode")) { CHECK_NEXT_ARG PrintNode(argv[i+1], 2); MP4BOX_EXIT_WITH_CODE(0); }
+               else if (!stricmp(arg, "-snodes")) { PrintBuiltInNodes(2); MP4BOX_EXIT_WITH_CODE(0); } 
                else if (!stricmp(arg, "-std")) dump_std = 1;
 #endif
 
@@ -1449,7 +1471,7 @@ int mp4boxMain(int argc, char **argv)
                                trackID = 0;
                        }
 #ifdef GPAC_DISABLE_ISOM_WRITE
-                       if (trackID) { fprintf(stdout, "Error: Read-Only version - subtitle conversion not available\n"); return 1; }
+                       if (trackID) { fprintf(stdout, "Error: Read-Only version - subtitle conversion not available\n"); MP4BOX_EXIT_WITH_CODE(1); }
 #endif
                        if (!stricmp(arg, "-ttxt")) dump_ttxt = 1;
                        else dump_srt = 1;
@@ -1462,7 +1484,7 @@ int mp4boxMain(int argc, char **argv)
                        }
                }
 
-#ifndef GPAC_DISABLE_ISOM_WRITE
+#ifndef GPAC_DISABLE_SWF_IMPORT
                /*SWF importer options*/
                else if (!stricmp(arg, "-global")) swf_flags |= GF_SM_SWF_STATIC_DICT;
                else if (!stricmp(arg, "-no-ctrl")) swf_flags &= ~GF_SM_SWF_SPLIT_TIMELINE;
@@ -1479,6 +1501,8 @@ int mp4boxMain(int argc, char **argv)
                        swf_flatten_angle = (Float) atof(argv[i+1]);
                        i++;
                }
+#endif
+#ifndef GPAC_DISABLE_ISOM_WRITE
                else if (!stricmp(arg, "-isma")) { conv_type = GF_ISOM_CONV_TYPE_ISMA; open_edit = 1; }
                else if (!stricmp(arg, "-3gp")) { conv_type = GF_ISOM_CONV_TYPE_3GPP; open_edit = 1; }
                else if (!stricmp(arg, "-ipod")) { conv_type = GF_ISOM_CONV_TYPE_IPOD; open_edit = 1; }
@@ -1593,10 +1617,8 @@ int mp4boxMain(int argc, char **argv)
                else if (!stricmp(arg, "-add-sdp") || !stricmp(arg, "-sdp_ex")) {
                        char *id;
                        CHECK_NEXT_ARG
-                       if (nb_sdp_ex>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d extra SDP lines allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       sdp_lines = realloc(sdp_lines, sizeof(SDPLine) * (nb_sdp_ex+1) );
+
                        id = strchr(argv[i+1], ':');
                        if (id) {
                                id[0] = 0;
@@ -1663,10 +1685,8 @@ int mp4boxMain(int argc, char **argv)
                }
                else if (!stricmp(arg, "-rem") || !stricmp(arg, "-disable") || !stricmp(arg, "-enable")) {
                        CHECK_NEXT_ARG
-                       if (nb_track_act>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d track operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       tracks = realloc(tracks, sizeof(TrackAction) * (nb_track_act+1));
+
                        if (!stricmp(arg, "-enable")) tracks[nb_track_act].act_type = 6;
                        else if (!stricmp(arg, "-disable")) tracks[nb_track_act].act_type = 7;
                        else tracks[nb_track_act].act_type = 0;
@@ -1678,16 +1698,14 @@ int mp4boxMain(int argc, char **argv)
                else if (!stricmp(arg, "-par")) {
                        char szTK[20], *ext;
                        CHECK_NEXT_ARG
-                       if (nb_track_act>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d track operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       tracks = realloc(tracks, sizeof(TrackAction) * (nb_track_act+1));
+
                        tracks[nb_track_act].act_type = 4;
                        strcpy(szTK, argv[i+1]);
                        ext = strchr(szTK, '=');
                        if (!ext) {
                                fprintf(stdout, "Bad format for track par - expecting ID=PAR_NUM:PAR_DEN got %s\n", argv[i+1]);
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                        if (!stricmp(ext+1, "none")) {
                                tracks[nb_track_act].par_num = tracks[nb_track_act].par_den = -1;
@@ -1703,10 +1721,8 @@ int mp4boxMain(int argc, char **argv)
                else if (!stricmp(arg, "-lang")) {
                        char szTK[20], *ext;
                        CHECK_NEXT_ARG
-                       if (nb_track_act>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d track operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       tracks = realloc(tracks, sizeof(TrackAction) * (nb_track_act+1));
+
                        tracks[nb_track_act].act_type = 1;
                        tracks[nb_track_act].lang[3] = 0;
                        tracks[nb_track_act].trackID = 0;
@@ -1729,15 +1745,13 @@ int mp4boxMain(int argc, char **argv)
                else if (!stricmp(arg, "-delay")) {
                        char szTK[20], *ext;
                        CHECK_NEXT_ARG
-                       if (nb_track_act>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d track operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       tracks = realloc(tracks, sizeof(TrackAction) * (nb_track_act+1));
+
                        strcpy(szTK, argv[i+1]);
                        ext = strchr(szTK, '=');
                        if (!ext) {
                                fprintf(stdout, "Bad format for track delay - expecting ID=DLAY got %s\n", argv[i+1]);
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                        tracks[nb_track_act].act_type = 2;
                        tracks[nb_track_act].delay_ms = atoi(ext+1);
@@ -1750,22 +1764,20 @@ int mp4boxMain(int argc, char **argv)
                else if (!stricmp(arg, "-ref")) {
                        char *szTK, *ext;
                        CHECK_NEXT_ARG
-                       if (nb_track_act>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d track operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       tracks = realloc(tracks, sizeof(TrackAction) * (nb_track_act+1));
+
                        szTK = argv[i+1];
                        ext = strchr(szTK, ':');
                        if (!ext) {
                                fprintf(stdout, "Bad format for track reference - expecting ID:XXXX:refID got %s\n", argv[i+1]);
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                        tracks[nb_track_act].act_type = 8;
                        ext[0] = 0; tracks[nb_track_act].trackID = atoi(szTK); ext[0] = ':'; szTK = ext+1;
                        ext = strchr(szTK, ':');
                        if (!ext) {
                                fprintf(stdout, "Bad format for track reference - expecting ID:XXXX:refID got %s\n", argv[i+1]);
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                        ext[0] = 0;
                        strncpy(tracks[nb_track_act].lang, szTK, 4);
@@ -1778,15 +1790,13 @@ int mp4boxMain(int argc, char **argv)
                else if (!stricmp(arg, "-name")) {
                        char szTK[GF_MAX_PATH], *ext;
                        CHECK_NEXT_ARG
-                       if (nb_track_act>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d track operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       tracks = realloc(tracks, sizeof(TrackAction) * (nb_track_act+1));
+
                        strcpy(szTK, argv[i+1]);
                        ext = strchr(szTK, '=');
                        if (!ext) {
                                fprintf(stdout, "Bad format for track name - expecting ID=name got %s\n", argv[i+1]);
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                        tracks[nb_track_act].act_type = 5;
                        tracks[nb_track_act].hdl_name = strchr(argv[i+1], '=') + 1;
@@ -1910,10 +1920,8 @@ int mp4boxMain(int argc, char **argv)
                else if (!stricmp(arg, "-set-kms")) {
                        char szTK[20], *ext;
                        CHECK_NEXT_ARG
-                       if (nb_track_act>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d track operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       tracks = realloc(tracks, sizeof(TrackAction) * (nb_track_act+1));
+
                        strncpy(szTK, argv[i+1], 19);
                        ext = strchr(szTK, '=');
                        tracks[nb_track_act].act_type = 3;
@@ -1955,7 +1963,7 @@ int mp4boxMain(int argc, char **argv)
                        CHECK_NEXT_ARG 
                        if (!strstr(argv[i+1], ":")) {
                                fprintf(stdout, "Chunk extraction usage: \"-splitx start:end\" expressed in seconds\n");
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                        sscanf(argv[i+1], "%lf:%lf", &split_start, &split_duration);
                        split_duration -= split_start; 
@@ -1965,7 +1973,8 @@ int mp4boxMain(int argc, char **argv)
                }
                /*meta*/
                else if (!stricmp(arg, "-set-meta")) { 
-                       CHECK_META_OPS
+                       metas = realloc(metas, sizeof(MetaAction) * (nb_meta_act+1));
+
                        metas[nb_meta_act].act_type = 0;
                        parse_meta_args(&metas[nb_meta_act], argv[i+1]);
                        nb_meta_act++;
@@ -1973,7 +1982,8 @@ int mp4boxMain(int argc, char **argv)
                        i++;
                }
                else if (!stricmp(arg, "-add-item")) { 
-                       CHECK_META_OPS
+                       metas = realloc(metas, sizeof(MetaAction) * (nb_meta_act+1));
+
                        metas[nb_meta_act].act_type = 1;
                        parse_meta_args(&metas[nb_meta_act], argv[i+1]);
                        nb_meta_act++;
@@ -1981,7 +1991,8 @@ int mp4boxMain(int argc, char **argv)
                        i++;
                }
                else if (!stricmp(arg, "-rem-item")) { 
-                       CHECK_META_OPS
+                       metas = realloc(metas, sizeof(MetaAction) * (nb_meta_act+1));
+
                        metas[nb_meta_act].act_type = 2;
                        parse_meta_args(&metas[nb_meta_act], argv[i+1]);
                        nb_meta_act++;
@@ -1989,7 +2000,8 @@ int mp4boxMain(int argc, char **argv)
                        i++;
                }
                else if (!stricmp(arg, "-set-primary")) { 
-                       CHECK_META_OPS
+                       metas = realloc(metas, sizeof(MetaAction) * (nb_meta_act+1));
+
                        metas[nb_meta_act].act_type = 3;
                        parse_meta_args(&metas[nb_meta_act], argv[i+1]);
                        nb_meta_act++;
@@ -1997,7 +2009,8 @@ int mp4boxMain(int argc, char **argv)
                        i++;
                }
                else if (!stricmp(arg, "-set-xml")) { 
-                       CHECK_META_OPS
+                       metas = realloc(metas, sizeof(MetaAction) * (nb_meta_act+1));
+
                        metas[nb_meta_act].act_type = 4;
                        parse_meta_args(&metas[nb_meta_act], argv[i+1]);
                        nb_meta_act++;
@@ -2005,21 +2018,24 @@ int mp4boxMain(int argc, char **argv)
                        i++;
                }
                else if (!stricmp(arg, "-rem-xml")) { 
-                       CHECK_META_OPS
+                       metas = realloc(metas, sizeof(MetaAction) * (nb_meta_act+1));
+
                        metas[nb_meta_act].act_type = 6;
                        if (parse_meta_args(&metas[nb_meta_act], argv[i+1])) i++;
                        nb_meta_act++;
                        open_edit = 1;
                }
                else if (!stricmp(arg, "-dump-xml")) { 
-                       CHECK_META_OPS
+                       metas = realloc(metas, sizeof(MetaAction) * (nb_meta_act+1));
+
                        metas[nb_meta_act].act_type = 7;
                        parse_meta_args(&metas[nb_meta_act], argv[i+1]);
                        nb_meta_act++;
                        i++;
                }
                else if (!stricmp(arg, "-dump-item")) { 
-                       CHECK_META_OPS
+                       metas = realloc(metas, sizeof(MetaAction) * (nb_meta_act+1));
+
                        metas[nb_meta_act].act_type = 8;
                        parse_meta_args(&metas[nb_meta_act], argv[i+1]);
                        nb_meta_act++;
@@ -2027,9 +2043,9 @@ int mp4boxMain(int argc, char **argv)
                }
                else if (!stricmp(arg, "-group-add") || !stricmp(arg, "-group-rem-track") || !stricmp(arg, "-group-rem")) { 
                        tsel_acts[nb_tsel_acts].act_type = !stricmp(arg, "-group-rem") ? 2 : ( !stricmp(arg, "-group-rem-track") ? 1 : 0 );
-                       if (parse_tsel_args(tsel_acts, argv[i+1], &nb_tsel_acts)==0) {
+                       if (parse_tsel_args(&tsel_acts, argv[i+1], &nb_tsel_acts)==0) {
                                fprintf(stdout, "Invalid group syntax - check usage\n");
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                        open_edit=1;
                        i++;
@@ -2065,21 +2081,19 @@ int mp4boxMain(int argc, char **argv)
                else if (!stricmp(arg, "-ab")) { 
                        char *b = argv[i+1];
                        CHECK_NEXT_ARG 
-                       if (nb_alt_brand_add>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d brand remove operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       brand_add = realloc(brand_add, sizeof(u32) * (nb_alt_brand_add+1));
+
                        brand_add[nb_alt_brand_add] = GF_4CC(b[0], b[1], b[2], b[3]);
                        nb_alt_brand_add++;
                        open_edit = 1;
                        i++;
                }
                else if (!stricmp(arg, "-rb")) { 
+                       char *b = argv[i+1];
                        CHECK_NEXT_ARG 
-                       if (nb_alt_brand_rem>=MAX_CUMUL_OPS) {
-                               fprintf(stdout, "Sorry - no more than %d brand remove operations allowed\n", MAX_CUMUL_OPS);
-                               return 1;
-                       }
+                       brand_rem = realloc(brand_rem, sizeof(u32) * (nb_alt_brand_rem+1));
+
+                       brand_rem[nb_alt_brand_rem] = GF_4CC(b[0], b[1], b[2], b[3]);
                        nb_alt_brand_rem++;
                        open_edit = 1;
                        i++;
@@ -2087,7 +2101,7 @@ int mp4boxMain(int argc, char **argv)
 #endif
                else if (!stricmp(arg, "-languages")) { 
                        PrintLanguages();
-                       return 0;
+                       MP4BOX_EXIT_WITH_CODE(0);
                }
                else if (!stricmp(arg, "-h")) {
                        if (i+1== (u32) argc) PrintUsage();
@@ -2122,7 +2136,7 @@ int mp4boxMain(int argc, char **argv)
 #endif
                        }
                        else PrintUsage();
-                       return 0;
+                       MP4BOX_EXIT_WITH_CODE(0);
                }
                else if (!stricmp(arg, "-v")) verbose++;
                else if (!stricmp(arg, "-tag-list")) {
@@ -2130,23 +2144,25 @@ int mp4boxMain(int argc, char **argv)
                        for (i=0; i<nb_itunes_tags; i++) {
                                fprintf(stdout, "\t%s\t%s\n", itags[i].name, itags[i].comment);
                        }
-                       return 0;
+                       MP4BOX_EXIT_WITH_CODE(0);
                } else if (!live_scene && !stream_rtp) {
                        fprintf(stdout, "Option %s unknown. Please check usage\n", arg);
-                       return 1;
+                       MP4BOX_EXIT_WITH_CODE(1);
                }
        }
        if (!inName) {
                PrintUsage();
-               return 1;
+               MP4BOX_EXIT_WITH_CODE(1);
        }
 
 #if !defined(GPAC_DISABLE_STREAMING) && !defined(GPAC_DISABLE_SENG)
        if (live_scene) {
-               return live_session(argc, argv);
+               int ret = live_session(argc, argv);
+               MP4BOX_EXIT_WITH_CODE(ret);
        }
        if (stream_rtp) {
-               return stream_file_rtp(argc, argv);
+               int ret = stream_file_rtp(argc, argv);
+               MP4BOX_EXIT_WITH_CODE(ret);
        }
 #endif
 
@@ -2155,11 +2171,11 @@ int mp4boxMain(int argc, char **argv)
                FILE *fin, *fout;
                s64 to_copy, done;
                fin = gf_f64_open(raw_cat, "rb");
-               if (!fin) return 1;
+               if (!fin) MP4BOX_EXIT_WITH_CODE(1);
                fout = gf_f64_open(inName, "a+b");
                if (!fout) {
                        fclose(fin);
-                       return 1;
+                       MP4BOX_EXIT_WITH_CODE(1);
                }
                gf_f64_seek(fin, 0, SEEK_END);
                to_copy = gf_f64_tell(fin);
@@ -2174,7 +2190,7 @@ int mp4boxMain(int argc, char **argv)
                }
                fclose(fin);
                fclose(fout);
-               return 0;
+               MP4BOX_EXIT_WITH_CODE(0);
        }
 
        /*init libgpac*/
@@ -2208,26 +2224,27 @@ int mp4boxMain(int argc, char **argv)
                        if (e != GF_OK) {
                                fprintf(stdout, "Cannot retrieve M3U8 (%s): %s\n", inName, gf_error_to_string(e));
                                gf_free(mpd_base_url);
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                        inName = "tmp_main.m3u8";
                        remote = 1;
                }
-               e = gf_m3u8_to_mpd(inName, mpd_base_url, (outName ? outName : inName), 0, "video/mp2t", NULL, 1, use_url_template);
+               e = gf_m3u8_to_mpd(inName, mpd_base_url, (outName ? outName : inName), 0, "video/mp2t", 1, use_url_template, NULL);
                gf_free(mpd_base_url);
                if (remote) {
                        //gf_delete_file("tmp_main.m3u8");
                }
                if (e != GF_OK) {
                        fprintf(stdout, "Error converting M3U8 (%s) to MPD (%s): %s\n", inName, outName, gf_error_to_string(e));
-                       return 1;
+                       MP4BOX_EXIT_WITH_CODE(1);
                } else {
                        fprintf(stdout, "Done converting M3U8 (%s) to MPD (%s)\n", inName, outName);
-                       return 0;
+                       MP4BOX_EXIT_WITH_CODE(0);
                }
        }
 
        if (dash_duration && !nb_dash_inputs) {
+               dash_inputs = realloc(dash_inputs, sizeof(char *) * (nb_dash_inputs+1) );
                dash_inputs[nb_dash_inputs] = inName;
                nb_dash_inputs++;
        }
@@ -2260,7 +2277,7 @@ int mp4boxMain(int argc, char **argv)
                        fprintf(stdout, "Error importing %s: %s\n", inName, gf_error_to_string(e));
                        gf_isom_delete(file);
                        gf_delete_file("ttxt_convert");
-                       return 1;
+                       MP4BOX_EXIT_WITH_CODE(1);
                }
                strcpy(outfile, outName ? outName : inName);
                if (strchr(outfile, '.')) {
@@ -2274,12 +2291,12 @@ int mp4boxMain(int argc, char **argv)
                gf_delete_file("ttxt_convert");
                if (e) {
                        fprintf(stdout, "Error converting %s: %s\n", inName, gf_error_to_string(e));
-                       return 1;
+                       MP4BOX_EXIT_WITH_CODE(1);
                }
-               return 0;
+               MP4BOX_EXIT_WITH_CODE(0);
 #else
                fprintf(stdout, "Feature not supported\n");
-               return 1;
+               MP4BOX_EXIT_WITH_CODE(1);
 #endif
        }
 
@@ -2306,7 +2323,7 @@ int mp4boxMain(int argc, char **argv)
                file = gf_isom_open(inName, open_mode, tmpdir);
                if (!file) {
                        fprintf(stdout, "Cannot open destination file %s: %s\n", inName, gf_error_to_string(gf_isom_last_error(NULL)) );
-                       return 1;
+                       MP4BOX_EXIT_WITH_CODE(1);
                }
                for (i=0; i<(u32) argc; i++) {
                        if (!strcmp(argv[i], "-add")) {
@@ -2314,7 +2331,7 @@ int mp4boxMain(int argc, char **argv)
                                if (e) {
                                        fprintf(stdout, "Error importing %s: %s\n", argv[i+1], gf_error_to_string(e));
                                        gf_isom_delete(file);
-                                       return 1;
+                                       MP4BOX_EXIT_WITH_CODE(1);
                                }
                                i++;
                        }
@@ -2345,7 +2362,7 @@ int mp4boxMain(int argc, char **argv)
                        file = gf_isom_open(inName, open_mode, tmpdir);
                        if (!file) {
                                fprintf(stdout, "Cannot open destination file %s: %s\n", inName, gf_error_to_string(gf_isom_last_error(NULL)) );
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                }
                for (i=0; i<(u32)argc; i++) {
@@ -2354,7 +2371,7 @@ int mp4boxMain(int argc, char **argv)
                                if (e) {
                                        fprintf(stdout, "Error appending %s: %s\n", argv[i+1], gf_error_to_string(e));
                                        gf_isom_delete(file);
-                                       return 1;
+                                       MP4BOX_EXIT_WITH_CODE(1);
                                }
                                i++;
                        }
@@ -2371,11 +2388,11 @@ int mp4boxMain(int argc, char **argv)
        else if (chunk_mode) {
                if (!inName) {
                        fprintf(stdout, "chunk encoding syntax: [-outctx outDump] -inctx inScene auFile\n");
-                       return 1;
+                       MP4BOX_EXIT_WITH_CODE(1);
                }
                e = EncodeFileChunk(inName, outName ? outName : inName, input_ctx, output_ctx, tmpdir);
                if (e) fprintf(stdout, "Error encoding chunk file %s\n", gf_error_to_string(e));
-               return e ? 1 : 0;
+               MP4BOX_EXIT_WITH_CODE( e ? 1 : 0 );
        }
 #endif
        else if (encode) {
@@ -2454,7 +2471,7 @@ int mp4boxMain(int argc, char **argv)
 
                                if (!file) {
                                        fprintf(stdout, "Error opening file %s: %s\n", inName, gf_error_to_string(gf_isom_last_error(NULL)));
-                                       return 1;
+                                       MP4BOX_EXIT_WITH_CODE(1);
                                }
                        }
                        break;
@@ -2494,7 +2511,7 @@ int mp4boxMain(int argc, char **argv)
                                                fprintf(stdout, "Error importing %s: %s\n", inName, gf_error_to_string(e));
                                                gf_isom_delete(file);
                                                gf_delete_file("ttxt_convert");
-                                               return 1;
+                                               MP4BOX_EXIT_WITH_CODE(1);
                                        }
                                }
 #endif /*GPAC_DISABLE_MEDIA_IMPORT*/
@@ -2520,7 +2537,7 @@ int mp4boxMain(int argc, char **argv)
                                        convert_file_info(inName, info_track_id);
 #endif
                                }
-                               return 0;
+                               MP4BOX_EXIT_WITH_CODE(0);
                        }
 #endif /*GPAC_DISABLE_ISOM_WRITE*/
                        else if (open_edit) {
@@ -2528,10 +2545,10 @@ int mp4boxMain(int argc, char **argv)
                                if (!outName && file) outName = inName;
                        } else if (!file_exists) {
                                fprintf(stdout, "Error creating file %s: %s\n", inName, gf_error_to_string(GF_URL_ERROR));
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        } else {
                                fprintf(stdout, "Cannot open %s - extension not supported\n", inName);
-                               return 1;
+                               MP4BOX_EXIT_WITH_CODE(1);
                        }
                }
        }
@@ -2568,7 +2585,7 @@ int mp4boxMain(int argc, char **argv)
                mdump.out_name = szFile;
                e = gf_media_export(&mdump);
                if (e) goto err_exit;
-               return 0;
+               MP4BOX_EXIT_WITH_CODE(0);
        }
        if (!open_edit && !gf_isom_probe_file(inName) && track_dump_type) {
                GF_MediaExporter mdump;
@@ -2579,7 +2596,7 @@ int mp4boxMain(int argc, char **argv)
                mdump.out_name = outfile;
                e = gf_media_export(&mdump);
                if (e) goto err_exit;
-               return 0;
+               MP4BOX_EXIT_WITH_CODE(0);
        } 
 
 #endif /*GPAC_DISABLE_MEDIA_EXPORT*/
@@ -2752,7 +2769,7 @@ int mp4boxMain(int argc, char **argv)
        if (!open_edit && !needSave) {
                if (file) gf_isom_delete(file);
                gf_sys_close();
-               return 0;
+               MP4BOX_EXIT_WITH_CODE(0);
        }
 
 #ifndef GPAC_DISABLE_ISOM_WRITE
@@ -2816,7 +2833,7 @@ int mp4boxMain(int argc, char **argv)
                if (!file) {
                        fprintf(stdout, "Nothing to do - exiting\n");
                        gf_sys_close();
-                       return 0;
+                       MP4BOX_EXIT_WITH_CODE(0);
                }
                if (outName) {
                        strcpy(outfile, outName);
@@ -3189,7 +3206,7 @@ int mp4boxMain(int argc, char **argv)
                                        fprintf(stdout, "Error while opening %s: %s\n", dash_inputs[i], gf_error_to_string( gf_isom_last_error(NULL) ));
                                        gf_isom_delete(file);
                                        gf_sys_close();
-                                       return 1;
+                                       MP4BOX_EXIT_WITH_CODE(0);
                                }
                        }
                        for (j=0; j<gf_isom_get_track_count(in); j++) {
@@ -3323,7 +3340,7 @@ int mp4boxMain(int argc, char **argv)
 
                gf_isom_delete(file);
                gf_sys_close();
-               return (e!=GF_OK) ? 1 : 0;
+               MP4BOX_EXIT_WITH_CODE( (e!=GF_OK) ? 1 : 0 );
 #ifndef GPAC_DISABLE_ISOM_FRAGMENTS
        } else if (Frag) {
                if (!InterleavingTime) InterleavingTime = 0.5;
@@ -3337,7 +3354,7 @@ int mp4boxMain(int argc, char **argv)
                        else if (rename(outfile, inName)) fprintf(stdout, "Error renaming file %s to %s\n", outfile, inName);
                }
                gf_sys_close();
-               return (e!=GF_OK) ? 1 : 0;
+               MP4BOX_EXIT_WITH_CODE( (e!=GF_OK) ? 1 : 0 );
 #endif
        }
        
@@ -3424,7 +3441,7 @@ int mp4boxMain(int argc, char **argv)
                needSave = 1;
        }
        for (i=0; i<nb_alt_brand_rem; i++) {
-               gf_isom_modify_alternate_brand(file, brand_add[i], 0);
+               gf_isom_modify_alternate_brand(file, brand_rem[i], 0);
                needSave = 1;
        }
 
@@ -3456,20 +3473,20 @@ int mp4boxMain(int argc, char **argv)
        gf_sys_close();
 
        if (e) fprintf(stdout, "Error: %s\n", gf_error_to_string(e));
-       return (e!=GF_OK) ? 1 : 0;
+       MP4BOX_EXIT_WITH_CODE( (e!=GF_OK) ? 1 : 0 );
 #else
        /*close libgpac*/
        gf_sys_close();
        gf_isom_delete(file);
        fprintf(stdout, "Error: Read-only version of MP4Box.\n");
-       return 1;
+       MP4BOX_EXIT_WITH_CODE(1);
 #endif
 err_exit:
        /*close libgpac*/
        gf_sys_close();
        if (file) gf_isom_delete(file);         
        fprintf(stdout, "\n\tError: %s\n", gf_error_to_string(e));
-       return 1;
+       MP4BOX_EXIT_WITH_CODE(1);
 }
 
 int main( int argc, char** argv )
index acad9b7f868282d49beccebc8eb41d410ba134eb..f91f14d48ec8cb557330e6147a9f342483265c1f 100644 (file)
@@ -3,6 +3,6 @@ cd /d %~dp0
 \r
 for /f "delims=" %%a in ('svnversion ') do set gpac_revision=%%a\r
 \r
-zip "GPAC_0.4.6-r%gpac_revision%_WindowsMobile.zip" ../*.dll ../*.exe ../*.plg\r
+zip "GPAC_0.5.0-r%gpac_revision%_WindowsMobile.zip" ../*.dll ../*.exe ../*.plg\r
 \r
 cd /d %OLDDIR%\r
index eb69935defd623b1d626941e0c299edb5ebff71b..8591a040971618a8fd081fbb6a91d43cba93be60 100644 (file)
@@ -4,7 +4,7 @@ cd /d %~dp0
 for /f "delims=" %%a in ('svnversion') do set gpac_revision=%%a\r
 \r
 ECHO [Version] > gpaccab.inf\r
-ECHO Provider = "GPAC 0.4.6-r%gpac_revision%" >> gpaccab.inf\r
+ECHO Provider = "GPAC 0.5.0-r%gpac_revision%" >> gpaccab.inf\r
 type gpac.inf >> gpaccab.inf\r
 \r
 CabWiz gpaccab.inf\r
@@ -12,7 +12,7 @@ CabWiz gpaccab.inf
 ECHO off\r
 \r
 ECHO [CEAppManager]> gpac.ini\r
-ECHO Version = 0.4.6-r%gpac_revision%>> gpac.ini\r
+ECHO Version = 0.5.0-r%gpac_revision%>> gpac.ini\r
 ECHO Component = GPAC for Windows Mobile>> gpac.ini\r
 ECHO [GPAC for Windows Mobile]>> gpac.ini\r
 ECHO Description = GPAC MPEG-4 Player>> gpac.ini\r
@@ -24,7 +24,7 @@ ECHO CabFiles = gpaccab.cab >> gpac.ini
 ECHO on\r
 \r
 ezsetup -l english -i gpac.ini -r readme.txt -e ../../../../COPYING -o gpac.exe\r
-rename gpac.exe "GPAC_0.4.6-r%gpac_revision%_WindowsMobile.exe"\r
+rename gpac.exe "GPAC_0.5.0-r%gpac_revision%_WindowsMobile.exe"\r
 DEL gpaccab.cab\r
 DEL gpaccab.inf\r
 DEL gpac.ini\r
index e44245369175ce37d3c1cb70557ac8cf77aec097..5879e325fb7cd0d9ebff88b4246cd474634b0791 100644 (file)
@@ -1,5 +1,5 @@
 ;[Version]
-;Provider = "GPAC 0.4.6"
+;Provider = "GPAC 0.5.0"
 Signature = "$Windows NT$"
 CESignature = "$Windows CE$"
 
index 0a561e1e50392d1bc755ddc0636979ab4a4f68c3..46dd6274f0d629e812b0c09b9e5919fe31e63024 100644 (file)
@@ -1,4 +1,4 @@
-This will install GPAC version 0.4.5 for ARM PocketPC/SmartPhones 2003 Platforms\r
+This will install GPAC version 0.5.0 for ARM PocketPC/SmartPhones 2003 Platforms\r
 \r
 GPAC is an open source MPEG-4 framework developped by ENST and available at:\r
        http://gpac.sourceforge.net\r
index b391018e588c3459b92c50511d125459a98e9052..65437e95485534607f8860559d72b45d6cb9127f 100644 (file)
-;--------------------------------
-;General
-!define GPAC_VERSION   0.4.6-DEV
-!include default.out
-
-!define GPAC_ROOT ..\..\..\..
-
-InstallDir "$PROGRAMFILES\GPAC"
-InstallDirRegKey HKCU "SOFTWARE\GPAC" "InstallDir"
-
-RequestExecutionLevel user
-
-
-;--------------------------------
-;Include Modern UI
-
-  !include "MUI2.nsh"
-
-WindowIcon on
-Icon "..\..\..\..\doc\osmo4.ico"
-UninstallIcon "..\..\..\..\doc\osmo4.ico"
-
-
-;--------------------------------
-;Interface Settings
-
-  !define MUI_ABORTWARNING
-
-Var DIALOG
-Var Label
-Var Confirm
-
-LangString PAGE_TITLE ${LANG_ENGLISH} "Title"
-LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Subtitle"
-
-Function EnableNext
-  Pop $R1
-  ${NSD_GetState} $Confirm $R1
-       GetDlgItem $0 $HWNDPARENT 1
-       ${If} $R1 == ${BST_CHECKED}
-   EnableWindow $0 1
-  ${Else} 
-   EnableWindow $0 0
-  ${Endif} 
-FunctionEnd
-
-Function customPage
-       !insertmacro MUI_HEADER_TEXT "Patents and Royalties" "Please read carefully the following clause."
-       GetDlgItem $0 $HWNDPARENT 1
-       EnableWindow $0 0
-       nsDialogs::Create 1018
-       Pop $DIALOG
-
-  ${NSD_CreateLabel} 0 0 100% 120u "Multimedia technologies are often covered by various patents which are most of the time hard to identify. These patents may or may not apply in your local jurisdiction. By installing this software, you acknowledge that you may have to pay royaltee fees in order to legally use this software. Do not proceed with this setup if you do not understand or do not agree with these terms. In any case, the authors and/or distributors bears no liability for any infringing usage of this software, which is provided for educational or research purposes."
-       Pop $Label
-
-  ${NSD_CreateCheckBox} 0 -30 100% 12u "I understand and accept the conditions"
-  Pop $Confirm
-       GetFunctionAddress $0 EnableNext
-       nsDialogs::OnClick $Confirm $0
-  
-  
-  nsDialogs::Show
-FunctionEnd
-
-;--------------------------------
-;Pages
-
-  !insertmacro MUI_PAGE_WELCOME
-  !insertmacro MUI_PAGE_LICENSE "${GPAC_ROOT}\COPYING" 
-  Page custom customPage
-  !insertmacro MUI_PAGE_COMPONENTS
-  !insertmacro MUI_PAGE_DIRECTORY
-    
-  !insertmacro MUI_PAGE_INSTFILES
-  !insertmacro MUI_PAGE_FINISH
-  
-  !insertmacro MUI_UNPAGE_CONFIRM
-  !insertmacro MUI_UNPAGE_INSTFILES
-
-  !insertmacro MUI_LANGUAGE "English"
-
-ComponentText "This will install the GPAC Framework on your computer. Select which optional things you want installed."
-DirText "This will install the GPAC Framework on your computer. Choose a directory"
-
-
-Function FctWriteRegStrAuth
-   ;local var
-   Push $0
-   Push $R0
-   Push $R1
-   Push $R2
-   Push $R3
-   ;pop function arguments
-   Exch 5
-   Pop $R3
-   Exch 5
-   Pop $R2
-   Exch 5
-   Pop $R1
-   Exch 5
-   Pop $R0
-
-   ;test if calling HKCR
-   StrCmp $R0 "HKCR" +1 +3
-   WriteRegStr HKCR $R1 $R2 $R3
-   goto lbl_end
-   
-   #has current user admin privileges?
-   userInfo::getAccountType
-   Pop $0
-   StrCmp $0 "Admin" lbl_admin lbl_not_admin
-
-   lbl_admin:
-      WriteRegStr HKLM $R1 $R2 $R3
-      goto lbl_end
-
-   lbl_not_admin:
-      WriteRegStr HKCU $R1 $R2 $R3
-
-   lbl_end:
-      Pop $R3
-      Pop $R2
-      Pop $R1
-      Pop $R0
-      Pop $0
-FunctionEnd
-
-!macro WriteRegStrAuth HKREG SUBREG ENTRY VALUESTR
-    Push "${HKREG}"
-    Push "${SUBREG}"
-    Push "${ENTRY}"
-    Push "${VALUESTR}"
-    Call FctWriteRegStrAuth
-!macroend
-!define WriteRegStrAuth "!insertmacro WriteRegStrAuth"
-
-
-Function un.FctDeleteRegKeyAuth
-   ;local var
-   Push $0
-   Push $R0
-   Push $R1
-   ;pop function arguments
-   Exch 3
-   Pop $R1
-   Exch 3
-   Pop $R0
-
-   ;test if calling HKCR
-   StrCmp $R0 "HKCR" +1 +3
-   DeleteRegKey HKCR $R1
-   goto lbl_end
-   
-   #has current user admin privileges?
-   userInfo::getAccountType
-   Pop $0
-   StrCmp $0 "Admin" lbl_admin lbl_not_admin
-   
-   lbl_admin:
-      DeleteRegKey HKLM $R1
-      goto lbl_end
-   
-   lbl_not_admin:
-      DeleteRegKey HKCU $R1
-
-   lbl_end:
-      Pop $0
-      Pop $R1
-      Pop $R0
-FunctionEnd
-
-!macro DeleteRegKeyAuth HKREG SUBREG
-    Push "${HKREG}"
-    Push "${SUBREG}"
-    Call un.FctDeleteRegKeyAuth
-!macroend
-!define DeleteRegKeyAuth "!insertmacro DeleteRegKeyAuth"
-
-
-Function InsertGDIPLUS
-   Push $R0
-   Push $R1
-   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
-   StrCmp $R0 "" 0 lbl_winnt
-
-   ;NOT NT
-   ReadRegStr $R0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion VersionNumber
-
-   StrCpy $R1 $R0 1
-   ; win95, NOT SUPPORTED
-   StrCmp $R1 '4' 0 lbl_err_95
-   StrCpy $R1 $R0 3
-   StrCmp $R1 '4.0' lbl_err_95
-   ;winME or 98 otherwise
-   StrCmp $R1 '4.9' lbl_add lbl_add
-
-lbl_err_nt:
-   MessageBox MB_OK "Microsoft GDI+ cannot be installed on NT 3 Systems"
-   Goto lbl_done
-
-lbl_err_95:
-   MessageBox MB_OK "Microsoft GDI+ cannot be installed on Windows 95 and older Systems"
-   Goto lbl_done
-
-lbl_winnt:
-   StrCpy $R1 $R0 1
-   StrCmp $R1 '3' lbl_err_nt
-   StrCmp $R1 '4' lbl_add
-   StrCpy $R1 $R0 3
-   StrCmp $R1 '5.0' lbl_add    ;2000
-   StrCmp $R1 '5.1' lbl_xp     ;XP
-   StrCmp $R1 '5.2' lbl_done   ;.NET server
-
-lbl_add:
-   File ".\Gdiplus.dll"
-
-lbl_xp:
-   File "..\gm_gdip_raster.dll"
-
-lbl_done:
-FunctionEnd
-
-
-;osmo4 install
-Section "Osmo4/GPAC Player" SecOsmo4
-  SectionIn RO
-  SetOutPath $INSTDIR
-
-  File /oname=ReadMe.txt "${GPAC_ROOT}\README"
-  File /oname=License.txt "${GPAC_ROOT}\COPYING"
-  File /oname=Changelog.txt "${GPAC_ROOT}\Changelog"
-  File "${GPAC_ROOT}\doc\configuration.html"
-  File "${GPAC_ROOT}\doc\gpac.mp4"
-
-  File "..\Osmo4.exe"
-  File "..\..\..\..\doc\osmo4.ico"
-  File "..\libgpac.dll"
-  File "..\gm_dummy_in.dll"
-  File "..\gm_dx_hw.dll"
-  File "..\js32.dll"
-  File "..\gm_gpac_js.dll"
-  File "..\libeay32.dll"
-  File "..\ssleay32.dll"
-  File "..\gm_ismacryp.dll"
-
-  ;create default cache
-  SetOutPath $INSTDIR\cache
-
-
-  ;copy GUI
-  SetOutPath $INSTDIR\gui
-  File "..\..\..\..\gui\gui.bt"
-  File "..\..\..\..\gui\gui.js"
-  File "..\..\..\..\gui\gwlib.js"
-  File "..\..\..\..\gui\mpegu-core.js"
-  SetOutPath $INSTDIR\gui\icons
-  File /r /x .svn ..\..\..\..\gui\icons\*
-  SetOutPath $INSTDIR\gui\extensions
-  File /r /x .svn ..\..\..\..\gui\extensions\*
-
-  SetOutPath $INSTDIR
-  
-  ${WriteRegStrAuth} HKCU "SOFTWARE\GPAC" "InstallDir" "$INSTDIR"
-  ${WriteRegStrAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4" "DisplayName" "Osmo4/GPAC (remove only)"
-  ${WriteRegStrAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4" "UninstallString" "$INSTDIR\uninstall.exe"
-  WriteUninstaller "uninstall.exe"
-
-SectionEnd
-
-SubSection "GPAC Plugins" SecPlugins
-
-
-;
-;      2 install modes, normal one and full one
-
-Section "MPEG-4 BIFS Decoder" SecBIFS
-  SectionIn 1
-  File "..\gm_bifs_dec.dll"
-SectionEnd
-
-Section "MPEG-4 ODF Decoder" SecODF
-  SectionIn 1
-  File "..\gm_odf_dec.dll"
-SectionEnd
-
-Section "MPEG-4 LASeR Decoder" SecLASeR
-  SectionIn 1
-  File "..\gm_laser_dec.dll"
-SectionEnd
-
-Section "MPEG-4 SAF Demultiplexer" SecSAF
-  SectionIn 1
-  File "..\gm_saf_in.dll"
-SectionEnd
-
-Section "Textual MPEG-4 Loader" SecTextLoad
-  SectionIn 1
-  File "..\gm_ctx_load.dll"
-SectionEnd
-
-Section "Image Package (PNG, JPEG, BMP)" SecIMG
-  SectionIn 1
-  File "..\gm_img_in.dll"
-SectionEnd
-
-Section "AAC Audio" SecAAC
-  SectionIn 1
-  File "..\gm_aac_in.dll"
-SectionEnd
-
-Section "MP3 Audio" SecMP3
-  SectionIn 1
-  File "..\gm_mp3_in.dll"
-SectionEnd
-
-Section "AC3 Audio" SecAC3
-  SectionIn 1
-  File "..\gm_ac3_in.dll"
-SectionEnd
-
-Section "FFMPEG" SecFFMPEG
-  SectionIn 1
-  File "..\gm_ffmpeg_in.dll"
-  File "..\avcodec-*.dll"
-  File "..\avformat-*.dll"
-  File "..\avutil-*.dll"
-  File "..\swscale-*.dll"
-SectionEnd
-
-Section "XviD Video Decoder" SecXVID
-  SectionIn 1
-  File "..\gm_xvid_dec.dll"
-SectionEnd
-
-;Section "AMR NB & WB" SecAMRFT
-;  SectionIn 1
-;  File "..\gm_amr_float_dec.dll"
-;SectionEnd
-
-Section "Subtitles" SecSUBS
-  SectionIn 1
-  File "..\gm_timedtext.dll"
-SectionEnd
-
-Section "ISO File Format" SecISOFF
-  SectionIn 1
-  File "..\gm_isom_in.dll"
-SectionEnd
-
-Section "MPEG-2 TS" SecM2TS
-  SectionIn 1
-  File "..\gm_mpegts_in.dll"
-SectionEnd
-
-Section "RTP/RTSP" SecRTP
-  SectionIn 1
-  File "..\gm_rtp_in.dll"
-SectionEnd
-
-Section "SVG" SecSVG
-  SectionIn 1
-  File "..\gm_svg_in.dll"
-SectionEnd
-
-
-Section "GDI+" SecGDIP
-  SectionIn 1
-  call InsertGDIPLUS
-SectionEnd
-
-Section "GPAC 2D Raster" SecG2DS
-  SectionIn 1
-  File "..\gm_soft_raster.dll"
-SectionEnd
-
-Section "FreeType" SecFT
-  SectionIn 1
-  File "..\gm_ft_font.dll"
-SectionEnd
-
-Section "Windows MME Audio" SecWAVE
-  SectionIn 1
-  File "..\gm_wav_out.dll"
-SectionEnd
-
-Section "Xiph" SecXIPH
-  SectionIn 1
-  File "..\gm_ogg.dll"
-SectionEnd
-
-Section "OpenSVC Decoder" SecOSVC
-  SectionIn 1
-  File "..\OpenSVCdecoder.plg"
-  File "..\gm_opensvc_dec.dll"
-SectionEnd
-
-Section "MPEG DASH Suppport" SecDASH
-  SectionIn 1
-  File "..\gm_mpd_in.dll"
-SectionEnd
-
-Section "UPnP Support" SecUPnP
-  SectionIn 1
-  File "..\gm_platinum.dll"
-SectionEnd
-
-Section "Widget Manager" SecMPEGU
-  SectionIn 1
-  File "..\gm_widgetman.dll"
-SectionEnd
-
-;Section "MobileIP Framework" SecMobIP
-;  SectionIn 1
-;  File "..\gm_mobile_ip.dll"
-;  File "..\MobileSession.dll"
-;SectionEnd
-
-
-;Section "OFFIS Audio compressor" SecOffisComp
-;  SectionIn 1
-;  ;copy GUI
-;  File "..\gm_offis_compressor.dll"
-;  File "..\QtCore4.dll"
-;  File "..\QtGui4.dll"
-;  SetOutPath $INSTDIR\gui\extensions
-;  File /r /x .svn ..\..\..\..\gui\extensions\offis*
-;  SetOutPath $INSTDIR
-;SectionEnd
-
-SubSectionEnd
-
-
-Section "MP4Box" SecMP4B
-  SectionIn 1
-  SetOutPath $INSTDIR
-  File "..\MP4Box.exe"
-  File "..\MP42TS.exe"
-
-  Push $INSTDIR
-  Call AddToPath
-SectionEnd
-
-
-Section "GPAC SDK" SecSDK
-  SectionIn 1
-  SetOutPath $INSTDIR\sdk\include
-  File /r /x CVS ..\..\..\..\include\*.h
-  SetOutPath $INSTDIR\sdk\lib
-  File ..\libgpac.lib
-  File ..\..\..\..\extra_lib\lib\win32\release\js32.lib
-SectionEnd
-
-
-!define HK_MOZ "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0"
-
-Section "Osmozilla" SecZILLA
-  SectionIn 1
-  SetOutPath $INSTDIR
-  File "..\nposmozilla.dll"
-  File "..\nposmozilla.xpt"
-
-  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Path" "$INSTDIR\nposmozilla.dll"
-  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "XPTPath" "$INSTDIR\nposmozilla.xpt"
-  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Version" "${GPAC_VERSION}"
-  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Vendor" "GPAC"
-  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Description" "GPAC plugin"
-  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "ProductName" "Osmozilla"
-SectionEnd
-
-
-Section "GPAX" SecGPAX
-  SectionIn 1
-  SetOutPath $INSTDIR
-  File "..\GPAX.dll"
-  RegDLL "$INSTDIR\GPAX.dll"
-SectionEnd
-
-
-Section "MP4Client" SecMP4C
-  SectionIn 1
-  SetOutPath $INSTDIR
-  File "..\MP4Client.exe"
-SectionEnd   
-                 
-                 
-                  
-Section "Windows Runtime Libraries" SecMSVCRT
-  SectionIn 1
-  File "..\Microsoft.VC90.CRT.manifest"
-  File "..\Microsoft.VC90.MFC.manifest"       
-  File "..\msvcr90.dll"
-  File "..\mfc90.dll"
-SectionEnd
-
-
-
-
-SubSection "Osmo4 Shortcuts"
-
-Section "Add Start Menu Shortcuts"
-  SectionIn 1
-  #has current user admin privileges?
-  userInfo::getAccountType
-  Pop $0
-  StrCmp $0 "Admin" +1 +2
-  SetShellVarContext all
-  CreateDirectory "$SMPROGRAMS\Osmo4"
-  CreateShortCut "$SMPROGRAMS\Osmo4\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
-  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (Classic UI).lnk" "$INSTDIR\Osmo4.exe" ""
-  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (New UI).lnk" "$INSTDIR\MP4Client.exe" "-gui" 
-  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (New UI With Console).lnk" "$INSTDIR\MP4Client.exe" ""
-  CreateShortCut "$SMPROGRAMS\Osmo4\Readme.lnk" "$INSTDIR\ReadMe.txt"
-  CreateShortCut "$SMPROGRAMS\Osmo4\License.lnk" "$INSTDIR\License.txt"
-  CreateShortCut "$SMPROGRAMS\Osmo4\History.lnk" "$INSTDIR\changelog.txt"
-  CreateShortCut "$SMPROGRAMS\Osmo4\Configuration Info.lnk" "$INSTDIR\configuration.html"
-SectionEnd
-
-Section "Add shortcut to QuickLaunch"
-  SectionIn 1
-  CreateShortCut "$QUICKLAUNCH\Osmo4.lnk" "$INSTDIR\Osmo4.exe" "" "$INSTDIR\Osmo4.exe" 0
-SectionEnd
-
-Section "Add shortcut to Desktop"
-  SectionIn 1
-  CreateShortCut "$DESKTOP\Osmo4.lnk" "$INSTDIR\Osmo4.exe" "" "$INSTDIR\Osmo4.exe" 0
-SectionEnd
-
-!define SHCNE_ASSOCCHANGED 0x08000000
-!define SHCNF_IDLIST 0
-
-Section "Make Osmo4 the default MPEG-4 Player"
-  SectionIn 1
-  ;write file association
-  ${WriteRegStrAuth} HKCR GPAC\mp4\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"
-  ${WriteRegStrAuth} HKCR GPAC\mp4\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"
-  ${WriteRegStrAuth} HKCR .mp4 "" "GPAC\mp4"
-  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
-
-SectionEnd
-
-Section "Associate 3GPP files (3GP) with Osmo4"
-  SectionIn 1
-  ;write file association
-  ${WriteRegStrAuth} HKCR GPAC\3gp\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"
-  ${WriteRegStrAuth} HKCR GPAC\3gp\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"
-  ${WriteRegStrAuth} HKCR .3gp "" "GPAC\3gp"
-  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
-SectionEnd
-
-Section "Associate 3GPP2 files (3G2) with Osmo4"
-  SectionIn 1
-  ;write file association
-  ${WriteRegStrAuth} HKCR GPAC\3g2\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"
-  ${WriteRegStrAuth} HKCR GPAC\3g2\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"
-  ${WriteRegStrAuth} HKCR .3g2 "" "GPAC\3g2"
-  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
-SectionEnd
-
-SubSectionEnd
-
-
-
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecOsmo4} "Osmo4 player"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "GPAC Plugins"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecBIFS} "MPEG-4 BIFS Scene Decoder"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecODF} "MPEG-4 Object Descriptor Decoder"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecLASeR} "MPEG-4 LASeR Scene Decoder"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecTextLoad} "Support for uncompressed MPEG-4 (BT and XMT), VRML and X3D textual formats"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecSAF} "MPEG-4 SAF Demultiplexer"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecIMG} "Support for PNG, JPEG, BMP and JPEG2000 images"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecAAC} "Support for MPEG-4 Audio HE-AAC decoder and web radios"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP3} "Support for MPEG-1/2 Audio (inc. MP3) decoder and web radios"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecAC3} "Support for Dolby AC3 decoder and web radios"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecFFMPEG} "Support for FFMPEG libraries for various format decoding and demultiplexing"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecXVID} "Support for XVID library for MPEG-4 Video Part 2 decoding"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecAMRFT} "Support for AMR and AMR WideBand decoder and web radios"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecSUBS} "Subtitle support include SRT, SUB, 3GPP and MPEG-4 Text formats"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecISOFF} "Support for ISO-based file formats (3GP, MP4, MJ2K)"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecM2TS} "Support for MPEG-2 Transport Stream"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecRTP} "Support for RTP and RTSP IP streaming"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecSVG} "Support for SVG including progressive loading"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecGDIP} "GDIPlus-based rasterizer"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecG2DS} "GPAC software rasterizer"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecFT} "FreeType font parsing"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecWAVE} "Windows MME Audio output support"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecXIPH} "Support for XIPP OGG, Vorbis and Theora media"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecOSVC} "Support for SVC decoding through OpenSVC Decoder"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecDASH} "HTTP Streaming using MPEG DASH"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecUPnP} "Support for UPnP based on Platinum"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecMPEGU} "Support for W3C and MPEG-U Widgets"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecMobIP} "UNIGE Mobile IP Framework"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecOffisComp} "OFFIS Audio Compressor"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP4B} "MP4Box command-line tool for various multimedia operations"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecSDK} "GPAC SDK: headers and library files needed to develop modules for GPAC or appllication based on GPAC"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecZILLA} "GPAC playback support NPAPI-based browsers (FireFox/Gecko, Safari/WebKit)"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecGPAX} "GPAC playback support using ActiveX component (Internet Explorer)"
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP4C} "GPAC command-line player and AVI dumper"
-  
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-
-Function .onInstSuccess
-;  MessageBox MB_YESNO "GPAC Framework installation complete. Do you want to launch the Osmo4 player?" IDNO NoLaunch
-;  Exec $INSTDIR\Osmo4.exe
-;  NoLaunch:
-FunctionEnd
-
-
-
-
-
-; uninstall stuff
-
-UninstallText "This will uninstall OSMO4/GPAC from your computer. Hit next to continue."
-
-; special uninstall section.
-Section "Uninstall"
-  ; remove registry keys
-  ${DeleteRegKeyAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4"
-  ${DeleteRegKeyAuth} HKCU "SOFTWARE\GPAC"
-  ${DeleteRegKeyAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0"
-  ${DeleteRegKeyAuth} HKCR GPAC\mp4\DefaultIcon
-  ${DeleteRegKeyAuth} HKCR GPAC\mp4\shell\open\command
-  ${DeleteRegKeyAuth} HKCR GPAC\mp4
-  ${DeleteRegKeyAuth} HKCR .mp4
-  ${DeleteRegKeyAuth} HKCR GPAC\3gp\DefaultIcon
-  ${DeleteRegKeyAuth} HKCR GPAC\3gp\shell\open\command
-  ${DeleteRegKeyAuth} HKCR GPAC\3gp
-  ${DeleteRegKeyAuth} HKCR .3gp
-  ${DeleteRegKeyAuth} HKCR GPAC\3g2\DefaultIcon
-  ${DeleteRegKeyAuth} HKCR GPAC\3g2\shell\open\command
-  ${DeleteRegKeyAuth} HKCR GPAC\3g2
-  ${DeleteRegKeyAuth} HKCR .3g2
-  ${DeleteRegKeyAuth} HKCR GPAC
-
-  UnRegDLL "$INSTDIR\GPAX.dll"
-  RMDir /r $INSTDIR
-  Push $INSTDIR
-  Call un.RemoveFromPath
-  #has current user admin privileges?
-  userInfo::getAccountType
-  Pop $0
-  StrCmp $0 "Admin" +1 +2
-  SetShellVarContext all
-  Delete "$SMPROGRAMS\Osmo4\*.*"
-  RMDir "$SMPROGRAMS\Osmo4"
-  Delete "$QUICKLAUNCH\Osmo4.lnk"
-  Delete "$DESKTOP\Osmo4.lnk"
-
-SectionEnd
-
-;path modif functions
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
+;--------------------------------\r
+;General\r
+!define GPAC_VERSION   0.5.0\r
+!include default.out\r
+\r
+!define GPAC_ROOT ..\..\..\..\r
+\r
+InstallDir "$PROGRAMFILES\GPAC"\r
+InstallDirRegKey HKCU "SOFTWARE\GPAC" "InstallDir"\r
+\r
+RequestExecutionLevel user\r
+\r
+\r
+;--------------------------------\r
+;Include Modern UI\r
+\r
+  !include "MUI2.nsh"\r
+\r
+WindowIcon on\r
+Icon "..\..\..\..\doc\osmo4.ico"\r
+UninstallIcon "..\..\..\..\doc\osmo4.ico"\r
+\r
+\r
+;--------------------------------\r
+;Interface Settings\r
+\r
+  !define MUI_ABORTWARNING\r
+\r
+Var DIALOG\r
+Var Label\r
+Var Confirm\r
+\r
+LangString PAGE_TITLE ${LANG_ENGLISH} "Title"\r
+LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Subtitle"\r
+\r
+Function EnableNext\r
+  Pop $R1\r
+  ${NSD_GetState} $Confirm $R1\r
+       GetDlgItem $0 $HWNDPARENT 1\r
+       ${If} $R1 == ${BST_CHECKED}\r
+   EnableWindow $0 1\r
+  ${Else} \r
+   EnableWindow $0 0\r
+  ${Endif} \r
+FunctionEnd\r
+\r
+Function customPage\r
+       !insertmacro MUI_HEADER_TEXT "Patents and Royalties" "Please read carefully the following clause."\r
+       GetDlgItem $0 $HWNDPARENT 1\r
+       EnableWindow $0 0\r
+       nsDialogs::Create 1018\r
+       Pop $DIALOG\r
+\r
+  ${NSD_CreateLabel} 0 0 100% 120u "Multimedia technologies are often covered by various patents which are most of the time hard to identify. These patents may or may not apply in your local jurisdiction. By installing this software, you acknowledge that you may have to pay royaltee fees in order to legally use this software. Do not proceed with this setup if you do not understand or do not agree with these terms. In any case, the authors and/or distributors bears no liability for any infringing usage of this software, which is provided for educational or research purposes."\r
+       Pop $Label\r
+\r
+  ${NSD_CreateCheckBox} 0 -30 100% 12u "I understand and accept the conditions"\r
+  Pop $Confirm\r
+       GetFunctionAddress $0 EnableNext\r
+       nsDialogs::OnClick $Confirm $0\r
+  \r
+  \r
+  nsDialogs::Show\r
+FunctionEnd\r
+\r
+;--------------------------------\r
+;Pages\r
+\r
+  !insertmacro MUI_PAGE_WELCOME\r
+  !insertmacro MUI_PAGE_LICENSE "${GPAC_ROOT}\COPYING" \r
+  Page custom customPage\r
+  !insertmacro MUI_PAGE_COMPONENTS\r
+  !insertmacro MUI_PAGE_DIRECTORY\r
+    \r
+  !insertmacro MUI_PAGE_INSTFILES\r
+  !insertmacro MUI_PAGE_FINISH\r
+  \r
+  !insertmacro MUI_UNPAGE_CONFIRM\r
+  !insertmacro MUI_UNPAGE_INSTFILES\r
+\r
+  !insertmacro MUI_LANGUAGE "English"\r
+\r
+ComponentText "This will install the GPAC Framework on your computer. Select which optional things you want installed."\r
+DirText "This will install the GPAC Framework on your computer. Choose a directory"\r
+\r
+\r
+Function FctWriteRegStrAuth\r
+   ;local var\r
+   Push $0\r
+   Push $R0\r
+   Push $R1\r
+   Push $R2\r
+   Push $R3\r
+   ;pop function arguments\r
+   Exch 5\r
+   Pop $R3\r
+   Exch 5\r
+   Pop $R2\r
+   Exch 5\r
+   Pop $R1\r
+   Exch 5\r
+   Pop $R0\r
+\r
+   ;test if calling HKCR\r
+   StrCmp $R0 "HKCR" +1 +3\r
+   WriteRegStr HKCR $R1 $R2 $R3\r
+   goto lbl_end\r
+   \r
+   #has current user admin privileges?\r
+   userInfo::getAccountType\r
+   Pop $0\r
+   StrCmp $0 "Admin" lbl_admin lbl_not_admin\r
+\r
+   lbl_admin:\r
+      WriteRegStr HKLM $R1 $R2 $R3\r
+      goto lbl_end\r
+\r
+   lbl_not_admin:\r
+      WriteRegStr HKCU $R1 $R2 $R3\r
+\r
+   lbl_end:\r
+      Pop $R3\r
+      Pop $R2\r
+      Pop $R1\r
+      Pop $R0\r
+      Pop $0\r
+FunctionEnd\r
+\r
+!macro WriteRegStrAuth HKREG SUBREG ENTRY VALUESTR\r
+    Push "${HKREG}"\r
+    Push "${SUBREG}"\r
+    Push "${ENTRY}"\r
+    Push "${VALUESTR}"\r
+    Call FctWriteRegStrAuth\r
+!macroend\r
\r
+!define WriteRegStrAuth "!insertmacro WriteRegStrAuth"\r
+\r
+\r
+Function un.FctDeleteRegKeyAuth\r
+   ;local var\r
+   Push $0\r
+   Push $R0\r
+   Push $R1\r
+   ;pop function arguments\r
+   Exch 3\r
+   Pop $R1\r
+   Exch 3\r
+   Pop $R0\r
+\r
+   ;test if calling HKCR\r
+   StrCmp $R0 "HKCR" +1 +3\r
+   DeleteRegKey HKCR $R1\r
+   goto lbl_end\r
+   \r
+   #has current user admin privileges?\r
+   userInfo::getAccountType\r
+   Pop $0\r
+   StrCmp $0 "Admin" lbl_admin lbl_not_admin\r
+   \r
+   lbl_admin:\r
+      DeleteRegKey HKLM $R1\r
+      goto lbl_end\r
+   \r
+   lbl_not_admin:\r
+      DeleteRegKey HKCU $R1\r
+\r
+   lbl_end:\r
+      Pop $0\r
+      Pop $R1\r
+      Pop $R0\r
+FunctionEnd\r
+\r
+!macro DeleteRegKeyAuth HKREG SUBREG\r
+    Push "${HKREG}"\r
+    Push "${SUBREG}"\r
+    Call un.FctDeleteRegKeyAuth\r
+!macroend\r
\r
+!define DeleteRegKeyAuth "!insertmacro DeleteRegKeyAuth"\r
+\r
+\r
+Function InsertGDIPLUS\r
+   Push $R0\r
+   Push $R1\r
+   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion\r
+   StrCmp $R0 "" 0 lbl_winnt\r
+\r
+   ;NOT NT\r
+   ReadRegStr $R0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion VersionNumber\r
+\r
+   StrCpy $R1 $R0 1\r
+   ; win95, NOT SUPPORTED\r
+   StrCmp $R1 '4' 0 lbl_err_95\r
+   StrCpy $R1 $R0 3\r
+   StrCmp $R1 '4.0' lbl_err_95\r
+   ;winME or 98 otherwise\r
+   StrCmp $R1 '4.9' lbl_add lbl_add\r
+\r
+lbl_err_nt:\r
+   MessageBox MB_OK "Microsoft GDI+ cannot be installed on NT 3 Systems"\r
+   Goto lbl_done\r
+\r
+lbl_err_95:\r
+   MessageBox MB_OK "Microsoft GDI+ cannot be installed on Windows 95 and older Systems"\r
+   Goto lbl_done\r
+\r
+lbl_winnt:\r
+   StrCpy $R1 $R0 1\r
+   StrCmp $R1 '3' lbl_err_nt\r
+   StrCmp $R1 '4' lbl_add\r
+   StrCpy $R1 $R0 3\r
+   StrCmp $R1 '5.0' lbl_add    ;2000\r
+   StrCmp $R1 '5.1' lbl_xp     ;XP\r
+   StrCmp $R1 '5.2' lbl_done   ;.NET server\r
+\r
+lbl_add:\r
+   File ".\Gdiplus.dll"\r
+\r
+lbl_xp:\r
+   File "..\gm_gdip_raster.dll"\r
+\r
+lbl_done:\r
+FunctionEnd\r
+\r
+\r
+;osmo4 install\r
+Section "Osmo4/GPAC Player" SecOsmo4\r
+  SectionIn RO\r
+  SetOutPath $INSTDIR\r
+\r
+  File /oname=ReadMe.txt "${GPAC_ROOT}\README"\r
+  File /oname=License.txt "${GPAC_ROOT}\COPYING"\r
+  File /oname=Changelog.txt "${GPAC_ROOT}\Changelog"\r
+  File "${GPAC_ROOT}\doc\configuration.html"\r
+  File "${GPAC_ROOT}\doc\gpac.mp4"\r
+\r
+  File "..\Osmo4.exe"\r
+  File "..\..\..\..\doc\osmo4.ico"\r
+  File "..\libgpac.dll"\r
+  File "..\gm_dummy_in.dll"\r
+  File "..\gm_dx_hw.dll"\r
+  File "..\js32.dll"\r
+  File "..\gm_gpac_js.dll"\r
+  File "..\libeay32.dll"\r
+  File "..\ssleay32.dll"\r
+  File "..\gm_ismacryp.dll"\r
+\r
+  ;create default cache\r
+  SetOutPath $INSTDIR\cache\r
+\r
+\r
+  ;copy GUI\r
+  SetOutPath $INSTDIR\gui\r
+  File "..\..\..\..\gui\gui.bt"\r
+  File "..\..\..\..\gui\gui.js"\r
+  File "..\..\..\..\gui\gwlib.js"\r
+  File "..\..\..\..\gui\mpegu-core.js"\r
+  SetOutPath $INSTDIR\gui\icons\r
+  File /r /x .svn ..\..\..\..\gui\icons\*\r
+  SetOutPath $INSTDIR\gui\extensions\r
+  File /r /x .svn ..\..\..\..\gui\extensions\*\r
+\r
+  SetOutPath $INSTDIR\r
+  \r
+  ${WriteRegStrAuth} HKCU "SOFTWARE\GPAC" "InstallDir" "$INSTDIR"\r
+  ${WriteRegStrAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4" "DisplayName" "Osmo4/GPAC (remove only)"\r
+  ${WriteRegStrAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4" "UninstallString" "$INSTDIR\uninstall.exe"\r
+  WriteUninstaller "uninstall.exe"\r
+\r
+SectionEnd\r
+\r
+SubSection "GPAC Plugins" SecPlugins\r
+\r
+\r
+;\r
+;      2 install modes, normal one and full one\r
+\r
+Section "MPEG-4 BIFS Decoder" SecBIFS\r
+  SectionIn 1\r
+  File "..\gm_bifs_dec.dll"\r
+SectionEnd\r
+\r
+Section "MPEG-4 ODF Decoder" SecODF\r
+  SectionIn 1\r
+  File "..\gm_odf_dec.dll"\r
+SectionEnd\r
+\r
+Section "MPEG-4 LASeR Decoder" SecLASeR\r
+  SectionIn 1\r
+  File "..\gm_laser_dec.dll"\r
+SectionEnd\r
+\r
+Section "MPEG-4 SAF Demultiplexer" SecSAF\r
+  SectionIn 1\r
+  File "..\gm_saf_in.dll"\r
+SectionEnd\r
+\r
+Section "Textual MPEG-4 Loader" SecTextLoad\r
+  SectionIn 1\r
+  File "..\gm_ctx_load.dll"\r
+SectionEnd\r
+\r
+Section "Image Package (PNG, JPEG, BMP)" SecIMG\r
+  SectionIn 1\r
+  File "..\gm_img_in.dll"\r
+SectionEnd\r
+\r
+Section "AAC Audio" SecAAC\r
+  SectionIn 1\r
+  File "..\gm_aac_in.dll"\r
+SectionEnd\r
+\r
+Section "MP3 Audio" SecMP3\r
+  SectionIn 1\r
+  File "..\gm_mp3_in.dll"\r
+SectionEnd\r
+\r
+Section "AC3 Audio" SecAC3\r
+  SectionIn 1\r
+  File "..\gm_ac3_in.dll"\r
+SectionEnd\r
+\r
+Section "FFMPEG" SecFFMPEG\r
+  SectionIn 1\r
+  File "..\gm_ffmpeg_in.dll"\r
+  File "..\avcodec-*.dll"\r
+  File "..\avformat-*.dll"\r
+  File "..\avutil-*.dll"\r
+  File "..\swscale-*.dll"\r
+SectionEnd\r
+\r
+Section "XviD Video Decoder" SecXVID\r
+  SectionIn 1\r
+  File "..\gm_xvid_dec.dll"\r
+SectionEnd\r
+\r
+;Section "AMR NB & WB" SecAMRFT\r
+;  SectionIn 1\r
+;  File "..\gm_amr_float_dec.dll"\r
+;SectionEnd\r
+\r
+Section "Subtitles" SecSUBS\r
+  SectionIn 1\r
+  File "..\gm_timedtext.dll"\r
+SectionEnd\r
+\r
+Section "ISO File Format" SecISOFF\r
+  SectionIn 1\r
+  File "..\gm_isom_in.dll"\r
+SectionEnd\r
+\r
+Section "MPEG-2 TS" SecM2TS\r
+  SectionIn 1\r
+  File "..\gm_mpegts_in.dll"\r
+SectionEnd\r
+\r
+Section "RTP/RTSP" SecRTP\r
+  SectionIn 1\r
+  File "..\gm_rtp_in.dll"\r
+SectionEnd\r
+\r
+Section "SVG" SecSVG\r
+  SectionIn 1\r
+  File "..\gm_svg_in.dll"\r
+SectionEnd\r
+\r
+\r
+Section "GDI+" SecGDIP\r
+  SectionIn 1\r
+  call InsertGDIPLUS\r
+SectionEnd\r
+\r
+Section "GPAC 2D Raster" SecG2DS\r
+  SectionIn 1\r
+  File "..\gm_soft_raster.dll"\r
+SectionEnd\r
+\r
+Section "FreeType" SecFT\r
+  SectionIn 1\r
+  File "..\gm_ft_font.dll"\r
+SectionEnd\r
+\r
+Section "Windows MME Audio" SecWAVE\r
+  SectionIn 1\r
+  File "..\gm_wav_out.dll"\r
+SectionEnd\r
+\r
+Section "Xiph" SecXIPH\r
+  SectionIn 1\r
+  File "..\gm_ogg.dll"\r
+SectionEnd\r
+\r
+Section "OpenSVC Decoder" SecOSVC\r
+  SectionIn 1\r
+  File "..\OpenSVCdecoder.plg"\r
+  File "..\gm_opensvc_dec.dll"\r
+SectionEnd\r
+\r
+Section "MPEG DASH Suppport" SecDASH\r
+  SectionIn 1\r
+  File "..\gm_mpd_in.dll"\r
+SectionEnd\r
+\r
+Section "UPnP Support" SecUPnP\r
+  SectionIn 1\r
+  File "..\gm_platinum.dll"\r
+SectionEnd\r
+\r
+Section "Widget Manager" SecMPEGU\r
+  SectionIn 1\r
+  File "..\gm_widgetman.dll"\r
+SectionEnd\r
+\r
+;Section "MobileIP Framework" SecMobIP\r
+;  SectionIn 1\r
+;  File "..\gm_mobile_ip.dll"\r
+;  File "..\MobileSession.dll"\r
+;SectionEnd\r
+\r
+\r
+;Section "OFFIS Audio compressor" SecOffisComp\r
+;  SectionIn 1\r
+;  ;copy GUI\r
+;  File "..\gm_offis_compressor.dll"\r
+;  File "..\QtCore4.dll"\r
+;  File "..\QtGui4.dll"\r
+;  SetOutPath $INSTDIR\gui\extensions\r
+;  File /r /x .svn ..\..\..\..\gui\extensions\offis*\r
+;  SetOutPath $INSTDIR\r
+;SectionEnd\r
+\r
+SubSectionEnd\r
+\r
+\r
+Section "MP4Box" SecMP4B\r
+  SectionIn 1\r
+  SetOutPath $INSTDIR\r
+  File "..\MP4Box.exe"\r
+  File "..\MP42TS.exe"\r
+\r
+  Push $INSTDIR\r
+  Call AddToPath\r
+SectionEnd\r
+\r
+\r
+Section "GPAC SDK" SecSDK\r
+  SectionIn 1\r
+  SetOutPath $INSTDIR\sdk\include\r
+  File /r /x CVS ..\..\..\..\include\*.h\r
+  SetOutPath $INSTDIR\sdk\lib\r
+  File ..\libgpac.lib\r
+  File ..\..\..\..\extra_lib\lib\win32\release\js32.lib\r
+SectionEnd\r
+\r
+\r
+!define HK_MOZ "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0"\r
+\r
+Section "Osmozilla" SecZILLA\r
+  SectionIn 1\r
+  SetOutPath $INSTDIR\r
+  File "..\nposmozilla.dll"\r
+  File "..\nposmozilla.xpt"\r
+\r
+  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Path" "$INSTDIR\nposmozilla.dll"\r
+  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "XPTPath" "$INSTDIR\nposmozilla.xpt"\r
+  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Version" "${GPAC_VERSION}"\r
+  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Vendor" "GPAC"\r
+  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Description" "GPAC plugin"\r
+  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "ProductName" "Osmozilla"\r
+SectionEnd\r
+\r
+\r
+Section "GPAX" SecGPAX\r
+  SectionIn 1\r
+  SetOutPath $INSTDIR\r
+  File "..\GPAX.dll"\r
+  RegDLL "$INSTDIR\GPAX.dll"\r
+SectionEnd\r
+\r
+\r
+Section "MP4Client" SecMP4C\r
+  SectionIn 1\r
+  SetOutPath $INSTDIR\r
+  File "..\MP4Client.exe"\r
+SectionEnd   \r
+                 \r
+                 \r
+                  \r
+Section "Windows Runtime Libraries" SecMSVCRT\r
+  SectionIn 1\r
+  File "..\Microsoft.VC90.CRT.manifest"\r
+  File "..\Microsoft.VC90.MFC.manifest"       \r
+  File "..\msvcr90.dll"\r
+  File "..\mfc90.dll"\r
+SectionEnd\r
+\r
+\r
+\r
+\r
+SubSection "Osmo4 Shortcuts"\r
+\r
+Section "Add Start Menu Shortcuts"\r
+  SectionIn 1\r
+  #has current user admin privileges?\r
+  userInfo::getAccountType\r
+  Pop $0\r
+  StrCmp $0 "Admin" +1 +2\r
+  SetShellVarContext all\r
+  CreateDirectory "$SMPROGRAMS\Osmo4"\r
+  CreateShortCut "$SMPROGRAMS\Osmo4\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0\r
+  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (Classic UI).lnk" "$INSTDIR\Osmo4.exe" ""\r
+  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (New UI).lnk" "$INSTDIR\MP4Client.exe" "-gui" \r
+  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (New UI With Console).lnk" "$INSTDIR\MP4Client.exe" ""\r
+  CreateShortCut "$SMPROGRAMS\Osmo4\Readme.lnk" "$INSTDIR\ReadMe.txt"\r
+  CreateShortCut "$SMPROGRAMS\Osmo4\License.lnk" "$INSTDIR\License.txt"\r
+  CreateShortCut "$SMPROGRAMS\Osmo4\History.lnk" "$INSTDIR\changelog.txt"\r
+  CreateShortCut "$SMPROGRAMS\Osmo4\Configuration Info.lnk" "$INSTDIR\configuration.html"\r
+SectionEnd\r
+\r
+Section "Add shortcut to QuickLaunch"\r
+  SectionIn 1\r
+  CreateShortCut "$QUICKLAUNCH\Osmo4.lnk" "$INSTDIR\Osmo4.exe" "" "$INSTDIR\Osmo4.exe" 0\r
+SectionEnd\r
+\r
+Section "Add shortcut to Desktop"\r
+  SectionIn 1\r
+  CreateShortCut "$DESKTOP\Osmo4.lnk" "$INSTDIR\Osmo4.exe" "" "$INSTDIR\Osmo4.exe" 0\r
+SectionEnd\r
+\r
+!define SHCNE_ASSOCCHANGED 0x08000000\r
+!define SHCNF_IDLIST 0\r
+\r
+Section "Make Osmo4 the default MPEG-4 Player"\r
+  SectionIn 1\r
+  ;write file association\r
+  ${WriteRegStrAuth} HKCR GPAC\mp4\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"\r
+  ${WriteRegStrAuth} HKCR GPAC\mp4\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"\r
+  ${WriteRegStrAuth} HKCR .mp4 "" "GPAC\mp4"\r
+  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'\r
+\r
+SectionEnd\r
+\r
+Section "Associate 3GPP files (3GP) with Osmo4"\r
+  SectionIn 1\r
+  ;write file association\r
+  ${WriteRegStrAuth} HKCR GPAC\3gp\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"\r
+  ${WriteRegStrAuth} HKCR GPAC\3gp\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"\r
+  ${WriteRegStrAuth} HKCR .3gp "" "GPAC\3gp"\r
+  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'\r
+SectionEnd\r
+\r
+Section "Associate 3GPP2 files (3G2) with Osmo4"\r
+  SectionIn 1\r
+  ;write file association\r
+  ${WriteRegStrAuth} HKCR GPAC\3g2\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"\r
+  ${WriteRegStrAuth} HKCR GPAC\3g2\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"\r
+  ${WriteRegStrAuth} HKCR .3g2 "" "GPAC\3g2"\r
+  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'\r
+SectionEnd\r
+\r
+SubSectionEnd\r
+\r
+\r
+\r
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecOsmo4} "Osmo4 player"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "GPAC Plugins"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecBIFS} "MPEG-4 BIFS Scene Decoder"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecODF} "MPEG-4 Object Descriptor Decoder"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecLASeR} "MPEG-4 LASeR Scene Decoder"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecTextLoad} "Support for uncompressed MPEG-4 (BT and XMT), VRML and X3D textual formats"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecSAF} "MPEG-4 SAF Demultiplexer"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecIMG} "Support for PNG, JPEG, BMP and JPEG2000 images"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecAAC} "Support for MPEG-4 Audio HE-AAC decoder and web radios"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP3} "Support for MPEG-1/2 Audio (inc. MP3) decoder and web radios"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecAC3} "Support for Dolby AC3 decoder and web radios"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecFFMPEG} "Support for FFMPEG libraries for various format decoding and demultiplexing"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecXVID} "Support for XVID library for MPEG-4 Video Part 2 decoding"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecAMRFT} "Support for AMR and AMR WideBand decoder and web radios"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecSUBS} "Subtitle support include SRT, SUB, 3GPP and MPEG-4 Text formats"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecISOFF} "Support for ISO-based file formats (3GP, MP4, MJ2K)"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecM2TS} "Support for MPEG-2 Transport Stream"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecRTP} "Support for RTP and RTSP IP streaming"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecSVG} "Support for SVG including progressive loading"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecGDIP} "GDIPlus-based rasterizer"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecG2DS} "GPAC software rasterizer"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecFT} "FreeType font parsing"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecWAVE} "Windows MME Audio output support"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecXIPH} "Support for XIPP OGG, Vorbis and Theora media"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecOSVC} "Support for SVC decoding through OpenSVC Decoder"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecDASH} "HTTP Streaming using MPEG DASH"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecUPnP} "Support for UPnP based on Platinum"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecMPEGU} "Support for W3C and MPEG-U Widgets"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecMobIP} "UNIGE Mobile IP Framework"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecOffisComp} "OFFIS Audio Compressor"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP4B} "MP4Box command-line tool for various multimedia operations"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecSDK} "GPAC SDK: headers and library files needed to develop modules for GPAC or appllication based on GPAC"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecZILLA} "GPAC playback support NPAPI-based browsers (FireFox/Gecko, Safari/WebKit)"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecGPAX} "GPAC playback support using ActiveX component (Internet Explorer)"\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP4C} "GPAC command-line player and AVI dumper"\r
+  \r
+!insertmacro MUI_FUNCTION_DESCRIPTION_END\r
+\r
+\r
+Function .onInstSuccess\r
+;  MessageBox MB_YESNO "GPAC Framework installation complete. Do you want to launch the Osmo4 player?" IDNO NoLaunch\r
+;  Exec $INSTDIR\Osmo4.exe\r
+;  NoLaunch:\r
+FunctionEnd\r
+\r
+\r
+\r
+\r
+\r
+; uninstall stuff\r
+\r
+UninstallText "This will uninstall OSMO4/GPAC from your computer. Hit next to continue."\r
+\r
+; special uninstall section.\r
+Section "Uninstall"\r
+  ; remove registry keys\r
+  ${DeleteRegKeyAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4"\r
+  ${DeleteRegKeyAuth} HKCU "SOFTWARE\GPAC"\r
+  ${DeleteRegKeyAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0"\r
+  ${DeleteRegKeyAuth} HKCR GPAC\mp4\DefaultIcon\r
+  ${DeleteRegKeyAuth} HKCR GPAC\mp4\shell\open\command\r
+  ${DeleteRegKeyAuth} HKCR GPAC\mp4\r
+  ${DeleteRegKeyAuth} HKCR .mp4\r
+  ${DeleteRegKeyAuth} HKCR GPAC\3gp\DefaultIcon\r
+  ${DeleteRegKeyAuth} HKCR GPAC\3gp\shell\open\command\r
+  ${DeleteRegKeyAuth} HKCR GPAC\3gp\r
+  ${DeleteRegKeyAuth} HKCR .3gp\r
+  ${DeleteRegKeyAuth} HKCR GPAC\3g2\DefaultIcon\r
+  ${DeleteRegKeyAuth} HKCR GPAC\3g2\shell\open\command\r
+  ${DeleteRegKeyAuth} HKCR GPAC\3g2\r
+  ${DeleteRegKeyAuth} HKCR .3g2\r
+  ${DeleteRegKeyAuth} HKCR GPAC\r
+\r
+  UnRegDLL "$INSTDIR\GPAX.dll"\r
+  RMDir /r $INSTDIR\r
+  Push $INSTDIR\r
+  Call un.RemoveFromPath\r
+  #has current user admin privileges?\r
+  userInfo::getAccountType\r
+  Pop $0\r
+  StrCmp $0 "Admin" +1 +2\r
+  SetShellVarContext all\r
+  Delete "$SMPROGRAMS\Osmo4\*.*"\r
+  RMDir "$SMPROGRAMS\Osmo4"\r
+  Delete "$QUICKLAUNCH\Osmo4.lnk"\r
+  Delete "$DESKTOP\Osmo4.lnk"\r
+\r
+SectionEnd\r
+\r
+;path modif functions\r
+!verbose 3\r
+!include "WinMessages.NSH"\r
+!verbose 4\r
 \r
 !ifndef WriteEnvStr_RegKey\r
   !ifdef ALL_USERS\r
@@ -665,12 +665,12 @@ SectionEnd
   !else\r
     !define WriteEnvStr_RegKey 'HKCU "Environment"'\r
   !endif\r
-!endif
-
-; AddToPath - Adds the given dir to the search path.
-;        Input - head of the stack
-;        Note - Win9x systems requires reboot
-
+!endif\r
+\r
+; AddToPath - Adds the given dir to the search path.\r
+;        Input - head of the stack\r
+;        Note - Win9x systems requires reboot\r
+\r
 Function AddToPath\r
   Exch $0\r
   Push $1\r
@@ -734,11 +734,11 @@ Function AddToPath
     Pop $2\r
     Pop $1\r
     Pop $0\r
-FunctionEnd
-
-; RemoveFromPath - Remove a given dir from the path
-;     Input: head of the stack
-
+FunctionEnd\r
+\r
+; RemoveFromPath - Remove a given dir from the path\r
+;     Input: head of the stack\r
+\r
 Function un.RemoveFromPath\r
   Exch $0\r
   Push $1\r
@@ -820,21 +820,21 @@ Function un.RemoveFromPath
     Pop $2\r
     Pop $1\r
     Pop $0\r
-FunctionEnd
-
-###########################################
-#            Utility Functions            #
-###########################################
-
-; IsNT
-; no input
-; output, top of the stack = 1 if NT or 0 if not
-;
-; Usage:
-;   Call IsNT
-;   Pop $R0
-;  ($R0 at this point is 1 or 0)
-
+FunctionEnd\r
+\r
+###########################################\r
+#            Utility Functions            #\r
+###########################################\r
+\r
+; IsNT\r
+; no input\r
+; output, top of the stack = 1 if NT or 0 if not\r
+;\r
+; Usage:\r
+;   Call IsNT\r
+;   Pop $R0\r
+;  ($R0 at this point is 1 or 0)\r
+\r
 !macro IsNT un\r
 Function ${un}IsNT\r
   Push $0\r
@@ -849,24 +849,24 @@ Function ${un}IsNT
     ; NT!!!\r
     Pop $0\r
     Push 1\r
-FunctionEnd
-!macroend
-!insertmacro IsNT ""
-!insertmacro IsNT "un."
-
-; StrStr
-; input, top of stack = string to search for
-;        top of stack-1 = string to search in
-; output, top of stack (replaces with the portion of the string remaining)
-; modifies no other variables.
-;
-; Usage:
-;   Push "this is a long ass string"
-;   Push "ass"
-;   Call StrStr
-;   Pop $R0
-;  ($R0 at this point is "ass string")
-
+FunctionEnd\r
+!macroend\r
+!insertmacro IsNT ""\r
+!insertmacro IsNT "un."\r
+\r
+; StrStr\r
+; input, top of stack = string to search for\r
+;        top of stack-1 = string to search in\r
+; output, top of stack (replaces with the portion of the string remaining)\r
+; modifies no other variables.\r
+;\r
+; Usage:\r
+;   Push "this is a long ass string"\r
+;   Push "ass"\r
+;   Call StrStr\r
+;   Pop $R0\r
+;  ($R0 at this point is "ass string")\r
+\r
 !macro StrStr un\r
 Function ${un}StrStr\r
 Exch $R1 ; st=haystack,old$R1, $R1=needle\r
@@ -898,4 +898,4 @@ done:
 FunctionEnd\r
 !macroend\r
 !insertmacro StrStr ""\r
-!insertmacro StrStr "un."
+!insertmacro StrStr "un."\r
index 3b0f3a02c5c6982b113ac8d6a02ab1e2e836cef6..2da22e100f1b6d3b673563e0d855f7027157b5a9 100755 (executable)
--- a/configure
+++ b/configure
@@ -101,7 +101,6 @@ has_ipv6="no"
 has_dvb4linux="no"
 has_xmlrpc="no"
 has_openjpeg="no"
-has_libxml2="no"
 gprof_build="no"
 static_build="no"
 want_pic="no"
@@ -117,7 +116,9 @@ disable_od="no"
 disable_bifs="no"
 disable_bifs_enc="no"
 disable_laser="no"
-disable_beng="no"
+disable_saf="no"
+disable_smgr="no"
+disable_seng="no"
 disable_qtvr="no"
 disable_avi="no"
 disable_m2ps="no"
@@ -143,6 +144,11 @@ disable_isoff_frag="no"
 disable_isoff_hint="no"
 disable_isoff_frag="no"
 disable_streaming="no"
+disable_player="no"
+disable_scenegraph="no"
+disable_dvbx="no"
+disable_vobsub="no"
+disable_ttxt="no"
 enable_depth_compositor="no"
 enable_renoir="no"
 has_avcap="no"
@@ -243,7 +249,8 @@ Configuration options for libgpac - all options can be enabled with --enable-opt
   --disable-bifs           disable BIFS
   --disable-bifs-enc       disable BIFS coder
   --disable-laser          disable LASeR coder
-  --disable-beng           disable scene encoder engine
+  --disable-saf            disable SAF container
+  --disable-seng           disable scene encoder engine
   --disable-qtvr           disable import of Cubic QTVR files
   --disable-avi            disable AVI
   --disable-ogg            disable OGG
@@ -269,6 +276,12 @@ Configuration options for libgpac - all options can be enabled with --enable-opt
   --disable-isoff-hint     disable ISO File Format hinting
   --disable-isoff-frag     disable fragments in ISO File Format
   --disable-streaming      disable RTP/RTSP/SDP
+  --disable-dvb            disable DVB-specific tools (MPE, FEC, DSM-CC)
+  --disable-vobsub         disable VobSub support
+  --disable-sman           disable scene manager
+  --disable-ttxt           disable TTXT (3GPP / MPEG-4 Timed Text) support
+  --disable-player         disable player (terminal and compositor)
+  --disable-scenegraph     disable scenegraph, scene parsers and player (terminal and compositor)
 
 Extra libraries configuration. You can turn a libray off or force using the local version in gpac/extra_lib/
   --use-js=OPT             force SpiderMonkey ECMAScript OPT=[no,local]
@@ -1418,18 +1431,6 @@ EOF
 fi
 #end wx test
 
-#if svg isn't disabled
-if test "$disable_svg" != "yes"; then
-    #then check libxm2 presence via pkg-config
-    if $pkg_config libxml-2.0 --exists > /dev/null 2>&1  ; then
-        libxml2_cflags=`$pkg_config libxml-2.0 --cflags`
-        libxml2_lib_flags=`$pkg_config libxml-2.0 --libs`
-        has_libxml2="yes"
-    fi
-fi
-
-
-
 #look for IPv6
 cat > $TMPC << EOF
 #include <sys/types.h>
@@ -1697,7 +1698,7 @@ for opt do
         --enable-pulseaudio=*) has_pulseaudio="yes"
             ;;
 
-        --disable-all) has_pulseaudio="no"; has_alsa="no"; disable_3d="yes"; disable_svg="yes"; disable_vrml="yes"; disable_od="yes"; disable_bifs="yes"; disable_bifs_enc="yes"; disable_laser="yes"; disable_beng="yes"; disable_qtvr="yes";  disable_avi="yes"; disable_ogg="yes"; disable_m2ps="yes"; disable_m2ts="yes"; disable_m2ts_mux="yes"; disable_parsers="yes"; disable_import="yes"; disable_export="yes"; disable_swf="yes"; disable_scene_stats="yes"; disable_scene_dump="yes"; disable_scene_encode="yes"; disable_loader_isoff="yes"; disable_od_dump="yes"; disable_isom_dump="yes"; disable_mcrypt="yes"; disable_isoff="yes"; disable_isoff_write="yes"; disable_isoff_hint="yes"; disable_isoff_frag="yes"; disable_streaming="yes"; disable_x3d="yes"; disable_loader_bt="yes"; disable_loader_xmt="yes"; has_dvb4linux="no"
+        --disable-all) has_pulseaudio="no"; has_alsa="no"; disable_3d="yes"; disable_svg="yes"; disable_vrml="yes"; disable_od="yes"; disable_bifs="yes"; disable_bifs_enc="yes"; disable_laser="yes"; disable_seng="yes"; disable_qtvr="yes";  disable_avi="yes"; disable_ogg="yes"; disable_m2ps="yes"; disable_m2ts="yes"; disable_m2ts_mux="yes"; disable_parsers="yes"; disable_import="yes"; disable_export="yes"; disable_swf="yes"; disable_scene_stats="yes"; disable_scene_dump="yes"; disable_scene_encode="yes"; disable_loader_isoff="yes"; disable_od_dump="yes"; disable_isom_dump="yes"; disable_mcrypt="yes"; disable_isoff="yes"; disable_isoff_write="yes"; disable_isoff_hint="yes"; disable_isoff_frag="yes"; disable_streaming="yes"; disable_x3d="yes"; disable_loader_bt="yes"; disable_loader_xmt="yes"; has_dvb4linux="no"; disable_player="yes"; disable_vobsub="yes"; disable_ttxt="yes"; disable_saf="yes"; disable_smgr="yes"
             ;;
 
         --disable-3d) disable_3d="yes"
@@ -1732,9 +1733,9 @@ for opt do
             ;;
         --enable-laser) disable_laser="no"
             ;;
-        --disable-beng) disable_beng="yes"
+        --disable-seng) disable_seng="yes"
             ;;
-        --enable-beng) disable_beng="no"
+        --enable-seng) disable_seng="no"
             ;;
         --disable-qtvr) disable_qtvr="yes"
             ;;
@@ -1834,7 +1835,34 @@ for opt do
             ;;
         --enable-streaming) disable_streaming="no"
             ;; 
-
+        --disable-player) disable_player="yes"
+            ;;
+        --enable-player) disable_player="no"
+            ;; 
+        --disable-scenegraph) disable_scenegraph="yes"
+            ;;
+        --enable-scenegraph) disable_scenegraph="no"
+            ;; 
+        --disable-dvbx) disable_dvbx="yes"
+            ;;
+        --enable-dvbx) disable_dvbx="no"
+            ;; 
+        --disable-vobsub) disable_vobsub="yes"
+            ;;
+        --enable-vobsub) disable_vobsub="no"
+            ;; 
+        --disable-ttxt) disable_ttxt="yes"
+            ;;
+        --enable-ttxt) disable_ttxt="no"
+            ;; 
+        --disable-saf) disable_saf="yes"
+            ;;
+        --enable-saf) disable_saf="no"
+            ;; 
+        --disable-smgr) disable_smgr="yes"
+            ;;
+        --enable-smgr) disable_smgr="no"
+            ;; 
 
     esac
 done
@@ -2065,7 +2093,27 @@ if test "$cpu" = "sh4"; then
     fi
 fi
 
-
+if test "$disable_scenegraph" = "yes" ; then
+disable_3d="yes"
+disable_svg="yes"
+disable_vrml="yes"
+disable_x3d="yes"
+disable_od="no"
+disable_bifs="yes"
+disable_bifs_enc="yes"
+disable_laser="yes"
+disable_seng="yes"
+disable_qtvr="yes"
+disable_swf="yes"
+disable_scene_stats="yes"
+disable_scene_dump="yes"
+disable_scene_encode="yes"
+disable_loader_isoff="yes"
+disable_loader_bt="yes"
+disable_loader_xmt="yes"
+disable_streaming="yes"
+disable_player="yes"
+fi
 
 #prepare for config.h writing
 TMPH="${TMPDIR1}/gpac-conf-${RANDOM}-$$-${RANDOM}.h"
@@ -2080,12 +2128,16 @@ version_minor=`grep '#define GPAC_VERSION_MINOR ' $source_path/include/gpac/tool
 version_micro=`grep '#define GPAC_VERSION_MICRO ' $source_path/include/gpac/tools.h | sed -e 's/.*\([0-9]\)\+$/\1/'`
 soname_version="${version_major}.${version_minor}.${version_micro}"
 
-if which svnversion >/dev/null
-then
+if [ -d ".svn" ]; then
+ if which svnversion >/dev/null
+ then
     revision="`svnversion \"$source_path\"`"
     echo "#define GPAC_SVN_REVISION    \"$revision\"" > $source_path/include/gpac/version.h
-else
+ else
     echo "Cannot find SVN revision"
+ fi
+else
+    echo "#define GPAC_SVN_REVISION    \"4065\"" > $source_path/include/gpac/version.h
 fi
 
 echo ""
@@ -2111,9 +2163,29 @@ echo "fixed-point version: $use_fixed_point"
 echo "IPV6 Support: $has_ipv6"
 
 
+if test "$disable_player" = "yes" ; then
+    echo "Player disabled"
+    echo "#define GPAC_DISABLE_PLAYER" >> $TMPH
+    disable_laser="yes"
+fi
+if test "$disable_smgr" = "yes" ; then
+disable_seng="yes"
+disable_qtvr="yes"
+disable_swf="yes"
+disable_scene_stats="yes"
+disable_scene_dump="yes"
+disable_scene_encode="yes"
+disable_loader_isoff="yes"
+disable_loader_bt="yes"
+disable_loader_xmt="yes"
+disable_svg="yes"
+    echo "Scene Manager disabled"
+    echo "#define GPAC_DISABLE_SMGR" >> $TMPH
+fi
 if test "$disable_svg" = "yes" ; then
     echo "SVG disabled"
     echo "#define GPAC_DISABLE_SVG" >> $TMPH
+    disable_laser="yes"
 fi
 if test "$disable_vrml" = "yes" ; then
     echo "MPEG-4/VRML/X3D disabled"
@@ -2139,7 +2211,11 @@ if test "$disable_laser" = "yes" ; then
     echo "LASeR coder disabled"
     echo "#define GPAC_DISABLE_LASER" >> $TMPH
 fi
-if test "$disable_beng" = "yes" ; then
+if test "$disable_saf" = "yes" ; then
+    echo "SAF container disabled"
+    echo "#define GPAC_DISABLE_SAF" >> $TMPH
+fi
+if test "$disable_seng" = "yes" ; then
     echo "Scene encoder engine disabled"
     echo "#define GPAC_DISABLE_SENG" >> $TMPH
 fi
@@ -2239,6 +2315,19 @@ if test "$disable_streaming" = "yes" ; then
     echo "RTP/RTSP/SDP streaming disabled"
     echo "#define GPAC_DISABLE_STREAMING" >> $TMPH
 fi
+if test "$disable_dvbx" = "yes" ; then
+    echo "DVB MPE and DSM-CC disabled"
+    echo "#define GPAC_DISABLE_MPE" >> $TMPH
+    echo "#define GPAC_DISABLE_DSMCC" >> $TMPH
+fi
+if test "$disable_vobsub" = "yes" ; then
+    echo "VobSub disabled"
+    echo "#define GPAC_DISABLE_VOBSUB" >> $TMPH
+fi
+if test "$disable_ttxt" = "yes" ; then
+    echo "TimedText disabled"
+    echo "#define GPAC_DISABLE_TTXT" >> $TMPH
+fi
 
 if test "$enable_depth_compositor" = "yes" ; then
     echo "Depth Compositor enabled"
@@ -2529,13 +2618,32 @@ then
     echo "FREENECT_LDLAGS=$freenect_ld" >> config.mak
 fi
 
+echo "DISABLE_PLAYER=$disable_player" >> config.mak
+echo "DISABLE_STREAMING=$disable_streaming" >> config.mak
 echo "DISABLE_SVG=$disable_svg" >> config.mak
+echo "DISABLE_LASER=$disable_laser" >> config.mak
+echo "DISABLE_SAF=$disable_saf" >> config.mak
+echo "DISABLE_BIFS=$disable_bifs" >> config.mak
+echo "DISABLE_SENG=$disable_seng" >> config.mak
+echo "DISABLE_LOADER_ISOFF=$disable_loader_isoff" >> config.mak
 echo "DISABLE_LOADER_BT=$disable_loader_bt" >> config.mak
-echo "HAS_LIBXML2=$has_libxml2" >> config.mak
-if test "$has_libxml2" = "yes"; then
-    echo "XML2_CFLAGS=$libxml2_cflags" >> config.mak
-    echo "XML2_LIBS=$libxml2_lib_flags" >> config.mak
-fi
+echo "DISABLE_LOADER_XMT=$disable_loader_xmt" >> config.mak
+echo "DISABLE_LOADER_QTVR=$disable_qtvr" >> config.mak
+echo "DISABLE_LOADER_SWF=$disable_swf" >> config.mak
+echo "DISABLE_SCENE_STATS=$disable_scene_stats" >> config.mak
+echo "DISABLE_SCENE_DUMP=$disable_scene_dump" >> config.mak
+echo "DISABLE_SCENE_ENCODE=$disable_scene_encode" >> config.mak
+echo "DISABLE_SCENEGRAPH=$disable_scenegraph" >> config.mak
+echo "DISABLE_MCRYPT=$disable_mcrypt" >> config.mak
+echo "DISABLE_DVBX=$disable_dvbx" >> config.mak
+echo "DISABLE_AVILIB=$disable_avi" >> config.mak
+echo "DISABLE_M2PS=$disable_m2ps" >> config.mak
+echo "DISABLE_OGG=$disable_ogg" >> config.mak
+echo "DISABLE_ISOFF_HINT=$disable_isoff_hint" >> config.mak
+echo "DISABLE_VOBSUB=$disable_vobsub" >> config.mak
+echo "DISABLE_TTXT=$disable_ttxt" >> config.mak
+echo "DISABLE_SMGR=$disable_smgr" >> config.mak
+
 if test "$disable_parsers" = "yes" ; then
     disable_m2ts_mux="yes"
 fi
@@ -2544,9 +2652,7 @@ if test "$disable_m2ts_mux" = "yes" -o "$disable_m2ts" = "yes" ; then
 else
     echo "DISABLE_M2TS=no" >> config.mak
 fi
-if test "$disable_beng" = "no"; then
-    echo "DISABLE_SENG=no" >> config.mak
-fi
+
 
 echo "GPAC_USE_TINYGL=$has_tinygl" >> config.mak
 echo "OGL_INCLS=$INCL3D" >> config.mak
index 817770b2cd648fb55ceb8edfb720a32292520823..10ea0726385f1b5571ece395dd7a5fce640df8b0 100644 (file)
Binary files a/doc/GPAC UPnP.doc and b/doc/GPAC UPnP.doc differ
index 7026a5e2d6a3eb71e3e497173edf32c8506360f0..a3517ccd8d6cd701b3100835d2608096417e0701 100644 (file)
@@ -1,4 +1,4 @@
-Installation instructions for GPAC 0.4.5 on GCC-powered platforms
+Installation instructions for GPAC on GCC-powered platforms
 last modified: December 2008
 
 0 Foreword
index b767b32477c09223be1f81fa46b3b62485b98766..84169cb8cd518b41c726eba338ad40f0d3007e83 100644 (file)
@@ -1,4 +1,4 @@
-Installation instructions for GPAC 0.4.5 on Familiar+GPE platforms
+Installation instructions for GPAC on Familiar+GPE platforms
 last modified: December 2008
 
 0 Foreword
index 0f77545dce39957c695d581f3d0520464588a9f5..3918cd51d7334be95bab114b6bdf2f093272a06a 100644 (file)
@@ -2,6 +2,8 @@ Installation instructions for GPAC 0.4.5 on Symbian 9.1 (S60 3rd Edition) platfo
 last modified: December 2008
 
 0 Foreword
+    ! GPAC versions later than 0.4.5 are no longer supported on Symbian ! 
+    
        Compilation has only been tested with GCCE & Nokia S60 SDK
        In order to fully compile, you must get:
   - the complete S60 3rd edition SDK (maintainance release) 
index 0b2b5890399571b04a46a0bf771818e3401ea0d1..21411fbc7ab63805e9c4aebfbab4cafc23422c33 100644 (file)
@@ -1,12 +1,12 @@
-Installation instructions for GPAC 0.4.5 on windows platform
-last modified: December 2008
+Installation instructions for GPAC on windows platform
+last modified: May 2012
 
 0 Foreword
-       Compilation has only been tested with MSVC 6 and VS2005 (VC8). 
+       For any question on the installation procedure, please refer to http://gpac.sourceforge.net/home_download.php
 
        The output directory for all plugins and applications is
-               gpac/bin/w32_deb in debug mode
-               gpac/bin/w32_rel in release mode
+               gpac/bin/win32/debug in debug mode
+               gpac/bin/win32/release in release mode
        
        As of 0.2.2, GPAC cannot be compiled without ZLIB. You'd better make sure it is installed locally or on your system (zlib is provided in gpac_extra_libs package)
        
@@ -19,7 +19,8 @@ II GPAC compilation
 
        open the GPAC workspace: 
     gpac/build/msvc6/GPAC.dsw with MSVC6
-    gpac/build/msvc8/gpac.sln with VS2005
+    gpac/build/msvc8/gpac.sln with VS2005 
+    gpac/build/msvc9/gpac.sln with VS2008
        
        NEVER ATTEMPT TO LOAD A PROJECT OUTSIDE THIS WORKSPACE, AS DEPENDENCY RULES WILL BE BROKEN
        
index 619e4f29dec638c85f8ec55ec51cd65dccdae2d8..e308319bfc7e9fbce656cbf658a792fb2081f426 100644 (file)
@@ -1,5 +1,5 @@
-Installation instructions for GPAC 0.4.5 on windows CE platform
-last modified: Mai 2007
+Installation instructions for GPAC on windows CE platform
+last modified: Mai 2012
 
 0 Foreword
   
@@ -7,12 +7,12 @@ last modified: Mai 2007
   
        Compilation has only been tested with evc4 and ARM platforms
        
-       GPAC 0.4.5 should be stable on most devices running PocketPC/SmartPhone 2003. It has know bugs with higher versions
+       GPAC should be stable on most devices running PocketPC/SmartPhone 2003. It has know bugs with higher versions
        of the Windows Mobile OS, but should still be stable.
 
        The output directory for all plugins and applications for Windows PocketPC 2003 is
-               gpac/bin/arm_ppc03_deb in debug mode
-               gpac/bin/arm_ppc03_rel in release mode
+               gpac/bin/Smartphone 2003/Debug in debug mode
+               gpac/bin/Smartphone 2003/Release in release mode
        
        As of 0.2.2, GPAC cannot be compiled without ZLIB. You'd better make sure it is installed locally or on your system (zlib is provided in gpac_extra_libs package)
        
@@ -22,7 +22,8 @@ I Extra lib installation
 
 
 II GPAC compilation
-       open /build/msevc4/GPAC.dsw (GPAC workspace) with MS eVC4
+       open /build/msvc8/gpac.sln (GPAC workspace) with MSVC 2005
+       open /build/msvc9/gpac.sln (GPAC workspace) with MSVC 2008
        
        NEVER ATTEMPT TO LOAD A PROJECT OUTSIDE THIS WORKSPACE
        
index 54f255f7d70c333d2dec2e4fb74d22c219d6c7fc..72965814c2ffc17a1134e507b54024d209ade413 100644 (file)
@@ -1,4 +1,4 @@
-Codes used in GPAC are according to ISO/IEC 639-2/T as of GPAC 0.4.6-DEV internal rev. 6
+Codes used in GPAC are according to ISO/IEC 639-2/T 
 
        "Abkhazian","abk","ab",
        "Achinese","ace","",
index b87b7e463754134ed6b07b356cf534abab7b2e96..019f6c69c363349167d0bd7fed91ceb72dd5d701 100644 (file)
Binary files a/doc/configuration.html and b/doc/configuration.html differ
index 0dc2d7bafb815fdde020f04f6d525dbd28bb073e..d545a45c227cfec7ed2bf4444e2bd54c59ce5a5b 100644 (file)
@@ -4,7 +4,7 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 PROJECT_NAME           = libgpac
-PROJECT_NUMBER         = 0.4.5
+PROJECT_NUMBER         = 0.5.0
 OUTPUT_DIRECTORY       = .
 CREATE_SUBDIRS         = NO
 OUTPUT_LANGUAGE        = English
index 5befdc09852def1088ad38c6200cd4a6043284f3..15254f202d928f59bdb1170d97b04533c8f8ceea 100644 (file)
@@ -1,4 +1,4 @@
-.TH "GPAC" 1 "December 2006" "GPAC Configuration" "GPAC Configuration"
+.TH "GPAC" 1 "May 2012" "GPAC Configuration" "GPAC Configuration"
 .
 .SH NAME
 .LP
@@ -6,7 +6,7 @@ GPAC    \- MPEG-4 Systems Framework and Software Development Kit
 .SH "DESCRIPTION"
 .LP
 GPAC stands (does it ?) for GPAC Project on Advanced Content. It is an implementation of the MPEG-4 Systems standard written in ANSI C. GPAC provides tools for media playback, vector graphics and 3D rendering, MPEG-4 authoring and distribution.
-This man page is about configuration of the GPAC framework version 0.4.5.
+This man page is about configuration of the GPAC framework version 0.5.0.
 .
 .SH INTRODUCTION
 Some applications in the GPAC framework use a configuration file shared among modules and reloadable at run time. This file is located in the user home directory and called ".gpacrc".
index 7d98972219269680f6481f691bf84c4dea73a31f..88a620cf0bafb46641a0042f430ab26a5b3b640c 100644 (file)
--- a/gpac.spec
+++ b/gpac.spec
@@ -1,11 +1,11 @@
 # $Id: gpac.spec,v 1.5 2008-12-02 18:04:42 jeanlf Exp $
 Summary: GPAC is a multimedia framework covering MPEG-4, VRML/X3D and SVG.
 Name: gpac
-Version: 0.4.5
-Release: DEV
+Version: 0.5.0
+Release: 0.5.0
 License: LGPL
 Group: Applications/Multimedia
-Source0: gpac-0.4.5.tar.gz%{?_with_amr:Source1:http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-700.zip}
+Source0: gpac-0.5.0.tar.gz%{?_with_amr:Source1:http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-700.zip}
 URL: http://gpac.sourceforge.net/
 BuildRoot: %{_tmppath}/%{name}-root
 Requires: SDL
@@ -36,19 +36,18 @@ standard (ISO/IEC 14496-1) developed from scratch in C.
 The main development goal is to provide a clean (a.k.a. readable by as many
 people as possible), small and flexible alternative to the MPEG-4 Systems 
 reference software (known as IM1 and distributed in ISO/IEC 14496-5). 
+GPAC covers a very large part of the MPEG-4 standard, and features what can probably 
+be seen as the most advanced and robust 2D MPEG-4 Player available worldwide, as well as 
+a decent 3D MPEG-4/VRML player.
 
 The second development goal is to achieve integration of recent multimedia 
-standards (SVG/SMIL, VRML, X3D, SWF, etc) into a single framework. 
-GPAC already supports most of VRML97 and SVG Tiny 1.2, as well as some X3D and simple SWF support.
-
-GPAC already features 2D and 3D multimedia playback, MPEG-4 Systems 
-encoders/multiplexers and publishing tools for content distribution.
+standards for content playback (SVG/SMIL, VRML, X3D, SWF, etc) and content delivery into a single framework.
+GPAC features 2D and 3D multimedia playback, MPEG-4 Systems (BIFS and LASeR) encoders, multiplexers and 
+publishing tools for content distribution, such as RTP streamers, MPEG-2 TS muxers, ISO Base Media File (MP4 & 3GP a.k.a. ISO/IEC 14496-12) 
+and MPEG DASH muxers.
 
 GPAC is licensed under the GNU Lesser General Public License.
 
-The current GPAC release (0.4.5) already covers a very large part of the MPEG-4 standard,
-and features what can probably be seen as the most advanced and robust 2D MPEG-4 
-Player available worldwide, as well as a decent 3D MPEG-4/VRML player.
 
 Available rpmbuild rebuild options :
 --without : js freetype faad a52 jpeg png mad xvid ffmpeg
index 9b681e327318f25a31a216d321043ed66f95acf2..6518c83d4125714610f708f6e479a62eb4be27c4 100644 (file)
@@ -156,37 +156,6 @@ u32 gf_crypt_str_get_algo_supported_key_sizes(const char *algorithm, int *keys);
 #endif /*GPAC_DISABLE_MCRYPT*/
 
 
-/*SHA1 from Christophe Devine*/
-typedef struct
-{
-    u32 total[2];
-    u32 state[5];
-    u8 buffer[64];
-} GF_SHA1Context;
-
-/*
- * Core SHA-1 functions
- */
-void gf_sha1_starts(GF_SHA1Context *ctx );
-void gf_sha1_update(GF_SHA1Context *ctx, u8 *input, u32 length);
-void gf_sha1_finish(GF_SHA1Context *ctx, u8 digest[20] );
-
-/*
- * Output SHA-1(file contents), returns 0 if successful.
- */
-int gf_sha1_file(const char *filename, u8 digest[20]);
-
-/*
- * Output SHA-1(buf)
- */
-void gf_sha1_csum(u8 *buf, u32 buflen, u8 digest[20]);
-
-/*
- * Output HMAC-SHA-1(key,buf)
- */
-void gf_sha1_hmac(u8 *key, u32 keylen, u8 *buf, u32 buflen, u8 digest[20]);
-
-
 #ifdef __cplusplus
 }
 #endif
index e07aae306d19fe327dd3cfc1fada62a622ffc819..e83ccccba70e169d4d3f83404d8505e468ce9457 100644 (file)
@@ -26,7 +26,7 @@
 /*
        DO NOT MOFIFY - File generated on GMT Tue Nov 08 09:10:57 2011
 
-       BY MPEG4Gen for GPAC Version 0.4.6-DEV
+       BY MPEG4Gen for GPAC Version 0.5.0
 */
 
 #ifndef _NDT_H
index ef3cea0dbcdcb0756cfcd64d5ccf4f25dbf30335..5ab1422a08e74dbea85e45c2ff53279a72543dd8 100644 (file)
@@ -167,6 +167,9 @@ struct __tag_compositor
        /*compositor exclusive access to the scene and display*/
        GF_Mutex *mx;
 
+       /*list of modules containing hardcoded proto implementations*/
+       GF_List *proto_modules;
+
        /*the main scene graph*/
        GF_SceneGraph *scene;
        /*extra scene graphs (OSD, etc), always registered in draw order. That's the module responsability
index d8709e45fd2ab807cb2bc2dc9e01a66bab374e6f..320e4013d41e4eef4a887aeb53db090ce29a6d7f 100644 (file)
@@ -1,7 +1,8 @@
 /**
  *                     GPAC - Multimedia Framework C SDK
  *
- *                     Copyright (c) Jean Le Feuvre 2000-2005
+ *                                     Authors: Pierre Souchay
+ *                     Copyright (c) Telecom ParisTech 2010-2012
  *                                     All rights reserved
  *
  *  This file is part of GPAC
@@ -19,7 +20,6 @@
  *  You should have received a copy of the GNU Lesser General Public
  *  License along with this library; see the file COPYING.  If not, write to
  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- *  Written by Pierre Souchay for VizionR SAS
  *
  */
 #ifndef M3U8_PLAYLIST_H
index c6c4b267bf4f8e5d68828419ed99498d9692127e..956426d621d4795e5e8d6e794041bd32633ff027 100644 (file)
 #define _GF_MEDIA_DEV_H_
 
 #include <gpac/media_tools.h>
+
+#ifndef GPAC_DISABLE_STREAMING
 #include <gpac/ietf.h>
+#endif
 
 #ifndef GPAC_DISABLE_ISOM
 void gf_media_get_sample_average_infos(GF_ISOFile *file, u32 Track, u32 *avgSize, u32 *MaxSize, u32 *TimeDelta, u32 *maxCTSDelta, u32 *const_duration, u32 *bandwidth);
index 2b82d98d0ed1a6f9d7cf9f22b19688ed39a0a075..a723b14e2a52138d990fa6841fd77097bccd37e9 100644 (file)
@@ -27,6 +27,7 @@
 #define _GF_VOBSUB_H_
 
 #include <gpac/tools.h>
+#include <gpac/list.h>
 
 #ifdef __cplusplus
 extern "C" {
index 270b2996934b6f51fec7507df52a73e822114cad..dac6e4791f899799f5f643e0acf1e7bdf5f831de 100644 (file)
@@ -37,9 +37,6 @@ GF_Err gf_ismacryp_gpac_get_info(u32 stream_id, char *drm_file, char *key, char
 
 /*loads key and salt for MPEG4IP protected files*/
 Bool gf_ismacryp_mpeg4ip_get_info(char *kms_uri, char *key, char *salt);
-
-/*computes file hash. If file is ISO-based, computre hash according to OMA (P)DCF (without MutableDRMInformation box)*/
-GF_Err gf_media_get_file_hash(const char *file, u8 hash[20]);
        
 enum
 {
index bd3b2a828d5fc4bcbc723fd517dcd442756ee2ba..b2fe23661464c28dd06af948e6c5adc108292849 100644 (file)
@@ -33,6 +33,8 @@ extern "C" {
 #include <gpac/isomedia.h>
 #include <gpac/avparse.h>
 
+/*computes file hash. If file is ISO-based, computre hash according to OMA (P)DCF (without MutableDRMInformation box)*/
+GF_Err gf_media_get_file_hash(const char *file, u8 hash[20]);
 
 #ifndef GPAC_DISABLE_ISOM
 /*creates (if needed) a GF_ESD for the given track - THIS IS RESERVED for local playback
diff --git a/include/gpac/modules/hardcoded_proto.h b/include/gpac/modules/hardcoded_proto.h
new file mode 100644 (file)
index 0000000..10f0f15
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ *                     GPAC - Multimedia Framework C SDK
+ *
+ *                     Authors: Ivica Arsov, Jean Le Feuvre
+ *                     Copyright (c) Telecom ParisTech 2012
+ *                                     All rights reserved
+ *
+ *  This file is part of GPAC / modules interfaces
+ *
+ *  GPAC 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, or (at your option)
+ *  any later version.
+ *   
+ *  GPAC 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 Lesser General Public License for more details.
+ *   
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; see the file COPYING.  If not, write to
+ *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
+ *
+ */
+
+
+#ifndef _GF_MODULE_PROTO_MOD_H_
+#define _GF_MODULE_PROTO_MOD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <gpac/module.h>
+#include <gpac/scenegraph.h>
+#include <gpac/compositor.h>
+
+/*interface name and version for Built-in proto User Extensions*/
+#define GF_HARDCODED_PROTO_INTERFACE           GF_4CC('G','H','P', '1')
+
+typedef struct _hc_proto_mod
+{
+       /* interface declaration*/
+       GF_DECL_MODULE_INTERFACE
+
+       /*load hardcoded proto
+        compositor: compositor used for loading
+        node: proto node to be loaded
+       */
+       Bool (*init)(GF_Compositor* compositor, GF_Node* node);
+
+       /*check if the module can load a proto
+        url: url to check
+       */
+       Bool (*can_load_proto)(const char* url);
+
+       /*module private*/
+       void *udta;
+} GF_HardcodedProto;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /*#define _GF_MODULE_PROTO_MOD_H_*/
+
index 542d5635dfb4352d04b39c462444d1ada201c461..9bc55da0286e9f1fa2598f0da02b94dc1138eee6 100644 (file)
@@ -1117,8 +1117,7 @@ GF_Err gf_m2ts_program_stream_update_ts_scale(GF_ESInterface *_self, u32 time_sc
 #endif /*GPAC_DISABLE_MPEG2TS_MUX*/
 
 /******************* Demux DVB ****************************/
-#include <gpac/ait.h>
-#include <gpac/dsmcc.h>
+
 
 #define UDP_BUFFER_SIZE        0x40000
 #define M2TS_BUFFER_MAX 400
index 7652b0f3068f3956ea6bfa61da3d71d28d11926f..5520c08432beb54eff097e93abccbde84784528f 100644 (file)
@@ -26,7 +26,7 @@
 /*
        DO NOT MOFIFY - File generated on GMT Tue Nov 08 09:10:57 2011
 
-       BY MPEG4Gen for GPAC Version 0.4.6-DEV
+       BY MPEG4Gen for GPAC Version 0.5.0
 */
 
 #ifndef _nodes_mpeg4_H
index e81579c86c7eda2588d2f12b0139818372ef99f1..b3a1fc1c4093e51e84f4a5755fb5141c432af7c6 100644 (file)
@@ -26,7 +26,7 @@
 /*
        DO NOT MOFIFY - File generated on GMT Fri Jul 31 16:39:50 2009
 
-       BY X3DGen for GPAC Version 0.4.6-DEV
+       BY X3DGen for GPAC Version 0.5.0
 */
 
 #ifndef _GF_X3D_NODES_H
index 7f742234869c593146c8a261c297420262de46a3..f4e50d30b62ea329b7e0a174845cfe4fc78bb50b 100644 (file)
@@ -61,7 +61,7 @@ extern "C" {
  * NO SPACE in GPAC_VERSION for proper install
  * SONAME versions must be digits (not strings)
  */
-#define GPAC_VERSION          "0.4.6-DEV"
+#define GPAC_VERSION          "0.5.0"
 #define GPAC_VERSION_MAJOR    2
 #define GPAC_VERSION_MINOR    0
 #define GPAC_VERSION_MICRO    0
@@ -831,6 +831,27 @@ GF_Err gf_gz_compress_payload(char **data, u32 data_len, u32 *out_size);
 GF_Err gf_gz_decompress_payload(char *data, u32 data_len, char **uncompressed_data, u32 *out_size);
 
 
+/*SHA1*/
+typedef struct __sha1_context GF_SHA1Context;
+
+/*
+ * Core SHA-1 functions
+ */
+GF_SHA1Context *gf_sha1_starts();
+void gf_sha1_update(GF_SHA1Context *ctx, u8 *input, u32 length);
+void gf_sha1_finish(GF_SHA1Context *ctx, u8 digest[20] );
+
+/*
+ * Output SHA-1(file contents), returns 0 if successful.
+ */
+int gf_sha1_file(const char *filename, u8 digest[20]);
+
+/*
+ * Output SHA-1(buf)
+ */
+void gf_sha1_csum(u8 *buf, u32 buflen, u8 digest[20]);
+
+
 #ifdef GPAC_ANDROID
 typedef void (*fm_callback_func)(void *cbk_obj, u32 type, u32 param, int *value);
 extern void gf_fm_request_set_callback(void *cbk_obj, fm_callback_func cbk_func);
index 5de07db72a6f2d8b09527f56b49d173719c139fc..7e313c2d0b04d5db2c5a01f8e904a6f40fb72dcb 100644 (file)
@@ -1,7 +1,11 @@
 include ../config.mak
 
 #all OS and lib independent
-PLUGDIRS=aac_in ac3_in audio_filter bifs_dec ctx_load dummy_in soft_raster mp3_in isom_in odf_dec rtp_in timedtext img_in svg_in saf_in mpegts_in ismacryp mpd_in
+PLUGDIRS=aac_in ac3_in audio_filter bifs_dec dummy_in soft_raster mp3_in isom_in odf_dec rtp_in timedtext img_in saf_in mpegts_in ismacryp mpd_in
+
+ifeq ($(DISABLE_SMGR), no)
+PLUGDIRS+=ctx_load svg_in
+endif
 
 ifeq ($(DISABLE_SVG), no)
 PLUGDIRS+=laser_dec svg_in widgetman
@@ -105,6 +109,10 @@ endif
 
 endif
 
+ifeq ($(DISABLE_PLAYER), yes)
+PLUGDIRS=
+endif
+
 
 all: plugs
 
index cf2a20ed5ef1928fd4dfb50bfbb8d4424caca0fc..4b2bdf50d169c27a6faa7b4cf0420ac5bc45b5df 100644 (file)
@@ -152,7 +152,7 @@ void FFDEC_Delete(void *ifce);
 
 //#define FFMPEG_DUMP_REMOTE
 
-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52, 102, 0)
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52, 113, 1)
 #define USE_PRE_0_7 1
 #endif
 
index 7109b18a325cc88a54a2df2db6b0eaa06181b51e..e998ca38d1973427469de00a55dc47cc45875aaa 100644 (file)
@@ -528,7 +528,7 @@ void GF_UPnP::OnMediaServerAdd(PLT_DeviceDataReference& device, int added)
 static JSBool upnpdevice_getProperty(JSContext *c, JSObject *obj, SMJS_PROP_GETTER, jsval *vp)
 {
        char *prop_name;
-       GPAC_DeviceItem *dev = (GPAC_DeviceItem *)JS_GetPrivate(c, obj);
+       GPAC_DeviceItem *dev = (GPAC_DeviceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!dev) return JS_FALSE;
 
        if (!SMJS_ID_IS_STRING(id)) return JS_TRUE;
@@ -546,6 +546,10 @@ static JSBool upnpdevice_getProperty(JSContext *c, JSObject *obj, SMJS_PROP_GETT
        }
        else if (!strcmp(prop_name, "ServicesCount")) {
                u32 count = gf_list_count(dev->m_Services);
+               if (!count) {
+                       dev->RefreshServiceList();
+                       count = gf_list_count(dev->m_Services);
+               }
                *vp = INT_TO_JSVAL(count);
        }
        SMJS_FREE(c, prop_name);        
@@ -557,7 +561,7 @@ static JSBool upnp_device_subscribe(JSContext *c, JSObject *obj, uintN argc, jsv
 {
     PLT_Service* service;
        char *service_uuid;
-       GPAC_DeviceItem *item = (GPAC_DeviceItem *)JS_GetPrivate(c, obj);
+       GPAC_DeviceItem *item = (GPAC_DeviceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!item || (argc!=2) ) return JS_FALSE;
 
        if (!JSVAL_IS_STRING(argv[0])) return JS_FALSE;
@@ -577,7 +581,7 @@ static JSBool SMJS_FUNCTION(upnp_device_find_service)
        char *service_uuid;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_DeviceItem *item = (GPAC_DeviceItem *)JS_GetPrivate(c, obj);
+       GPAC_DeviceItem *item = (GPAC_DeviceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!item || !argc) return JS_FALSE;
        service_uuid = SMJS_CHARS(c, argv[0]);
 
@@ -596,7 +600,7 @@ static JSBool SMJS_FUNCTION(upnp_device_get_service)
        u32 service_index;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_DeviceItem *item = (GPAC_DeviceItem *)JS_GetPrivate(c, obj);
+       GPAC_DeviceItem *item = (GPAC_DeviceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!item || !argc || !JSVAL_IS_INT(argv[0])) return JS_FALSE;
        service_index = JSVAL_TO_INT(argv[0]);
 
@@ -624,7 +628,7 @@ void GF_UPnP::OnDeviceAdd(GPAC_DeviceItem *item, int added)
                item->obj = JS_NewObject(m_pJSCtx, &upnpGenericDeviceClass, 0, 0);
                item->m_pUPnP = this;
                gf_js_add_root(m_pJSCtx, &item->obj, GF_JSGC_OBJECT);
-               JS_SetPrivate(item->js_ctx, item->obj, item);
+               SMJS_SET_PRIVATE(item->js_ctx, item->obj, item);
        }
 
        JS_LookupProperty(m_pJSCtx, m_pObj, "onDeviceAdd", &funval);
@@ -640,7 +644,7 @@ void GF_UPnP::OnDeviceAdd(GPAC_DeviceItem *item, int added)
 static JSBool upnp_getProperty(JSContext *c, JSObject *obj, SMJS_PROP_GETTER, jsval *vp)
 {
        char *prop_name;
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp) return JS_FALSE;
 
        if (!SMJS_ID_IS_STRING(id)) return JS_TRUE;
@@ -672,7 +676,7 @@ static JSBool upnp_getProperty(JSContext *c, JSObject *obj, SMJS_PROP_GETTER, js
 static JSBool upnp_setProperty(JSContext *c, JSObject *obj, SMJS_PROP_SETTER, jsval *vp)
 {
        char *prop_name;
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp) return JS_FALSE;
 
        if (!SMJS_ID_IS_STRING(id)) return JS_TRUE;
@@ -707,7 +711,7 @@ static JSBool SMJS_FUNCTION(upnp_get_device)
        GPAC_DeviceItem *device;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || !argc || !JSVAL_IS_INT(argv[0]) ) return JS_FALSE;
 
        idx = JSVAL_TO_INT(argv[0]);
@@ -720,7 +724,7 @@ static JSBool SMJS_FUNCTION(upnp_get_device)
                device->obj = JS_NewObject(upnp->m_pJSCtx, &upnp->upnpGenericDeviceClass, 0, 0);
                device->m_pUPnP = upnp;
                gf_js_add_root(upnp->m_pJSCtx, &device->obj, GF_JSGC_OBJECT);
-               JS_SetPrivate(device->js_ctx, device->obj, device);
+               SMJS_SET_PRIVATE(device->js_ctx, device->obj, device);
        }
        SMJS_SET_RVAL( OBJECT_TO_JSVAL(device->obj) );
        return JS_TRUE;
@@ -732,7 +736,7 @@ static JSBool SMJS_FUNCTION(upnp_find_service)
        char *serv_name;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || (argc!=2) || !JSVAL_IS_STRING(argv[0]) || !JSVAL_IS_STRING(argv[1]) ) return JS_FALSE;
 
        dev_ip = SMJS_CHARS(c, argv[0]);
@@ -816,7 +820,7 @@ static JSBool SMJS_FUNCTION(upnp_renderer_open)
        char *item, *resource_url;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || (argc<1) ) return JS_FALSE;
 
        render = upnp_renderer_get_device(upnp, c, obj);
@@ -885,7 +889,7 @@ static JSBool SMJS_FUNCTION_EXT(upnp_renderer_playback, u32 act_type)
        GPAC_MediaRendererItem *render;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp) return JS_FALSE;
 
        render = upnp_renderer_get_device(upnp, c, obj);
@@ -945,7 +949,7 @@ static JSBool SMJS_FUNCTION(upnp_get_renderer)
        JSObject *s_obj;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || !upnp->m_pAVCtrlPoint || (argc!=1) ) return JS_FALSE;
 
        GPAC_MediaRendererItem *mr = NULL;
@@ -964,7 +968,7 @@ static JSBool SMJS_FUNCTION(upnp_get_renderer)
        if (!mr) return JS_FALSE;
 
        s_obj = JS_NewObject(c, &upnp->upnpDeviceClass, 0, 0);
-       JS_SetPrivate(c, s_obj, upnp);
+       SMJS_SET_PRIVATE(c, s_obj, upnp);
 
        JS_DefineProperty(c, s_obj, "Name", STRING_TO_JSVAL( JS_NewStringCopyZ(c, mr->m_device->GetFriendlyName()) ), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
        JS_DefineProperty(c, s_obj, "UUID", STRING_TO_JSVAL( JS_NewStringCopyZ(c, mr->m_UUID ) ), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
@@ -986,7 +990,7 @@ static JSBool SMJS_FUNCTION(upnp_server_browse)
        char *dir, *filter, *_dir, *_filter;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || (argc!=2) ) return JS_FALSE;
 
        server = upnp_server_get_device(upnp, c, obj);
@@ -1039,7 +1043,7 @@ static JSBool SMJS_FUNCTION(upnp_server_has_parent_dir)
 {
        GPAC_MediaServerItem *server;
        SMJS_OBJ
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp) return JS_FALSE;
 
        server = upnp_server_get_device(upnp, c, obj);
@@ -1053,7 +1057,7 @@ static JSBool SMJS_FUNCTION(upnp_server_get_resource_uri)
        u32 idx;
        SMJS_OBJ
        SMJS_ARGS
-       PLT_MediaObject *mo = (PLT_MediaObject *)JS_GetPrivate(c, obj);
+       PLT_MediaObject *mo = (PLT_MediaObject *)SMJS_GET_PRIVATE(c, obj);
        if (!mo || (argc!=1) || !JSVAL_IS_INT(argv[0]) ) return JS_FALSE;
        idx = JSVAL_TO_INT(argv[0]);
        if (idx<mo->m_Resources.GetItemCount()) {
@@ -1071,7 +1075,7 @@ static JSBool SMJS_FUNCTION(upnp_server_get_file)
        JSObject *f_obj;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || (argc!=1) || !JSVAL_IS_INT(argv[0]) ) return JS_FALSE;
 
        server = upnp_server_get_device(upnp, c, obj);
@@ -1084,7 +1088,7 @@ static JSBool SMJS_FUNCTION(upnp_server_get_file)
        if (!mo) return JS_TRUE;
 
        f_obj = JS_NewObject(c, &upnp->upnpDeviceClass, 0, 0);
-       JS_SetPrivate(c, f_obj, mo);
+       SMJS_SET_PRIVATE(c, f_obj, mo);
 
        JS_DefineProperty(c, f_obj, "ObjectID", STRING_TO_JSVAL( JS_NewStringCopyZ(c, mo->m_ObjectID)), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
        JS_DefineProperty(c, f_obj, "Name", STRING_TO_JSVAL( JS_NewStringCopyZ(c, mo->m_Title)), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
@@ -1104,7 +1108,7 @@ static JSBool SMJS_FUNCTION(upnp_server_get_file_uri)
        u32 id;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || (argc!=1) || !JSVAL_IS_INT(argv[0]) ) return JS_FALSE;
 
        server = upnp_server_get_device(upnp, c, obj);
@@ -1127,7 +1131,7 @@ static JSBool SMJS_FUNCTION(upnp_get_server)
        JSObject *s_obj;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || !upnp->m_pAVCtrlPoint || (argc!=1)) return JS_FALSE;
 
 
@@ -1146,7 +1150,7 @@ static JSBool SMJS_FUNCTION(upnp_get_server)
        }
        if (!ms) return JS_FALSE;
        s_obj = JS_NewObject(c, &upnp->upnpDeviceClass, 0, 0);
-       JS_SetPrivate(c, s_obj, upnp);
+       SMJS_SET_PRIVATE(c, s_obj, upnp);
 
        JS_DefineProperty(c, s_obj, "Name", STRING_TO_JSVAL( JS_NewStringCopyZ(c, ms->m_device->GetFriendlyName()) ), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
        JS_DefineProperty(c, s_obj, "UUID", STRING_TO_JSVAL( JS_NewStringCopyZ(c, ms->m_UUID ) ), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
@@ -1164,7 +1168,7 @@ static JSBool SMJS_FUNCTION(upnp_get_server)
 static JSBool SMJS_FUNCTION(upnp_bind_renderer)
 {
        SMJS_OBJ
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp) return JS_TRUE;
        upnp->m_renderer_bound = 1;
 
@@ -1180,7 +1184,7 @@ static JSBool SMJS_FUNCTION(upnp_share_resource)
        NPT_String resourceURI;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || !upnp->m_pMediaServer || !argc || !JSVAL_IS_STRING(argv[0]) ) return JS_TRUE;
        url = SMJS_CHARS(c, argv[0]);
        if (!url) return JS_TRUE;
@@ -1204,7 +1208,7 @@ static JSBool SMJS_FUNCTION(upnp_share_virtual_resource)
        char *res_url, *res_val, *mime;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || !upnp->m_pMediaServer || (argc<2) || !JSVAL_IS_STRING(argv[0]) || !JSVAL_IS_STRING(argv[1]) ) return JS_TRUE;
        res_url = SMJS_CHARS(c, argv[0]);
        if (!res_url) return JS_TRUE;
@@ -1234,7 +1238,7 @@ static JSBool SMJS_FUNCTION(upnp_device_setup_service)
        NPT_Result res;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_GenericDevice *device = (GPAC_GenericDevice *)JS_GetPrivate(c, obj);
+       GPAC_GenericDevice *device = (GPAC_GenericDevice *)SMJS_GET_PRIVATE(c, obj);
        if (!device) return JS_FALSE;
        if (argc<3) return JS_FALSE;
 
@@ -1278,7 +1282,7 @@ static JSBool SMJS_FUNCTION(upnp_device_start)
        jsval sval;
        char *str;
        SMJS_OBJ
-       GPAC_GenericDevice *device = (GPAC_GenericDevice *)JS_GetPrivate(c, obj);
+       GPAC_GenericDevice *device = (GPAC_GenericDevice *)SMJS_GET_PRIVATE(c, obj);
        if (!device) return JS_FALSE;
 
        if (JS_LookupProperty(device->m_pUPnP->m_pJSCtx, obj, "PresentationURL", &sval) && JSVAL_IS_STRING(sval)) {
@@ -1353,7 +1357,7 @@ static JSBool SMJS_FUNCTION(upnp_device_start)
 static JSBool SMJS_FUNCTION(upnp_device_stop)
 {
        SMJS_OBJ
-       GPAC_GenericDevice *device = (GPAC_GenericDevice *)JS_GetPrivate(c, obj);
+       GPAC_GenericDevice *device = (GPAC_GenericDevice *)SMJS_GET_PRIVATE(c, obj);
        if (!device) return JS_FALSE;
 
        PLT_DeviceHostReference devRef(device);
@@ -1379,7 +1383,7 @@ static GPAC_GenericDevice *upnp_create_generic_device(GF_UPnP *upnp, JSObject*gl
        JS_DefineFunction(upnp->m_pJSCtx, device->obj, "SetupService", upnp_device_setup_service, 0, 0);
        JS_DefineFunction(upnp->m_pJSCtx, device->obj, "Start", upnp_device_start, 0, 0);
 //     JS_DefineFunction(upnp->m_pJSCtx, device->obj, "Stop", upnp_device_stop, 0, 0);
-       JS_SetPrivate(upnp->m_pJSCtx, device->obj, device);
+       SMJS_SET_PRIVATE(upnp->m_pJSCtx, device->obj, device);
        if (!upnp->m_Devices) upnp->m_Devices = gf_list_new();
        gf_list_add(upnp->m_Devices, device);
 
@@ -1392,7 +1396,7 @@ static JSBool SMJS_FUNCTION(upnp_create_device)
        char *id, *name;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || (argc != 2)) return JS_FALSE;
 
        id = SMJS_CHARS(c, argv[0]);
@@ -1417,10 +1421,10 @@ static JSBool SMJS_FUNCTION(upnp_delete_device)
        GPAC_GenericDevice *device;
        SMJS_OBJ
        SMJS_ARGS
-       GF_UPnP *upnp = (GF_UPnP *)JS_GetPrivate(c, obj);
+       GF_UPnP *upnp = (GF_UPnP *)SMJS_GET_PRIVATE(c, obj);
        if (!upnp || (argc != 1)) return JS_FALSE;
 
-       device = (GPAC_GenericDevice *) JS_GetPrivate(c, JSVAL_TO_OBJECT(argv[0]) );
+       device = (GPAC_GenericDevice *) SMJS_GET_PRIVATE(c, JSVAL_TO_OBJECT(argv[0]) );
        if (!device) return JS_FALSE;
 
        gf_list_del_item(upnp->m_Devices, device);
@@ -1497,7 +1501,7 @@ Bool GF_UPnP::LoadJS(GF_TermExtJS *param)
 
        JS_InitClass(m_pJSCtx, (JSObject*)param->global, 0, &upnpClass, 0, 0, upnpClassProps, upnpClassFuncs, 0, 0);
        m_pObj = JS_DefineObject(m_pJSCtx, (JSObject*)param->global, "UPnP", &upnpClass, 0, 0);
-       JS_SetPrivate(m_pJSCtx, m_pObj, this);
+       SMJS_SET_PRIVATE(m_pJSCtx, m_pObj, this);
 
        JS_SETUP_CLASS(upnpDeviceClass, "UPNPAVDEVICE", JSCLASS_HAS_PRIVATE, JS_PropertyStub, JS_PropertyStub_forSetter, JS_FinalizeStub);
        
index 514c27d413dbe31174d0082155c0965d538579c3..962acf469213ca222fe947aa29e98a9c4a49eec5 100644 (file)
@@ -61,7 +61,7 @@ void GPAC_ServiceItem::DetachJS()
 {
        if (obj) {
                gf_js_remove_root(js_ctx, &obj, GF_JSGC_OBJECT);
-               JS_SetPrivate(js_ctx, obj, NULL);
+               SMJS_SET_PRIVATE(js_ctx, obj, NULL);
                obj = NULL;
        }
        if (!JSVAL_IS_NULL(on_event)) {
@@ -106,7 +106,7 @@ GPAC_DeviceItem::~GPAC_DeviceItem()
 void GPAC_DeviceItem::DetachJS() {
        if (obj) {
                gf_js_remove_root(js_ctx, &obj, GF_JSGC_OBJECT);
-               JS_SetPrivate(js_ctx, obj, NULL);
+               SMJS_SET_PRIVATE(js_ctx, obj, NULL);
                obj = NULL;
        }
        while (gf_list_count(m_Services)) {
@@ -125,7 +125,7 @@ static JSBool SMJS_FUNCTION(upnp_service_set_listener)
        u32 i;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_ServiceItem *service = (GPAC_ServiceItem *)JS_GetPrivate(c, obj);
+       GPAC_ServiceItem *service = (GPAC_ServiceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!service || !argc || !JSVAL_IS_OBJECT(argv[0])) return JS_FALSE;
 
        if (argc<1) {
@@ -184,7 +184,7 @@ static JSBool SMJS_FUNCTION(upnp_service_set_action_listener)
        u32 i;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_ServiceItem *service = (GPAC_ServiceItem *)JS_GetPrivate(c, obj);
+       GPAC_ServiceItem *service = (GPAC_ServiceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!service || (argc<2) || !JSVAL_IS_STRING(argv[0]) || !JSVAL_IS_OBJECT(argv[1])) return JS_FALSE;
        
        name = SMJS_CHARS(c, argv[0]);
@@ -234,10 +234,23 @@ static JSBool SMJS_FUNCTION(upnp_service_set_action_listener)
        return JS_TRUE;
 }
 
+static JSBool SMJS_FUNCTION(upnp_service_get_scpd)
+{
+       NPT_String name;
+       SMJS_OBJ
+       GPAC_ServiceItem *service = (GPAC_ServiceItem *)SMJS_GET_PRIVATE(c, obj);
+       if (!service ) 
+               return JS_FALSE;
+
+       service->m_service->GetSCPDXML(name);
+       SMJS_SET_RVAL( STRING_TO_JSVAL( JS_NewStringCopyZ(c, name) ) );
+       return JS_TRUE;
+}
+
 JSBool upnpservice_getProperty(JSContext *c, JSObject *obj, SMJS_PROP_GETTER, jsval *vp)
 {
        char *prop_name;
-       GPAC_ServiceItem *service = (GPAC_ServiceItem *)JS_GetPrivate(c, obj);
+       GPAC_ServiceItem *service = (GPAC_ServiceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!service) return JS_FALSE;
 
        if (!SMJS_ID_IS_STRING(id)) return JS_TRUE;
@@ -261,7 +274,7 @@ static JSBool SMJS_FUNCTION(upnp_service_has_var)
        char *name = NULL;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_ServiceItem *service = (GPAC_ServiceItem *)JS_GetPrivate(c, obj);
+       GPAC_ServiceItem *service = (GPAC_ServiceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!service || !argc || !JSVAL_IS_STRING(argv[0]) ) 
                return JS_FALSE;
 
@@ -277,7 +290,7 @@ static JSBool SMJS_FUNCTION(upnp_service_has_action)
        char *name = NULL;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_ServiceItem *service = (GPAC_ServiceItem *)JS_GetPrivate(c, obj);
+       GPAC_ServiceItem *service = (GPAC_ServiceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!service || !argc || !JSVAL_IS_STRING(argv[0]) )
                return JS_FALSE;
 
@@ -302,7 +315,7 @@ static JSBool SMJS_FUNCTION(upnp_service_call_action)
        char *action_name = NULL;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_ServiceItem *service = (GPAC_ServiceItem *)JS_GetPrivate(c, obj);
+       GPAC_ServiceItem *service = (GPAC_ServiceItem *)SMJS_GET_PRIVATE(c, obj);
        if (!service || !argc || !JSVAL_IS_STRING(argv[0]) ) return JS_FALSE;
 
        action_name = SMJS_CHARS(c, argv[0]);
@@ -381,6 +394,16 @@ static JSBool SMJS_FUNCTION(upnp_service_call_action)
 
 #endif
 
+void GPAC_DeviceItem::RefreshServiceList()
+{
+       u32 i;
+       NPT_Array<PLT_Service*> services = m_device->GetServices();
+
+       for (i=0; i<services.GetItemCount(); i++) {
+               PLT_Service *serv = services[i];
+               FindService(serv->GetServiceType());
+       }
+}
 
 GPAC_ServiceItem *GPAC_DeviceItem::FindService(const char *type)
 {
@@ -403,7 +426,7 @@ GPAC_ServiceItem *GPAC_DeviceItem::FindService(const char *type)
        serv->js_ctx = js_ctx;
        serv->obj = JS_NewObject(serv->js_ctx, &m_pUPnP->upnpServiceClass, 0, obj);
        gf_js_add_root(serv->js_ctx, &serv->obj, GF_JSGC_OBJECT);
-       JS_SetPrivate(serv->js_ctx, serv->obj, serv);
+       SMJS_SET_PRIVATE(serv->js_ctx, serv->obj, serv);
        JS_DefineProperty(serv->js_ctx, serv->obj, "Name", STRING_TO_JSVAL( JS_NewStringCopyZ(serv->js_ctx, service->GetServiceID()) ), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
        JS_DefineProperty(serv->js_ctx, serv->obj, "Type", STRING_TO_JSVAL( JS_NewStringCopyZ(serv->js_ctx, service->GetServiceType()) ), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
        JS_DefineProperty(serv->js_ctx, serv->obj, "Hostname", STRING_TO_JSVAL( JS_NewStringCopyZ(serv->js_ctx, m_device->GetURLBase().GetHost() ) ), 0, 0, JSPROP_READONLY | JSPROP_PERMANENT);
@@ -412,6 +435,7 @@ GPAC_ServiceItem *GPAC_DeviceItem::FindService(const char *type)
        JS_DefineFunction(serv->js_ctx, serv->obj, "HasAction", upnp_service_has_action, 2, 0);
        JS_DefineFunction(serv->js_ctx, serv->obj, "CallAction", upnp_service_call_action, 2, 0);
        JS_DefineFunction(serv->js_ctx, serv->obj, "SetActionListener", upnp_service_set_action_listener, 2, 0);
+       JS_DefineFunction(serv->js_ctx, serv->obj, "GetSCPD", upnp_service_get_scpd, 1, 0);
        
 #endif
 
@@ -495,7 +519,7 @@ static JSBool SMJS_FUNCTION(upnp_action_get_argument_value)
        char *arg_name = NULL;
        SMJS_OBJ
        SMJS_ARGS
-       PLT_Action *action = (PLT_Action *) JS_GetPrivate(c, obj);
+       PLT_Action *action = (PLT_Action *) SMJS_GET_PRIVATE(c, obj);
        if (!action || !argc || !JSVAL_IS_STRING(argv[0])) return JS_FALSE;
 
        arg_name = SMJS_CHARS(c, argv[0]);
@@ -510,7 +534,7 @@ static JSBool SMJS_FUNCTION(upnp_action_get_error_code)
 {
        NPT_String res;
        SMJS_OBJ
-       PLT_Action *action = (PLT_Action *) JS_GetPrivate(c, obj);
+       PLT_Action *action = (PLT_Action *) SMJS_GET_PRIVATE(c, obj);
        if (!action ) return JS_FALSE;
        SMJS_SET_RVAL( INT_TO_JSVAL( action->GetErrorCode() ));
        return JS_TRUE;
@@ -521,7 +545,7 @@ static JSBool SMJS_FUNCTION(upnp_action_get_error)
        NPT_String res;
        unsigned int code;
        SMJS_OBJ
-       PLT_Action *action = (PLT_Action *) JS_GetPrivate(c, obj);
+       PLT_Action *action = (PLT_Action *) SMJS_GET_PRIVATE(c, obj);
        if (!action ) return JS_FALSE;
        SMJS_SET_RVAL( STRING_TO_JSVAL( JS_NewStringCopyZ(c, action->GetError( code ) ) ) );
        return JS_TRUE;
@@ -617,7 +641,7 @@ NPT_Result GPAC_GenericController::OnActionResponse(NPT_Result res, PLT_ActionRe
                        GF_LOG(GF_LOG_INFO, GF_LOG_NETWORK, ("[UPnP] Calling handler for response %s\n", (char *) action->GetActionDesc().GetName()));
 
                        act_obj = JS_NewObject(serv->js_ctx, &item->m_pUPnP->upnpDeviceClass, 0, item->obj);
-                       JS_SetPrivate(serv->js_ctx, act_obj, (void *)action.AsPointer() );
+                       SMJS_SET_PRIVATE(serv->js_ctx, act_obj, (void *)action.AsPointer() );
                        JS_DefineFunction(serv->js_ctx, act_obj, "GetArgumentValue", upnp_action_get_argument_value, 1, 0);
                        JS_DefineFunction(serv->js_ctx, act_obj, "GetErrorCode", upnp_action_get_error_code, 1, 0);
                        JS_DefineFunction(serv->js_ctx, act_obj, "GetError", upnp_action_get_error, 1, 0);
@@ -737,7 +761,7 @@ static JSBool SMJS_FUNCTION(upnp_service_set_state_variable)
        char *name, *val;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_Service* service = (GPAC_Service*) JS_GetPrivate(c, obj);
+       GPAC_Service* service = (GPAC_Service*) SMJS_GET_PRIVATE(c, obj);
        if (!service) return JS_FALSE;
 
        name = SMJS_CHARS(c, argv[0]);
@@ -760,7 +784,7 @@ void GPAC_Service::SetupJS(JSContext *c, GF_UPnP *upnp, JSObject *parent)
        m_pCtx = c;
        m_pObj = JS_NewObject(c, &upnp->upnpDeviceClass, 0, parent);
        gf_js_add_root(m_pCtx, &m_pObj, GF_JSGC_OBJECT);
-       JS_SetPrivate(c, m_pObj, this);
+       SMJS_SET_PRIVATE(c, m_pObj, this);
        JS_DefineFunction(c, m_pObj, "SetStateVariable", upnp_service_set_state_variable, 2, 0);
 
 }
@@ -837,7 +861,7 @@ static JSBool SMJS_FUNCTION(upnp_action_get_argument)
        char *act_name;
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_GenericDevice *device = (GPAC_GenericDevice *)JS_GetPrivate(c, obj);
+       GPAC_GenericDevice *device = (GPAC_GenericDevice *)SMJS_GET_PRIVATE(c, obj);
        if (!device || !argc || !JSVAL_IS_STRING(argv[0]) ) return JS_FALSE;
 
        act_name = SMJS_CHARS(c, argv[0]);
@@ -853,7 +877,7 @@ static JSBool SMJS_FUNCTION(upnp_action_send_reply)
 {
        SMJS_OBJ
        SMJS_ARGS
-       GPAC_GenericDevice *device = (GPAC_GenericDevice *)JS_GetPrivate(c, obj);
+       GPAC_GenericDevice *device = (GPAC_GenericDevice *)SMJS_GET_PRIVATE(c, obj);
        if (!device) return JS_FALSE;
        
        if (argc && JSVAL_IS_OBJECT(argv[0]) ) {
@@ -941,7 +965,7 @@ GPAC_GenericDevice::OnAction(PLT_ActionReference&          action,
 
        JSObject *js_action = JS_NewObject(m_pUPnP->m_pJSCtx, &m_pUPnP->upnpDeviceClass, 0, 0);
        argv[0] = OBJECT_TO_JSVAL(js_action);
-       JS_SetPrivate(m_pUPnP->m_pJSCtx, js_action, this);
+       SMJS_SET_PRIVATE(m_pUPnP->m_pJSCtx, js_action, this);
        
        act_ref = action;
 
@@ -956,7 +980,7 @@ GPAC_GenericDevice::OnAction(PLT_ActionReference&          action,
 
        jsval rval;
        JS_CallFunctionValue(m_pUPnP->m_pJSCtx, obj, act_proc, 1, argv, &rval);
-       JS_SetPrivate(m_pUPnP->m_pJSCtx, js_action, NULL);
+       SMJS_SET_PRIVATE(m_pUPnP->m_pJSCtx, js_action, NULL);
        m_pUPnP->LockJavascript(0);
 
        if (JSVAL_IS_INT(rval) && (JSVAL_TO_INT(rval) != 0)) {
index 083e0c5325cddd69990f37f150718ccdb1faaf25..e49868440d371ec2ea0322e2081fafa8a2671322 100644 (file)
@@ -59,6 +59,7 @@ public:
        GF_UPnP *m_pUPnP;
 
        GPAC_ServiceItem *FindService(const char *type);
+       void RefreshServiceList();
 
        GF_List *m_Services;
 #ifdef GPAC_HAS_SPIDERMONKEY
index a04560b2766b6aec6b67f791da4556a3711f2943..ad81ac8a239d8f82829072e4ce7d11ceb6220020 100644 (file)
                font-variant="normal"
                font-weight="all"
                font-stretch="all"
-               font-size="all"
+               font-size="12"
                unicode-range="U+0-7FFFFFFF, U+0-7FFFFFFF"
                units-per-em="2048"
                panose-1="0 1 2 3 4 5 6 7 8 9"
index 78499417b49e00efdde6f0386159e07123fa9845..3729e8dabc151fc3a80aa022691a807f93162649 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- SVG Scene Dump - GPAC version 0.4.5-DEV (build 32) -->
 <svg id="svg-root" version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewport-fill="#CC3B38" font-family="Arial" >
     <text id="from" x="5" y="10">L&#233;a</text>
     <text id="to" x="5" y="40"></text>
index 78499417b49e00efdde6f0386159e07123fa9845..3729e8dabc151fc3a80aa022691a807f93162649 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- SVG Scene Dump - GPAC version 0.4.5-DEV (build 32) -->
 <svg id="svg-root" version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewport-fill="#CC3B38" font-family="Arial" >
     <text id="from" x="5" y="10">L&#233;a</text>
     <text id="to" x="5" y="40"></text>
index 3bdad5b6d01e4020964aba16994748f12ed5df2a..c0f4cb20cffe81fea3ecd49c595c019095664884 100644 (file)
@@ -15,16 +15,25 @@ LDFLAGS+=-pg
 endif
 
 ## libgpac objects gathering: src/utils
-LIBGPAC_UTILS=utils/os_divers.o utils/os_net.o utils/os_module.o utils/os_thread.o utils/os_config_init.o utils/list.o utils/base_encoding.o utils/bitstream.o utils/color.o utils/configfile.o utils/cache.o utils/downloader.o utils/error.o utils/math.o utils/path2d.o utils/path2d_stroker.o utils/module.o utils/token.o utils/uni_bidi.o utils/url.o utils/utf.o utils/xml_parser.o utils/alloc.o utils/ringbuffer.o utils/unicode.o
+LIBGPAC_UTILS=utils/os_divers.o utils/os_net.o utils/os_module.o utils/os_thread.o utils/os_config_init.o utils/list.o utils/base_encoding.o utils/bitstream.o utils/color.o utils/configfile.o utils/cache.o utils/downloader.o utils/error.o utils/math.o utils/path2d.o utils/path2d_stroker.o utils/module.o utils/token.o utils/uni_bidi.o utils/url.o utils/utf.o utils/xml_parser.o utils/alloc.o utils/ringbuffer.o utils/unicode.o utils/sha1.o
 
 ## libgpac objects gathering: src/ietf
+LIBGPAC_IETF=
+ifeq ($(DISABLE_STREAMING), no)
 LIBGPAC_IETF=ietf/rtcp.o ietf/rtp.o ietf/rtp_packetizer.o ietf/rtp_pck_3gpp.o ietf/rtp_pck_mpeg12.o ietf/rtp_pck_mpeg4.o ietf/rtsp_command.o ietf/rtsp_common.o ietf/rtsp_response.o ietf/rtsp_session.o ietf/sdp.o ietf/rtp_depacketizer.o ietf/rtp_streamer.o
+endif
 
 ## libgpac objects gathering: src/bifs
+LIBGPAC_BIFS=
+ifeq ($(DISABLE_BIFS), no)
 LIBGPAC_BIFS=bifs/arith_decoder.o bifs/bifs_codec.o bifs/bifs_node_tables.o bifs/com_dec.o bifs/com_enc.o bifs/conditional.o bifs/field_decode.o bifs/field_encode.o bifs/memory_decoder.o bifs/predictive_mffield.o bifs/quantize.o bifs/script_dec.o bifs/script_enc.o bifs/unquantize.o
+endif
 
 ## libgpac objects gathering: src/isomedia
-LIBGPAC_ISOM=isomedia/avc_ext.o isomedia/box_code_3gpp.o isomedia/box_code_apple.o isomedia/box_code_base.o isomedia/box_code_isma.o isomedia/box_code_meta.o isomedia/box_dump.o isomedia/box_funcs.o isomedia/data_map.o isomedia/hint_track.o isomedia/hinting.o isomedia/isma_sample.o isomedia/isom_intern.o isomedia/isom_read.o isomedia/isom_store.o isomedia/isom_write.o isomedia/media.o isomedia/media_odf.o isomedia/meta.o isomedia/movie_fragments.o isomedia/sample_descs.o isomedia/stbl_read.o isomedia/stbl_write.o isomedia/track.o isomedia/tx3g.o 
+LIBGPAC_ISOM=isomedia/avc_ext.o isomedia/box_code_3gpp.o isomedia/box_code_apple.o isomedia/box_code_base.o isomedia/box_code_isma.o isomedia/box_code_meta.o isomedia/box_dump.o isomedia/box_funcs.o isomedia/data_map.o isomedia/isma_sample.o isomedia/isom_intern.o isomedia/isom_read.o isomedia/isom_store.o isomedia/isom_write.o isomedia/media.o isomedia/media_odf.o isomedia/meta.o isomedia/movie_fragments.o isomedia/sample_descs.o isomedia/stbl_read.o isomedia/stbl_write.o isomedia/track.o isomedia/tx3g.o 
+ifeq ($(DISABLE_ISOFF_HINT), no)
+LIBGPAC_ISOM+=isomedia/hint_track.o isomedia/hinting.o
+endif
 
 ## libgpac objects gathering: src/odf
 LIBGPAC_ODF=odf/desc_private.o odf/descriptors.o odf/ipmpx_code.o odf/ipmpx_dump.o odf/ipmpx_parse.o odf/oci_codec.o odf/odf_code.o odf/odf_codec.o odf/odf_command.o odf/odf_dump.o odf/odf_parse.o odf/qos.o odf/slc.o 
@@ -33,13 +42,80 @@ LIBGPAC_ODF=odf/desc_private.o odf/descriptors.o odf/ipmpx_code.o odf/ipmpx_dump
 LIBGPAC_SCENE=scenegraph/base_scenegraph.o scenegraph/mpeg4_animators.o scenegraph/commands.o scenegraph/mpeg4_nodes.o scenegraph/mpeg4_valuator.o scenegraph/vrml_interpolators.o scenegraph/vrml_proto.o scenegraph/vrml_route.o scenegraph/vrml_script.o scenegraph/vrml_smjs.o scenegraph/vrml_tools.o scenegraph/x3d_nodes.o scenegraph/svg_attributes.o scenegraph/svg_types.o scenegraph/svg_smjs.o scenegraph/smil_anim.o scenegraph/smil_timing.o scenegraph/svg_properties.o scenegraph/dom_events.o  scenegraph/dom_smjs.o scenegraph/xbl_process.o scenegraph/xml_ns.o
 
 ## libgpac objects gathering: src/mcrypt
-LIBGPAC_MCRYPT=mcrypt/cbc.o mcrypt/cfb.o mcrypt/ctr.o mcrypt/des.o mcrypt/ecb.o mcrypt/g_crypt.o mcrypt/ncfb.o mcrypt/nofb.o mcrypt/ofb.o mcrypt/rijndael-128.o mcrypt/rijndael-192.o mcrypt/rijndael-256.o mcrypt/stream.o mcrypt/tripledes.o mcrypt/sha1.o 
+LIBGPAC_MCRYPT=
+ifeq ($(DISABLE_MCRYPT), no)
+LIBGPAC_MCRYPT+=mcrypt/cbc.o mcrypt/cfb.o mcrypt/ctr.o mcrypt/des.o mcrypt/ecb.o mcrypt/g_crypt.o mcrypt/ncfb.o mcrypt/nofb.o mcrypt/ofb.o mcrypt/rijndael-128.o mcrypt/rijndael-192.o mcrypt/rijndael-256.o mcrypt/stream.o mcrypt/tripledes.o 
+endif
 
 ## libgpac objects gathering: src/media tools
-LIBGPAC_MEDIATOOLS=media_tools/ait.o media_tools/av_parsers.o media_tools/avilib.o media_tools/dsmcc.o media_tools/dvb.o media_tools/filestreamer.o media_tools/gpac_ogg.o media_tools/img.o media_tools/ismacryp.o media_tools/isom_hinter.o media_tools/isom_tools.o media_tools/media_export.o media_tools/media_import.o media_tools/mpeg2_ps.o media_tools/text_import.o media_tools/saf.o media_tools/mpegts.o media_tools/dvb_mpe.o  media_tools/reedsolomon.o media_tools/vobsub.o media_tools/m2ts_mux.o media_tools/m3u8.o media_tools/mpd.o
+LIBGPAC_MEDIATOOLS=media_tools/av_parsers.o media_tools/img.o media_tools/isom_tools.o media_tools/media_export.o media_tools/media_import.o media_tools/mpegts.o media_tools/m2ts_mux.o media_tools/m3u8.o media_tools/mpd.o
+ifeq ($(DISABLE_STREAMING), no)
+LIBGPAC_MEDIATOOLS+=media_tools/filestreamer.o
+endif
+ifeq ($(DISABLE_DVBX), no)
+LIBGPAC_MEDIATOOLS+=media_tools/ait.o media_tools/dsmcc.o media_tools/dvb_mpe.o media_tools/reedsolomon.o
+endif
+ifeq ($(DISABLE_AVILIB), no)
+LIBGPAC_MEDIATOOLS+=media_tools/avilib.o
+endif
+ifeq ($(DISABLE_M2PS), no)
+LIBGPAC_MEDIATOOLS+=media_tools/mpeg2_ps.o
+endif
+ifeq ($(DISABLE_OGG), no)
+LIBGPAC_MEDIATOOLS+=media_tools/gpac_ogg.o
+endif
+ifeq ($(DISABLE_MCRYPT), no)
+LIBGPAC_MEDIATOOLS+=media_tools/ismacryp.o
+endif
+ifeq ($(DISABLE_ISOFF_HINT), no)
+LIBGPAC_MEDIATOOLS+=media_tools/isom_hinter.o
+endif
+ifeq ($(DISABLE_SAF), no)
+LIBGPAC_MEDIATOOLS+=media_tools/saf.o
+endif
+ifeq ($(DISABLE_VOBSUB), no)
+LIBGPAC_MEDIATOOLS+=media_tools/vobsub.o
+endif
+ifeq ($(DISABLE_TTXT), no)
+LIBGPAC_MEDIATOOLS+=media_tools/text_import.o
+endif
+
 
 ## libgpac objects gathering: src/scene_manager
-LIBGPAC_SCENEMANAGER=scene_manager/loader_bt.o scene_manager/loader_isom.o scene_manager/loader_qt.o scene_manager/loader_xmt.o scene_manager/scene_dump.o scene_manager/scene_manager.o scene_manager/scene_stats.o scene_manager/swf_parse.o scene_manager/swf_bifs.o scene_manager/text_to_bifs.o scene_manager/scene_engine.o scene_manager/encode_isom.o scene_manager/loader_svg.o
+LIBGPAC_SCENEMANAGER=
+ifeq ($(DISABLE_SMGR), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/scene_manager.o
+endif
+ifeq ($(DISABLE_LOADER_BT), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/loader_bt.o scene_manager/text_to_bifs.o
+endif
+ifeq ($(DISABLE_LOADER_XMT), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/loader_xmt.o
+endif
+ifeq ($(DISABLE_LOADER_ISOFF), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/loader_isom.o
+endif
+ifeq ($(DISABLE_LOADER_QTVR), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/loader_qt.o
+endif
+ifeq ($(DISABLE_SVG), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/loader_svg.o 
+endif
+ifeq ($(DISABLE_LOADER_SWF), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/swf_parse.o scene_manager/swf_bifs.o 
+endif
+ifeq ($(DISABLE_SCENE_DUMP), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/scene_dump.o
+endif
+ifeq ($(DISABLE_SCENE_STATS), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/scene_stats.o
+endif
+ifeq ($(DISABLE_SENG), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/scene_engine.o 
+endif
+ifeq ($(DISABLE_SCENE_ENCODE), no)
+LIBGPAC_SCENEMANAGER+=scene_manager/encode_isom.o
+endif
 
 ## libgpac objects gathering: src/terminal
 LIBGPAC_TERMINAL=terminal/channel.o terminal/clock.o terminal/decoder.o terminal/term_node_init.o terminal/input_sensor.o terminal/media_control.o terminal/media_manager.o terminal/media_memory.o terminal/media_object.o terminal/media_sensor.o terminal/mpeg4_inline.o terminal/network_service.o terminal/object_browser.o terminal/object_manager.o terminal/scene.o terminal/terminal.o terminal/svg_external.o
@@ -47,9 +123,19 @@ LIBGPAC_TERMINAL=terminal/channel.o terminal/clock.o terminal/decoder.o terminal
 ## libgpac objects gathering: src/compositor
 LIBGPAC_COMPOSITOR=compositor/audio_input.o compositor/audio_mixer.o compositor/audio_render.o compositor/bindable.o compositor/camera.o compositor/compositor.o compositor/compositor_2d.o compositor/compositor_3d.o compositor/compositor_node_init.o compositor/drawable.o compositor/events.o compositor/font_engine.o compositor/hc_flash_shape.o compositor/hardcoded_protos.o compositor/mesh.o compositor/mesh_collide.o compositor/mesh_tesselate.o compositor/mpeg4_animstream.o compositor/mpeg4_audio.o compositor/mpeg4_background.o compositor/mpeg4_background2d.o compositor/mpeg4_bitmap.o compositor/mpeg4_composite.o compositor/mpeg4_form.o compositor/mpeg4_geometry_2d.o compositor/mpeg4_geometry_3d.o compositor/mpeg4_geometry_ifs2d.o compositor/mpeg4_geometry_ils2d.o compositor/mpeg4_gradients.o compositor/mpeg4_grouping.o compositor/mpeg4_grouping_2d.o compositor/mpeg4_grouping_3d.o compositor/mpeg4_layer_2d.o compositor/mpeg4_layer_3d.o compositor/mpeg4_layout.o compositor/mpeg4_lighting.o compositor/mpeg4_path_layout.o compositor/mpeg4_sensors.o compositor/mpeg4_sound.o compositor/mpeg4_text.o compositor/mpeg4_textures.o compositor/mpeg4_timesensor.o compositor/mpeg4_viewport.o compositor/navigate.o compositor/offscreen_cache.o compositor/svg_base.o compositor/svg_filters.o compositor/svg_font.o compositor/svg_geometry.o compositor/svg_grouping.o compositor/svg_media.o compositor/svg_paint_servers.o compositor/svg_text.o compositor/texturing.o compositor/texturing_gl.o compositor/visual_manager.o compositor/visual_manager_2d.o compositor/visual_manager_2d_draw.o compositor/visual_manager_3d.o compositor/visual_manager_3d_gl.o compositor/x3d_geometry.o
 
+ifeq ($(DISABLE_PLAYER), yes)
+LIBGPAC_COMPOSITOR=
+LIBGPAC_TERMINAL=
+endif
+ifeq ($(DISABLE_SCENEGRAPH), yes)
+LIBGPAC_SCENE=
+endif
+
+
+
 ## libgpac objects gathering: src/laser
 LIBGPAC_LASER=
-ifeq ($(DISABLE_SVG), no)
+ifeq ($(DISABLE_LASER), no)
 LIBGPAC_LASER=laser/lsr_enc.o laser/lsr_dec.o laser/lsr_tables.o
 endif
 
@@ -108,10 +194,6 @@ endif
 
 ## libgpac compositor compilation options
 COMPOSITOR_CFLAGS=
-## SVG disabled
-ifeq ($(DISABLE_SVG), yes)
-COMPOSITOR_CFLAGS+=-DGPAC_DISABLE_SVG
-endif
 
 ## Add prefix before every lib
 ifneq ($(prefix), /usr/local)
index 220014bf3db32ec198e58d888bac15a388899258..a024495c9550b3fd5ca83f2e83039b376ce675e0 100644 (file)
@@ -26,7 +26,7 @@
 /*
        DO NOT MOFIFY - File generated on GMT Tue Nov 08 09:10:57 2011
 
-       BY MPEG4Gen for GPAC Version 0.4.6-DEV
+       BY MPEG4Gen for GPAC Version 0.5.0
 */
 
 
index 19ca532c4c76ac2a82de2313197e3227005e29ee..71b46457e8a55641e9c33400beb04714e1078687 100644 (file)
@@ -27,6 +27,7 @@
 #include <gpac/internal/terminal_dev.h>
 #include <gpac/options.h>
 #include <gpac/utf.h>
+#include <gpac/modules/hardcoded_proto.h>
 
 #include "nodes_stacks.h"
 
@@ -457,7 +458,6 @@ GF_Compositor *gf_sc_new(GF_User *user, Bool self_threaded, GF_Terminal *term)
 {
        GF_Err e;
        GF_Compositor *tmp;
-       
 
        GF_SAFEALLOC(tmp, GF_Compositor);
        if (!tmp){
@@ -467,7 +467,17 @@ GF_Compositor *gf_sc_new(GF_User *user, Bool self_threaded, GF_Terminal *term)
        tmp->user = user;
        tmp->term = term;
        tmp->mx = gf_mx_new("Compositor");
-       
+
+       /*load proto modules*/
+       if (user) {
+               u32 i;
+               tmp->proto_modules = gf_list_new();
+               for (i=0; i< gf_modules_get_count(user->modules); i++) {
+                       GF_HardcodedProto *ifce = (GF_HardcodedProto *) gf_modules_load_interface(user->modules, i, GF_HARDCODED_PROTO_INTERFACE);
+                       if (ifce) gf_list_add(tmp->proto_modules, ifce);
+               }
+       }
+
 
        if (self_threaded) {
 
@@ -568,6 +578,15 @@ void gf_sc_del(GF_Compositor *compositor)
        if (compositor->audio_renderer) gf_sc_ar_del(compositor->audio_renderer);
        compositor->audio_renderer = NULL;
 
+       /*unload proto modules*/
+       if (compositor->proto_modules) {
+               u32 i;
+               for (i=0; i< gf_list_count(compositor->proto_modules); i++) {
+                       GF_HardcodedProto *ifce = gf_list_get(compositor->proto_modules, i);
+                       gf_modules_close_interface((GF_BaseInterface *) ifce);
+               }
+               gf_list_del(compositor->proto_modules);
+       }
 #ifdef GF_SR_EVENT_QUEUE
        gf_mx_p(compositor->ev_mx);
        while (gf_list_count(compositor->events)) {
@@ -822,10 +841,10 @@ GF_Err gf_sc_set_scene(GF_Compositor *compositor, GF_SceneGraph *scene_graph)
                SVG_Length *w, *h;
                SVG_ViewBox *vb;
                Bool is_svg = 0;
-#endif
-               const char *opt;
                u32 tag;
                GF_Node *top_node;
+#endif
+               const char *opt;
                Bool had_size_info = compositor->has_size_info;
                /*get pixel size if any*/
                gf_sg_get_scene_size_info(compositor->scene, &width, &height);
@@ -839,11 +858,11 @@ GF_Err gf_sc_set_scene(GF_Compositor *compositor, GF_SceneGraph *scene_graph)
                /*default back color is black*/
                if (! (compositor->user->init_flags & GF_TERM_WINDOWLESS)) compositor->back_color = 0xFF000000;
 
+#ifndef GPAC_DISABLE_SVG
                top_node = gf_sg_get_root_node(compositor->scene);
                tag = 0;
                if (top_node) tag = gf_node_get_tag(top_node);
 
-#ifndef GPAC_DISABLE_SVG
                w = h = NULL;
                vb = NULL;
                if ((tag>=GF_NODE_RANGE_FIRST_SVG) && (tag<=GF_NODE_RANGE_LAST_SVG)) {
@@ -1729,10 +1748,10 @@ GF_Node *gf_sc_pick_node(GF_Compositor *compositor, s32 X, s32 Y)
 static void gf_sc_setup_root_visual(GF_Compositor *compositor, GF_Node *top_node)
 {
        if (top_node && !compositor->root_visual_setup) {
-               Bool force_navigate=0;
                GF_SceneGraph *scene = compositor->scene;
                u32 node_tag;
 #ifndef GPAC_DISABLE_3D
+               Bool force_navigate=0;
                Bool was_3d = compositor->visual->type_3d;
 #endif
                compositor->root_visual_setup = 1;
index 159b27ab525b3fb8c0f597906193c1765c51eb5b..695cae41f36d1baaa8b456625eb2e6fd2daac973 100644 (file)
@@ -28,6 +28,9 @@
 #include "offscreen_cache.h"
 #include "mpeg4_grouping.h"
 
+#include <gpac/modules/hardcoded_proto.h>
+#include <gpac/internal/terminal_dev.h>
+
 #ifndef GPAC_DISABLE_VRML
 
 #ifndef GPAC_DISABLE_3D
@@ -984,7 +987,8 @@ void compositor_init_hardcoded_proto(GF_Compositor *compositor, GF_Node *node)
 {
        MFURL *proto_url;
        GF_Proto *proto;
-       u32 i;
+       u32 i, j;
+       GF_HardcodedProto *ifce;
 
        proto = gf_node_get_proto(node);
        if (!proto) return;
@@ -1034,6 +1038,16 @@ void compositor_init_hardcoded_proto(GF_Compositor *compositor, GF_Node *node)
                        compositor_init_hc_flashshape(compositor, node);
                        return;
                }
+
+               /*check proto modules*/
+               if (compositor->proto_modules) {
+                       j = 0;
+                       while ( (ifce = (GF_HardcodedProto *)gf_list_enum(compositor->proto_modules, &j) )) {
+                               if ( ifce->can_load_proto(url) && ifce->init(compositor, node) ) {
+                                       return;
+                               }
+                       }
+               }
        }
 
 }
index ec81c5d14d1096e018d097b4291b8a25ecacb0ef..6baf398eadc3ed81403dc5c3be5a803cffd40c20 100644 (file)
@@ -45,7 +45,7 @@ static void TraverseSwitch(GF_Node *node, void *rs, Bool is_destroy)
        GF_TraverseState *tr_state; 
        tr_state = (GF_TraverseState *)rs;
        children = NULL;
-       /* souchay : be sure to be initialized, -1 seems reasonable since we check if (whichChoice>=0)  */
+
        whichChoice = -1;
        if (is_destroy) {
                gf_sc_check_focus_upon_destroy(node);
index 8e539854d1ceeb4fd39d2a8ca63ea5a736937e2d..673087d30e5ea8ea847fad86b5aabb8b32530e57 100644 (file)
@@ -416,10 +416,10 @@ static void TraverseNavigationInfo(GF_Node *node, void *rs, Bool is_destroy)
 #ifndef GPAC_DISABLE_3D
        SFVec3f start, end;
        Fixed scale;
+       ViewStack *st = (ViewStack *) gf_node_get_private(node);
 #endif
        GF_TraverseState *tr_state = (GF_TraverseState *)rs;
        M_NavigationInfo *ni = (M_NavigationInfo *) node;
-       ViewStack *st = (ViewStack *) gf_node_get_private(node);
 
        if (is_destroy) {
                DestroyViewStack(node);
index 6d63bd96b49c8c69796a0b7a455392dc91f665ca..04692ab71c36eb2e4c04597d69c6d37e92fbefe0 100644 (file)
@@ -87,9 +87,6 @@
 #pragma comment (linker, EXPORT_SYMBOL(gf_gz_compress_payload) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_gz_decompress_payload) )
 
-/* Font */
-#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_new) )
-
 /* Memory */
 #ifdef GPAC_MEMORY_TRACKING
 #pragma comment (linker, EXPORT_SYMBOL(gf_mem_malloc) )
 
 
 /*plugin_network.h exports*/
+#ifndef GPAC_DISABLE_PLAYER
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_on_message) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_on_connect) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_on_disconnect) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_remove_event_filter) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_lock_media_queue) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_get_current_service_id) )
-
+#endif
 
 /*ietf.h exports*/
 #ifndef GPAC_DISABLE_STREAMING
 #pragma comment (linker, EXPORT_SYMBOL(gf_ismacryp_decrypt_file) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_ismacryp_encrypt_track) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_ismacryp_decrypt_track) )
-#endif
-
 #pragma comment (linker, EXPORT_SYMBOL(gf_ismacryp_gpac_get_info) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_ismacryp_mpeg4ip_get_info) )
-       
+
+#endif
+
 /*scene_manager.h exports*/
+
 #ifndef GPAC_DISABLE_SCENE_STATS
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_stats_new) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_stats_del) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_stats_for_command) )
 #endif
 
+#ifndef GPAC_DISABLE_SMGR
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_new) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_del) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_stream_new) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_load_run) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_load_suspend) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_import_bifs_subtitle) )
+#endif
+
 #ifndef GPAC_DISABLE_LOADER_BT
 #pragma comment (linker, EXPORT_SYMBOL(gf_sm_load_bt_from_string) )
 #endif
 #endif
 #endif /*GPAC_DISABLE_BIFS*/
 
+#if !defined(GPAC_DISABLE_VRML) && !defined(GPAC_DISABLE_X3D) && !defined(GPAC_DISABLE_SVG)
 
 /*scenegraph.h exports*/
 #pragma comment (linker, EXPORT_SYMBOL(gf_node_get_tag) )
 
 #pragma comment (linker, EXPORT_SYMBOL(gf_node_dump_attribute) )
 
+
 #ifndef GPAC_DISABLE_SVG
 #pragma comment (linker, EXPORT_SYMBOL(gf_node_dom_listener_add) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_dom_event_type_by_name) )
 
 #endif /*GPAC_DISABLE_VRML*/
 
+#endif //!defined(GPAC_DISABLE_VRML) && !defined(GPAC_DISABLE_X3D) && !defined(GPAC_DISABLE_SVG)
+
 
+#ifndef GPAC_DISABLE_PLAYER
 /*terminal.h exports*/
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_new) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_del) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_lock_compositor) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_term_switch_quality) )
 
+/*terminal_dev exports*/
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_new) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_del) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_get_time) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_attach_to_compositor) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_find_odm) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_set_duration) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_setup_object) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_register_extra_graph) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_force_size) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_process_anchor) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_scene_disconnect) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_odm_new) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_odm_setup_object) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_odm_disconnect) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_odm_setup_es) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_odm_remove_es) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_term_node_callback) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_term_message) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_clock_time) )
 
+#endif
+
+#ifndef GPAC_DISABLE_PLAYER
 /*compositor.h exports*/
 #pragma comment (linker, EXPORT_SYMBOL(gf_sc_new) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sc_del) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sc_audio_stop) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_sc_audio_restart) )
 
-/*terminal_dev exports*/
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_new) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_del) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_get_time) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_attach_to_compositor) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_find_odm) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_set_duration) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_setup_object) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_register_extra_graph) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_force_size) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_process_anchor) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_scene_disconnect) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_odm_new) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_odm_setup_object) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_odm_disconnect) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_odm_setup_es) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_odm_remove_es) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_term_node_callback) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_term_message) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_clock_time) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_new) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_set_font) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_create_span) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_refresh_span_bounds) )
+
+#endif
 
 /*mpegts.h exports*/
 #ifndef GPAC_DISABLE_MPEG2TS
 #pragma comment (linker, EXPORT_SYMBOL(gf_m2ts_crc32_check) )
 
 /* carousel.h */
+#ifndef GPAC_DISABLE_DSMCC
 #pragma comment (linker, EXPORT_SYMBOL(gf_m2ts_get_channel_application_info) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_m2ts_process_dsmcc) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_m2ts_init_dsmcc_overlord) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_m2ts_get_dmscc_overlord) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_m2ts_demux_dmscc_init) )
-
+#endif
 
 
 #ifndef GPAC_DISABLE_MPEG2TS_MUX
 #pragma comment (linker, EXPORT_SYMBOL(gf_laser_encoder_get_rap) )
 #endif /*GPAC_DISABLE_LASER*/
 
-#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_new) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_set_font) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_create_span) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_font_manager_refresh_span_bounds) )
-
 /*download.h exports*/
 #pragma comment (linker, EXPORT_SYMBOL(gf_dm_wget) )
 #pragma comment (linker, EXPORT_SYMBOL(gf_dm_wget_with_cache) )
index accca3f9fdfd92e771ffc9ec96bcb10cac0aff13..f0e6cec08c65fac43861387e4c8f693f6f6cbee5 100644 (file)
@@ -26,7 +26,7 @@
 /*
        DO NOT MOFIFY - File generated on GMT Tue May 15 11:18:46 2007
 
-       BY SVGGen for GPAC Version 0.4.3-DEV
+       BY SVGGen for GPAC Version 0.5.0
 */
 
 
diff --git a/src/mcrypt/sha1.c b/src/mcrypt/sha1.c
deleted file mode 100644 (file)
index 3ce8c61..0000000
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- *  FIPS-180-1 compliant SHA-1 implementation
- *
- *  Copyright (C) 2003-2006  Christophe Devine
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License, version 2.1 as published by the Free Software Foundation.
- *
- *  This library 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
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- *  MA  02110-1301  USA
- */
-/*
- *  The SHA-1 standard was published by NIST in 1993.
- *
- *  http://www.itl.nist.gov/fipspubs/fip180-1.htm
- */
-
-#ifndef _CRT_SECURE_NO_DEPRECATE
-#define _CRT_SECURE_NO_DEPRECATE 1
-#endif
-
-#include <gpac/crypt.h>
-
-/*
- * 32-bit integer manipulation macros (big endian)
- */
-#ifndef GET_UINT32_BE
-#define GET_UINT32_BE(n,b,i)                            \
-{                                                       \
-    (n) = ( (u32) (b)[(i)    ] << 24 )        \
-        | ( (u32) (b)[(i) + 1] << 16 )        \
-        | ( (u32) (b)[(i) + 2] <<  8 )        \
-        | ( (u32) (b)[(i) + 3]       );       \
-}
-#endif
-#ifndef PUT_UINT32_BE
-#define PUT_UINT32_BE(n,b,i)                            \
-{                                                       \
-    (b)[(i)    ] = (u8) ( (n) >> 24 );       \
-    (b)[(i) + 1] = (u8) ( (n) >> 16 );       \
-    (b)[(i) + 2] = (u8) ( (n) >>  8 );       \
-    (b)[(i) + 3] = (u8) ( (n)       );       \
-}
-#endif
-
-/*
- * SHA-1 context setup
- */
-void gf_sha1_starts(GF_SHA1Context *ctx )
-{
-    ctx->total[0] = 0;
-    ctx->total[1] = 0;
-
-    ctx->state[0] = 0x67452301;
-    ctx->state[1] = 0xEFCDAB89;
-    ctx->state[2] = 0x98BADCFE;
-    ctx->state[3] = 0x10325476;
-    ctx->state[4] = 0xC3D2E1F0;
-}
-
-static void sha1_process(GF_SHA1Context *ctx, u8 data[64] )
-{
-    u32 temp, W[16], A, B, C, D, E;
-
-    GET_UINT32_BE( W[0],  data,  0 );
-    GET_UINT32_BE( W[1],  data,  4 );
-    GET_UINT32_BE( W[2],  data,  8 );
-    GET_UINT32_BE( W[3],  data, 12 );
-    GET_UINT32_BE( W[4],  data, 16 );
-    GET_UINT32_BE( W[5],  data, 20 );
-    GET_UINT32_BE( W[6],  data, 24 );
-    GET_UINT32_BE( W[7],  data, 28 );
-    GET_UINT32_BE( W[8],  data, 32 );
-    GET_UINT32_BE( W[9],  data, 36 );
-    GET_UINT32_BE( W[10], data, 40 );
-    GET_UINT32_BE( W[11], data, 44 );
-    GET_UINT32_BE( W[12], data, 48 );
-    GET_UINT32_BE( W[13], data, 52 );
-    GET_UINT32_BE( W[14], data, 56 );
-    GET_UINT32_BE( W[15], data, 60 );
-
-#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
-
-#define R(t)                                            \
-(                                                       \
-    temp = W[(t -  3) & 0x0F] ^ W[(t - 8) & 0x0F] ^     \
-           W[(t - 14) & 0x0F] ^ W[ t      & 0x0F],      \
-    ( W[t & 0x0F] = S(temp,1) )                         \
-)
-
-#define P(a,b,c,d,e,x)                                  \
-{                                                       \
-    e += S(a,5) + F(b,c,d) + K + x; b = S(b,30);        \
-}
-
-    A = ctx->state[0];
-    B = ctx->state[1];
-    C = ctx->state[2];
-    D = ctx->state[3];
-    E = ctx->state[4];
-
-#define F(x,y,z) (z ^ (x & (y ^ z)))
-#define K 0x5A827999
-
-    P( A, B, C, D, E, W[0]  );
-    P( E, A, B, C, D, W[1]  );
-    P( D, E, A, B, C, W[2]  );
-    P( C, D, E, A, B, W[3]  );
-    P( B, C, D, E, A, W[4]  );
-    P( A, B, C, D, E, W[5]  );
-    P( E, A, B, C, D, W[6]  );
-    P( D, E, A, B, C, W[7]  );
-    P( C, D, E, A, B, W[8]  );
-    P( B, C, D, E, A, W[9]  );
-    P( A, B, C, D, E, W[10] );
-    P( E, A, B, C, D, W[11] );
-    P( D, E, A, B, C, W[12] );
-    P( C, D, E, A, B, W[13] );
-    P( B, C, D, E, A, W[14] );
-    P( A, B, C, D, E, W[15] );
-    P( E, A, B, C, D, R(16) );
-    P( D, E, A, B, C, R(17) );
-    P( C, D, E, A, B, R(18) );
-    P( B, C, D, E, A, R(19) );
-
-#undef K
-#undef F
-
-#define F(x,y,z) (x ^ y ^ z)
-#define K 0x6ED9EBA1
-
-    P( A, B, C, D, E, R(20) );
-    P( E, A, B, C, D, R(21) );
-    P( D, E, A, B, C, R(22) );
-    P( C, D, E, A, B, R(23) );
-    P( B, C, D, E, A, R(24) );
-    P( A, B, C, D, E, R(25) );
-    P( E, A, B, C, D, R(26) );
-    P( D, E, A, B, C, R(27) );
-    P( C, D, E, A, B, R(28) );
-    P( B, C, D, E, A, R(29) );
-    P( A, B, C, D, E, R(30) );
-    P( E, A, B, C, D, R(31) );
-    P( D, E, A, B, C, R(32) );
-    P( C, D, E, A, B, R(33) );
-    P( B, C, D, E, A, R(34) );
-    P( A, B, C, D, E, R(35) );
-    P( E, A, B, C, D, R(36) );
-    P( D, E, A, B, C, R(37) );
-    P( C, D, E, A, B, R(38) );
-    P( B, C, D, E, A, R(39) );
-
-#undef K
-#undef F
-
-#define F(x,y,z) ((x & y) | (z & (x | y)))
-#define K 0x8F1BBCDC
-
-    P( A, B, C, D, E, R(40) );
-    P( E, A, B, C, D, R(41) );
-    P( D, E, A, B, C, R(42) );
-    P( C, D, E, A, B, R(43) );
-    P( B, C, D, E, A, R(44) );
-    P( A, B, C, D, E, R(45) );
-    P( E, A, B, C, D, R(46) );
-    P( D, E, A, B, C, R(47) );
-    P( C, D, E, A, B, R(48) );
-    P( B, C, D, E, A, R(49) );
-    P( A, B, C, D, E, R(50) );
-    P( E, A, B, C, D, R(51) );
-    P( D, E, A, B, C, R(52) );
-    P( C, D, E, A, B, R(53) );
-    P( B, C, D, E, A, R(54) );
-    P( A, B, C, D, E, R(55) );
-    P( E, A, B, C, D, R(56) );
-    P( D, E, A, B, C, R(57) );
-    P( C, D, E, A, B, R(58) );
-    P( B, C, D, E, A, R(59) );
-
-#undef K
-#undef F
-
-#define F(x,y,z) (x ^ y ^ z)
-#define K 0xCA62C1D6
-
-    P( A, B, C, D, E, R(60) );
-    P( E, A, B, C, D, R(61) );
-    P( D, E, A, B, C, R(62) );
-    P( C, D, E, A, B, R(63) );
-    P( B, C, D, E, A, R(64) );
-    P( A, B, C, D, E, R(65) );
-    P( E, A, B, C, D, R(66) );
-    P( D, E, A, B, C, R(67) );
-    P( C, D, E, A, B, R(68) );
-    P( B, C, D, E, A, R(69) );
-    P( A, B, C, D, E, R(70) );
-    P( E, A, B, C, D, R(71) );
-    P( D, E, A, B, C, R(72) );
-    P( C, D, E, A, B, R(73) );
-    P( B, C, D, E, A, R(74) );
-    P( A, B, C, D, E, R(75) );
-    P( E, A, B, C, D, R(76) );
-    P( D, E, A, B, C, R(77) );
-    P( C, D, E, A, B, R(78) );
-    P( B, C, D, E, A, R(79) );
-
-#undef K
-#undef F
-
-    ctx->state[0] += A;
-    ctx->state[1] += B;
-    ctx->state[2] += C;
-    ctx->state[3] += D;
-    ctx->state[4] += E;
-}
-
-/*
- * SHA-1 process buffer
- */
-void gf_sha1_update(GF_SHA1Context *ctx, u8 *input, u32 ilen )
-{
-    s32 fill;
-    u32 left;
-
-    if( ilen <= 0 )
-        return;
-
-    left = ctx->total[0] & 0x3F;
-    fill = 64 - left;
-
-    ctx->total[0] += ilen;
-    ctx->total[0] &= 0xFFFFFFFF;
-
-    if( ctx->total[0] < (u32) ilen )
-        ctx->total[1]++;
-
-    if( left && (s32) ilen >= fill )
-    {
-        memcpy( (void *) (ctx->buffer + left),
-                (void *) input, fill );
-        sha1_process( ctx, ctx->buffer );
-        input += fill;
-        ilen  -= fill;
-        left = 0;
-    }
-
-    while( ilen >= 64 )
-    {
-        sha1_process( ctx, input );
-        input += 64;
-        ilen  -= 64;
-    }
-
-    if( ilen > 0 )
-    {
-        memcpy( (void *) (ctx->buffer + left),
-                (void *) input, ilen );
-    }
-}
-
-static const u8 sha1_padding[64] =
-{
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/*
- * SHA-1 final digest
- */
-void gf_sha1_finish(GF_SHA1Context *ctx, u8 output[20] )
-{
-    u32 last, padn;
-    u32 high, low;
-    u8 msglen[8];
-
-    high = ( ctx->total[0] >> 29 )
-         | ( ctx->total[1] <<  3 );
-    low  = ( ctx->total[0] <<  3 );
-
-    PUT_UINT32_BE( high, msglen, 0 );
-    PUT_UINT32_BE( low,  msglen, 4 );
-
-    last = ctx->total[0] & 0x3F;
-    padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
-
-    gf_sha1_update( ctx, (u8 *) sha1_padding, padn );
-    gf_sha1_update( ctx, msglen, 8 );
-
-    PUT_UINT32_BE( ctx->state[0], output,  0 );
-    PUT_UINT32_BE( ctx->state[1], output,  4 );
-    PUT_UINT32_BE( ctx->state[2], output,  8 );
-    PUT_UINT32_BE( ctx->state[3], output, 12 );
-    PUT_UINT32_BE( ctx->state[4], output, 16 );
-}
-
-/*
- * Output = SHA-1( file contents )
- */
-GF_EXPORT
-s32 gf_sha1_file( const char *path, u8 output[20] )
-{
-    FILE *f;
-    size_t n;
-   GF_SHA1Context ctx;
-    u8 buf[1024];
-
-    if( ( f = gf_f64_open( path, "rb" ) ) == NULL )
-        return( 1 );
-
-    gf_sha1_starts( &ctx );
-
-    while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
-        gf_sha1_update( &ctx, buf, (s32) n );
-
-    gf_sha1_finish( &ctx, output );
-
-    fclose( f );
-    return( 0 );
-}
-
-/*
- * Output = SHA-1( input buffer )
- */
-void gf_sha1_csum( u8 *input, u32 ilen, u8 output[20] )
-{
-   GF_SHA1Context ctx;
-
-    gf_sha1_starts( &ctx );
-    gf_sha1_update( &ctx, input, ilen );
-    gf_sha1_finish( &ctx, output );
-}
-
-/*
- * Output = HMAC-SHA-1( input buffer, hmac key )
- */
-void gf_sha1_hmac( u8 *key, u32 keylen,
-                u8 *input, u32 ilen,
-                u8 output[20] )
-{
-    s32 i;
-   GF_SHA1Context ctx;
-    u8 k_ipad[64];
-    u8 k_opad[64];
-    u8 tmpbuf[20];
-
-    memset( k_ipad, 0x36, 64 );
-    memset( k_opad, 0x5C, 64 );
-
-    for( i = 0; i < (s32) keylen; i++ )
-    {
-        if( i >= 64 ) break;
-
-        k_ipad[i] ^= key[i];
-        k_opad[i] ^= key[i];
-    }
-
-    gf_sha1_starts( &ctx );
-    gf_sha1_update( &ctx, k_ipad, 64 );
-    gf_sha1_update( &ctx, input, ilen );
-    gf_sha1_finish( &ctx, tmpbuf );
-
-    gf_sha1_starts( &ctx );
-    gf_sha1_update( &ctx, k_opad, 64 );
-    gf_sha1_update( &ctx, tmpbuf, 20 );
-    gf_sha1_finish( &ctx, output );
-
-    memset( k_ipad, 0, 64 );
-    memset( k_opad, 0, 64 );
-    memset( tmpbuf, 0, 20 );
-    memset( &ctx, 0, sizeof(GF_SHA1Context ) );
-}
-
index 3f6fc62ff5abe797534d9f38d2d523ddf7e741b8..92c2b4e2f51c7772c5fb99ecaba32eb5becefc58 100644 (file)
  */
 
 #include <gpac/internal/media_dev.h>
-#include <gpac/internal/ogg.h>
 #include <gpac/constants.h>
 #include <gpac/math.h>
 
+#ifndef GPAC_DISABLE_OGG
+#include <gpac/internal/ogg.h>
+#endif
 
 GF_EXPORT
 const char *gf_m4v_get_profile_name(u8 video_pl)
@@ -1561,10 +1563,10 @@ static u32 avc_emulation_bytes_add_count(unsigned char *buffer, u32 nal_size)
        while (i < nal_size) {
                /*ISO 14496-10: "Within the NAL unit, any four-byte sequence that starts with 0x000003
                other than the following sequences shall not occur at any byte-aligned position:
-               \96 0x00000300
-               \96 0x00000301
-               \96 0x00000302
-               \96 0x00000303"
+               \96 0x00000300
+               \96 0x00000301
+               \96 0x00000302
+               \96 0x00000303"
                */
                if (num_zero == 2 && buffer[i] < 0x04) {
                        /*emulation code found*/
@@ -1622,10 +1624,10 @@ static u32 avc_emulation_bytes_remove_count(unsigned char *buffer, u32 nal_size)
        {
                /*ISO 14496-10: "Within the NAL unit, any four-byte sequence that starts with 0x000003
                  other than the following sequences shall not occur at any byte-aligned position:
-                 \96 0x00000300
-                 \96 0x00000301
-                 \96 0x00000302
-                 \96 0x00000303"
+                 \96 0x00000300
+                 \96 0x00000301
+                 \96 0x00000302
+                 \96 0x00000303"
                */
                if (num_zero == 2
                        && buffer[i] == 0x03
@@ -1750,8 +1752,8 @@ s32 AVC_ReadSeqInfo(char *sps_data, u32 sps_size, AVCState *avc, u32 subseq_sps,
                        u8 separate_colour_plane_flag = gf_bs_read_int(bs, 1);
                        /*
                        Depending on the value of separate_colour_plane_flag, the value of the variable ChromaArrayType is assigned as follows.
-                       \96       If separate_colour_plane_flag is equal to 0, ChromaArrayType is set equal to chroma_format_idc.
-                       \96       Otherwise (separate_colour_plane_flag is equal to 1), ChromaArrayType is set equal to 0.
+                       \96     If separate_colour_plane_flag is equal to 0, ChromaArrayType is set equal to chroma_format_idc.
+                       \96     Otherwise (separate_colour_plane_flag is equal to 1), ChromaArrayType is set equal to 0.
                        */
                        if (separate_colour_plane_flag) ChromaArrayType = 0;
                }
@@ -2583,6 +2585,8 @@ u32 AVC_ReformatSEI_NALU(char *buffer, u32 nal_size, AVCState *avc)
        return (written>1) ? written : 0;
 }
 
+#ifndef GPAC_DISABLE_ISOM
+
 static u8 avc_get_sar_idx(u32 w, u32 h)
 {
        u32 i;
@@ -2592,7 +2596,6 @@ static u8 avc_get_sar_idx(u32 w, u32 h)
        return 0xFF;
 }
 
-#ifndef GPAC_DISABLE_ISOM
 GF_Err AVC_ChangePAR(GF_AVCConfig *avcc, s32 ar_n, s32 ar_d)
 {
        GF_BitStream *orig, *mod;
diff --git a/src/media_tools/dvb.c b/src/media_tools/dvb.c
deleted file mode 100644 (file)
index 9abf791..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *                     GPAC - Multimedia Framework C SDK
- *
- *    Copyright (c)2006-201X ENST - All rights reserved
- *
- *  This file is part of GPAC / MPEG2-TS sub-project
- *
- *  GPAC is gf_free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published by
- *  the gf_free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *
- *  GPAC 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 Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; see the file COPYING.  If not, write to
- *  the gf_free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-
-#include <gpac/tools.h>
-#include <time.h>
-
-
-/* decodes an Modified Julian Date (MJD) into a Co-ordinated Universal Time (UTC)
-See annex C of DVB-SI ETSI EN 300468 */
-void dvb_decode_mjd_date(u32 date, u16 *year, u8 *month, u8 *day)
-{
-    u32 yp, mp, k;
-    yp = (u32)((date - 15078.2)/365.25);
-    mp = (u32)((date - 14956.1 - (u32)(yp * 365.25))/30.6001);
-    *day = (u32)(date - 14956 - (u32)(yp * 365.25) - (u32)(mp * 30.6001));
-    if (mp == 14 || mp == 15) k = 1;
-    else k = 0;
-    *year = yp + k + 1900;
-    *month = mp - 1 - k*12;
-       assert(*year>=1900 && *year<=2100 && *month && *month<=12 && *day && *day<=31);
-}
-
-#if 0 /*disabled since mktime doesn't exist on Windows Mobile*/
-/* decodes an Modified Julian Date (MJD) into a unix time (i.e. seconds since Jan 1st 1970) */
-void dvb_decode_mjd_to_unix_time(u8 *data, time_t *unix_time) {
-    struct tm time;
-    char tmp_time[10];
-    u16 year = (u16)time.tm_year;
-    u8 month = (u8) time.tm_mon;
-    u8 day   = (u8) time.tm_mday;
-
-    memset(&time, 0, sizeof(struct tm));
-    dvb_decode_mjd_date((data[0] << 8) | data[1], &year, &month, &day);
-    time.tm_year = year - 1900;
-    time.tm_mon = month-1; /* months are 0-based in time_t */
-    time.tm_mday = day;
-    time.tm_isdst = -1; /* we don't want to apply Daylight Saving Time */
-
-    sprintf(tmp_time, "%02x", data[2]);
-    time.tm_hour = atoi(tmp_time);
-    sprintf(tmp_time, "%02x", data[3]);
-    time.tm_min = atoi(tmp_time);
-    sprintf(tmp_time, "%02x", data[4]);
-    time.tm_sec = atoi(tmp_time);
-    *unix_time = mktime(&time);
-}
-#endif
index acaa0dc6ab3269b1190634935aa7cc095b6c58ac..39e9d8feb4fab9fc1e25f6d8bd56908fb2b71f88 100644 (file)
@@ -32,6 +32,8 @@
 #include <gpac/crypt.h>
 
 
+#if !defined(GPAC_DISABLE_MCRYPT)
+
 typedef struct 
 {
        GF_List *tcis;
@@ -257,7 +259,7 @@ Bool gf_ismacryp_mpeg4ip_get_info(char *kms_uri, char *key, char *salt)
        return 0;
 }
 
-#if !defined(GPAC_DISABLE_MCRYPT) && !defined(GPAC_DISABLE_ISOM_WRITE)
+#ifndef GPAC_DISABLE_ISOM_WRITE
 
 static GFINLINE void resync_IV(GF_Crypt *mc, u64 BSO, char *salt)
 {
@@ -892,70 +894,6 @@ GF_Err gf_ismacryp_crypt_file(GF_ISOFile *mp4, const char *drm_file)
        return e;
 }
 
-#endif /*!defined(GPAC_DISABLE_MCRYPT) && !defined(GPAC_DISABLE_ISOM_WRITE)*/
-
-GF_EXPORT
-GF_Err gf_media_get_file_hash(const char *file, u8 hash[20]) 
-{
-       u8 block[1024];
-       u32 read;
-       u64 size, tot;
-       FILE *in;
-       GF_SHA1Context ctx;
-#ifndef GPAC_DISABLE_ISOM
-       GF_BitStream *bs = NULL;
-       Bool is_isom = gf_isom_probe_file(file);
-#endif
-
-       in = gf_f64_open(file, "rb");
-       gf_f64_seek(in, 0, SEEK_END);
-       size = gf_f64_tell(in);
-       gf_f64_seek(in, 0, SEEK_SET);
-
-       gf_sha1_starts(&ctx);
-       tot = 0;
-#ifndef GPAC_DISABLE_ISOM
-       if (is_isom) bs = gf_bs_from_file(in, GF_BITSTREAM_READ);
-#endif
-
-       while (tot<size) {
-#ifndef GPAC_DISABLE_ISOM
-               if (is_isom) {
-                       u64 box_size = gf_bs_peek_bits(bs, 32, 0);
-                       u32 box_type = gf_bs_peek_bits(bs, 32, 4);
-
-                       /*till end of file*/
-                       if (!box_size) box_size = size-tot;
-                       /*64-bit size*/
-                       else if (box_size==1) box_size = gf_bs_peek_bits(bs, 64, 8);
-
-                       /*skip all MutableDRMInformation*/
-                       if (box_type==GF_4CC('m','d','r','i')) {
-                               gf_bs_skip_bytes(bs, box_size);
-                               tot += box_size;
-                       } else {
-                               u32 bsize = 0;
-                               while (bsize<box_size) {
-                                       u32 to_read = (u32) ((box_size-bsize<1024) ? (box_size-bsize) : 1024);
-                                       gf_bs_read_data(bs, block, to_read);
-                                       gf_sha1_update(&ctx, block, to_read);
-                                       bsize += to_read;
-                               }
-                               tot += box_size;
-                       }
-               } else
-#endif
-               {
-                       read = fread(block, 1, 1024, in);
-                       gf_sha1_update(&ctx, block, read);
-                       tot += read;
-               }
-       }
-       gf_sha1_finish(&ctx, hash);
-#ifndef GPAC_DISABLE_ISOM
-       if (bs) gf_bs_del(bs);
-#endif
-       fclose(in);
-       return GF_OK;
-}
+#endif /* !defined(GPAC_DISABLE_ISOM_WRITE)*/
+#endif /* !defined(GPAC_DISABLE_MCRYPT)*/
 
index 9f37d0119b95726e5205b4656b328b46c16158b8..9b8f18989e63201ca609918d3f4ad901f5b000bc 100644 (file)
 #include <gpac/constants.h>
 #include <gpac/config_file.h>
 
+
+GF_EXPORT
+GF_Err gf_media_get_file_hash(const char *file, u8 hash[20]) 
+{
+       u8 block[1024];
+       u32 read;
+       u64 size, tot;
+       FILE *in;
+       GF_SHA1Context *ctx;
+#ifndef GPAC_DISABLE_ISOM
+       GF_BitStream *bs = NULL;
+       Bool is_isom = gf_isom_probe_file(file);
+#endif
+
+       in = gf_f64_open(file, "rb");
+       gf_f64_seek(in, 0, SEEK_END);
+       size = gf_f64_tell(in);
+       gf_f64_seek(in, 0, SEEK_SET);
+
+       ctx = gf_sha1_starts();
+       tot = 0;
+#ifndef GPAC_DISABLE_ISOM
+       if (is_isom) bs = gf_bs_from_file(in, GF_BITSTREAM_READ);
+#endif
+
+       while (tot<size) {
+#ifndef GPAC_DISABLE_ISOM
+               if (is_isom) {
+                       u64 box_size = gf_bs_peek_bits(bs, 32, 0);
+                       u32 box_type = gf_bs_peek_bits(bs, 32, 4);
+
+                       /*till end of file*/
+                       if (!box_size) box_size = size-tot;
+                       /*64-bit size*/
+                       else if (box_size==1) box_size = gf_bs_peek_bits(bs, 64, 8);
+
+                       /*skip all MutableDRMInformation*/
+                       if (box_type==GF_4CC('m','d','r','i')) {
+                               gf_bs_skip_bytes(bs, box_size);
+                               tot += box_size;
+                       } else {
+                               u32 bsize = 0;
+                               while (bsize<box_size) {
+                                       u32 to_read = (u32) ((box_size-bsize<1024) ? (box_size-bsize) : 1024);
+                                       gf_bs_read_data(bs, block, to_read);
+                                       gf_sha1_update(ctx, block, to_read);
+                                       bsize += to_read;
+                               }
+                               tot += box_size;
+                       }
+               } else
+#endif
+               {
+                       read = fread(block, 1, 1024, in);
+                       gf_sha1_update(ctx, block, read);
+                       tot += read;
+               }
+       }
+       gf_sha1_finish(ctx, hash);
+#ifndef GPAC_DISABLE_ISOM
+       if (bs) gf_bs_del(bs);
+#endif
+       fclose(in);
+       return GF_OK;
+}
+
 #ifndef GPAC_DISABLE_ISOM
 
 GF_Err gf_media_get_rfc_6381_codec_name(GF_ISOFile *movie, u32 track, char *szCodec)
index 17ce1290780fe7dab20d3d7c6c939793a10a38a5..00b3cd0bd8ca4bfb9b3e711bddcc4c9f9cf70c3b 100644 (file)
@@ -1,7 +1,8 @@
 /**
 *                      GPAC - Multimedia Framework C SDK
 *
-*                      Copyright (c) Jean Le Feuvre 2000-2005
+*                                      Authors: Pierre Souchay, Jean Le Feuvre
+*                      Copyright (c) Telecom ParisTech 2010-2012
 *                                      All rights reserved
 *
 *  This file is part of GPAC
@@ -19,7 +20,6 @@
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; see the file COPYING.  If not, write to
 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-*  Written by Pierre Souchay for VizionR SAS
 *
 */
 
index 32255fb0cb710c09023305d549205923164e7822..bf6b6cbec12e6e090921176d143775b0c4450bc5 100644 (file)
 
 #ifndef GPAC_DISABLE_MEDIA_EXPORT
 
+#ifndef GPAC_DISABLE_AVILIB
 #include <gpac/internal/avilib.h>
+#endif
+
+#ifndef GPAC_DISABLE_OGG
 #include <gpac/internal/ogg.h>
+#endif
+
+#ifndef GPAC_DISABLE_VOBSUB
 #include <gpac/internal/vobsub.h>
+#endif
+
+
 #include <zlib.h>
 
 GF_Err gf_media_export_nhml(GF_MediaExporter *dumper, Bool dims_doc);
@@ -439,6 +449,7 @@ GF_Err gf_media_export_samples(GF_MediaExporter *dumper)
 
 static GF_Err gf_dump_to_vobsub(GF_MediaExporter *dumper, char *szName, u32 track, char *dsi, u32 dsiSize)
 {
+#ifndef GPAC_DISABLE_VOBSUB
        FILE                    *fidx, *fsub;
        u32                              width, height, i, count, di;
        GF_ISOSample    *samp;
@@ -554,6 +565,9 @@ static GF_Err gf_dump_to_vobsub(GF_MediaExporter *dumper, char *szName, u32 trac
        fclose(fidx);
 
        return GF_OK;
+#else
+       return GF_NOT_SUPPORTED;
+#endif
 }
 
 /*QCP codec GUIDs*/
@@ -1813,6 +1827,7 @@ typedef struct
 
 GF_Err gf_media_export_saf(GF_MediaExporter *dumper)
 {
+#ifndef GPAC_DISABLE_SAF
        u32 count, i, s_count, di, tot_samp, samp_done;
        char out_file[GF_MAX_PATH];
        GF_SAFMuxer *mux;
@@ -1914,6 +1929,9 @@ GF_Err gf_media_export_saf(GF_MediaExporter *dumper)
 
        gf_saf_mux_del(mux);
        return GF_OK;
+#else
+       return GF_NOT_SUPPORTED;
+#endif
 }
 
 #ifndef GPAC_DISABLE_MPEG2TS
index 25deb74954d02a26386095b0110722c1c09abbd4..e80f7087f8e96bb3d90f9fff3af8d4b7f9046d20 100644 (file)
 
 
 #include <gpac/internal/media_dev.h>
+#ifndef GPAC_DISABLE_AVILIB
 #include <gpac/internal/avilib.h>
+#endif
+#ifndef GPAC_DISABLE_OGG
 #include <gpac/internal/ogg.h>
+#endif
+#ifndef GPAC_DISABLE_VOBSUB
 #include <gpac/internal/vobsub.h>
+#endif
 #include <gpac/xml.h>
 #include <gpac/mpegts.h>
 #include <gpac/constants.h>
@@ -5130,6 +5136,7 @@ exit:
 
 GF_Err gf_import_saf(GF_MediaImporter *import)
 {
+#ifndef GPAC_DISABLE_SAF
        GF_Err e;
        u32 track;
        u64 tot;
@@ -5300,9 +5307,11 @@ GF_Err gf_import_saf(GF_MediaImporter *import)
        gf_set_progress("Importing SAF", tot, tot);
        MP4T_RecomputeBitRate(import->dest, track);
        return GF_OK;
+#else
+       return GF_NOT_SUPPORTED;
+#endif
 }
 
-
 typedef struct
 {
        GF_MediaImporter *import;
@@ -6271,6 +6280,7 @@ GF_Err gf_import_mpeg_ts(GF_MediaImporter *import)
 
 GF_Err gf_import_vobsub(GF_MediaImporter *import)
 {
+#ifndef GPAC_DISABLE_VOBSUB
        static const u8 null_subpic[] = { 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0xFF };
        char              filename[GF_MAX_PATH];
        FILE             *file = NULL;
@@ -6522,6 +6532,9 @@ error:
        }
 
        return err;
+#else
+       return GF_NOT_SUPPORTED;
+#endif
 }
 
 #ifndef GPAC_DISABLE_AV_PARSERS
@@ -6658,7 +6671,9 @@ exit:
 GF_EXPORT
 GF_Err gf_media_import(GF_MediaImporter *importer)
 {
+#ifndef GPAC_DISABLE_TTXT
        GF_Err gf_import_timed_text(GF_MediaImporter *import);
+#endif
        GF_Err e;
        char *ext, *xml_type;
        char *fmt = "";
@@ -6776,8 +6791,13 @@ GF_Err gf_media_import(GF_MediaImporter *importer)
                return gf_import_saf(importer);
        /*text subtitles*/
        if (!strnicmp(ext, ".srt", 4) || !strnicmp(ext, ".sub", 4) || !strnicmp(ext, ".ttxt", 5)
-               || !stricmp(fmt, "SRT") || !stricmp(fmt, "SUB") || !stricmp(fmt, "TEXT") )
-               return gf_import_timed_text(importer);
+               || !stricmp(fmt, "SRT") || !stricmp(fmt, "SUB") || !stricmp(fmt, "TEXT") ) {
+#ifndef GPAC_DISABLE_TTXT
+                       return gf_import_timed_text(importer);
+#else
+                       return GF_NOT_SUPPORTED;
+#endif
+       }
        /*VobSub*/
        if (!strnicmp(ext, ".idx", 4) || !stricmp(fmt, "VOBSUB"))
                return gf_import_vobsub(importer);
@@ -6794,7 +6814,11 @@ GF_Err gf_media_import(GF_MediaImporter *importer)
        if (xml_type) {
                if (!stricmp(xml_type, "TextStream") || !stricmp(xml_type, "text3GTrack") ) {
                        gf_free(xml_type);
+#ifndef GPAC_DISABLE_TTXT
                        return gf_import_timed_text(importer);
+#else
+                       return GF_NOT_SUPPORTED;
+#endif
                }
                else if (!stricmp(xml_type, "NHNTStream")) {
                        gf_free(xml_type);
index 78521dba5645f102d5fbb8ce1516b6c3faaec89f..9cc877b2438f0739cfafe30ff5e62a332327e4fa 100644 (file)
 #include <unistd.h>
 #endif
 
-#define DUMP_MPE_IP_DATAGRAMS
 //#define FORCE_DISABLE_MPEG4SL_OVER_MPEG2TS
 
-#ifdef DUMP_MPE_IP_DATAGRAMS
+#ifndef GPAC_DISABLE_MPE
 #include <gpac/dvb_mpe.h>
 #endif
 
+#ifndef GPAC_DISABLE_DSMCC
+#include <gpac/ait.h>
+#endif
+
 #define DEBUG_TS_PACKET 0
 
 
@@ -811,7 +814,7 @@ void gf_m2ts_es_del(GF_M2TS_ES *es)
                GF_M2TS_SECTION_ES *ses = (GF_M2TS_SECTION_ES *)es;
                if (ses->sec) gf_m2ts_section_filter_del(ses->sec);
 
-#ifdef DUMP_MPE_IP_DATAGRAMS
+#ifndef GPAC_DISABLE_MPE
                if (es->flags & GF_M2TS_ES_IS_MPE)
                        gf_dvb_mpe_section_del(es);
 #endif
@@ -841,22 +844,27 @@ static void gf_m2ts_section_complete(GF_M2TS_Demuxer *ts, GF_M2TS_SectionFilter
 {
        if (!sec->process_section) {
                if ((ts->on_event && (sec->section[0]==GF_M2TS_TABLE_ID_AIT)) ) {                               
+#ifndef GPAC_DISABLE_DSMCC
                        GF_M2TS_SL_PCK pck;
                        pck.data_len = sec->length;
                        pck.data = sec->section;
                        pck.stream = (GF_M2TS_ES *)ses;
                        //ts->on_event(ts, GF_M2TS_EVT_AIT_FOUND, &pck);
                        on_ait_section(ts, GF_M2TS_EVT_AIT_FOUND, &pck);
+#endif
                } else if ((ts->on_event && (sec->section[0]==GF_M2TS_TABLE_ID_DSM_CC_ENCAPSULATED_DATA || sec->section[0]==GF_M2TS_TABLE_ID_DSM_CC_UN_MESSAGE ||
                        sec->section[0]==GF_M2TS_TABLE_ID_DSM_CC_DOWNLOAD_DATA_MESSAGE || sec->section[0]==GF_M2TS_TABLE_ID_DSM_CC_STREAM_DESCRIPTION || sec->section[0]==GF_M2TS_TABLE_ID_DSM_CC_PRIVATE)) ) {                         
+
+#ifndef GPAC_DISABLE_DSMCC
                        GF_M2TS_SL_PCK pck;
                        pck.data_len = sec->length;
                        pck.data = sec->section;
                        pck.stream = (GF_M2TS_ES *)ses;
                        on_dsmcc_section(ts,GF_M2TS_EVT_DSMCC_FOUND,&pck); 
                        //ts->on_event(ts, GF_M2TS_EVT_DSMCC_FOUND, &pck);
+#endif
                }
-#ifdef DUMP_MPE_IP_DATAGRAMS
+#ifndef GPAC_DISABLE_MPE
                else if (ts->on_mpe_event && ((ses && (ses->flags & GF_M2TS_EVT_DVB_MPE)) || (sec->section[0]==GF_M2TS_TABLE_ID_INT)) ) {
                        GF_M2TS_SL_PCK pck;
                        pck.data_len = sec->length;
@@ -1278,7 +1286,22 @@ static void gf_m2ts_process_nit(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *nit_es,
        GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[MPEG-2 TS] NIT table processing (not yet implemented)"));
 }
 
-extern void dvb_decode_mjd_date(u32 date, u16 *year, u8 *month, u8 *day);
+/* decodes an Modified Julian Date (MJD) into a Co-ordinated Universal Time (UTC)
+See annex C of DVB-SI ETSI EN 300468 */
+static void dvb_decode_mjd_date(u32 date, u16 *year, u8 *month, u8 *day)
+{
+    u32 yp, mp, k;
+    yp = (u32)((date - 15078.2)/365.25);
+    mp = (u32)((date - 14956.1 - (u32)(yp * 365.25))/30.6001);
+    *day = (u32)(date - 14956 - (u32)(yp * 365.25) - (u32)(mp * 30.6001));
+    if (mp == 14 || mp == 15) k = 1;
+    else k = 0;
+    *year = yp + k + 1900;
+    *month = mp - 1 - k*12;
+       assert(*year>=1900 && *year<=2100 && *month && *month<=12 && *day && *day<=31);
+}
+
+
 static void gf_m2ts_process_tdt_tot(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *tdt_tot_es, GF_List *sections, u8 table_id, u16 ex_table_id, u8 version_number, u8 last_section_number, u32 status)
 {
        unsigned char *data;
@@ -1522,13 +1545,6 @@ static void gf_m2ts_process_pmt(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *pmt, GF
                        }
                        break;
 
-               
-               
-                       /*to refine with generic private section redispatching to AIT or other afterwards*/
-                       es = gf_ait_section_new(pmt->program->number);
-                       ses = (GF_M2TS_SECTION_ES *)es;
-                       ses->sec = gf_m2ts_section_filter_new(NULL, 0);
-                       break;
                case GF_M2TS_13818_6_ANNEX_A:
                case GF_M2TS_13818_6_ANNEX_B:
                case GF_M2TS_13818_6_ANNEX_C:
@@ -1551,7 +1567,7 @@ static void gf_m2ts_process_pmt(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *pmt, GF
 
                case GF_M2TS_MPE_SECTIONS:
                        GF_LOG(GF_LOG_INFO, GF_LOG_CONTAINER, ("stream type MPE found : pid = %d \n", pid));
-#ifdef DUMP_MPE_IP_DATAGRAMS
+#ifndef GPAC_DISABLE_MPE
                        es = gf_dvb_mpe_section_new();
                        if (es->flags & GF_M2TS_ES_IS_SECTION) {
                                /* NULL means: trigger the call to on_event with DVB_GENERAL type and the raw section as payload */
@@ -2476,7 +2492,7 @@ GF_M2TS_Demuxer *gf_m2ts_demux_new()
        ts->eit = gf_m2ts_section_filter_new(NULL/*gf_m2ts_process_eit*/, 1);
        ts->tdt_tot = gf_m2ts_section_filter_new(gf_m2ts_process_tdt_tot, 1);
 
-#ifdef DUMP_MPE_IP_DATAGRAMS
+#ifndef GPAC_DISABLE_MPE
        gf_dvb_mpe_init(ts);
 #endif
 
@@ -2548,11 +2564,12 @@ void gf_m2ts_demux_del(GF_M2TS_Demuxer *ts)
        if (ts->tdt_tot)
        gf_list_del(ts->SDTs);
 
-#ifdef DUMP_MPE_IP_DATAGRAMS
+#ifndef GPAC_DISABLE_MPE
        gf_dvb_mpe_shutdown(ts);
 #endif
 
        if(gf_list_count(ts->dsmcc_controler)){
+#ifndef GPAC_DISABLE_DSMCC
                GF_M2TS_DSMCC_OVERLORD* dsmcc_overlord = (GF_M2TS_DSMCC_OVERLORD*)gf_list_get(ts->dsmcc_controler,0);   
                gf_cleanup_dir(dsmcc_overlord->root_dir);
                gf_rmdir(dsmcc_overlord->root_dir);     
@@ -2560,12 +2577,15 @@ void gf_m2ts_demux_del(GF_M2TS_Demuxer *ts)
                if(ts->dsmcc_root_dir){
                        gf_free(ts->dsmcc_root_dir);
                }
+#endif
        }
 
        while(gf_list_count(ts->ChannelAppList)){
+#ifndef GPAC_DISABLE_DSMCC
                GF_M2TS_CHANNEL_APPLICATION_INFO* ChanAppInfo = (GF_M2TS_CHANNEL_APPLICATION_INFO*)gf_list_get(ts->ChannelAppList,0);
                gf_m2ts_delete_channel_application_info(ChanAppInfo);
                gf_list_rem(ts->ChannelAppList,0);
+#endif
        }
        gf_list_del(ts->ChannelAppList);
 
@@ -2574,7 +2594,7 @@ void gf_m2ts_demux_del(GF_M2TS_Demuxer *ts)
 
 void gf_m2ts_print_info(GF_M2TS_Demuxer *ts)
 {
-#ifdef DUMP_MPE_IP_DATAGRAMS
+#ifndef GPAC_DISABLE_MPE
        gf_m2ts_print_mpe_info(ts);
 #endif
 }
index c6ea069742792755d03308c7cd703304d027f8dd..79e777aba9376e47bcbfa97b89be03cdcb742bf1 100644 (file)
@@ -26,6 +26,7 @@
 #include <gpac/internal/media_dev.h>
 #include <gpac/bitstream.h>
 #include <gpac/thread.h>
+#include <gpac/list.h>
 
 enum
 {
index 16cbcbd1aaf05685dcafb1f0f08b8e3e7b47d0cf..780aef65c5900453e3e55dce60837ebe26e1eff7 100644 (file)
@@ -639,8 +639,12 @@ GF_Err gf_odf_del_text_cfg(GF_TextConfig *desc)
 GF_EXPORT
 GF_Err gf_odf_get_text_config(GF_DefaultDescriptor *dsi, u8 oti, GF_TextConfig *cfg)
 {
-       u32 i, j;
-       Bool has_alt_format, has_sd;
+       u32 i;
+       Bool has_alt_format;
+#ifndef GPAC_DISABLE_ISOM
+       Bool has_sd;
+       u32 j;
+#endif
        GF_Err e;
        GF_BitStream *bs;
        if (!dsi || !dsi->data || !dsi->dataLength || !cfg) return GF_BAD_PARAM;
@@ -657,7 +661,11 @@ GF_Err gf_odf_get_text_config(GF_DefaultDescriptor *dsi, u8 oti, GF_TextConfig *
        cfg->timescale = gf_bs_read_int(bs, 24);
        has_alt_format = gf_bs_read_int(bs, 1);
        cfg->sampleDescriptionFlags = gf_bs_read_int(bs, 2);
+#ifndef GPAC_DISABLE_ISOM
        has_sd = gf_bs_read_int(bs, 1);
+#else
+       gf_bs_read_int(bs, 1);
+#endif
        cfg->has_vid_info = gf_bs_read_int(bs, 1);
        gf_bs_read_int(bs, 3);
        cfg->layer = gf_bs_read_int(bs, 8);
@@ -717,7 +725,9 @@ GF_Err gf_odf_get_text_config(GF_DefaultDescriptor *dsi, u8 oti, GF_TextConfig *
                cfg->vert_offset = gf_bs_read_int(bs, 16);
        }
        
+#ifndef GPAC_DISABLE_ISOM
 exit:
+#endif
        gf_bs_del(bs);
        if (e) ResetTextConfig(cfg);
        return e;
index c1e2ad6df783ffb3ee3aee21e8a285fe12d87744..05187c4feaaa4e748a4d30d8db48abd0ea72af0f 100644 (file)
@@ -622,7 +622,9 @@ GF_Err gf_node_unregister(GF_Node *pNode, GF_Node *parentNode)
        u32 j;
        GF_Route *r;
 #endif
+#ifdef GPAC_HAS_SPIDERMONKEY
        Bool detach=0;
+#endif
        GF_SceneGraph *pSG;
 
        if (!pNode) return GF_OK;
@@ -641,7 +643,9 @@ GF_Err gf_node_unregister(GF_Node *pNode, GF_Node *parentNode)
                                if (prev) prev->next = nlist->next;
                                else pNode->sgprivate->parents = nlist->next;
                                gf_free(nlist);
+#ifdef GPAC_HAS_SPIDERMONKEY
                                if (pNode->sgprivate->parents==NULL) detach=1;
+#endif
                                break;
                        }
                }
index 07d1a368c4021b80190d4c0127119433d37462c7..f020ce18c03e0a10a2fcdc589cc6999a5427d12a 100644 (file)
@@ -26,7 +26,7 @@
 /*
        DO NOT MOFIFY - File generated on GMT Tue Nov 08 09:10:57 2011
 
-       BY MPEG4Gen for GPAC Version 0.4.6-DEV
+       BY MPEG4Gen for GPAC Version 0.5.0
 */
 
 #include <gpac/nodes_mpeg4.h>
index 78d059bffca13d31310e44c7f7cb060a002d5276..c7e36e24f040653cac6b201e9d53275e1861f4b9 100644 (file)
@@ -26,7 +26,7 @@
 /*
        DO NOT MOFIFY - File generated on GMT Fri Jul 31 16:39:50 2009
 
-       BY X3DGen for GPAC Version 0.4.6-DEV
+       BY X3DGen for GPAC Version 0.5.0
 */
 
 
index d6dec1f49134c8ccb670b425b6259943fc1496dd..1c083382b829d1549b3cef629506418c864cc1b3 100644 (file)
@@ -33,6 +33,7 @@
 #include <gpac/nodes_svg.h>
 
 
+#ifndef GPAC_DISABLE_SVG
 static GF_MediaObject *get_sync_reference(GF_Scene *scene, XMLRI *iri, u32 o_type, GF_Node *orig_ref, Bool *post_pone)
 {
        MFURL mfurl;
@@ -51,14 +52,11 @@ static GF_MediaObject *get_sync_reference(GF_Scene *scene, XMLRI *iri, u32 o_typ
                else ref = gf_sg_find_node_by_name(scene->graph, iri->string);
 
                if (ref) {
-#ifndef GPAC_DISABLE_SVG
                        GF_FieldInfo info;
-#endif
                        /*safety check, break cyclic references*/
                        if (ref==orig_ref) return NULL;
 
                        switch (ref->sgprivate->tag) {
-#ifndef GPAC_DISABLE_SVG
                        case TAG_SVG_audio:
                                o_type = GF_MEDIA_OBJECT_AUDIO; 
                                if (gf_node_get_attribute_by_tag(ref, TAG_XLINK_ATT_href, 0, 0, &info)==GF_OK) {
@@ -71,7 +69,6 @@ static GF_MediaObject *get_sync_reference(GF_Scene *scene, XMLRI *iri, u32 o_typ
                                        return get_sync_reference(scene, info.far_ptr, o_type, orig_ref ? orig_ref : ref, post_pone);
                                }
                                return NULL;
-#endif
                        default:
                                return NULL;
                        }
@@ -87,6 +84,8 @@ static GF_MediaObject *get_sync_reference(GF_Scene *scene, XMLRI *iri, u32 o_typ
        if (!res) *post_pone = 1;
        return res;
 }
+#endif
+
 
 GF_EXPORT
 GF_MediaObject *gf_mo_register(GF_Node *node, MFURL *url, Bool lock_timelines, Bool force_new_res)
index 44ab289fb3ce2596457382d7f9264efa5d0fd2fd..b68b30805d8a9481adfeb22be6cdbe071e724b39 100644 (file)
@@ -1243,6 +1243,7 @@ void gf_term_lock_net(GF_Terminal *term, Bool LockIt)
        }
 }
 
+#ifndef GPAC_DISABLE_SVG
 static void media_event_collect_info(GF_ClientService *net, GF_ObjectManager *odm, GF_DOMMediaEvent *media_event, u32 *min_time, u32 *min_buffer)
 {
        u32 i=0;
@@ -1268,6 +1269,7 @@ static void media_event_collect_info(GF_ClientService *net, GF_ObjectManager *od
                }
        }
 }
+#endif
 
 void gf_term_service_media_event_with_download(GF_ObjectManager *odm, u32 event_type, u64 loaded_size, u64 total_size, u32 bytes_per_sec)
 {
@@ -1704,6 +1706,7 @@ void gf_term_attach_service(GF_Terminal *term, GF_InputService *service_hdl)
 GF_EXPORT
 GF_Err gf_term_scene_update(GF_Terminal *term, char *type, char *com)
 {
+#ifndef GPAC_DISABLE_SMGR
        GF_Err e;
        GF_StreamContext *sc;
        GF_ESD *esd;
@@ -1810,6 +1813,9 @@ GF_Err gf_term_scene_update(GF_Terminal *term, char *type, char *com)
        }
        gf_sm_del(load.ctx);
        return e;
+#else
+       return GF_NOT_SUPPORTED;
+#endif
 }
 
 GF_EXPORT
index 8745c8b50850c263adee1baa50f68315faf15820..56a84715298ded64897ffed921e5d1e9174d079b 100644 (file)
@@ -30,7 +30,6 @@
 #include <gpac/thread.h>
 #include <gpac/list.h>
 #include <gpac/base_coding.h>
-#include <gpac/crypt.h>
 #include <gpac/tools.h>
 #include <gpac/config_file.h>
 #include <stdio.h>
index 78cba2bd7dd5edf28aa01590f91c291c77becbd2..75534af60d069e25820f430b95efb5dbb2f3c068 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 
-#include <gpac/user.h>
+#include <gpac/tools.h>
 #include <gpac/constants.h>
 #include <gpac/color.h>
 
index e12f3b486a28faf4857db669e930d598b37d8063..b297cb146e514094115beb288a63e276339347ef 100644 (file)
@@ -30,7 +30,6 @@
 #include <gpac/thread.h>
 #include <gpac/list.h>
 #include <gpac/base_coding.h>
-#include <gpac/crypt.h>
 #include <gpac/tools.h>
 #include <gpac/cache.h>
 
diff --git a/src/utils/sha1.c b/src/utils/sha1.c
new file mode 100644 (file)
index 0000000..b78cdec
--- /dev/null
@@ -0,0 +1,722 @@
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+
+#include <gpac/tools.h>
+
+#ifndef PUT_UINT32_BE
+#define PUT_UINT32_BE(n,b,i)                            \
+{                                                       \
+    (b)[(i)    ] = (u8) ( (n) >> 24 );       \
+    (b)[(i) + 1] = (u8) ( (n) >> 16 );       \
+    (b)[(i) + 2] = (u8) ( (n) >>  8 );       \
+    (b)[(i) + 3] = (u8) ( (n)       );       \
+}
+#endif
+
+#if 0
+/*
+ *  FIPS-180-1 compliant SHA-1 implementation
+ *
+ *  Copyright (C) 2003-2006  Christophe Devine
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License, version 2.1 as published by the Free Software Foundation.
+ *
+ *  This library 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
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+/*
+ *  The SHA-1 standard was published by NIST in 1993.
+ *
+ *  http://www.itl.nist.gov/fipspubs/fip180-1.htm
+ */
+
+
+struct __sha1_context
+{
+    u32 total[2];
+    u32 state[5];
+    u8 buffer[64];
+};
+
+/*
+ * 32-bit integer manipulation macros (big endian)
+ */
+#ifndef GET_UINT32_BE
+#define GET_UINT32_BE(n,b,i)                            \
+{                                                       \
+    (n) = ( (u32) (b)[(i)    ] << 24 )        \
+        | ( (u32) (b)[(i) + 1] << 16 )        \
+        | ( (u32) (b)[(i) + 2] <<  8 )        \
+        | ( (u32) (b)[(i) + 3]       );       \
+}
+#endif
+
+/*
+ * SHA-1 context setup
+ */
+GF_SHA1Context *gf_sha1_starts()
+{
+       GF_SHA1Context *ctx;
+       GF_SAFEALLOC(ctx, GF_SHA1Context);
+    ctx->total[0] = 0;
+    ctx->total[1] = 0;
+
+    ctx->state[0] = 0x67452301;
+    ctx->state[1] = 0xEFCDAB89;
+    ctx->state[2] = 0x98BADCFE;
+    ctx->state[3] = 0x10325476;
+    ctx->state[4] = 0xC3D2E1F0;
+       return ctx;
+}
+
+static void sha1_process(GF_SHA1Context *ctx, u8 data[64] )
+{
+    u32 temp, W[16], A, B, C, D, E;
+
+    GET_UINT32_BE( W[0],  data,  0 );
+    GET_UINT32_BE( W[1],  data,  4 );
+    GET_UINT32_BE( W[2],  data,  8 );
+    GET_UINT32_BE( W[3],  data, 12 );
+    GET_UINT32_BE( W[4],  data, 16 );
+    GET_UINT32_BE( W[5],  data, 20 );
+    GET_UINT32_BE( W[6],  data, 24 );
+    GET_UINT32_BE( W[7],  data, 28 );
+    GET_UINT32_BE( W[8],  data, 32 );
+    GET_UINT32_BE( W[9],  data, 36 );
+    GET_UINT32_BE( W[10], data, 40 );
+    GET_UINT32_BE( W[11], data, 44 );
+    GET_UINT32_BE( W[12], data, 48 );
+    GET_UINT32_BE( W[13], data, 52 );
+    GET_UINT32_BE( W[14], data, 56 );
+    GET_UINT32_BE( W[15], data, 60 );
+
+#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
+
+#define R(t)                                            \
+(                                                       \
+    temp = W[(t -  3) & 0x0F] ^ W[(t - 8) & 0x0F] ^     \
+           W[(t - 14) & 0x0F] ^ W[ t      & 0x0F],      \
+    ( W[t & 0x0F] = S(temp,1) )                         \
+)
+
+#define P(a,b,c,d,e,x)                                  \
+{                                                       \
+    e += S(a,5) + F(b,c,d) + K + x; b = S(b,30);        \
+}
+
+    A = ctx->state[0];
+    B = ctx->state[1];
+    C = ctx->state[2];
+    D = ctx->state[3];
+    E = ctx->state[4];
+
+#define F(x,y,z) (z ^ (x & (y ^ z)))
+#define K 0x5A827999
+
+    P( A, B, C, D, E, W[0]  );
+    P( E, A, B, C, D, W[1]  );
+    P( D, E, A, B, C, W[2]  );
+    P( C, D, E, A, B, W[3]  );
+    P( B, C, D, E, A, W[4]  );
+    P( A, B, C, D, E, W[5]  );
+    P( E, A, B, C, D, W[6]  );
+    P( D, E, A, B, C, W[7]  );
+    P( C, D, E, A, B, W[8]  );
+    P( B, C, D, E, A, W[9]  );
+    P( A, B, C, D, E, W[10] );
+    P( E, A, B, C, D, W[11] );
+    P( D, E, A, B, C, W[12] );
+    P( C, D, E, A, B, W[13] );
+    P( B, C, D, E, A, W[14] );
+    P( A, B, C, D, E, W[15] );
+    P( E, A, B, C, D, R(16) );
+    P( D, E, A, B, C, R(17) );
+    P( C, D, E, A, B, R(18) );
+    P( B, C, D, E, A, R(19) );
+
+#undef K
+#undef F
+
+#define F(x,y,z) (x ^ y ^ z)
+#define K 0x6ED9EBA1
+
+    P( A, B, C, D, E, R(20) );
+    P( E, A, B, C, D, R(21) );
+    P( D, E, A, B, C, R(22) );
+    P( C, D, E, A, B, R(23) );
+    P( B, C, D, E, A, R(24) );
+    P( A, B, C, D, E, R(25) );
+    P( E, A, B, C, D, R(26) );
+    P( D, E, A, B, C, R(27) );
+    P( C, D, E, A, B, R(28) );
+    P( B, C, D, E, A, R(29) );
+    P( A, B, C, D, E, R(30) );
+    P( E, A, B, C, D, R(31) );
+    P( D, E, A, B, C, R(32) );
+    P( C, D, E, A, B, R(33) );
+    P( B, C, D, E, A, R(34) );
+    P( A, B, C, D, E, R(35) );
+    P( E, A, B, C, D, R(36) );
+    P( D, E, A, B, C, R(37) );
+    P( C, D, E, A, B, R(38) );
+    P( B, C, D, E, A, R(39) );
+
+#undef K
+#undef F
+
+#define F(x,y,z) ((x & y) | (z & (x | y)))
+#define K 0x8F1BBCDC
+
+    P( A, B, C, D, E, R(40) );
+    P( E, A, B, C, D, R(41) );
+    P( D, E, A, B, C, R(42) );
+    P( C, D, E, A, B, R(43) );
+    P( B, C, D, E, A, R(44) );
+    P( A, B, C, D, E, R(45) );
+    P( E, A, B, C, D, R(46) );
+    P( D, E, A, B, C, R(47) );
+    P( C, D, E, A, B, R(48) );
+    P( B, C, D, E, A, R(49) );
+    P( A, B, C, D, E, R(50) );
+    P( E, A, B, C, D, R(51) );
+    P( D, E, A, B, C, R(52) );
+    P( C, D, E, A, B, R(53) );
+    P( B, C, D, E, A, R(54) );
+    P( A, B, C, D, E, R(55) );
+    P( E, A, B, C, D, R(56) );
+    P( D, E, A, B, C, R(57) );
+    P( C, D, E, A, B, R(58) );
+    P( B, C, D, E, A, R(59) );
+
+#undef K
+#undef F
+
+#define F(x,y,z) (x ^ y ^ z)
+#define K 0xCA62C1D6
+
+    P( A, B, C, D, E, R(60) );
+    P( E, A, B, C, D, R(61) );
+    P( D, E, A, B, C, R(62) );
+    P( C, D, E, A, B, R(63) );
+    P( B, C, D, E, A, R(64) );
+    P( A, B, C, D, E, R(65) );
+    P( E, A, B, C, D, R(66) );
+    P( D, E, A, B, C, R(67) );
+    P( C, D, E, A, B, R(68) );
+    P( B, C, D, E, A, R(69) );
+    P( A, B, C, D, E, R(70) );
+    P( E, A, B, C, D, R(71) );
+    P( D, E, A, B, C, R(72) );
+    P( C, D, E, A, B, R(73) );
+    P( B, C, D, E, A, R(74) );
+    P( A, B, C, D, E, R(75) );
+    P( E, A, B, C, D, R(76) );
+    P( D, E, A, B, C, R(77) );
+    P( C, D, E, A, B, R(78) );
+    P( B, C, D, E, A, R(79) );
+
+#undef K
+#undef F
+
+    ctx->state[0] += A;
+    ctx->state[1] += B;
+    ctx->state[2] += C;
+    ctx->state[3] += D;
+    ctx->state[4] += E;
+}
+
+/*
+ * SHA-1 process buffer
+ */
+void gf_sha1_update(GF_SHA1Context *ctx, u8 *input, u32 ilen )
+{
+    s32 fill;
+    u32 left;
+
+    if( ilen <= 0 )
+        return;
+
+    left = ctx->total[0] & 0x3F;
+    fill = 64 - left;
+
+    ctx->total[0] += ilen;
+    ctx->total[0] &= 0xFFFFFFFF;
+
+    if( ctx->total[0] < (u32) ilen )
+        ctx->total[1]++;
+
+    if( left && (s32) ilen >= fill )
+    {
+        memcpy( (void *) (ctx->buffer + left),
+                (void *) input, fill );
+        sha1_process( ctx, ctx->buffer );
+        input += fill;
+        ilen  -= fill;
+        left = 0;
+    }
+
+    while( ilen >= 64 )
+    {
+        sha1_process( ctx, input );
+        input += 64;
+        ilen  -= 64;
+    }
+
+    if( ilen > 0 )
+    {
+        memcpy( (void *) (ctx->buffer + left),
+                (void *) input, ilen );
+    }
+}
+
+static const u8 sha1_padding[64] =
+{
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*
+ * SHA-1 final digest
+ */
+void gf_sha1_finish(GF_SHA1Context *ctx, u8 output[20] )
+{
+    u32 last, padn;
+    u32 high, low;
+    u8 msglen[8];
+
+    high = ( ctx->total[0] >> 29 )
+         | ( ctx->total[1] <<  3 );
+    low  = ( ctx->total[0] <<  3 );
+
+    PUT_UINT32_BE( high, msglen, 0 );
+    PUT_UINT32_BE( low,  msglen, 4 );
+
+    last = ctx->total[0] & 0x3F;
+    padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
+
+    gf_sha1_update( ctx, (u8 *) sha1_padding, padn );
+    gf_sha1_update( ctx, msglen, 8 );
+
+    PUT_UINT32_BE( ctx->state[0], output,  0 );
+    PUT_UINT32_BE( ctx->state[1], output,  4 );
+    PUT_UINT32_BE( ctx->state[2], output,  8 );
+    PUT_UINT32_BE( ctx->state[3], output, 12 );
+    PUT_UINT32_BE( ctx->state[4], output, 16 );
+
+       gf_free(ctx);
+}
+#else
+
+/*
+ *  sha1.c
+ *
+ *  Copyright (C) 1998, 2009
+ *  Paul E. Jones <paulej@packetizer.com>
+ *  All Rights Reserved
+ *
+ *  Freeware Public License (FPL)
+ *  
+ *  This software is licensed as "freeware."  Permission to distribute
+ *  this software in source and binary forms, including incorporation 
+ *  into other products, is hereby granted without a fee.  THIS SOFTWARE 
+ *  IS PROVIDED 'AS IS' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, 
+ *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
+ *  AND FITNESS FOR A PARTICULAR PURPOSE.  THE AUTHOR SHALL NOT BE HELD 
+ *  LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE, EITHER 
+ *  DIRECTLY OR INDIRECTLY, INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA 
+ *  OR DATA BEING RENDERED INACCURATE.
+ *  
+ *****************************************************************************
+ *  $Id: sha1.c 12 2009-06-22 19:34:25Z paulej $
+ *****************************************************************************
+ *
+ *  Description:
+ *      This file implements the Secure Hashing Standard as defined
+ *      in FIPS PUB 180-1 published April 17, 1995.
+ *
+ *      The Secure Hashing Standard, which uses the Secure Hashing
+ *      Algorithm (SHA), produces a 160-bit message digest for a
+ *      given data stream.  In theory, it is highly improbable that
+ *      two messages will produce the same message digest.  Therefore,
+ *      this algorithm can serve as a means of providing a "fingerprint"
+ *      for a message.
+ *
+ *  Portability Issues:
+ *      SHA-1 is defined in terms of 32-bit "words".  This code was
+ *      written with the expectation that the processor has at least
+ *      a 32-bit machine word size.  If the machine word size is larger,
+ *      the code should still function properly.  One caveat to that
+ *      is that the input functions taking characters and character
+ *      arrays assume that only 8 bits of information are stored in each
+ *      character.
+ *
+ *  Caveats:
+ *      SHA-1 is designed to work with messages less than 2^64 bits
+ *      long. Although SHA-1 allows a message digest to be generated for
+ *      messages of any number of bits less than 2^64, this
+ *      implementation only works with messages with a length that is a
+ *      multiple of the size of an 8-bit character.
+ *
+ */
+
+/* 
+ *  This structure will hold context information for the hashing
+ *  operation
+ */
+struct __sha1_context
+{
+    unsigned Message_Digest[5]; /* Message Digest (output)          */
+
+    unsigned Length_Low;        /* Message length in bits           */
+    unsigned Length_High;       /* Message length in bits           */
+
+    unsigned char Message_Block[64]; /* 512-bit message blocks      */
+    int Message_Block_Index;    /* Index into message block array   */
+
+    int Computed;               /* Is the digest computed?          */
+    int Corrupted;              /* Is the message digest corruped?  */
+};
+
+/*
+ *  Define the circular shift macro
+ */
+#define SHA1CircularShift(bits,word) \
+                ((((word) << (bits)) & 0xFFFFFFFF) | \
+                ((word) >> (32-(bits))))
+
+
+/*  
+ *  SHA1ProcessMessageBlock
+ *
+ *  Description:
+ *      This function will process the next 512 bits of the message
+ *      stored in the Message_Block array.
+ *
+ *  Parameters:
+ *      None.
+ *
+ *  Returns:
+ *      Nothing.
+ *
+ *  Comments:
+ *      Many of the variable names in the SHAContext, especially the
+ *      single character names, were used because those were the names
+ *      used in the publication.
+ *         
+ *
+ */
+void SHA1ProcessMessageBlock(GF_SHA1Context *context)
+{
+    const unsigned K[] =            /* Constants defined in SHA-1   */      
+    {
+        0x5A827999,
+        0x6ED9EBA1,
+        0x8F1BBCDC,
+        0xCA62C1D6
+    };
+    int         t;                  /* Loop counter                 */
+    unsigned    temp;               /* Temporary word value         */
+    unsigned    W[80];              /* Word sequence                */
+    unsigned    A, B, C, D, E;      /* Word buffers                 */
+
+    /*
+     *  Initialize the first 16 words in the array W
+     */
+    for(t = 0; t < 16; t++)
+    {
+        W[t] = ((unsigned) context->Message_Block[t * 4]) << 24;
+        W[t] |= ((unsigned) context->Message_Block[t * 4 + 1]) << 16;
+        W[t] |= ((unsigned) context->Message_Block[t * 4 + 2]) << 8;
+        W[t] |= ((unsigned) context->Message_Block[t * 4 + 3]);
+    }
+
+    for(t = 16; t < 80; t++)
+    {
+       W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
+    }
+
+    A = context->Message_Digest[0];
+    B = context->Message_Digest[1];
+    C = context->Message_Digest[2];
+    D = context->Message_Digest[3];
+    E = context->Message_Digest[4];
+
+    for(t = 0; t < 20; t++)
+    {
+        temp =  SHA1CircularShift(5,A) +
+                ((B & C) | ((~B) & D)) + E + W[t] + K[0];
+        temp &= 0xFFFFFFFF;
+        E = D;
+        D = C;
+        C = SHA1CircularShift(30,B);
+        B = A;
+        A = temp;
+    }
+
+    for(t = 20; t < 40; t++)
+    {
+        temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
+        temp &= 0xFFFFFFFF;
+        E = D;
+        D = C;
+        C = SHA1CircularShift(30,B);
+        B = A;
+        A = temp;
+    }
+
+    for(t = 40; t < 60; t++)
+    {
+        temp = SHA1CircularShift(5,A) +
+               ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
+        temp &= 0xFFFFFFFF;
+        E = D;
+        D = C;
+        C = SHA1CircularShift(30,B);
+        B = A;
+        A = temp;
+    }
+
+    for(t = 60; t < 80; t++)
+    {
+        temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];
+        temp &= 0xFFFFFFFF;
+        E = D;
+        D = C;
+        C = SHA1CircularShift(30,B);
+        B = A;
+        A = temp;
+    }
+
+    context->Message_Digest[0] =
+                        (context->Message_Digest[0] + A) & 0xFFFFFFFF;
+    context->Message_Digest[1] =
+                        (context->Message_Digest[1] + B) & 0xFFFFFFFF;
+    context->Message_Digest[2] =
+                        (context->Message_Digest[2] + C) & 0xFFFFFFFF;
+    context->Message_Digest[3] =
+                        (context->Message_Digest[3] + D) & 0xFFFFFFFF;
+    context->Message_Digest[4] =
+                        (context->Message_Digest[4] + E) & 0xFFFFFFFF;
+
+    context->Message_Block_Index = 0;
+}
+
+/*  
+ *  SHA1PadMessage
+ *
+ *  Description:
+ *      According to the standard, the message must be padded to an even
+ *      512 bits.  The first padding bit must be a '1'.  The last 64
+ *      bits represent the length of the original message.  All bits in
+ *      between should be 0.  This function will pad the message
+ *      according to those rules by filling the Message_Block array
+ *      accordingly.  It will also call SHA1ProcessMessageBlock()
+ *      appropriately.  When it returns, it can be assumed that the
+ *      message digest has been computed.
+ *
+ *  Parameters:
+ *      context: [in/out]
+ *          The context to pad
+ *
+ *  Returns:
+ *      Nothing.
+ *
+ *  Comments:
+ *
+ */
+static void SHA1PadMessage(GF_SHA1Context *context)
+{
+    /*
+     *  Check to see if the current message block is too small to hold
+     *  the initial padding bits and length.  If so, we will pad the
+     *  block, process it, and then continue padding into a second
+     *  block.
+     */
+    if (context->Message_Block_Index > 55)
+    {
+        context->Message_Block[context->Message_Block_Index++] = 0x80;
+        while(context->Message_Block_Index < 64)
+        {
+            context->Message_Block[context->Message_Block_Index++] = 0;
+        }
+
+        SHA1ProcessMessageBlock(context);
+
+        while(context->Message_Block_Index < 56)
+        {
+            context->Message_Block[context->Message_Block_Index++] = 0;
+        }
+    }
+    else
+    {
+        context->Message_Block[context->Message_Block_Index++] = 0x80;
+        while(context->Message_Block_Index < 56)
+        {
+            context->Message_Block[context->Message_Block_Index++] = 0;
+        }
+    }
+
+    /*
+     *  Store the message length as the last 8 octets
+     */
+    context->Message_Block[56] = (context->Length_High >> 24) & 0xFF;
+    context->Message_Block[57] = (context->Length_High >> 16) & 0xFF;
+    context->Message_Block[58] = (context->Length_High >> 8) & 0xFF;
+    context->Message_Block[59] = (context->Length_High) & 0xFF;
+    context->Message_Block[60] = (context->Length_Low >> 24) & 0xFF;
+    context->Message_Block[61] = (context->Length_Low >> 16) & 0xFF;
+    context->Message_Block[62] = (context->Length_Low >> 8) & 0xFF;
+    context->Message_Block[63] = (context->Length_Low) & 0xFF;
+
+    SHA1ProcessMessageBlock(context);
+}
+/*  
+ *  SHA1Reset
+ *
+ *  Description:
+ *      This function will initialize the SHA1Context in preparation
+ *      for computing a new message digest.
+ *
+ *  Parameters:
+ *      context: [in/out]
+ *          The context to reset.
+ *
+ *  Returns:
+ *      Nothing.
+ *
+ *  Comments:
+ *
+ */
+GF_SHA1Context *gf_sha1_starts()
+{
+       GF_SHA1Context *context;
+       GF_SAFEALLOC(context, GF_SHA1Context);
+    context->Length_Low             = 0;
+    context->Length_High            = 0;
+    context->Message_Block_Index    = 0;
+
+    context->Message_Digest[0]      = 0x67452301;
+    context->Message_Digest[1]      = 0xEFCDAB89;
+    context->Message_Digest[2]      = 0x98BADCFE;
+    context->Message_Digest[3]      = 0x10325476;
+    context->Message_Digest[4]      = 0xC3D2E1F0;
+
+    context->Computed   = 0;
+    context->Corrupted  = 0;
+       return context;
+}
+
+void gf_sha1_update(GF_SHA1Context *context, u8 *message_array, u32 length )
+{
+    if (!length)
+    {
+        return;
+    }
+
+    if (context->Computed || context->Corrupted)
+    {
+        context->Corrupted = 1;
+        return;
+    }
+
+    while(length-- && !context->Corrupted)
+    {
+        context->Message_Block[context->Message_Block_Index++] =
+                                                (*message_array & 0xFF);
+
+        context->Length_Low += 8;
+        /* Force it to 32 bits */
+        context->Length_Low &= 0xFFFFFFFF;
+        if (context->Length_Low == 0)
+        {
+            context->Length_High++;
+            /* Force it to 32 bits */
+            context->Length_High &= 0xFFFFFFFF;
+            if (context->Length_High == 0)
+            {
+                /* Message is too long */
+                context->Corrupted = 1;
+            }
+        }
+
+        if (context->Message_Block_Index == 64)
+        {
+            SHA1ProcessMessageBlock(context);
+        }
+
+        message_array++;
+    }
+}
+void gf_sha1_finish(GF_SHA1Context *context, u8 output[20] )
+{
+    if (context->Corrupted)
+    {
+        return;
+    }
+
+    if (!context->Computed)
+    {
+        SHA1PadMessage(context);
+        context->Computed = 1;
+    }
+    PUT_UINT32_BE( context->Message_Digest[0], output,  0 );
+    PUT_UINT32_BE( context->Message_Digest[1], output,  4 );
+    PUT_UINT32_BE( context->Message_Digest[2], output,  8 );
+    PUT_UINT32_BE( context->Message_Digest[3], output, 12 );
+    PUT_UINT32_BE( context->Message_Digest[4], output, 16 );
+
+       gf_free(context);
+}
+
+#endif
+
+/*
+ * Output = SHA-1( file contents )
+ */
+GF_EXPORT
+s32 gf_sha1_file( const char *path, u8 output[20] )
+{
+    FILE *f;
+    size_t n;
+    GF_SHA1Context *ctx;
+    u8 buf[1024];
+
+    if( ( f = gf_f64_open( path, "rb" ) ) == NULL )
+        return( 1 );
+
+    ctx  = gf_sha1_starts();
+
+    while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
+        gf_sha1_update(ctx, buf, (s32) n );
+
+    gf_sha1_finish(ctx, output );
+
+    fclose( f );
+    return( 0 );
+}
+
+/*
+ * Output = SHA-1( input buffer )
+ */
+void gf_sha1_csum( u8 *input, u32 ilen, u8 output[20] )
+{
+   GF_SHA1Context *ctx;
+
+    ctx = gf_sha1_starts();
+    gf_sha1_update(ctx, input, ilen );
+    gf_sha1_finish(ctx, output );
+}
+
+