mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 18:31:22 +02:00
Merge branch 'master' into pu/fb-setmode
This commit is contained in:
@@ -32,7 +32,7 @@ AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/lib/connection \
|
||||
-I$(top_srcdir)/lib/xmltree \
|
||||
-I$(top_srcdir)/lib/libupnpclient \
|
||||
-I$(top_srcdir)/lib/jsoncpp/include \
|
||||
-I$(top_srcdir)/lib/jsoncpp \
|
||||
@SIGC_CFLAGS@ \
|
||||
@CURL_CFLAGS@ \
|
||||
@FREETYPE_CFLAGS@ \
|
||||
|
@@ -12,7 +12,7 @@ AM_CPPFLAGS += \
|
||||
-I$(top_srcdir)/lib/connection \
|
||||
-I$(top_srcdir)/lib/xmltree \
|
||||
-I$(top_srcdir)/lib/libupnpclient \
|
||||
-I$(top_srcdir)/lib/jsoncpp/include \
|
||||
-I$(top_srcdir)/lib/jsoncpp \
|
||||
@SIGC_CFLAGS@ \
|
||||
@CURL_CFLAGS@ \
|
||||
@FREETYPE_CFLAGS@ \
|
||||
|
@@ -581,7 +581,7 @@ void CUpnpBrowserGui::selectDevice()
|
||||
#endif
|
||||
else
|
||||
{
|
||||
printf("msg: %x\n", (int) msg);
|
||||
//printf("msg: %x\n", (int) msg);
|
||||
if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all)
|
||||
loop = false;
|
||||
}
|
||||
@@ -733,6 +733,7 @@ bool CUpnpBrowserGui::selectItem(std::string id)
|
||||
|
||||
while (loop) {
|
||||
updateTimes();
|
||||
updateMode();
|
||||
|
||||
if (refresh) {
|
||||
printf("selectItem: refresh, timeout = %d\n", (int) timeout);
|
||||
@@ -1257,7 +1258,7 @@ void CUpnpBrowserGui::updateTimes(const bool force)
|
||||
updatePlayed = true;
|
||||
}
|
||||
|
||||
printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed);
|
||||
//printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed);
|
||||
char play_time[8];
|
||||
snprintf(play_time, 7, "%ld:%02ld", m_time_played / 60, m_time_played % 60);
|
||||
|
||||
@@ -1268,14 +1269,21 @@ void CUpnpBrowserGui::updateTimes(const bool force)
|
||||
}
|
||||
}
|
||||
|
||||
void CUpnpBrowserGui::updateMode()
|
||||
{
|
||||
/* switch back to mode_upnp if audio has stopped automatically */
|
||||
if ((CAudioPlayer::getInstance()->getState() == CBaseDec::STOP) && (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_audio))
|
||||
{
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_upnp | NeutrinoMessages::norezap);
|
||||
}
|
||||
}
|
||||
|
||||
void CUpnpBrowserGui::playAudio(std::string name, int type)
|
||||
{
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_audio);
|
||||
|
||||
CAudiofile mp3(name, (CFile::FileType) type);
|
||||
CAudioPlayer::getInstance()->play(&mp3, g_settings.audioplayer_highprio == 1);
|
||||
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_upnp | NeutrinoMessages::norezap);
|
||||
}
|
||||
|
||||
void CUpnpBrowserGui::stopAudio()
|
||||
@@ -1284,6 +1292,8 @@ void CUpnpBrowserGui::stopAudio()
|
||||
{
|
||||
CAudioPlayer::getInstance()->stop();
|
||||
}
|
||||
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_upnp | NeutrinoMessages::norezap);
|
||||
}
|
||||
|
||||
void CUpnpBrowserGui::showPicture(std::string name)
|
||||
|
@@ -124,6 +124,7 @@ class CUpnpBrowserGui : public CMenuTarget, public CListHelpers
|
||||
void paintItem2DetailsLine(int pos);
|
||||
|
||||
void updateTimes(const bool force = false);
|
||||
void updateMode();
|
||||
void playAudio(std::string name, int type);
|
||||
void stopAudio();
|
||||
void showPicture(std::string name);
|
||||
|
@@ -16,7 +16,7 @@ AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/libconfigfile \
|
||||
-I$(top_srcdir)/lib/libmd5sum \
|
||||
-I$(top_srcdir)/lib/xmltree \
|
||||
-I$(top_srcdir)/lib/jsoncpp/include \
|
||||
-I$(top_srcdir)/lib/jsoncpp \
|
||||
@SIGC_CFLAGS@ \
|
||||
@FREETYPE_CFLAGS@ \
|
||||
@AVFORMAT_CFLAGS@ \
|
||||
|
Reference in New Issue
Block a user