mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
Merge branch 'uncool/dvbsi++'
Conflicts: src/driver/Makefile.am src/driver/streamts.cpp src/gui/audioplayer.cpp src/gui/epgview.cpp src/gui/infoviewer_bb.cpp src/gui/widget/textbox.h
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
(C) 2002-2008 the tuxbox project contributors
|
||||
(C) 2008 Novell, Inc. Author: Stefan Seyfried
|
||||
(C) 2011 Stefan Seyfried
|
||||
(C) 2011-2012 Stefan Seyfried
|
||||
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@@ -65,6 +65,8 @@
|
||||
#include <gui/widget/stringinput.h>
|
||||
#include <gui/widget/stringinput_ext.h>
|
||||
|
||||
#include "gui/pictureviewer.h"
|
||||
|
||||
#include <system/settings.h>
|
||||
#include <system/helpers.h>
|
||||
#include <driver/screen_max.h>
|
||||
@@ -198,6 +200,8 @@ void CAudioPlayerGui::Init(void)
|
||||
m_selected = 0;
|
||||
m_metainfo.clear();
|
||||
|
||||
pictureviewer = false;
|
||||
|
||||
m_select_title_by_name = g_settings.audioplayer_select_title_by_name==1;
|
||||
|
||||
if (strlen(g_settings.network_nfs_audioplayerdir)!=0)
|
||||
@@ -753,6 +757,22 @@ int CAudioPlayerGui::show()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( (msg == CRCInput::RC_info) && (!m_playlist.empty()) )
|
||||
{
|
||||
pictureviewer = true;
|
||||
m_frameBuffer->Clear();
|
||||
videoDecoder->StopPicture();
|
||||
CPictureViewerGui * picture = new CPictureViewerGui();
|
||||
picture->m_audioPlayer = this;
|
||||
picture->exec(this, "audio");
|
||||
delete picture;
|
||||
pictureviewer = false;
|
||||
videoDecoder->setBlank(true);
|
||||
videoDecoder->ShowPicture(DATADIR "/neutrino/icons/mp3.jpg");
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_AUDIO);
|
||||
paintLCD();
|
||||
screensaver(false);
|
||||
}
|
||||
else if (msg == CRCInput::RC_help)
|
||||
{
|
||||
if (m_key_level == 2)
|
||||
@@ -905,6 +925,17 @@ bool CAudioPlayerGui::playNext(bool allow_rotate)
|
||||
return(result);
|
||||
}
|
||||
|
||||
void CAudioPlayerGui::wantNextPlay()
|
||||
{
|
||||
if ((m_state != CAudioPlayerGui::STOP) &&
|
||||
(CAudioPlayer::getInstance()->getState() == CBaseDec::STOP) &&
|
||||
(!m_playlist.empty()))
|
||||
{
|
||||
if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO)
|
||||
playNext();
|
||||
}
|
||||
}
|
||||
|
||||
bool CAudioPlayerGui::playPrev(bool allow_rotate)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -1701,10 +1732,11 @@ const struct button_label AudioPlayerButtons[][4] =
|
||||
void CAudioPlayerGui::paintFoot()
|
||||
{
|
||||
// printf("paintFoot{\n");
|
||||
const struct button_label ScondLineButtons[2] =
|
||||
const struct button_label ScondLineButtons[3] =
|
||||
{
|
||||
{ NEUTRINO_ICON_BUTTON_OKAY , LOCALE_AUDIOPLAYER_PLAY },
|
||||
{ NEUTRINO_ICON_BUTTON_HELP , LOCALE_AUDIOPLAYER_KEYLEVEL },
|
||||
{ NEUTRINO_ICON_BUTTON_INFO , LOCALE_PICTUREVIEWER_HEAD},
|
||||
};
|
||||
|
||||
int top;
|
||||
@@ -1719,8 +1751,7 @@ const struct button_label ScondLineButtons[2] =
|
||||
m_frameBuffer->paintHLine(m_x, m_x + m_width, top, COL_INFOBAR_SHADOW_PLUS_1);
|
||||
|
||||
if (!m_playlist.empty())
|
||||
::paintButtons(m_x, top+m_buttonHeight, m_width, 2, ScondLineButtons, m_width, m_buttonHeight);
|
||||
|
||||
::paintButtons(m_x, top+m_buttonHeight, m_width, 3, ScondLineButtons, m_width, m_buttonHeight);
|
||||
|
||||
if (m_key_level == 0)
|
||||
{
|
||||
@@ -1949,12 +1980,16 @@ void CAudioPlayerGui::stop()
|
||||
{
|
||||
m_state = CAudioPlayerGui::STOP;
|
||||
m_current = 0;
|
||||
//LCD
|
||||
paintLCD();
|
||||
//Display
|
||||
paintInfo();
|
||||
m_key_level = 0;
|
||||
paintFoot();
|
||||
|
||||
if (!pictureviewer)
|
||||
{
|
||||
//LCD
|
||||
paintLCD();
|
||||
//Display
|
||||
paintInfo();
|
||||
m_key_level = 0;
|
||||
paintFoot();
|
||||
}
|
||||
|
||||
if (CAudioPlayer::getInstance()->getState() != CBaseDec::STOP)
|
||||
CAudioPlayer::getInstance()->stop();
|
||||
@@ -2028,31 +2063,31 @@ void CAudioPlayerGui::play(unsigned int pos)
|
||||
if (m_selected - m_liststart >= m_listmaxshow && g_settings.audioplayer_follow)
|
||||
{
|
||||
m_liststart = m_selected;
|
||||
if (!m_screensaver)
|
||||
if (!m_screensaver && !pictureviewer)
|
||||
paint();
|
||||
}
|
||||
else if (m_liststart < m_selected && g_settings.audioplayer_follow)
|
||||
{
|
||||
m_liststart = m_selected - m_listmaxshow + 1;
|
||||
if (!m_screensaver)
|
||||
if (!m_screensaver && !pictureviewer)
|
||||
paint();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (old_current >= m_liststart && old_current - m_liststart < m_listmaxshow)
|
||||
{
|
||||
if (!m_screensaver)
|
||||
if (!m_screensaver && !pictureviewer)
|
||||
paintItem(old_current - m_liststart);
|
||||
}
|
||||
if (pos >= m_liststart && pos - m_liststart < m_listmaxshow)
|
||||
{
|
||||
if (!m_screensaver)
|
||||
if (!m_screensaver && !pictureviewer)
|
||||
paintItem(pos - m_liststart);
|
||||
}
|
||||
if (g_settings.audioplayer_follow)
|
||||
{
|
||||
if (old_selected >= m_liststart && old_selected - m_liststart < m_listmaxshow)
|
||||
if (!m_screensaver)
|
||||
if (!m_screensaver && !pictureviewer)
|
||||
paintItem(old_selected - m_liststart);
|
||||
}
|
||||
}
|
||||
@@ -2071,14 +2106,18 @@ void CAudioPlayerGui::play(unsigned int pos)
|
||||
m_curr_audiofile = m_playlist[m_current];
|
||||
// Play
|
||||
CAudioPlayer::getInstance()->play(&m_curr_audiofile, g_settings.audioplayer_highprio == 1);
|
||||
//LCD
|
||||
paintLCD();
|
||||
// Display
|
||||
if (!m_screensaver)
|
||||
paintInfo();
|
||||
m_key_level = 1;
|
||||
if (!m_screensaver)
|
||||
paintFoot();
|
||||
|
||||
if (!pictureviewer)
|
||||
{
|
||||
//LCD
|
||||
paintLCD();
|
||||
// Display
|
||||
if (!m_screensaver)
|
||||
paintInfo();
|
||||
m_key_level = 1;
|
||||
if (!m_screensaver)
|
||||
paintFoot();
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user