mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +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 <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:
|
||||
* nextRecording / pending recordings - needs testing
|
||||
* check/fix askUserOnTimerConflict gui/timerlist.cpp -> getOverlappingTimers lib/timerdclient/timerdclient.cpp
|
||||
|
@@ -42,9 +42,11 @@
|
||||
#include <OpenThreads/Mutex>
|
||||
#include <OpenThreads/Thread>
|
||||
|
||||
#if 0
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
}
|
||||
#endif
|
||||
|
||||
#define REC_MAX_APIDS 10
|
||||
#define FILENAMEBUFFERSIZE 1024
|
||||
@@ -242,6 +244,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/
|
||||
#endif
|
||||
};
|
||||
|
||||
#if 0
|
||||
class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
||||
{
|
||||
private:
|
||||
@@ -268,5 +271,6 @@ class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
||||
bool Stop(bool remove_event = true);
|
||||
static int Interrupt(void * data);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user