mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
audio_select: copy full code from TangoCash
Just compile tested. Maybe some more alignments needed.
Signed-off-by: Thilo Graf <dbt@novatux.de>
Additional changes on cs playback_cs.h, because broken build
Signed-off-by: Thilo Graf <dbt@novatux.de>
Origin commit data
------------------
Branch: ni/coolstream
Commit: 5fd7ec68ac
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-12 (Thu, 12 Oct 2017)
Origin message was:
------------------
- audio_select: copy full code from TangoCash
Just compile tested. Maybe some more alignments needed.
Signed-off-by: Thilo Graf <dbt@novatux.de>
Additional changes on cs playback_cs.h, because broken build
Signed-off-by: Thilo Graf <dbt@novatux.de>
------------------
This commit was generated by Migit
This commit is contained in:
@@ -49,11 +49,13 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <playback.h>
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <gui/widget/stringinput.h>
|
||||
#include <gui/infoclock.h>
|
||||
#include <gui/infoviewer.h>
|
||||
#include <gui/movieplayer.h>
|
||||
#include <driver/display.h>
|
||||
#include <driver/volume.h>
|
||||
#include <system/helpers.h>
|
||||
@@ -338,9 +340,19 @@ bool CFontSizeNotifier::changeNotify(const neutrino_locale_t, void *)
|
||||
int CSubtitleChangeExec::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
{
|
||||
printf("CSubtitleChangeExec::exec: action %s\n", actionKey.c_str());
|
||||
|
||||
CMoviePlayerGui *mp = &CMoviePlayerGui::getInstance();
|
||||
bool is_mp = mp->Playing();
|
||||
|
||||
if(actionKey == "off") {
|
||||
tuxtx_stop_subtitle();
|
||||
dvbsub_stop();
|
||||
if (!is_mp && dvbsub_getpid() > 0)
|
||||
dvbsub_stop();
|
||||
if (is_mp && playback) {
|
||||
playback->SetSubtitlePid(0);
|
||||
playback->SetTeletextPid(0);
|
||||
mp->setCurrentTTXSub("");
|
||||
}
|
||||
return menu_return::RETURN_EXIT;
|
||||
}
|
||||
if(!strncmp(actionKey.c_str(), "DVB", 3)) {
|
||||
@@ -349,7 +361,7 @@ printf("CSubtitleChangeExec::exec: action %s\n", actionKey.c_str());
|
||||
tuxtx_stop_subtitle();
|
||||
dvbsub_pause();
|
||||
dvbsub_start(pid);
|
||||
} else {
|
||||
} else if (!strncmp(actionKey.c_str(), "TTX", 3)) {
|
||||
char const * ptr = strchr(actionKey.c_str(), ':');
|
||||
ptr++;
|
||||
int pid = atoi(ptr);
|
||||
@@ -362,7 +374,29 @@ printf("CSubtitleChangeExec::exec: TTX, pid %x page %x lang %s\n", pid, page, pt
|
||||
tuxtx_stop_subtitle();
|
||||
tuxtx_set_pid(pid, page, ptr);
|
||||
dvbsub_stop();
|
||||
tuxtx_main(pid, page);
|
||||
if (is_mp) {
|
||||
playback->SetSubtitlePid(0);
|
||||
playback->SetTeletextPid(pid);
|
||||
tuxtx_set_pid(pid, page, ptr);
|
||||
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE
|
||||
tuxtx_main(pid, page, 0, true);
|
||||
#else
|
||||
tuxtx_main(pid, page, 0);
|
||||
#endif
|
||||
mp->setCurrentTTXSub(actionKey.c_str());
|
||||
} else {
|
||||
tuxtx_set_pid(pid, page, ptr);
|
||||
tuxtx_main(pid, page);
|
||||
}
|
||||
} else if (is_mp && !strncmp(actionKey.c_str(), "SUB", 3)) {
|
||||
tuxtx_stop_subtitle();
|
||||
dvbsub_stop();
|
||||
playback->SetSubtitlePid(0);
|
||||
playback->SetTeletextPid(0);
|
||||
mp->setCurrentTTXSub("");
|
||||
char const * pidptr = strchr(actionKey.c_str(), ':');
|
||||
int pid = atoi(pidptr+1);
|
||||
playback->SetSubtitlePid(pid);
|
||||
}
|
||||
return menu_return::RETURN_EXIT;
|
||||
}
|
||||
|
Reference in New Issue
Block a user