Improved performance of FLV input and generic input IO class.

This commit is contained in:
Thulinma 2015-10-06 16:36:06 +02:00
parent 16d38459b6
commit 6d25774b94
3 changed files with 23 additions and 20 deletions

View file

@ -6,7 +6,6 @@
#include <cstdio>
#include <string>
#include <mist/stream.h>
#include <mist/flv_tag.h>
#include <mist/defines.h>
#include "input_flv.h"
@ -66,7 +65,6 @@ namespace Mist {
}
//Create header file from FLV data
fseek(inFile, 13, SEEK_SET);
FLV::Tag tmpTag;
AMF::Object amf_storage;
long long int lastBytePos = 13;
while (!feof(inFile) && !FLV::Parse_Error){
@ -90,7 +88,6 @@ namespace Mist {
void inputFLV::getNext(bool smart) {
long long int lastBytePos = ftell(inFile);
FLV::Tag tmpTag;
while (!feof(inFile) && !FLV::Parse_Error){
if (tmpTag.FileLoader(inFile)){
if ( !selectedTracks.count(tmpTag.getTrackID())){

View file

@ -1,5 +1,6 @@
#include "input.h"
#include <mist/dtsc.h>
#include <mist/flv_tag.h>
namespace Mist {
class inputFLV : public Input {
@ -12,7 +13,7 @@ namespace Mist {
void getNext(bool smart = true);
void seek(int seekTime);
void trackSelect(std::string trackSpec);
FLV::Tag tmpTag;
FILE * inFile;
};
}