summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/mpgplayer/mpegStreamPlayer.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch)
tree9047cf9e6b5c43878d5bf82660adae77ceee097a /mpeglib/lib/mpgplayer/mpegStreamPlayer.h
downloadtdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz
tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip
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
Diffstat (limited to 'mpeglib/lib/mpgplayer/mpegStreamPlayer.h')
-rw-r--r--mpeglib/lib/mpgplayer/mpegStreamPlayer.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/mpeglib/lib/mpgplayer/mpegStreamPlayer.h b/mpeglib/lib/mpgplayer/mpegStreamPlayer.h
new file mode 100644
index 00000000..584e0a22
--- /dev/null
+++ b/mpeglib/lib/mpgplayer/mpegStreamPlayer.h
@@ -0,0 +1,90 @@
+/*
+ feeds audio/video streams to the decoders
+ 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 __MPEGSTREAMPLAYER_H
+#define __MPEGSTREAMPLAYER_H
+
+#include "../decoder/decoderPlugin.h"
+#include "../util/syncClock.h"
+
+class MpegSystemHeader;
+
+class MpegStreamPlayer {
+
+ protected:
+ SyncClock* syncClock;
+ DecoderPlugin* audioDecoder;
+ DecoderPlugin* videoDecoder;
+ BufferInputStream* audioInput;
+ BufferInputStream* videoInput;
+ OutputStream* output;
+ InputStream* input;
+ TimeStamp* timeStampVideo;
+ TimeStamp* timeStampAudio;
+
+ int packetCnt;
+ int audioPacketCnt;
+ int videoPacketCnt;
+ int seekPos;
+ int writeToDisk;
+
+ char* nukeBuffer;
+
+ public:
+ MpegStreamPlayer(InputStream* input,
+ OutputStream* output,
+ DecoderPlugin* audioDecoder,
+ DecoderPlugin* videoDecoder);
+ ~MpegStreamPlayer();
+
+ int isInit();
+ void processThreadCommand(Command* command);
+
+ //
+ // Mpeg special functions [START]
+ //
+
+ int processSystemHeader(MpegSystemHeader* mpegSystemHeader);
+ int insertAudioData(MpegSystemHeader* header,int len);
+ int insertVideoData(MpegSystemHeader* header,int len);
+
+ //
+ // Mpeg special functions [END]
+ //
+
+
+
+ int insertAudioDataRaw(unsigned char* input,int len,TimeStamp* stamp);
+ int insertVideoDataRaw(unsigned char* input,int len,TimeStamp* stamp);
+
+ void dumpData(MpegSystemHeader* mpegSystemHeader);
+
+ void setWriteToDisk(int lwriteToDisk);
+ int getWriteToDisk();
+
+ int hasEnd();
+ protected:
+ int processResyncRequest();
+
+ int getByteDirect();
+ void nuke(int byte);
+
+ // useful methods
+ int finishAudio(int len);
+ int finishVideo(int len);
+
+};
+
+#endif