]> rtime.felk.cvut.cz Git - frescor/demo.git/commitdiff
We can easily switch between FRSH and normal version of FFMPEG
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 25 Nov 2009 14:01:17 +0000 (15:01 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 25 Nov 2009 19:11:42 +0000 (20:11 +0100)
This can be done by seeting CONFIG_FFMPEG_WITH_FRSH variable in
config.omk.

Modified submodules:

* src/streamer 539f012...c70b54d (1):
  > Easy switch between FRSH and non-FRSH version of FFMPEG

README
build/Makefile.omk
build/Makefile.omk.ffmpeg [new file with mode: 0644]
build/config.target
src/ffmpeg
src/streamer

diff --git a/README b/README
index 394fbbc5a39f27cbf3da2d3a3e73e7a45340611e..afa99767c4b1e1e79f25ec90cb7aaad28b85b154 100644 (file)
--- a/README
+++ b/README
@@ -1,19 +1,15 @@
 To compile this demo follow the following steps (you can also run ./compile.sh
 which does all the steps):
 
-1) Download modules from FRESCOR subversion repository:
-
-   src/update-svn-revision
-
-2) Download/update git submodules
+1) Download/update git submodules
 
    git submodule init
    git submodule update
 
-3) Compile it
+2) Compile it
 
    cd build
-   ( cd ffmpeg && ./configure4omk )
+   ( cd ffmpeg && ./configure )
    make default-config
    echo CONFIG_AQUOSA=y >>config.omk
    make
index 7d60cd110c2075e2f35e777967803f3f457ab4f9..be9e204fc3bd813530f68f4eab1012a1a892f913 100644 (file)
@@ -1,5 +1,7 @@
 SUBDIRS=$(ALL_OMK_SUBDIRS)
 
+default_CONFIG=CONFIG_FFMPEG_WITH_FRSH=y
+
 SUBDIRS += ffmpeg/libavcodec ffmpeg/libavdevice ffmpeg/libavfilter     \
           ffmpeg/libavformat ffmpeg/libavutil ffmpeg/libpostproc       \
           ffmpeg/libswscale
diff --git a/build/Makefile.omk.ffmpeg b/build/Makefile.omk.ffmpeg
new file mode 100644 (file)
index 0000000..0161085
--- /dev/null
@@ -0,0 +1,14 @@
+lib_LIBRARIES:=$(NAME)
+$(NAME)_SOURCES:=$(OBJS:%.o=%.c) $(OBJS-y:%.o=%.c) $(OBJS-yes:%.o=%.c)
+renamed_include_HEADERS:=$(foreach h,$(HEADERS),$(h)->lib$(NAME)/$(h) )
+INCLUDES += -I $(dir $(srcdir:%/=%)) # this should point to ffmpeg sources
+
+ifeq ($(FFMPEG_SUBDIR),libavcodec)
+SUBDIRS=x86
+endif
+
+ifeq ($(FFMPEG_SUBDIR),libavformat)
+ifeq ($(CONFIG_FFMPEG_WITH_FRSH),y)
+$(NAME)_SOURCES := $(filter-out udp.c,$(NAME)_SOURCES) frsh.c
+endif
+endif
index 264b279959f146584490c1b2a4e2479b19568c95..ba998d460dca34b6aff6cbe14270f9dc62586058 100644 (file)
@@ -3,7 +3,6 @@
 
 ifeq ($(RELATIVE_DIR:ffmpeg%=ffmpeg),ffmpeg)
 # Allow building ffmpeg by OMK
-
 define FFMPEG_OMKIZE
 lib_LIBRARIES:=$(NAME)
 $(NAME)_SOURCES:=$(OBJS:%.o=%.c) $(OBJS-y:%.o=%.c) $(OBJS-yes:%.o=%.c)
@@ -16,9 +15,7 @@ $(SOURCES_DIR)/Makefile.omk: $(SOURCES_DIR)/Makefile $(MAKERULES_DIR)/ffmpeg/lib
        $(Q)make DEPS="" -C $(SOURCES_DIR) -qp -f $< |sed -ne '/# Pattern-specific Variable Values/,$$ d' -e '/# makefile/,+1 p'|\
                        sed -e /^define/d -e "/^#/d" -e "/^MAKE/d" > $@
 #      echo '$(value FFMPEG_OMKIZE)' >> $@ # There is a bug in make
-ifeq ($(SOURCES_DIR:%/libavcodec=YES),YES)
-       $(Q)echo 'SUBDIRS=x86' >> $@
-endif
+       $(Q)echo "FFMPEG_SUBDIR=$(RELATIVE_DIR:ffmpeg/%=%)" >> $@
        $(Q)cat $(MAKERULES_DIR)/Makefile.omk.ffmpeg >> $@
        $(Q)echo 'CFLAGS := $(CFLAGS) $$(CFLAGS)' >> $@
 
@@ -60,7 +57,9 @@ CONFIG_AQUOSA=y
 
 # Instead, we call normal gcc with parameters which mgcc adds
 
-CFLAGS=$(ARCH_GCC_OPTS) -Wall -Wuninitialized -g -O1 -D_REENTRANT -D$(PLATFORM) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
+CFLAGS=$(ARCH_GCC_OPTS) -Wall -Wuninitialized -g -O1 $(CFLAGS-y) -D_REENTRANT -D$(PLATFORM) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
+CFLAGS-$(CONFIG_FFMPEG_WITH_FRSH) = -DCONFIG_FFMPEG_WITH_FRSH=y
+
 LDFLAGS=$(ARCH_LD_OPTS) $(LIBS_PATH) $(LIBS)
 LDFLAGS += '-Wl,-rpath,$$ORIGIN/../lib' -z origin --enable-new-dtags
 
index 74b7334ba3042282d93e60c1c152c461a703c494..a9550dce057995d4a5374217640ea8c0fba661f6 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 74b7334ba3042282d93e60c1c152c461a703c494
+Subproject commit a9550dce057995d4a5374217640ea8c0fba661f6
index 539f0126e80a67deb6905f6da73dd4e18d0d6386..c70b54d49bd2c66becd708f22d210244b13c7a94 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 539f0126e80a67deb6905f6da73dd4e18d0d6386
+Subproject commit c70b54d49bd2c66becd708f22d210244b13c7a94