Permalink
Browse files

Merge branch 'fixes/0.25' of code.mythtv.org:mythtv into fixes/0.25

  • Loading branch information...
2 parents a4cdc9e + 1c496c8 commit 8ab229a8bed860fb0855797c683655a7465e2ee4 @wagnerrp wagnerrp committed Jul 31, 2012
View
1 checksums/mythplugins-0.25.2.md5sum
@@ -0,0 +1 @@
+80466458a82759d213fe69af63d6dc80 mythplugins-0.25.2.tar.bz2
View
1 checksums/mythtv-0.25.2.md5sum
@@ -0,0 +1 @@
+2bf8c0aa75e88d39747e59c27aa6072e mythtv-0.25.2.tar.bz2
View
7 mythplugins/mythmusic/mythmusic/musicplayer.cpp
@@ -105,6 +105,7 @@ MusicPlayer::~MusicPlayer()
m_cdWatcher->stop();
m_cdWatcher->wait();
delete m_cdWatcher;
+ m_cdWatcher = NULL;
}
if (!hasClient())
@@ -283,6 +284,12 @@ void MusicPlayer::stop(bool stopAll)
m_output = NULL;
}
+ if (stopAll && m_cdWatcher)
+ {
+ m_cdWatcher->stop();
+ m_cdWatcher->wait();
+ }
+
// because we don't actually stop the audio output we have to fake a Stopped
// event so any listeners can act on it
OutputEvent oe(OutputEvent::Stopped);
View
4 mythplugins/mythmusic/mythmusic/polygon.h
@@ -18,13 +18,13 @@ class Bitmap
delete[] data;
width = w;
height = h;
- data = new Pixel[w*h+extra];
+ data = new Pixel[2*w*h+extra];
clear();
}
void clear()
{
- memset(data,0,sizeof(Pixel)*(width*height+extra));
+ memset(data,0,sizeof (Pixel)*(2*width*height+extra));
}
};
#endif
View
1 mythtv/libs/libmythtv/firewirerecorder.cpp
@@ -210,6 +210,7 @@ bool FirewireRecorder::PauseAndWait(int timeout)
{
LOG(VB_RECORD, LOG_INFO, LOC +
QString("PauseAndWait(%1) -- unpause").arg(timeout));
+ paused = false;
StartStreaming();
unpauseWait.wakeAll();
}
View
34 mythtv/libs/libmythtv/streamhandler.cpp
@@ -26,9 +26,15 @@ StreamHandler::StreamHandler(const QString &device) :
StreamHandler::~StreamHandler()
{
- if (!_stream_data_list.empty())
+ QMutexLocker locker(&_add_rm_lock);
+
{
- LOG(VB_GENERAL, LOG_ERR, LOC + "dtor & _stream_data_list not empty");
+ QMutexLocker locker2(&_listener_lock);
+ if (!_stream_data_list.empty())
+ {
+ LOG(VB_GENERAL, LOG_ERR, LOC +
+ "dtor & _stream_data_list not empty");
+ }
}
// This should never be triggered.. just to be safe..
@@ -41,6 +47,8 @@ void StreamHandler::AddListener(MPEGStreamData *data,
bool needs_buffering,
QString output_file)
{
+ QMutexLocker locker(&_add_rm_lock);
+
LOG(VB_RECORD, LOG_INFO, LOC + QString("AddListener(0x%1) -- begin")
.arg((uint64_t)data,0,16));
if (!data)
@@ -93,6 +101,8 @@ void StreamHandler::AddListener(MPEGStreamData *data,
void StreamHandler::RemoveListener(MPEGStreamData *data)
{
+ QMutexLocker locker(&_add_rm_lock);
+
LOG(VB_RECORD, LOG_INFO, LOC + QString("RemoveListener(0x%1) -- begin")
.arg((uint64_t)data,0,16));
if (!data)
@@ -158,12 +168,6 @@ void StreamHandler::Start(void)
while (!_running && !_error && _running_desired)
_running_state_changed.wait(&_start_stop_lock, 100);
- if (!_running_desired)
- {
- LOG(VB_GENERAL, LOG_WARNING, LOC +
- "Programmer Error: Stop called before Start finished");
- }
-
if (_error)
{
LOG(VB_GENERAL, LOG_WARNING, LOC + "Start failed");
@@ -175,17 +179,9 @@ void StreamHandler::Stop(void)
{
QMutexLocker locker(&_start_stop_lock);
- do
- {
- SetRunningDesired(false);
- while (!_running_desired && _running)
- _running_state_changed.wait(&_start_stop_lock, 100);
- if (_running_desired)
- {
- LOG(VB_GENERAL, LOG_WARNING, LOC +
- "Programmer Error: Start called before Stop finished");
- }
- } while (_running_desired);
+ SetRunningDesired(false);
+ while (_running)
+ _running_state_changed.wait(&_start_stop_lock, 100);
wait();
}
View
6 mythtv/libs/libmythtv/streamhandler.h
@@ -45,7 +45,9 @@ class PIDInfo
typedef QMap<uint,PIDInfo*> PIDInfoMap;
// locking order
-// _pid_lock -> _listener_lock -> _start_stop_lock
+// _pid_lock -> _listener_lock
+// _add_rm_lock -> _listener_lock
+// -> _start_stop_lock
class StreamHandler : protected MThread, public DeviceReaderCB
{
@@ -101,6 +103,8 @@ class StreamHandler : protected MThread, public DeviceReaderCB
bool _needs_buffering;
bool _allow_section_reader;
+ QMutex _add_rm_lock;
+
mutable QMutex _start_stop_lock;
volatile bool _running_desired;
volatile bool _error;
View
6 mythtv/libs/libmythtv/subtitlescreen.cpp
@@ -922,7 +922,8 @@ void FormattedTextSubtitle::InitFromCC608(vector<CC608Text*> &buffers,
CC708CharacterAttribute attr(isItalic, isBold, isUnderline,
clr[min(max(0, color), 7)],
useBackground);
- FormattedTextChunk chunk(captionText, attr, parent);
+ FormattedTextChunk chunk(captionText, attr, parent,
+ cc->teletextmode);
line.chunks += chunk;
LOG(VB_VBI, LOG_INFO,
QString("Adding cc608 chunk (%1,%2): %3")
@@ -1089,6 +1090,7 @@ bool FormattedTextChunk::Split(FormattedTextChunk &newChunk)
QString("Failed to split chunk '%1'").arg(text));
return false;
}
+ newChunk.isTeletext = isTeletext;
newChunk.parent = parent;
newChunk.format = format;
newChunk.text = text.mid(lastSpace + 1).trimmed() + ' ';
@@ -1119,6 +1121,8 @@ QString FormattedTextChunk::ToLogString(void) const
.arg(format.boldface);
str += QString("font=%1 ").arg(format.font_tag);
str += QString(" text='%1'").arg(text);
+ if (isTeletext)
+ str += " DEPRECATED_608_TELETEXT";
return str;
}
View
7 mythtv/libs/libmythtv/subtitlescreen.h
@@ -110,11 +110,11 @@ class FormattedTextChunk
{
public:
FormattedTextChunk(const QString &t, CC708CharacterAttribute formatting,
- SubtitleScreen *p)
- : text(t), format(formatting), parent(p)
+ SubtitleScreen *p, bool teletext = false)
+ : text(t), format(formatting), parent(p), isTeletext(teletext)
{
}
- FormattedTextChunk(void) : parent(NULL) {}
+ FormattedTextChunk(void) : parent(NULL), isTeletext(false) {}
QSize CalcSize(float layoutSpacing = 0.0f) const
{
@@ -130,6 +130,7 @@ class FormattedTextChunk
QString text;
CC708CharacterAttribute format;
SubtitleScreen *parent; // where fonts and sizes are kept
+ bool isTeletext;
};
class FormattedTextLine
View
1 mythtv/themes/defaultmenu/mainmenu.xml
@@ -41,6 +41,7 @@
<text>Setup</text>
<description>Configure MythTV and plugins</description>
<action>MENU main_settings.xml</action>
+ <password>SetupPinCode</password>
</button>
</mythmenu>

0 comments on commit 8ab229a

Please sign in to comment.