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/frame/rawFrame.cpp | 90 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 mpeglib/lib/frame/rawFrame.cpp (limited to 'mpeglib/lib/frame/rawFrame.cpp') diff --git a/mpeglib/lib/frame/rawFrame.cpp b/mpeglib/lib/frame/rawFrame.cpp new file mode 100644 index 00000000..fbe662c5 --- /dev/null +++ b/mpeglib/lib/frame/rawFrame.cpp @@ -0,0 +1,90 @@ +/* + 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 + + */ + + + +#include "rawFrame.h" + +#include + +using namespace std; + +RawFrame::RawFrame(int size) { + init(_FRAME_RAW_BASE,size); +} + + +RawFrame::RawFrame(int type,int size) { + init(type,size); +} + + +RawFrame::~RawFrame() { + if (data != NULL) { + if (lRemoteData==false) { + delete data; + } + } +} + + +void RawFrame::print(const char* msg) { + cout << msg<size=0; + } + if (size > 0) { + data=new unsigned char[size]; + if (data != NULL) { + cout <<"malloc error RawFrame"<size=size; + } + setLen(0); + lRemoteData=false; +} + + +void RawFrame::setRemoteData(unsigned char* data,int size) { + if (this->data != NULL) { + if (lRemoteData==false) { + delete this->data; + } + } + lRemoteData=true; + this->data=data; + this->size=size; +} -- cgit v1.2.3