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/decoder/command.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/decoder/command.cpp')
-rw-r--r-- | mpeglib/lib/decoder/command.cpp | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/mpeglib/lib/decoder/command.cpp b/mpeglib/lib/decoder/command.cpp new file mode 100644 index 00000000..8b29efe6 --- /dev/null +++ b/mpeglib/lib/decoder/command.cpp @@ -0,0 +1,85 @@ +/* + describes a command + 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 + + */ + +#include "command.h" + +#include <iostream> + +using namespace std; + +Command::Command(int id) { + this->id=id; + this->intArg=0; +} + +Command::Command(int id,int arg) { + this->id=id; + this->intArg=arg; +} + + +Command::~Command() { +} + + +int Command::getID() { + return id; +} + + +int Command::getIntArg() { + return intArg; +} + + +void Command::copyTo(Command* dest) { + dest->id=this->id; + dest->intArg=this->intArg; +} + +void Command::print(const char* text) { + cout << "COMMAND:"<<text<<endl; + switch(id) { + case _COMMAND_NONE: + cout << "_COMMAND_NONE"; + break; + case _COMMAND_PING: + cout << "_COMMAND_PING"; + break; + case _COMMAND_PAUSE: + cout << "_COMMAND_PAUSE"; + break; + case _COMMAND_PLAY: + cout << "_COMMAND_PLAY"; + break; + case _COMMAND_SEEK: + cout << "_COMMAND_SEEK"; + cout << " intArg:"<<intArg; + break; + case _COMMAND_CLOSE: + cout << "_COMMAND_CLOSE"; + break; + case _COMMAND_START: + cout << "_COMMAND_START"; + break; + case _COMMAND_RESYNC_START: + cout << "_COMMAND_RESYNC_START"; + break; + case _COMMAND_RESYNC_END: + cout << "_COMMAND_RESYNC_END"; + break; + + default: + cout << "unknown command id in Command::print"<<endl; + } + cout << endl; +} |