Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

XMMSOut.hh

Go to the documentation of this file.
00001 /*
00002 
00003     XMMS output plugin streamdist replacement
00004     Copyright (C) 2003 Jussi Laako
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 */
00021 
00022 
00023 #include <gdk/gdk.h>
00024 #include <gtk/gtk.h>
00025 #include <xmms/configfile.h>
00026 #include <xmms/plugin.h>
00027 #include <xmms/util.h>
00028 
00029 #include <Alloc.hh>
00030 #include <Condition.hh>
00031 #include <Mutex.hh>
00032 #include <dsp/DSPOp.hh>
00033 #include <dsp/ReBufferT.hh>
00034 
00035 #include "Config.h"
00036 #include "LocalMsg.h"
00037 #include "SockOp.hh"
00038 #include "SockServ.hh"
00039 #include "DynThreads.hh"
00040 
00041 
00042 #ifndef XMMSOUT_HH
00043 #define XMMSOUT_HH
00044 
00045 #   define XMMSOUT_DESCRIPTION      "HASAS streamdist"
00046 
00047 
00048     class clXMMSOut
00049     {
00050             volatile bool bRun;
00051             volatile bool bPause;
00052             int iMainThreadH;
00053             int iWriteTime;
00054             int iPlayTime;
00055             volatile int iAudioBufSize;
00056             volatile int iFragmentSize;
00057             unsigned long long uiTotalTickCount;
00058             double dStartTime;
00059             char *cpLocalSocket;
00060             AFormat eAudioFormat;
00061             stRawDataFirst sHdr;
00062             clReBufferT<GDT> ReBuffer;
00063             clAlloc AudioBuf;
00064             clMutex MtxAudio;
00065             clCondition CndAudio;
00066             clDSPOp DSP;
00067             clSockServ SServ;
00068             /* UI components */
00069             gchar *cpMessageTxt;
00070             GtkWidget *gwMessageBox;
00071             GtkWidget *gwWinConfig;
00072             GtkWidget *gwVBox;
00073             GtkWidget *gwHBox;
00074             GtkWidget *gwLBufSize;
00075             GtkWidget *gwEBufSize;
00076             GtkWidget *gwLLocalSocket;
00077             GtkWidget *gwELocalSocket;
00078             GtkWidget *gwBOk;
00079             GtkWidget *gwBCancel;
00080             /* - */
00081             double GetTime ();
00082             void Convert8s8u (void *, int);
00083             void Convert16u16s (void *, int);
00084             void EndianConvert (unsigned short *, int);
00085             void CopyChannel (GDT *, const GDT *, int);
00086         public:
00087             clXMMSOut ();
00088             ~clXMMSOut ();
00089             void Init ();
00090             void About ();
00091             void Configure ();
00092             int OpenAudio (AFormat, int, int);
00093             void WriteAudio (void *, int);
00094             void CloseAudio ();
00095             void Flush (int);
00096             void Pause (short);
00097             int BufferFree ();
00098             int BufferPlaying ();
00099             int OutputTime ();
00100             int WrittenTime ();
00101             void *MainThread (void *);
00102             void *ServeClientThread (void *);
00103             void Stop () { bRun = false; }
00104             void OnAboutButton (GtkButton *, gpointer);
00105             void OnButtonClick (GtkButton *, gpointer);
00106     };
00107 
00108 #endif

Generated on Sun Oct 26 19:11:23 2003 for HASAS by doxygen 1.3.3