From: Martin Molnar Date: Wed, 20 May 2009 18:22:24 +0000 (+0200) Subject: The streamer is FRESCORized to allow underlying communication over FWP. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/streamer.git/commitdiff_plain/a9a59554105ef09f8784559eec518e55496cbadc The streamer is FRESCORized to allow underlying communication over FWP. Signed-off-by: Martin --- diff --git a/Makefile.omk b/Makefile.omk index 6de24ea..595b812 100644 --- a/Makefile.omk +++ b/Makefile.omk @@ -1,4 +1,9 @@ -CFLAGS = -Wall +default_CONFIG += CONFIG_STREAMER_WITH_FRSH=y +default_CONFIG += CONFIG_AQUOSA=x + +LOCAL_CONFIG_H = streamer_config.h + +CFLAGS += -Wall CFLAGS += -Wdeclaration-after-statement CFLAGS += -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls CFLAGS += -Wno-pointer-sign @@ -18,3 +23,6 @@ streamer_SOURCES=streamer.c input.c codec.c output.c lib_LOADLIBES+= postproc swscale avfilter avdevice avformat avcodec avutil m z pthread lib_LOADLIBES+= z bz2 m asound jack dl asound jack asound +ifeq ($(CONFIG_STREAMER_WITH_FRSH),y) +lib_LOADLIBES+= pthread rt fwp fna frsh +endif \ No newline at end of file diff --git a/streamer.c b/streamer.c index 4185c16..3e563db 100644 --- a/streamer.c +++ b/streamer.c @@ -15,6 +15,12 @@ #include "codec.h" #include "rt.h" +#include "streamer_config.h" + +#ifdef CONFIG_STREAMER_WITH_FRSH +#include +#endif + static const char *sdp_file = "sdp.txt"; static const char *vdev = "/dev/video0"; static const char *dst = "127.0.0.1"; @@ -75,7 +81,12 @@ static int args_parse(int argc, char *argv[]) int main(int argc, char *argv[]) { AVFormatContext *s, *os; - int done; + int done, ret; + +#ifdef CONFIG_STREAMER_WITH_FRSH + ret = frsh_init(); + if (ret) PERROR_AND_EXIT(ret, "frsh_init1"); +#endif /*CONFIG_STREAMER_WITH_FRSH*/ avcodec_register_all(); av_register_all();