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:
Stefan Seyfried
2016-10-22 12:08:57 +02:00
committed by svenhoefer
parent 5bf115db80
commit b5cb683048
2 changed files with 35 additions and 0 deletions

View File

@@ -64,6 +64,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