summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/frame/rawFrame.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/frame/rawFrame.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/frame/rawFrame.h')
-rw-r--r--mpeglib/lib/frame/rawFrame.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/mpeglib/lib/frame/rawFrame.h b/mpeglib/lib/frame/rawFrame.h
new file mode 100644
index 00000000..e1a05e9e
--- /dev/null
+++ b/mpeglib/lib/frame/rawFrame.h
@@ -0,0 +1,75 @@
+/*
+ base class for raw frames (encoded data, where only the type is known)
+ Copyright (C) 2001 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 __RAW_FRAME_H
+#define __RAW_FRAME_H
+
+#include "frame.h"
+
+/**
+ Raw frames represents bitstreams. They most likely have have now
+ real value for anyone but a decoder.
+ In general you simply allocate a rawFrame with a given size, This
+ size should make sure, that the bitstream packet does fit into
+ the frame. Sometime, in derived classes you can set thes pointer
+ to the allocated directly by calling the protected method: setRemoteData.
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifndef WORDS_BIGENDIAN
+#define RAWFRAME_BIGENDIAN 1
+#else
+#define RAWFRAME_BIGENDIAN 0
+#endif
+
+
+class RawFrame : public Frame {
+
+ unsigned char* data;
+ int size;
+ int len;
+ int lRemoteData;
+
+ public:
+ RawFrame(int size);
+ RawFrame(int type,int size);
+ ~RawFrame();
+
+ // access start of frameData
+ unsigned char* getData() { return data; }
+
+ // current size in byte
+ int getLen() { return len; }
+ void setLen(int bytes) { this->len=bytes; }
+
+ // maximum size of allocated memory
+ int getSize() { return size; }
+
+
+ void print(const char* msg);
+
+ private:
+ void init(int type,int size);
+
+ protected:
+ void setRemoteData(unsigned char* data,int size);
+};
+
+
+
+#endif