libeplayer3: minor adjustments

Origin commit data
------------------
Branch: master
Commit: 2729075a35
Author: martii <m4rtii@gmx.de>
Date: 2014-04-16 (Wed, 16 Apr 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2014-04-16 17:26:53 +02:00
parent 5f271b7642
commit eb7717d710
5 changed files with 9 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ class Player;
struct Track
{
std::string Name;
std::string title;
int pid;
int64_t duration;
AVFormatContext *avfc;

View File

@@ -328,7 +328,7 @@ bool Input::ReadSubtitle(const char *filename, const char *format, int pid)
avformat_free_context(subavfc);
Track track;
track.Name = format;
track.title = format;
track.is_static = 1;
track.pid = pid;
player->manager.addSubtitleTrack(track);
@@ -434,7 +434,7 @@ bool Input::UpdateTracks()
track.avfc = avfc;
track.stream = stream;
AVDictionaryEntry *lang = av_dict_get(stream->metadata, "language", NULL, 0);
track.Name = lang ? lang->value : "";
track.title = lang ? lang->value : "";
track.pid = stream->id;
if (stream->duration == AV_NOPTS_VALUE)
track.duration = avfc->duration;
@@ -483,7 +483,7 @@ bool Input::UpdateTracks()
int size = stream->codec->extradata_size;
if (size > 0 && 2 * size - 1 == (int) l.length())
for (int i = 0; i < size; i += 2) {
track.Name = l.substr(i * 2, 3);
track.title = l.substr(i * 2, 3);
track.type = data[i] >> 3;
track.mag = data[i] & 7;
track.page = data[i + 1];

View File

@@ -52,7 +52,7 @@ void *Player::playthread(void *arg)
char threadname[17];
strncpy(threadname, __func__, sizeof(threadname));
threadname[16] = 0;
prctl(PR_SET_NAME, (unsigned long) &threadname);
prctl(PR_SET_NAME, (unsigned long) threadname);
Player *player = (Player *) arg;
player->hasThreadStarted = true;

View File

@@ -1,5 +1,5 @@
/*
* audio_mixer.c
* audio_mixer.cpp
*
* (C) 2012 martii
*

View File

@@ -258,7 +258,7 @@ void cPlayback::FindAllPids(int *pids, unsigned int *ac3flags, unsigned int *num
for (std::vector<Track>::iterator it = tracks.begin(); it != tracks.end() && i < *numpids; ++it) {
pids[i] = it->pid;
ac3flags[i] = it->ac3flags;
language[i] = it->Name;
language[i] = it->title;
i++;
}
@@ -272,7 +272,7 @@ void cPlayback::FindAllSubtitlePids(int *pids, unsigned int *numpids, std::strin
std::vector<Track> tracks = player->manager.getSubtitleTracks();
for (std::vector<Track>::iterator it = tracks.begin(); it != tracks.end() && i < *numpids; ++it) {
pids[i] = it->pid;
language[i] = it->Name;
language[i] = it->title;
i++;
}
@@ -288,7 +288,7 @@ void cPlayback::FindAllTeletextsubtitlePids(int *pids, unsigned int *numpids, st
if (it->type != 2 && it->type != 5) // return subtitles only
continue;
pids[i] = it->pid;
language[i] = it->Name;
language[i] = it->title;
mags[i] = it->mag;
pages[i] = it->page;
i++;
@@ -337,7 +337,6 @@ void cPlayback::RequestAbort() {
bool cPlayback::IsPlaying() {
return player->isPlaying;
return false;
}
uint64_t cPlayback::GetReadCount() {