diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch) | |
tree | 9047cf9e6b5c43878d5bf82660adae77ceee097a /mpeglib/lib/input/inputStream.cpp | |
download | tdemultimedia-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/input/inputStream.cpp')
-rw-r--r-- | mpeglib/lib/input/inputStream.cpp | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/mpeglib/lib/input/inputStream.cpp b/mpeglib/lib/input/inputStream.cpp new file mode 100644 index 00000000..7eb9943b --- /dev/null +++ b/mpeglib/lib/input/inputStream.cpp @@ -0,0 +1,135 @@ +/* + generic input class + Copyright (C) 1999 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 "inputStream.h" +#include "../util/mmx/mmx.h" + +#include <iostream> + +using namespace std; + + +InputStream::InputStream() { + timeStampArray=new TimeStampArray((char*)"Input",3000); + urlBuffer=new DynBuffer(20); + // we call mm_support() here because it is the only position + // where we gurantee that not threads are + // running (the call is not thread safe) + // afer the call we never execute the asm part again + // and everything is fine + mm_support(); +} + + + +InputStream::~InputStream() { + delete timeStampArray; + delete urlBuffer; + +} + + +int InputStream::open(const char* dest) { + cout << "direct virtual call InputStream::open:"<<dest<<endl; + return false; +} + + +void InputStream::close() { + cout << "direct virtual call InputStream::close"<<endl; + exit(0); +} + + +int InputStream::isOpen() { + cout << "direct virtual call InputStream::isOpen"<<endl; + exit(0); + return false; +} + + +int InputStream::eof() { + cout << "direct virtual call InputStream::eof"<<endl; + exit(0); + return true; +} + + +int InputStream::read(char* ,int ) { + cout << "direct virtual call InputStream::read"<<endl; + exit(0); + return 0; +} + + +int InputStream::seek(long bytePos) { + cout << "direct virtual call InputStream::seek:"<<bytePos<<endl; + exit(0); + return false; +} + +void InputStream::clear() { + cout << "direct virtual call InputStream::clear:"<<endl; + exit(0); +} + + +long InputStream::getByteLength() { + cout << "direct virtual call InputStream::getByteLength"<<endl; + return 0; +} + + +long InputStream::getBytePosition() { + cout << "direct virtual call InputStream::getBytePosition"<<endl; + return 0; +} + + +void InputStream::insertTimeStamp(TimeStamp* src,long key,int len) { + timeStampArray->insertTimeStamp(src,key,len); +} + +TimeStamp* InputStream::getTimeStamp(long key) { + return timeStampArray->getTimeStamp(key); +} + + +int InputStream::bytesUntilNext(long key) { + return timeStampArray->bytesUntilNext(key); +} + +void InputStream::print() { + cout << "direct virtual call InputStream::print"<<endl; +} + + + + + +char* InputStream::getUrl() { + return urlBuffer->getData(); +} + + +void InputStream::setUrl(const char* url) { + urlBuffer->clear(); + if (url != NULL) { + urlBuffer->append(url); + } +} + + + + + |