diff options
author | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:57:17 +0100 |
---|---|---|
committer | Mikko Matilainen <mikkom@iki.fi> | 2011-03-22 21:16:18 +0200 |
commit | 6ea5efe93960fc761dbb5e0b2d93d9b5818d5d7c (patch) | |
tree | 836d96c9a4688a01745719787a7a0e83804356f8 /remux | |
parent | 0a860a1e3e45ee83563b09beb93ede0e99eb75fb (diff) | |
download | vdr-plugin-streamdev-6ea5efe93960fc761dbb5e0b2d93d9b5818d5d7c.tar.gz vdr-plugin-streamdev-6ea5efe93960fc761dbb5e0b2d93d9b5818d5d7c.tar.bz2 |
Snapshot 2010-09-15
Diffstat (limited to 'remux')
-rw-r--r-- | remux/Makefile | 34 | ||||
-rw-r--r-- | remux/extern.c | 5 | ||||
-rw-r--r-- | remux/extern.h | 5 |
3 files changed, 43 insertions, 1 deletions
diff --git a/remux/Makefile b/remux/Makefile new file mode 100644 index 0000000..89cf4fd --- /dev/null +++ b/remux/Makefile @@ -0,0 +1,34 @@ +# +# Makefile for a Video Disk Recorder plugin +# +# $Id: Makefile,v 1.2 2010/07/19 13:49:28 schmirl Exp $ + +### The object files (add further files here): + +OBJS = tsremux.o ts2es.o ts2pes.o ts2ps.o extern.o + +### The main target: + +.PHONY: clean +remux.a: $(OBJS) + ar -rcs remux.a $^ + +### Implicit rules: + +%.o: %.c + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $< + +### Dependencies: + +MAKEDEP = $(CXX) -MM -MG +DEPFILE = .dependencies + +$(DEPFILE): Makefile + @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ + +-include $(DEPFILE) + +### Targets: + +clean: + @-rm -f $(OBJS) $(DEPFILE) *.a core* *~ diff --git a/remux/extern.c b/remux/extern.c index d66dc0a..cf766d3 100644 --- a/remux/extern.c +++ b/remux/extern.c @@ -191,6 +191,11 @@ cTSExt::cTSExt(cRingBufferLinear *ResultBuffer, const cServerConnection *Connect if (setpgid(0, 0) == -1) esyslog("streamdev-server: externremux setpgid failed: %m"); + if (access(opt_remux, X_OK) == -1) { + esyslog("streamdev-server %s: %m", opt_remux); + _exit(-1); + } + if (execle("/bin/sh", "sh", "-c", opt_remux, NULL, env) == -1) { esyslog("streamdev-server: externremux script '%s' execution failed: %m", opt_remux); _exit(-1); diff --git a/remux/extern.h b/remux/extern.h index ff4ddec..070e4f6 100644 --- a/remux/extern.h +++ b/remux/extern.h @@ -5,6 +5,9 @@ #include <vdr/ringbuffer.h> #include <string> +class cChannel; +class cServerConnection; + namespace Streamdev { class cTSExt; @@ -15,7 +18,7 @@ private: cTSExt *m_Remux; public: - cExternRemux(int VPid, const int *APids, const int *Dpids, const int *SPids, std::string Parameter); + cExternRemux(const cServerConnection *Connection, const cChannel *Channel, const int *APids, const int *Dpids); virtual ~cExternRemux(); int Put(const uchar *Data, int Count); |