libeplayer3: continue refresh

This commit is contained in:
martii
2014-04-08 20:02:07 +02:00
parent 42efb5c739
commit 7d49d4d32b
26 changed files with 709 additions and 908 deletions

View File

@@ -1,3 +1,23 @@
/*
* manager class
*
* Copyright (C) 2014 martii
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __MANAGER_H__
#define __MANAGER_H__
@@ -24,21 +44,13 @@ struct Track
{
std::string Name;
int pid;
/* length of track */
int64_t duration;
/* context from ffmpeg */
AVFormatContext *avfc;
/* stream from ffmpeg */
AVStream *stream;
bool inactive;
bool is_static;
int ac3flags;
int type, mag, page; // for teletext
Track() : pid(-1), duration(-1), avfc(NULL), stream(NULL), inactive(0), is_static(0), ac3flags(0) {}
};
@@ -49,7 +61,10 @@ class Manager
private:
Player *player;
OpenThreads::Mutex mutex;
std::map<int,Track *> videoTracks, audioTracks, subtitleTracks, teletextTracks;
std::map<int,Track*> videoTracks, audioTracks, subtitleTracks, teletextTracks;
void addTrack(std::map<int,Track*> &tracks, Track &track);
Track *getTrack(std::map<int,Track*> &tracks, int pid);
std::vector<Track> getTracks(std::map<int,Track*> &tracks);
public:
void addVideoTrack(Track &track);
void addAudioTrack(Track &track);