Skip to content

Commit

Permalink
Fix hiding of SetStreamData(void)
Browse files Browse the repository at this point in the history
This is a helper function called by SetStreamData(MPEGStreamData*), renamed to InitStreamData().
  • Loading branch information
daniel-kristjansson committed Jun 28, 2012
1 parent 695c2be commit 0b6b253
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
Expand Up @@ -243,10 +243,10 @@ void DTVRecorder::SetStreamData(MPEGStreamData *data)
delete old_data;

if (_stream_data)
SetStreamData();
InitStreamData();
}

void DTVRecorder::SetStreamData(void)
void DTVRecorder::InitStreamData(void)
{
_stream_data->AddMPEGSPListener(this);
_stream_data->AddMPEGListener(this);
Expand Down
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/recorders/dtvrecorder.h
Expand Up @@ -51,7 +51,6 @@ class DTVRecorder :
int GetVideoFd(void) { return _stream_fd; }

virtual void SetNextRecording(const ProgramInfo*, RingBuffer*);
virtual void SetStreamData(void);
virtual void SetStreamData(MPEGStreamData* sd);
MPEGStreamData *GetStreamData(void) const { return _stream_data; }

Expand Down Expand Up @@ -90,6 +89,8 @@ class DTVRecorder :
bool ProcessAVTSPacket(const TSPacket &tspacket);

protected:
virtual void InitStreamData(void);

void FinishRecording(void);
void ResetForNewFile(void);

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/firewirerecorder.cpp
Expand Up @@ -217,7 +217,7 @@ bool FirewireRecorder::PauseAndWait(int timeout)
return IsPaused(true);
}

void FirewireRecorder::SetStreamData(void)
void FirewireRecorder::InitStreamData(void)
{
_stream_data->AddMPEGSPListener(this);

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/firewirerecorder.h
Expand Up @@ -52,9 +52,9 @@ class FirewireRecorder :
const QString &videodev,
const QString &audiodev,
const QString &vbidev);
void SetStreamData(void);

protected:
virtual void InitStreamData(void);
FirewireRecorder(TVRec *rec);

private:
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/importrecorder.h
Expand Up @@ -36,7 +36,7 @@ class ImportRecorder : public DTVRecorder
bool Open(void);
void Close(void);

void SetStreamData(void) {}
void InitStreamData(void) {}

private:
int _import_fd;
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/recorders/mpegrecorder.cpp
Expand Up @@ -923,7 +923,7 @@ void MpegRecorder::run(void)
int progNum = 1;
MPEGStreamData *sd = new MPEGStreamData(progNum, true);
sd->SetRecordingType(_recording_type);
DTVRecorder::SetStreamData(sd);
SetStreamData(sd);

_stream_data->AddAVListener(this);
_stream_data->AddWritingListener(this);
Expand Down Expand Up @@ -1135,7 +1135,7 @@ void MpegRecorder::run(void)
{
_stream_data->RemoveWritingListener(this);
_stream_data->RemoveAVListener(this);
DTVRecorder::SetStreamData(NULL);
SetStreamData(NULL);
}

QMutexLocker locker(&pauseLock);
Expand Down Expand Up @@ -1370,7 +1370,7 @@ void MpegRecorder::StopEncoding(void)
readfd = -1;
}

void MpegRecorder::SetStreamData(void)
void MpegRecorder::InitStreamData(void)
{
_stream_data->AddMPEGSPListener(this);
_stream_data->SetDesiredProgram(1);
Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythtv/recorders/mpegrecorder.h
Expand Up @@ -41,9 +41,6 @@ class MpegRecorder : public V4LRecorder,
bool Open(void);
int GetVideoFd(void) { return chanfd; }

// TS
virtual void SetStreamData(void);

// TSPacketListener
bool ProcessTSPacket(const TSPacket &tspacket);

Expand All @@ -52,6 +49,7 @@ class MpegRecorder : public V4LRecorder,
virtual void PriorityEvent(int fd) { }

private:
virtual void InitStreamData(void);
void SetIntOption(RecordingProfile *profile, const QString &name);
void SetStrOption(RecordingProfile *profile, const QString &name);

Expand Down

0 comments on commit 0b6b253

Please sign in to comment.