Skip to content

Commit

Permalink
Sundry cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Jan 9, 2020
1 parent 4e9cd48 commit 7b02027
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 18 deletions.
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp
Expand Up @@ -346,12 +346,12 @@ AVPixelFormat MythV4L2M2MContext::GetV4L2RequestFormat(AVCodecContext *Context,
{
while (*PixFmt != AV_PIX_FMT_NONE)
{
if (*PixFmt == AV_PIX_FMT_DRM_PRIME) {
if (*PixFmt == AV_PIX_FMT_DRM_PRIME)
{
if (MythCodecContext::InitialiseDecoder(Context, MythV4L2M2MContext::InitialiseV4L2RequestContext,
"V4L2 request context creation") >= 0)
return AV_PIX_FMT_DRM_PRIME;

}
}
PixFmt++;
}
return AV_PIX_FMT_NONE;
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/opengl/mythdrmprimeinterop.cpp
Expand Up @@ -28,8 +28,7 @@ void MythDRMPRIMEInterop::DeleteTextures(void)
if (!m_openglTextures.isEmpty() && m_context->IsEGL())
{
int count = 0;
for (auto it = m_openglTextures.constBegin();
it != m_openglTextures.constEnd(); ++it)
for (auto it = m_openglTextures.constBegin(); it != m_openglTextures.constEnd(); ++it)
{
vector<MythVideoTexture*> textures = it.value();
for (auto & texture : textures)
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/opengl/mythmediacodecinterop.cpp
Expand Up @@ -87,7 +87,6 @@ bool MythMediaCodecInterop::Initialise(QSize Size)

// Create surface
m_surfaceTexture = QAndroidJniObject("android/graphics/SurfaceTexture", "(I)V", texture->m_textureId);
//N.B. org/mythtv/android/SurfaceTextureListener is found in the packaging repo
m_surfaceListener = QAndroidJniObject("org/mythtv/video/SurfaceTextureListener", "(J)V", jlong(&m_frameWait));
if (m_surfaceTexture.isValid() && m_surfaceListener.isValid())
{
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/opengl/mythnvdecinterop.cpp
Expand Up @@ -42,8 +42,7 @@ void MythNVDECInterop::DeleteTextures(void)
if (!m_openglTextures.isEmpty())
{
LOG(VB_PLAYBACK, LOG_INFO, LOC + "Deleting CUDA resources");
for (auto it = m_openglTextures.constBegin();
it != m_openglTextures.constEnd(); ++it)
for (auto it = m_openglTextures.constBegin(); it != m_openglTextures.constEnd(); ++it)
{
vector<MythVideoTexture*> textures = it.value();
for (auto & texture : textures)
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/opengl/mythopenglinterop.cpp
Expand Up @@ -249,8 +249,7 @@ void MythOpenGLInterop::DeleteTextures(void)
{
OpenGLLocker locker(m_context);
int count = 0;
for (auto it = m_openglTextures.constBegin();
it != m_openglTextures.constEnd(); ++it)
for (auto it = m_openglTextures.constBegin(); it != m_openglTextures.constEnd(); ++it)
{
vector<MythVideoTexture*> textures = it.value();
for (auto & texture : textures)
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/opengl/mythvaapidrminterop.cpp
Expand Up @@ -427,7 +427,6 @@ void MythVAAPIInteropDRM::CleanupDRMPRIME(void)
return;

LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Releasing %1 DRM descriptors").arg(m_drmFrames.size()));
// NOLINTNEXTLINE(modernize-loop-convert)
for (auto it = m_drmFrames.begin() ; it != m_drmFrames.end(); ++it)
{
for (int i = 0; i < (*it)->nb_objects; i++)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/opengl/mythvaapidrminterop.h
Expand Up @@ -15,7 +15,7 @@ class MythVAAPIInteropDRM : public MythVAAPIInterop, public MythEGLDMABUF
~MythVAAPIInteropDRM() override;
vector<MythVideoTexture*> Acquire(MythRenderOpenGL *Context,
VideoColourSpace *ColourSpace,
VideoFrame *Frame,FrameScanType Scan) final;
VideoFrame *Frame,FrameScanType Scan) override final;
static bool IsSupported(MythRenderOpenGL *Context);
void DeleteTextures(void) override;

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/opengl/mythvaapiglxinterop.h
Expand Up @@ -34,7 +34,7 @@ class MythVAAPIInteropGLXCopy : public MythVAAPIInteropGLX
~MythVAAPIInteropGLXCopy() override;
vector<MythVideoTexture*> Acquire(MythRenderOpenGL *Context,
VideoColourSpace *ColourSpace,
VideoFrame *Frame, FrameScanType Scan) final;
VideoFrame *Frame, FrameScanType Scan) override final;

private:
void* m_glxSurface { nullptr };
Expand All @@ -52,7 +52,7 @@ class MythVAAPIInteropGLXPixmap : public MythVAAPIInteropGLX
~MythVAAPIInteropGLXPixmap() override;
vector<MythVideoTexture*> Acquire(MythRenderOpenGL *Context,
VideoColourSpace *ColourSpace,
VideoFrame *Frame, FrameScanType Scan) final;
VideoFrame *Frame, FrameScanType Scan) override final;
static bool IsSupported(MythRenderOpenGL *Context);

private:
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythdisplay.h
Expand Up @@ -54,7 +54,7 @@ class MUI_PUBLIC MythDisplay : public QObject, public ReferenceCounter
static void PrimaryScreenChanged (QScreen *qScreen);
void ScreenAdded (QScreen *qScreen);
void ScreenRemoved (QScreen *qScreen);
static void GeometryChanged (const QRect &Geometry);
void GeometryChanged (const QRect &Geometry);

signals:
void CurrentScreenChanged (QScreen *qScreen);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythdisplaymode.cpp
Expand Up @@ -52,7 +52,7 @@ void MythDisplayMode::Init(void)

QSize MythDisplayMode::Resolution(void) const
{
return {m_width, m_height};
return { m_width, m_height };
}

int MythDisplayMode::Width(void) const
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythui/platforms/mythdisplayx11.cpp
Expand Up @@ -10,6 +10,7 @@
#define LOC QString("DisplayX11: ")

MythDisplayX11::MythDisplayX11()
: MythDisplay()
{
Initialise();
}
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/platforms/mythxdisplay.cpp
Expand Up @@ -110,7 +110,7 @@ QSize MythXDisplay::GetDisplaySize(void)
DisplayHeight(m_disp, m_screenNum));
}

return {mode.hdisplay, mode.vdisplay};
return { mode.hdisplay, mode.vdisplay };
}

/**
Expand All @@ -123,7 +123,7 @@ QSize MythXDisplay::GetDisplayDimensions(void)
MythXLocker locker(this);
int displayWidthMM = DisplayWidthMM( m_disp, m_screenNum);
int displayHeightMM = DisplayHeightMM(m_disp, m_screenNum);
return {displayWidthMM, displayHeightMM};
return { displayWidthMM, displayHeightMM };
}

double MythXDisplay::GetRefreshRate(void)
Expand Down

0 comments on commit 7b02027

Please sign in to comment.