libeplayer3: use uint64_t instead of float/double for position calculations

This commit is contained in:
martii
2014-04-14 21:47:40 +02:00
parent 31230e5b19
commit 8ccf1ba33b
7 changed files with 52 additions and 58 deletions

View File

@@ -53,8 +53,8 @@ class Input
Track *teletextTrack;
int hasPlayThreadStarted;
float seek_sec_abs;
float seek_sec_rel;
int64_t seek_avts_abs;
int64_t seek_avts_rel;
bool isContainerRunning;
bool abortPlayback;
@@ -71,8 +71,8 @@ class Input
bool UpdateTracks();
bool Play();
bool Stop();
bool Seek(float sec, bool absolute);
bool GetDuration(double &duration);
bool Seek(int64_t sec, bool absolute);
bool GetDuration(int64_t &duration);
bool SwitchAudio(Track *track);
bool SwitchSubtitle(Track *track);
bool SwitchTeletext(Track *track);

View File

@@ -47,8 +47,8 @@ extern "C" {
struct Chapter
{
std::string title;
double start;
double end;
int64_t start;
int64_t end;
};
class Player {
@@ -97,7 +97,7 @@ class Player {
bool GetPts(int64_t &pts);
bool GetFrameCount(int64_t &framecount);
bool GetDuration(double &duration);
bool GetDuration(int64_t &duration);
bool GetMetadata(std::vector<std::string> &keys, std::vector<std::string> &values);
bool SlowMotion(int repeats);
@@ -110,7 +110,7 @@ class Player {
bool Pause();
bool Continue();
bool Stop();
bool Seek(float pos, bool absolute);
bool Seek(int64_t pos, bool absolute);
void RequestAbort();
bool GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);