diff options
Diffstat (limited to 'command/markad-standalone.h')
-rw-r--r-- | command/markad-standalone.h | 53 |
1 files changed, 17 insertions, 36 deletions
diff --git a/command/markad-standalone.h b/command/markad-standalone.h index 78f0ea9..de91225 100644 --- a/command/markad-standalone.h +++ b/command/markad-standalone.h @@ -24,8 +24,7 @@ #define DELTATIME 20000 /* equals to 222ms (base is 90kHz PTS) */ -#define MAXRANGE 420 /* range to search for start/stop marks in seconds */ - +#define MAXRANGE 120 /* range to search for start/stop marks in seconds */ class cOSDMessage { @@ -156,19 +155,19 @@ unsigned Descriptor_Length: 8; }; + enum { mSTART=0x1, mBEFORE, mAFTER }; + static const char frametypes[8]; const char *directory; - cMarkAdDemux *video_demux; - cMarkAdDemux *ac3_demux; - cMarkAdDemux *mp2_demux; + cDemux *demux; cMarkAdDecoder *decoder; cMarkAdVideo *video; cMarkAdAudio *audio; cMarkAdStreamInfo *streaminfo; cOSDMessage *osd; - MarkAdPacket vpkt,apkt; + AvPacket pkt; MarkAdContext macontext; @@ -189,7 +188,6 @@ unsigned Descriptor_Length: bool abort; bool gotendmark; - bool reprocess; int waittime; int iwaittime; struct timeval tv1,tv2; @@ -202,49 +200,32 @@ unsigned Descriptor_Length: bool bDecodeVideo; bool bDecodeAudio; - bool bIgnoreAudioInfo; - bool bIgnoreVideoInfo; bool bIgnoreTimerInfo; - time_t startTime; // StartTime of broadcast - int length; // Length in seconds + time_t startTime; // starttime of broadcast + int length; // length of broadcast in seconds int tStart; // pretimer in seconds - int iStart; // pretimer as index value - int iStartCheck; // check position for iStart - int iStop; // posttimer as index value - int iStopCheck; // check position for iStop + int iStart; // pretimer in frames (negative if unset) + int iStop; // endposition in frames (negative if unset) - int errcnt; // Skipped bytes in stream + void CheckStop(); + void CheckStart(); + void CalculateCheckPositions(int startframe); + int chkSTART; + int chkSTOP; - bool setAudio51; // set audio to 5.1 in info - bool setAudio20; // set audio to 2.0 in info - bool setVideo43; // set video to 4:3 in info - bool setVideo43LB; // set video to 4:3 letterbox in info - bool setVideo169; // set video to 16:9 in info - - int chkLEFT; - int chkRIGHT; + int skipped; // skipped bytes in whole file + bool inBroadCast; // are we in a broadcast (or ad)? time_t GetBroadcastStart(time_t start, int fd); - void CheckBroadcastLength(); - bool CheckIndexGrowing(); + void CheckIndexGrowing(); char *indexFile; int sleepcnt; void SaveFrame(int Frame); - bool aspectChecked; - bool marksAligned; - clMarks marks; char *IndexToHMSF(int Index); - void CalculateStopPosition(int startframe, int delta); - void CheckFirstMark(); - void CheckLastMark(); - void CheckStartStop(int frame, bool checkend=false); - void CheckAspectRatio_and_AudioChannels(); - void CheckLogoMarks(clMark *last=NULL); - void AddStartMark(); void AddMark(MarkAdMark *Mark); bool Reset(bool FirstPass=true); void ChangeMarks(clMark **Mark1, clMark **Mark2, MarkAdPos *NewPos); |