diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 158476132..7dd3183ab 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -64,6 +64,37 @@ #include #include +extern "C" { +#include +} + +class CStreamRec : public CRecordInstance, OpenThreads::Thread +{ + private: + AVFormatContext *ifcx; + AVFormatContext *ofcx; + AVBitStreamFilterContext *bsfc; + bool stopped; + bool interrupt; + time_t time_started; + int stream_index; + + void GetPids(CZapitChannel * channel); + void FillMovieInfo(CZapitChannel * channel, APIDList & apid_list); + bool Start(); + + void Close(); + bool Open(CZapitChannel * channel); + void run(); + void WriteHeader(uint32_t duration); + public: + CStreamRec(const CTimerd::RecordingInfo * const eventinfo, std::string &dir, bool timeshift = false, bool stream_vtxt_pid = false, bool stream_pmt_pid = false, bool stream_subtitle_pids = false); + ~CStreamRec(); + record_error_msg_t Record(); + bool Stop(bool remove_event = true); + static int Interrupt(void * data); +}; + /* TODO: * nextRecording / pending recordings - needs testing * check/fix askUserOnTimerConflict gui/timerlist.cpp -> getOverlappingTimers lib/timerdclient/timerdclient.cpp diff --git a/src/driver/record.h b/src/driver/record.h index d5d5c4495..476f92de8 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -42,9 +42,11 @@ #include #include +#if 0 extern "C" { #include } +#endif #define REC_MAX_APIDS 10 #define FILENAMEBUFFERSIZE 1024 @@ -237,6 +239,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/ #endif }; +#if 0 class CStreamRec : public CRecordInstance, OpenThreads::Thread { private: @@ -263,5 +266,6 @@ class CStreamRec : public CRecordInstance, OpenThreads::Thread bool Stop(bool remove_event = true); static int Interrupt(void * data); }; +#endif #endif