mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 19:01:25 +02:00
gui/movieplayer.cpp: add GetReadCount, (C) martii,
user RED button to call streaminfo
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include <gui/infoclock.h>
|
||||
#include <gui/plugins.h>
|
||||
#include <gui/videosettings.h>
|
||||
#include <gui/streaminfo2.h>
|
||||
#include <driver/screenshot.h>
|
||||
#include <driver/volume.h>
|
||||
#include <driver/display.h>
|
||||
@@ -769,6 +770,7 @@ bool CMoviePlayerGui::PlayFileStart(void)
|
||||
|
||||
position = 0, duration = 0;
|
||||
speed = 1;
|
||||
last_read = 0;
|
||||
|
||||
printf("%s: starting...\n", __func__);
|
||||
stopPlayBack();
|
||||
@@ -1127,6 +1129,14 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
}
|
||||
if (restore)
|
||||
FileTime.show(position);
|
||||
} else if (msg == CRCInput::RC_red) {
|
||||
bool restore = FileTime.IsVisible();
|
||||
FileTime.kill();
|
||||
CStreamInfo2 streaminfo;
|
||||
streaminfo.exec(NULL, "");
|
||||
if (restore)
|
||||
FileTime.show(position);
|
||||
update_lcd = true;
|
||||
} else if (msg == NeutrinoMessages::SHOW_EPG) {
|
||||
handleMovieBrowser(NeutrinoMessages::SHOW_EPG, position);
|
||||
} else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
|
||||
@@ -2180,3 +2190,17 @@ void CMoviePlayerGui::makeScreenShot(bool autoshot, bool forcover)
|
||||
if (autoshot)
|
||||
autoshot_done = true;
|
||||
}
|
||||
|
||||
size_t CMoviePlayerGui::GetReadCount()
|
||||
{
|
||||
uint64_t this_read = 0;
|
||||
this_read = playback->GetReadCount();
|
||||
uint64_t res;
|
||||
if (this_read < last_read)
|
||||
res = 0;
|
||||
else
|
||||
res = this_read - last_read;
|
||||
last_read = this_read;
|
||||
//printf("GetReadCount: %lld\n", res);
|
||||
return (size_t) res;
|
||||
}
|
||||
|
@@ -115,6 +115,7 @@ class CMoviePlayerGui : public CMenuTarget
|
||||
time_t end_time;
|
||||
bool ext_subs;
|
||||
bool lock_subs;
|
||||
uint64_t last_read;
|
||||
|
||||
/* playback from MB */
|
||||
bool isMovieBrowser;
|
||||
@@ -218,6 +219,8 @@ class CMoviePlayerGui : public CMenuTarget
|
||||
void showSubtitle(neutrino_msg_data_t data);
|
||||
void clearSubtitle(bool lock = false);
|
||||
int getKeyPressed() { return keyPressed; };
|
||||
size_t GetReadCount();
|
||||
std::string GetFile() { return pretty_name; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user