Skip to content

Commit

Permalink
Update RAOP notification to cater for new Notification Center behaviour.
Browse files Browse the repository at this point in the history
The "New" notification type define how the notification will appear on screen, it can't be changed once open. So we must always send a MythMediaNotification as our first notification.
  • Loading branch information
jyavenard committed Jul 3, 2013
1 parent 3e7cdf7 commit a5ca5c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp
Expand Up @@ -82,7 +82,8 @@ MythRAOPConnection::MythRAOPConnection(QObject *parent, QTcpSocket *socket,
m_masterTimeStamp(0), m_deviceTimeStamp(0), m_networkLatency(0),
m_clockSkew(0),
m_audioTimer(NULL),
m_progressStart(0), m_progressCurrent(0), m_progressEnd(0)
m_progressStart(0), m_progressCurrent(0), m_progressEnd(0),
m_firstsend(false)
{
m_id = MythUINotificationCenter::GetInstance()->Register(this);
}
Expand Down Expand Up @@ -1771,7 +1772,7 @@ void MythRAOPConnection::SendNotification(bool update)

MythNotification *n;

if (!update)
if (!update || !m_firstsend)
{
n = new MythMediaNotification(MythNotification::New,
image, m_dmap, duration, position);
Expand All @@ -1784,5 +1785,6 @@ void MythRAOPConnection::SendNotification(bool update)
n->SetId(m_id);
n->SetParent(this);
MythUINotificationCenter::GetInstance()->Queue(*n);
m_firstsend = true;
delete n;
}
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/AirPlay/mythraopconnection.h
Expand Up @@ -189,6 +189,7 @@ class MTV_PUBLIC MythRAOPConnection : public QObject

// Notification Center registration Id
int m_id;
bool m_firstsend;

private slots:
void ProcessAudio(void);
Expand Down

0 comments on commit a5ca5c1

Please sign in to comment.