Skip to content

Commit

Permalink
Rename NuppelVideoPlayer to MythPlayer.
Browse files Browse the repository at this point in the history
I strongly suggest a 'make distclean'


git-svn-id: http://svn.mythtv.org/svn/trunk@25555 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information
Mark Kendall committed Aug 4, 2010
1 parent cb1aba9 commit 7234b2e
Show file tree
Hide file tree
Showing 89 changed files with 1,427 additions and 1,435 deletions.
30 changes: 15 additions & 15 deletions mythtv/libs/libmythtv/DetectLetterbox.cpp
Expand Up @@ -2,11 +2,11 @@

// MythTV headers
#include "DetectLetterbox.h"
#include "NuppelVideoPlayer.h"
#include "mythplayer.h"
#include "videoouttypes.h"
#include "mythcorecontext.h"

DetectLetterbox::DetectLetterbox(NuppelVideoPlayer* const nvp)
DetectLetterbox::DetectLetterbox(MythPlayer* const player)
{
int dbAdjustFill = gCoreContext->GetNumSetting("AdjustFill", 0);
isDetectLetterbox = dbAdjustFill >= kAdjustFill_AutoDetect_DefaultOff;
Expand All @@ -17,9 +17,9 @@ DetectLetterbox::DetectLetterbox(NuppelVideoPlayer* const nvp)
detectLetterboxPossibleHalfFrame = -1;
detectLetterboxPossibleFullFrame = -1;
detectLetterboxConsecutiveCounter = 0;
detectLetterboxDetectedMode = nvp->GetAdjustFill();
detectLetterboxDetectedMode = player->GetAdjustFill();
detectLetterboxLimit = gCoreContext->GetNumSetting("DetectLeterboxLimit", 75);
nupple_video_player = nvp;
m_player = player;
}

DetectLetterbox::~DetectLetterbox()
Expand Down Expand Up @@ -48,8 +48,8 @@ void DetectLetterbox::Detect(VideoFrame *frame)
// const int fullLimit = (int) (((height - width * 9 / 16) / 2) * detectLetterboxLimit / 100);
// const int halfLimit = (int) (((height - width * 9 / 14) / 2) * detectLetterboxLimit / 100);
// If the black bars is larger than this limit we switch to Half or Full Mode
const int fullLimit = (int) ((height * (1 - nupple_video_player->GetVideoAspect() * 9 / 16) / 2) * detectLetterboxLimit / 100);
const int halfLimit = (int) ((height * (1 - nupple_video_player->GetVideoAspect() * 9 / 14) / 2) * detectLetterboxLimit / 100);
const int fullLimit = (int) ((height * (1 - m_player->GetVideoAspect() * 9 / 16) / 2) * detectLetterboxLimit / 100);
const int halfLimit = (int) ((height * (1 - m_player->GetVideoAspect() * 9 / 14) / 2) * detectLetterboxLimit / 100);

const int xPos[] = {width / 4, width / 2, width * 3 / 4}; // Lines to scan for black letterbox edge
int topHits = 0, bottomHits = 0, minTop = 0, minBottom = 0, maxTop = 0, maxBottom = 0;
Expand All @@ -58,7 +58,7 @@ void DetectLetterbox::Detect(VideoFrame *frame)
if (!GetDetectLetterbox())
return;

if (!nupple_video_player->getVideoOutput())
if (!m_player->getVideoOutput())
return;

switch (frame->codec) {
Expand All @@ -85,13 +85,13 @@ void DetectLetterbox::Detect(VideoFrame *frame)
return;
}

if (nupple_video_player->GetVideoAspect() > 1.5)
if (m_player->GetVideoAspect() > 1.5)
{
if (detectLetterboxDetectedMode != detectLetterboxDefaultMode)
{
VERBOSE(VB_PLAYBACK, QString("Detect Letterbox: The source is "
"already in widescreen (aspect: %1)")
.arg(nupple_video_player->GetVideoAspect()));
.arg(m_player->GetVideoAspect()));
detectLetterboxLock.lock();
detectLetterboxConsecutiveCounter = 0;
detectLetterboxDetectedMode = detectLetterboxDefaultMode;
Expand All @@ -104,7 +104,7 @@ void DetectLetterbox::Detect(VideoFrame *frame)
}
VERBOSE(VB_PLAYBACK, QString("Detect Letterbox: The source is already "
"in widescreen (aspect: %1)")
.arg(nupple_video_player->GetVideoAspect()));
.arg(m_player->GetVideoAspect()));
isDetectLetterbox = false;
return;
}
Expand Down Expand Up @@ -177,7 +177,7 @@ void DetectLetterbox::Detect(VideoFrame *frame)
if (detectLetterboxSwitchFrame > frameNumber) // user is reversing
{
detectLetterboxLock.lock();
detectLetterboxDetectedMode = nupple_video_player->GetAdjustFill();
detectLetterboxDetectedMode = m_player->GetAdjustFill();
detectLetterboxSwitchFrame = -1;
detectLetterboxPossibleHalfFrame = -1;
detectLetterboxPossibleFullFrame = -1;
Expand Down Expand Up @@ -295,13 +295,13 @@ void DetectLetterbox::SwitchTo(VideoFrame *frame)
if (detectLetterboxSwitchFrame <= frame->frameNumber &&
detectLetterboxConsecutiveCounter > 3)
{
if (nupple_video_player->GetAdjustFill() != detectLetterboxDetectedMode)
if (m_player->GetAdjustFill() != detectLetterboxDetectedMode)
{
VERBOSE(VB_PLAYBACK, QString("Detect Letterbox: Switched to %1 "
"on frame %2 (%3)").arg(detectLetterboxDetectedMode)
.arg(frame->frameNumber).arg(detectLetterboxSwitchFrame));
nupple_video_player->getVideoOutput()->ToggleAdjustFill(detectLetterboxDetectedMode);
nupple_video_player->ReinitOSD();
m_player->getVideoOutput()->ToggleAdjustFill(detectLetterboxDetectedMode);
m_player->ReinitOSD();
}
detectLetterboxSwitchFrame = -1;
}
Expand All @@ -321,7 +321,7 @@ void DetectLetterbox::SetDetectLetterbox(bool detect)
{
isDetectLetterbox = detect;
detectLetterboxSwitchFrame = -1;
detectLetterboxDetectedMode = nupple_video_player->GetAdjustFill();
detectLetterboxDetectedMode = m_player->GetAdjustFill();
firstFrameChecked = 0;
}

Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/DetectLetterbox.h
@@ -1,15 +1,15 @@
// -*- Mode: c++ -*-

#include "NuppelVideoPlayer.h"
#include "mythplayer.h"

using namespace std;

class NuppelVideoPlayer;
class MythPlayer;

class MPUBLIC DetectLetterbox
{
public:
DetectLetterbox(NuppelVideoPlayer* const nvp);
DetectLetterbox(MythPlayer* const player);
~DetectLetterbox();
void SetDetectLetterbox(bool detect);
bool GetDetectLetterbox();
Expand All @@ -27,7 +27,7 @@ class MPUBLIC DetectLetterbox
long long detectLetterboxPossibleFullFrame;
int detectLetterboxConsecutiveCounter;

NuppelVideoPlayer *nupple_video_player;
MythPlayer *m_player;

int detectLetterboxLimit;
QMutex detectLetterboxLock;
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/audioplayer.cpp
@@ -1,10 +1,10 @@
#include "NuppelVideoPlayer.h"
#include "mythplayer.h"
#include "audiooutput.h"
#include "audioplayer.h"

#define LOC QString("AudioPlayer: ")

AudioPlayer::AudioPlayer(NuppelVideoPlayer *parent, bool muted)
AudioPlayer::AudioPlayer(MythPlayer *parent, bool muted)
: m_parent(parent), m_audioOutput(NULL),
m_channels(2), m_codec(0), m_format(FORMAT_NONE),
m_samplerate(44100), m_stretchfactor(1.0f), m_lock(QMutex::Recursive),
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/audioplayer.h
@@ -1,13 +1,13 @@
#ifndef AUDIOPLAYER_H
#define AUDIOPLAYER_H

class NuppelVideoPlayer;
class MythPlayer;
class AudioOutput;

class MPUBLIC AudioPlayer
{
public:
AudioPlayer(NuppelVideoPlayer *parent, bool muted);
AudioPlayer(MythPlayer *parent, bool muted);
~AudioPlayer();

void Reset(void);
Expand Down Expand Up @@ -50,7 +50,7 @@ class MPUBLIC AudioPlayer
bool GetBufferStatus(uint &fill, uint &total);

private:
NuppelVideoPlayer *m_parent;
MythPlayer *m_parent;
AudioOutput *m_audioOutput;
int m_channels;
int m_codec;
Expand Down

0 comments on commit 7234b2e

Please sign in to comment.