mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-06 21:28:32 +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/infoclock.h>
|
||||||
#include <gui/plugins.h>
|
#include <gui/plugins.h>
|
||||||
#include <gui/videosettings.h>
|
#include <gui/videosettings.h>
|
||||||
|
#include <gui/streaminfo2.h>
|
||||||
#include <driver/screenshot.h>
|
#include <driver/screenshot.h>
|
||||||
#include <driver/volume.h>
|
#include <driver/volume.h>
|
||||||
#include <driver/display.h>
|
#include <driver/display.h>
|
||||||
@@ -769,6 +770,7 @@ bool CMoviePlayerGui::PlayFileStart(void)
|
|||||||
|
|
||||||
position = 0, duration = 0;
|
position = 0, duration = 0;
|
||||||
speed = 1;
|
speed = 1;
|
||||||
|
last_read = 0;
|
||||||
|
|
||||||
printf("%s: starting...\n", __func__);
|
printf("%s: starting...\n", __func__);
|
||||||
stopPlayBack();
|
stopPlayBack();
|
||||||
@@ -1127,6 +1129,14 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
|||||||
}
|
}
|
||||||
if (restore)
|
if (restore)
|
||||||
FileTime.show(position);
|
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) {
|
} else if (msg == NeutrinoMessages::SHOW_EPG) {
|
||||||
handleMovieBrowser(NeutrinoMessages::SHOW_EPG, position);
|
handleMovieBrowser(NeutrinoMessages::SHOW_EPG, position);
|
||||||
} else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
|
} else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
|
||||||
@@ -2180,3 +2190,17 @@ void CMoviePlayerGui::makeScreenShot(bool autoshot, bool forcover)
|
|||||||
if (autoshot)
|
if (autoshot)
|
||||||
autoshot_done = true;
|
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;
|
time_t end_time;
|
||||||
bool ext_subs;
|
bool ext_subs;
|
||||||
bool lock_subs;
|
bool lock_subs;
|
||||||
|
uint64_t last_read;
|
||||||
|
|
||||||
/* playback from MB */
|
/* playback from MB */
|
||||||
bool isMovieBrowser;
|
bool isMovieBrowser;
|
||||||
@@ -218,6 +219,8 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
void showSubtitle(neutrino_msg_data_t data);
|
void showSubtitle(neutrino_msg_data_t data);
|
||||||
void clearSubtitle(bool lock = false);
|
void clearSubtitle(bool lock = false);
|
||||||
int getKeyPressed() { return keyPressed; };
|
int getKeyPressed() { return keyPressed; };
|
||||||
|
size_t GetReadCount();
|
||||||
|
std::string GetFile() { return pretty_name; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user