mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
driver/record: make CStreamRec non-public
CStreamRec is only used inside CRecordManager::Record, so it can be implemented completely inside record.cpp. The positive side effect is that avformat.h is not included everywhere (e.g. from moviebrowser/mb.h) and thus AVFORMAT_CFLAGS does not need to be added everywhere to fix build failures.
This commit is contained in:
@@ -63,6 +63,37 @@
|
|||||||
#include <timerdclient/timerdclient.h>
|
#include <timerdclient/timerdclient.h>
|
||||||
#include <cs_api.h>
|
#include <cs_api.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include <libavformat/avformat.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
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:
|
/* TODO:
|
||||||
* nextRecording / pending recordings - needs testing
|
* nextRecording / pending recordings - needs testing
|
||||||
* check/fix askUserOnTimerConflict gui/timerlist.cpp -> getOverlappingTimers lib/timerdclient/timerdclient.cpp
|
* check/fix askUserOnTimerConflict gui/timerlist.cpp -> getOverlappingTimers lib/timerdclient/timerdclient.cpp
|
||||||
|
@@ -42,9 +42,11 @@
|
|||||||
#include <OpenThreads/Mutex>
|
#include <OpenThreads/Mutex>
|
||||||
#include <OpenThreads/Thread>
|
#include <OpenThreads/Thread>
|
||||||
|
|
||||||
|
#if 0
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define REC_MAX_APIDS 10
|
#define REC_MAX_APIDS 10
|
||||||
#define FILENAMEBUFFERSIZE 1024
|
#define FILENAMEBUFFERSIZE 1024
|
||||||
@@ -242,6 +244,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@@ -268,5 +271,6 @@ class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
|||||||
bool Stop(bool remove_event = true);
|
bool Stop(bool remove_event = true);
|
||||||
static int Interrupt(void * data);
|
static int Interrupt(void * data);
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user