Skip to content

Commit

Permalink
libmythtv: Rename VideoDisplayProfile to MythVideoProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Dec 14, 2020
1 parent 7b6925f commit 31adfce
Show file tree
Hide file tree
Showing 23 changed files with 159 additions and 159 deletions.
14 changes: 7 additions & 7 deletions mythtv/libs/libmythtv/dbcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "recordingprofile.h"
#include "recordinginfo.h"
#include "cardutil.h"
#include "videodisplayprofile.h"
#include "mythvideoprofile.h"

// TODO convert all dates to UTC

Expand Down Expand Up @@ -3404,8 +3404,8 @@ static bool doUpgradeTVDatabaseSchema(void)
if (dbver == "1357")
{
// convert old VideoDisplayProfile settings to new format
ProfileItem temp;
std::vector<ProfileItem> profiles;
MythVideoProfileItem temp;
std::vector<MythVideoProfileItem> profiles;

MSqlQuery query(MSqlQuery::InitCon());
query.prepare("SELECT profileid, value, data FROM displayprofiles "
Expand Down Expand Up @@ -3438,7 +3438,7 @@ static bool doUpgradeTVDatabaseSchema(void)
profiles.push_back(temp);
}

for (const ProfileItem& profile : qAsConst(profiles))
for (const MythVideoProfileItem& profile : qAsConst(profiles))
{
QString newdecoder;
QString newrender;
Expand Down Expand Up @@ -3594,8 +3594,8 @@ static bool doUpgradeTVDatabaseSchema(void)
{
// missed in 1357 - convert old vdpau and openglvaapi renderers to opengl
// convert ancient quartz-blit to opengl as well
ProfileItem temp;
std::vector<ProfileItem> profiles;
MythVideoProfileItem temp;
std::vector<MythVideoProfileItem> profiles;

MSqlQuery query(MSqlQuery::InitCon());
query.prepare("SELECT profileid, value, data FROM displayprofiles "
Expand Down Expand Up @@ -3628,7 +3628,7 @@ static bool doUpgradeTVDatabaseSchema(void)
profiles.push_back(temp);
}

for (const ProfileItem& profile : qAsConst(profiles))
for (const MythVideoProfileItem& profile : qAsConst(profiles))
{
// the old deinterlacers will have been converted already
QString oldrender = profile.Get("pref_videorenderer");
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "captions/teletextdecoder.h"
#include "captions/subtitlereader.h"
#include "interactivetv.h"
#include "videodisplayprofile.h"
#include "mythvideoprofile.h"
#include "mythuihelper.h"
#include "DVD/mythdvdbuffer.h"
#include "Bluray/mythbdbuffer.h"
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/decoders/avformatdecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "spdifencoder.h"
#include "vbilut.h"
#include "AVCParser.h"
#include "videodisplayprofile.h"
#include "mythcodeccontext.h"
#include "mythplayer.h"

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/decoders/decoderbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "programinfo.h"
#include "mythcodecid.h"
#include "mythavutil.h"
#include "videodisplayprofile.h"
#include "mythvideoprofile.h"

class TeletextViewer;
class MythPlayer;
Expand Down Expand Up @@ -355,7 +355,7 @@ class DecoderBase
/// language preferences for auto-selection of streams
std::vector<int> m_languagePreference;
MythCodecContext *m_mythCodecCtx { nullptr };
VideoDisplayProfile m_videoDisplayProfile;
MythVideoProfile m_videoDisplayProfile;
const VideoFrameTypes* m_renderFormats { &MythVideoFrame::kDefaultRenderFormats };

private:
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/decoders/mythcodeccontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ using CreateHWDecoder = int (*)(AVCodecContext *Context);

class MythPlayerUI;
class MythOpenGLInterop;
class VideoDisplayProfile;
class MythVideoProfile;

class MTV_PUBLIC MythCodecContext
{
Expand Down Expand Up @@ -149,7 +149,7 @@ class MTV_PUBLIC MythCodecContext
virtual int HwDecoderInit (AVCodecContext */*Context*/) { return 0; }
virtual bool RetrieveFrame (AVCodecContext */*Context*/, MythVideoFrame */*Frame*/, AVFrame */*AvFrame*/) { return false; }
virtual int FilteredReceiveFrame (AVCodecContext *Context, AVFrame *Frame);
virtual void SetDeinterlacing (AVCodecContext */*Context*/, VideoDisplayProfile */*Profile*/, bool /*DoubleRate*/) {}
virtual void SetDeinterlacing (AVCodecContext */*Context*/, MythVideoProfile */*Profile*/, bool /*DoubleRate*/) {}
virtual void PostProcessFrame (AVCodecContext */*Context*/, MythVideoFrame */*Frame*/) {}
virtual bool IsDeinterlacing (bool &/*DoubleRate*/, bool /*StreamChange*/ = false) { return false; }
virtual void SetDecoderOptions (AVCodecContext */*Context*/, AVCodec */*Codec*/) { }
Expand All @@ -168,4 +168,4 @@ class MTV_PUBLIC MythCodecContext
bool m_resetRequired { false };
};

#endif // MYTHCODECCONTEXT_H
#endif
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int MythNVDECContext::HwDecoderInit(AVCodecContext *Context)
* and handle all deinterlacing.
*/
void MythNVDECContext::SetDeinterlacing(AVCodecContext *Context,
VideoDisplayProfile *Profile, bool DoubleRate)
MythVideoProfile *Profile, bool DoubleRate)
{
if (!Context)
return;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/decoders/mythnvdeccontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MythNVDECContext : public MythCodecContext
int HwDecoderInit (AVCodecContext *Context) override;
bool RetrieveFrame (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override;
void SetDeinterlacing (AVCodecContext *Context,
VideoDisplayProfile *Profile, bool DoubleRate) override;
MythVideoProfile *Profile, bool DoubleRate) override;
void PostProcessFrame (AVCodecContext *Context, MythVideoFrame *Frame) override;
bool IsDeinterlacing (bool &DoubleRate, bool StreamChange = false) override;
bool DecoderWillResetOnFlush (void) override;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/libmythtv.pro
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ using_frontend {
HEADERS += mythvideogpu.h
HEADERS += videobuffers.h
HEADERS += jitterometer.h
HEADERS += videodisplayprofile.h mythcodecid.h
HEADERS += mythvideoprofile.h mythcodecid.h
HEADERS += videoouttypes.h
HEADERS += mythvideobounds.h
HEADERS += mythvideocolourspace.h
Expand All @@ -488,7 +488,7 @@ using_frontend {
SOURCES += mythvideogpu.cpp
SOURCES += videobuffers.cpp
SOURCES += jitterometer.cpp
SOURCES += videodisplayprofile.cpp mythcodecid.cpp
SOURCES += mythvideoprofile.cpp mythcodecid.cpp
SOURCES += mythvideobounds.cpp
SOURCES += mythvideocolourspace.cpp
SOURCES += visualisations/videovisual.cpp
Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythtv/mythdeinterlacer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "config.h"
#include "mythlogging.h"
#include "mythavutil.h"
#include "mythvideoprofile.h"
#include "mythdeinterlacer.h"

extern "C" {
Expand Down Expand Up @@ -67,7 +68,7 @@ MythDeinterlacer::~MythDeinterlacer()
* Used for preview images.
*/
void MythDeinterlacer::Filter(MythVideoFrame *Frame, FrameScanType Scan,
VideoDisplayProfile *Profile, bool Force)
MythVideoProfile *Profile, bool Force)
{
// nothing to see here

Expand Down Expand Up @@ -295,7 +296,7 @@ void MythDeinterlacer::Cleanup(void)

///\brief Initialise deinterlacing using the given MythDeintType
bool MythDeinterlacer::Initialise(MythVideoFrame *Frame, MythDeintType Deinterlacer,
bool DoubleRate, bool TopFieldFirst, VideoDisplayProfile *Profile)
bool DoubleRate, bool TopFieldFirst, MythVideoProfile *Profile)
{
auto autofieldorder = m_autoFieldOrder;
auto lastfieldchange = m_lastFieldChange;
Expand Down
7 changes: 4 additions & 3 deletions mythtv/libs/libmythtv/mythdeinterlacer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,27 @@
// MythTV
#include "videoouttypes.h"
#include "mythavutil.h"
#include "videodisplayprofile.h"

extern "C" {
#include "libavfilter/avfilter.h"
#include "libswscale/swscale.h"
}

class MythVideoProfile;

class MythDeinterlacer
{
public:
MythDeinterlacer() = default;
~MythDeinterlacer();

void Filter (MythVideoFrame *Frame, FrameScanType Scan,
VideoDisplayProfile *Profile, bool Force = false);
MythVideoProfile *Profile, bool Force = false);

private:
bool Initialise (MythVideoFrame *Frame, MythDeintType Deinterlacer,
bool DoubleRate, bool TopFieldFirst,
VideoDisplayProfile *Profile);
MythVideoProfile *Profile);
inline void Cleanup (void);
void OneField (MythVideoFrame *Frame, FrameScanType Scan);
void Blend (MythVideoFrame *Frame, FrameScanType Scan);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythframe.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// MythTV
#include "mythlogging.h"
#include "videodisplayprofile.h"
#include "mythvideoprofile.h"
#include "mythframe.h"

// FFmpeg - for av_malloc/av_free
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythvideoout.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// MythTV
#include "osd.h"
#include "mythplayer.h"
#include "videodisplayprofile.h"
#include "mythvideoprofile.h"
#include "decoderbase.h"
#include "mythcorecontext.h"
#include "mythlogging.h"
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mythvideoout.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "videoouttypes.h"
#include "mythvideobounds.h"
#include "mythdisplay.h"
#include "videodisplayprofile.h"
#include "mythvideoprofile.h"
#include "mythvideocolourspace.h"
#include "mythavutil.h"
#include "mythdeinterlacer.h"
Expand Down Expand Up @@ -93,7 +93,7 @@ class MythVideoOutput : public MythVideoBounds
LetterBoxColour m_dbLetterboxColour { kLetterBoxColour_Black };
MythCodecID m_videoCodecID { kCodec_NONE };
int m_maxReferenceFrames { 16 };
VideoDisplayProfile* m_dbDisplayProfile { nullptr };
MythVideoProfile* m_dbDisplayProfile { nullptr };
VideoBuffers m_videoBuffers;
VideoErrorState m_errorState { kError_None };
long long m_framesPlayed { 0 };
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/mythvideooutgpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ MythVideoOutputGPU *MythVideoOutputGPU::Create(MythMainWindow* MainWindow, const
LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Allowed renderers for %1 %2 (Decoder: %3): '%4'")
.arg(get_encoding_type(CodecID)).arg(get_decoder_name(CodecID))
.arg(Decoder).arg(renderers.join(",")));
renderers = VideoDisplayProfile::GetFilteredRenderers(Decoder, renderers);
renderers = MythVideoProfile::GetFilteredRenderers(Decoder, renderers);
LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Allowed renderers (filt: %1): %2")
.arg(Decoder).arg(renderers.join(",")));

QString renderer;

auto * vprof = new VideoDisplayProfile();
auto * vprof = new MythVideoProfile();

if (!renderers.empty())
{
Expand All @@ -86,7 +86,7 @@ MythVideoOutputGPU *MythVideoOutputGPU::Create(MythMainWindow* MainWindow, const
}

if (renderer.isEmpty())
renderer = VideoDisplayProfile::GetBestVideoRenderer(renderers);
renderer = MythVideoProfile::GetBestVideoRenderer(renderers);

if (renderer.isEmpty())
{
Expand Down Expand Up @@ -144,7 +144,7 @@ MythVideoOutputGPU *MythVideoOutputGPU::Create(MythMainWindow* MainWindow, const
delete video;
video = nullptr;
}
renderer = VideoDisplayProfile::GetBestVideoRenderer(renderers);
renderer = MythVideoProfile::GetBestVideoRenderer(renderers);
}

LOG(VB_GENERAL, LOG_ERR, LOC + "Not compiled with any useable video output method.");
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/mythvideooutnull.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// MythTV
#include "mythlogging.h"
#include "mythvideooutnull.h"
#include "videodisplayprofile.h"

// Std
#include <map>
Expand Down
Loading

0 comments on commit 31adfce

Please sign in to comment.