28 changes: 14 additions & 14 deletions mythtv/libs/libmythtv/subtitlescreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void SubtitleScreen::ClearDisplayedSubtitles(void)

void SubtitleScreen::ExpireSubtitles(void)
{
VideoOutput *videoOut = m_player->getVideoOutput();
VideoOutput *videoOut = m_player->GetVideoOutput();
VideoFrame *currentFrame = videoOut ? videoOut->GetLastShownFrame() : NULL;
long long now = currentFrame ? currentFrame->timecode : LLONG_MAX;
QMutableHashIterator<MythUIType*, long long> it(m_expireTimes);
Expand Down Expand Up @@ -188,7 +188,7 @@ void SubtitleScreen::DisplayAVSubtitles(void)
if (!m_player || !m_subreader)
return;

VideoOutput *videoOut = m_player->getVideoOutput();
VideoOutput *videoOut = m_player->GetVideoOutput();
VideoFrame *currentFrame = videoOut ? videoOut->GetLastShownFrame() : NULL;

if (!currentFrame || !videoOut)
Expand Down Expand Up @@ -329,11 +329,11 @@ void SubtitleScreen::DisplayTextSubtitles(void)
return;

bool changed = false;
VideoOutput *vo = m_player->getVideoOutput();
VideoOutput *vo = m_player->GetVideoOutput();
if (vo)
{
QRect oldsafe = m_safeArea;
m_safeArea = m_player->getVideoOutput()->GetSafeRect();
m_safeArea = m_player->GetVideoOutput()->GetSafeRect();
if (oldsafe != m_safeArea)
{
changed = true;
Expand Down Expand Up @@ -415,11 +415,11 @@ void SubtitleScreen::DisplayRawTextSubtitles(void)
if (subs.empty())
return;

VideoOutput *vo = m_player->getVideoOutput();
VideoOutput *vo = m_player->GetVideoOutput();
if (vo)
{
QRect oldsafe = m_safeArea;
m_safeArea = m_player->getVideoOutput()->GetSafeRect();
m_safeArea = m_player->GetVideoOutput()->GetSafeRect();
if (oldsafe != m_safeArea)
{
int height = (m_safeArea.height() * m_textFontZoom) / 1800;
Expand Down Expand Up @@ -518,7 +518,7 @@ void SubtitleScreen::DisplayDVDButton(AVSubtitle* dvdButton, QRect &buttonPos)
if (!dvdButton || !m_player)
return;

VideoOutput *vo = m_player->getVideoOutput();
VideoOutput *vo = m_player->GetVideoOutput();
if (!vo)
return;

Expand Down Expand Up @@ -589,10 +589,10 @@ void SubtitleScreen::DisplayCC608Subtitles(void)

bool changed = false;

if (m_player && m_player->getVideoOutput())
if (m_player && m_player->GetVideoOutput())
{
QRect oldsafe = m_safeArea;
m_safeArea = m_player->getVideoOutput()->GetSafeRect();
m_safeArea = m_player->GetVideoOutput()->GetSafeRect();
if (oldsafe != m_safeArea)
changed = true;
}
Expand Down Expand Up @@ -669,11 +669,11 @@ void SubtitleScreen::DisplayCC708Subtitles(void)

CC708Service *cc708service = m_708reader->GetCurrentService();
float video_aspect = 1.77777f;
if (m_player && m_player->getVideoOutput())
if (m_player && m_player->GetVideoOutput())
{
video_aspect = m_player->GetVideoAspect();
QRect oldsafe = m_safeArea;
m_safeArea = m_player->getVideoOutput()->GetSafeRect();
m_safeArea = m_player->GetVideoOutput()->GetSafeRect();
if (oldsafe != m_safeArea)
{
for (uint i = 0; i < 8; i++)
Expand Down Expand Up @@ -911,7 +911,7 @@ void SubtitleScreen::Display708Strings(const CC708Window &win, int num,

void SubtitleScreen::AddScaledImage(QImage &img, QRect &pos)
{
VideoOutput *vo = m_player->getVideoOutput();
VideoOutput *vo = m_player->GetVideoOutput();
if (!vo)
return;

Expand Down Expand Up @@ -1194,7 +1194,7 @@ void SubtitleScreen::InitialiseAssTrack(int tracknum)
if (!header.isNull())
ass_process_codec_private(m_assTrack, header.data(), header.size());

m_safeArea = m_player->getVideoOutput()->GetMHEGBounds();
m_safeArea = m_player->GetVideoOutput()->GetMHEGBounds();
ResizeAssRenderer();
}

Expand Down Expand Up @@ -1225,7 +1225,7 @@ void SubtitleScreen::RenderAssTrack(uint64_t timecode)
if (!m_player || !m_assRenderer || !m_assTrack)
return;

VideoOutput *vo = m_player->getVideoOutput();
VideoOutput *vo = m_player->GetVideoOutput();
if (!vo )
return;

Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/teletextscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ QImage* TeletextScreen::GetRowImage(int row, QRect &rect)

void TeletextScreen::OptimiseDisplayedArea(void)
{
VideoOutput *vo = m_player->getVideoOutput();
VideoOutput *vo = m_player->GetVideoOutput();
if (!vo)
return;
MythPainter *osd_painter = vo->GetOSDPainter();
Expand Down Expand Up @@ -150,11 +150,11 @@ void TeletextScreen::Pulse(void)
if (!InitialiseFont() || !m_displaying)
return;

if (m_player && m_player->getVideoOutput())
if (m_player && m_player->GetVideoOutput())
{
static const float kTextPadding = 0.96f;
QRect oldsafe = m_safeArea;
m_safeArea = m_player->getVideoOutput()->GetSafeRect();
m_safeArea = m_player->GetVideoOutput()->GetSafeRect();
m_colWidth = (int)((float)m_safeArea.width() / (float)kTeletextColumns);
m_rowHeight = (int)((float)m_safeArea.height() / (float)kTeletextRows);

Expand Down
43 changes: 22 additions & 21 deletions mythtv/libs/libmythtv/tv_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3706,7 +3706,7 @@ bool TV::AudioSyncHandleAction(PlayerContext *ctx,
bool TV::DiscMenuHandleAction(PlayerContext *ctx, const QStringList &actions)
{
int64_t pts = 0;
VideoOutput *output = ctx->player->getVideoOutput();
VideoOutput *output = ctx->player->GetVideoOutput();
if (output)
{
VideoFrame *frame = output->GetLastShownFrame();
Expand Down Expand Up @@ -5077,7 +5077,7 @@ bool TV::ResizePIPWindow(PlayerContext *ctx)
.arg(loc));
if (loc != kPIP_END)
{
rect = mctx->player->getVideoOutput()->GetPIPRect(
rect = mctx->player->GetVideoOutput()->GetPIPRect(
loc, ctx->player, false);
}
}
Expand Down Expand Up @@ -7616,12 +7616,12 @@ void TV::DoEditSchedule(int editType)

{
actx->LockDeletePlayer(__FILE__, __LINE__);
pause_active = !actx->player || !actx->player->getVideoOutput();
pause_active = !actx->player || !actx->player->GetVideoOutput();
if (actx->player)
{
paused = actx->player->IsPaused();
if (actx->player->getVideoOutput())
allowEmbedding = actx->player->getVideoOutput()->AllowPreviewEPG();
if (actx->player->GetVideoOutput())
allowEmbedding = actx->player->GetVideoOutput()->AllowPreviewEPG();
if (!pause_active)
isNearEnd = actx->player->IsNearEnd();
}
Expand All @@ -7644,8 +7644,8 @@ void TV::DoEditSchedule(int editType)
// Resize window to the MythTV GUI size
PlayerContext *mctx = GetPlayer(actx,0);
mctx->LockDeletePlayer(__FILE__, __LINE__);
if (mctx->player && mctx->player->getVideoOutput())
mctx->player->getVideoOutput()->ResizeForGui();
if (mctx->player && mctx->player->GetVideoOutput())
mctx->player->GetVideoOutput()->ResizeForGui();
mctx->UnlockDeletePlayer(__FILE__, __LINE__);
ReturnPlayerLock(actx);
MythMainWindow *mwnd = GetMythMainWindow();
Expand Down Expand Up @@ -8449,8 +8449,8 @@ void TV::customEvent(QEvent *e)

mctx = GetPlayerReadLock(0, __FILE__, __LINE__);
mctx->LockDeletePlayer(__FILE__, __LINE__);
if (mctx->player && mctx->player->getVideoOutput())
mctx->player->getVideoOutput()->ResizeForVideo();
if (mctx->player && mctx->player->GetVideoOutput())
mctx->player->GetVideoOutput()->ResizeForVideo();
mctx->UnlockDeletePlayer(__FILE__, __LINE__);
ReturnPlayerLock(mctx);

Expand Down Expand Up @@ -8660,16 +8660,16 @@ void TV::HandleOSDClosed(int osdType)
}
}

static PictureAttribute next(
PictureAttribute TV::NextPictureAdjustType(
PictureAdjustType type, MythPlayer *mp, PictureAttribute attr)
{
if (!mp)
return kPictureAttribute_None;

uint sup = kPictureAttributeSupported_None;
if ((kAdjustingPicture_Playback == type) && mp && mp->getVideoOutput())
if ((kAdjustingPicture_Playback == type) && mp && mp->GetVideoOutput())
{
sup = mp->getVideoOutput()->GetSupportedPictureAttributes();
sup = mp->GetVideoOutput()->GetSupportedPictureAttributes();
if (mp->HasAudioOut())
sup |= kPictureAttributeSupported_Volume;
}
Expand Down Expand Up @@ -8702,7 +8702,8 @@ void TV::DoTogglePictureAttribute(const PlayerContext *ctx,
PictureAdjustType type)
{
ctx->LockDeletePlayer(__FILE__, __LINE__);
PictureAttribute attr = next(type, ctx->player, adjustingPictureAttribute);
PictureAttribute attr = NextPictureAdjustType(type, ctx->player,
adjustingPictureAttribute);
if (kPictureAttribute_None == attr)
{
ctx->UnlockDeletePlayer(__FILE__, __LINE__);
Expand All @@ -8724,7 +8725,7 @@ void TV::DoTogglePictureAttribute(const PlayerContext *ctx,
}
if (kPictureAttribute_Volume != adjustingPictureAttribute)
{
value = ctx->player->getVideoOutput()->GetPictureAttribute(attr);
value = ctx->player->GetVideoOutput()->GetPictureAttribute(attr);
}
else if (ctx->player->HasAudioOut())
{
Expand Down Expand Up @@ -8767,7 +8768,7 @@ void TV::DoChangePictureAttribute(
ctx->UnlockDeletePlayer(__FILE__, __LINE__);
return;
}
value = ctx->player->getVideoOutput()->ChangePictureAttribute(attr, up);
value = ctx->player->GetVideoOutput()->ChangePictureAttribute(attr, up);
}
ctx->UnlockDeletePlayer(__FILE__, __LINE__);

Expand Down Expand Up @@ -9931,7 +9932,7 @@ void TV::FillOSDMenuVideo(const PlayerContext *ctx, OSD *osd,
scan_type_locked = ctx->player->IsScanTypeLocked();
if (!tracks.empty())
curtrack = (uint) ctx->player->GetTrack(kTrackTypeVideo);
VideoOutput *vo = ctx->player->getVideoOutput();
VideoOutput *vo = ctx->player->GetVideoOutput();
if (vo)
{
sup = vo->GetSupportedPictureAttributes();
Expand Down Expand Up @@ -10053,10 +10054,10 @@ void TV::FillOSDMenuVideo(const PlayerContext *ctx, OSD *osd,
QString currentdeinterlacer;
bool doublerate = false;
ctx->LockDeletePlayer(__FILE__, __LINE__);
if (ctx->player && ctx->player->getVideoOutput())
if (ctx->player && ctx->player->GetVideoOutput())
{
ctx->player->getVideoOutput()->GetDeinterlacers(deinterlacers);
currentdeinterlacer = ctx->player->getVideoOutput()->GetDeinterlacer();
ctx->player->GetVideoOutput()->GetDeinterlacers(deinterlacers);
currentdeinterlacer = ctx->player->GetVideoOutput()->GetDeinterlacer();
doublerate = ctx->player->CanSupportDoubleRate();
}
ctx->UnlockDeletePlayer(__FILE__, __LINE__);
Expand Down Expand Up @@ -10939,8 +10940,8 @@ void TV::HandleDeinterlacer(PlayerContext *ctx, const QString &action)

QString deint = action.mid(13);
ctx->LockDeletePlayer(__FILE__, __LINE__);
if (ctx->player && ctx->player->getVideoOutput())
ctx->player->getVideoOutput()->SetupDeinterlace(true, deint);
if (ctx->player && ctx->player->GetVideoOutput())
ctx->player->GetVideoOutput()->SetupDeinterlace(true, deint);
ctx->UnlockDeletePlayer(__FILE__, __LINE__);
}

Expand Down
2 changes: 2 additions & 0 deletions mythtv/libs/libmythtv/tv_play.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ class MTV_PUBLIC TV : public QObject
PictureAdjustType type, PictureAttribute attr, bool up);
bool PictureAttributeHandleAction(PlayerContext*,
const QStringList &actions);
static PictureAttribute NextPictureAdjustType(
PictureAdjustType type, MythPlayer *mp, PictureAttribute attr);

// Channel editing support
void StartChannelEditMode(PlayerContext*);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videoout_d3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ MythCodecID VideoOutputD3D::GetBestSupportedCodec(
}


void* VideoOutputD3D::GetDXVA2Decoder(void)
void* VideoOutputD3D::GetDecoderContext(void)
{
#ifdef USING_DXVA2
if (m_decoder)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/videoout_d3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class VideoOutputD3D : public VideoOutput
virtual MythPainter *GetOSDPainter(void) { return (MythPainter*)m_osd_painter; }
bool hasHWAcceleration(void) const { return !codec_is_std(video_codec_id); }
virtual bool ApproveDeintFilter(const QString& filtername) const;
void* GetDXVA2Decoder(void);
virtual void* GetDecoderContext(void);

virtual bool CanVisualise(AudioPlayer *audio, MythRender *render)
{ return VideoOutput::CanVisualise(audio, (MythRender*)m_render); }
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/videooutbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class VideoOutput

/// \brief Return true if HW Acceleration is running
virtual bool hasHWAcceleration(void) const { return false; }
virtual void* GetDecoderContext(void) { return NULL; }

/// \brief Sets the number of frames played
virtual void SetFramesPlayed(long long fp) { framesPlayed = fp; };
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythtranscode/transcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ int Transcode::TranscodeFile(
float rateTimeConv = arb->eff_audiorate / 1000.0f;
float vidFrameTime = 1000.0f / video_frame_rate;
int wait_recover = 0;
VideoOutput *videoOutput = player->getVideoOutput();
VideoOutput *videoOutput = player->GetVideoOutput();
bool is_key = 0;
bool first_loop = true;
unsigned char *newFrame = new unsigned char[frame.size];
Expand Down