From e2de64d6f1beb9e492daf5b886e19933c1fa41dd Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- mpeglib/lib/mpegplay/videoDecoder.h | 118 ++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 mpeglib/lib/mpegplay/videoDecoder.h (limited to 'mpeglib/lib/mpegplay/videoDecoder.h') diff --git a/mpeglib/lib/mpegplay/videoDecoder.h b/mpeglib/lib/mpegplay/videoDecoder.h new file mode 100644 index 00000000..cba45a29 --- /dev/null +++ b/mpeglib/lib/mpegplay/videoDecoder.h @@ -0,0 +1,118 @@ +/* + mpeg I video decoder (derived from mpeg_play) + Copyright (C) 2000 Martin Vogt + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published by + the Free Software Foundation. + + For more information look at the file COPYRIGHT in this package + + */ + + +#ifndef __VIDEO_H +#define __VIDEO_H + + +#include +#include +#include + +#include "decoderClass.h" +#include "recon.h" +#include "motionVector.h" +#include "slice.h" +#include "proto.h" +#include "../input/inputStream.h" +#include "../output/outputStream.h" +#include "../util/timeStamp.h" +#include "mpegVideoHeader.h" +#include "gop.h" +#include "picture.h" +#include "macroBlock.h" +#include "startCodes.h" + + + +/* Define Parsing error codes. */ + + + +#define SYNC_TO_CLOSED_GOP 1 +#define SYNC_HAS_CLOSED_GOP 2 +#define SYNC_HAS_I_FRAME_SYNC 3 +#define SYNC_HAS_P_FRAME_SYNC 4 +#define SYNC_HAS_FRAME_SYNC 5 + +#define _SYNC_TO_GOP 1 +#define _SYNC_TO_PIC 2 +#define _SYNC_TO_NONE 3 + + + +/* Number of macroblocks to process in one call to mpegVidRsrc. */ + +#define MB_QUANTUM 100 + + +/* Video stream structure. */ +class VideoDecoder { + + + public: + VideoDecoder(MpegVideoStream* mpegVideoStream, + MpegVideoHeader* initSequence); + + ~VideoDecoder(); + int mpegVidRsrc(PictureArray* pictureArray); + + + // ugly callbacks FIX ME! + class MpegVideoStream* mpegVideoStream; + class DecoderClass* decoderClass; + class Recon* recon; + class MotionVector* motionVector; + class Slice* slice; /* Current slice. */ + class MpegVideoHeader* mpegVideoHeader; /* Sequence info in stream */ + class GOP* group; + class Picture* picture; /* Current picture. */ + class MacroBlock* macroBlock; /* Current macroblock. */ + + void resyncToI_Frame(); + + + + private: + + int syncState; + + int ParseSeqHead(); + int ParseGOP(); + int ParsePicture(); + int ParseSlice(); + void doPictureDisplay(PictureArray* pictureArray); + MpegExtension* extension; + int frameCounter; + +}; + + + +/* Declaration of global display pointer. */ + + + +extern int qualityFlag; + + + + +extern int gXErrorFlag; + + + + +#endif /* videoDecoder.h already included */ + + -- cgit v1.2.1