/* generic output 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 "outputStream.h" #include "../util/mmx/mmx.h" #include using namespace std; OutputStream::OutputStream() { // 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(); abs_thread_mutex_init(&stateChangeMut); abs_thread_cond_init(&stateChangeCond); audioState=0; videoState=0; audioInit(); videoInit(); } OutputStream::~OutputStream() { audioInit(); videoInit(); abs_thread_cond_destroy(&stateChangeCond); abs_thread_mutex_destroy(&stateChangeMut); } int OutputStream::audioInit() { sendSignal(_STREAM_MASK_IS_INIT,false,_STREAMTYPE_AUDIO); sendSignal(_STREAM_MASK_IS_EOF,false,_STREAMTYPE_AUDIO); sendSignal(_STREAM_MASK_IS_DATA,false,_STREAMTYPE_AUDIO); return true; } int OutputStream::audioSetup(int ,int , int ,int ,int ) { sendSignal(_STREAM_MASK_IS_INIT,true,_STREAMTYPE_AUDIO); return true; } int OutputStream::audioPlay(TimeStamp* , TimeStamp* ,char* , int len) { sendSignal(_STREAM_MASK_IS_DATA,true,_STREAMTYPE_AUDIO); return len; } void OutputStream::audioFlush() { sendSignal(_STREAM_MASK_IS_EOF,true,_STREAMTYPE_AUDIO); } void OutputStream::audioClose() { cerr << "direct virtual call OutputStream::audioClose"<