Working multi-input
This commit is contained in:
parent
9b6312ca01
commit
d370ef4eac
31 changed files with 1264 additions and 690 deletions
|
@ -7,35 +7,28 @@
|
|||
#include <mist/dtsc.h>
|
||||
#include <mist/shared_memory.h>
|
||||
|
||||
namespace Mist {
|
||||
struct DTSCPageData {
|
||||
DTSCPageData() : keyNum(0), partNum(0), dataSize(0), curOffset(0), firstTime(0){}
|
||||
int keyNum;///<The number of keyframes in this page.
|
||||
int partNum;///<The number of parts in this page.
|
||||
unsigned long long int dataSize;///<The full size this page should be.
|
||||
unsigned long long int curOffset;///<The current write offset in the page.
|
||||
unsigned long long int firstTime;///<The first timestamp of the page.
|
||||
unsigned long lastKeyTime;///<The last key time encountered on this track.
|
||||
};
|
||||
#include "../io.h"
|
||||
|
||||
namespace Mist {
|
||||
struct booking {
|
||||
int first;
|
||||
int curKey;
|
||||
int curPart;
|
||||
};
|
||||
|
||||
class Input {
|
||||
class Input : public InOutBase {
|
||||
public:
|
||||
Input(Util::Config * cfg);
|
||||
int run();
|
||||
virtual int run();
|
||||
virtual ~Input() {};
|
||||
protected:
|
||||
static void doNothing(char * data, size_t len, unsigned int id);
|
||||
static void callbackWrapper(char * data, size_t len, unsigned int id);
|
||||
virtual bool setup() = 0;
|
||||
virtual bool readHeader() = 0;
|
||||
virtual bool atKeyFrame();
|
||||
virtual void getNext(bool smart = true) {};
|
||||
virtual void seek(int seekTime){};
|
||||
virtual void finish();
|
||||
void play(int until = 0);
|
||||
void playOnce();
|
||||
void quitPlay();
|
||||
|
@ -53,27 +46,15 @@ namespace Mist {
|
|||
int playing;
|
||||
unsigned int playUntil;
|
||||
unsigned int benchMark;
|
||||
std::set<unsigned int> selectedTracks;
|
||||
|
||||
bool isBuffer;
|
||||
|
||||
Util::Config * config;
|
||||
JSON::Value capa;
|
||||
DTSC::Meta myMeta;
|
||||
DTSC::Packet lastPack;
|
||||
|
||||
std::map<int,std::set<int> > keyTimes;
|
||||
IPC::sharedPage metaPage;
|
||||
|
||||
//Create server for user pages
|
||||
IPC::sharedServer userPage;
|
||||
|
||||
|
||||
//TrackIndex pages
|
||||
std::map<int, IPC::sharedPage> indexPages;
|
||||
std::map<int, std::map<int, IPC::sharedPage> > dataPages;
|
||||
|
||||
//Page Overview
|
||||
std::map<int, std::map<int, DTSCPageData> > pagesByTrack;
|
||||
|
||||
std::map<unsigned int, std::map<unsigned int, unsigned int> > pageCounter;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue