1 |
/* maudioe_avdevice.h |
---|
2 |
* Copyright (C) 2006 by Daniel Wagner |
---|
3 |
* |
---|
4 |
* This file is part of FreeBoB. |
---|
5 |
* |
---|
6 |
* FreeBoB is free software; you can redistribute it and/or modify |
---|
7 |
* it under the terms of the GNU General Public License as published by |
---|
8 |
* the Free Software Foundation; either version 2 of the License, or |
---|
9 |
* (at your option) any later version. |
---|
10 |
* FreeBoB is distributed in the hope that it will be useful, |
---|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 |
* GNU General Public License for more details. |
---|
14 |
* |
---|
15 |
* You should have received a copy of the GNU General Public License |
---|
16 |
* along with FreeBoB; if not, write to the Free Software |
---|
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
---|
18 |
* MA 02111-1307 USA. |
---|
19 |
*/ |
---|
20 |
|
---|
21 |
#ifdef ENABLE_BEBOB |
---|
22 |
|
---|
23 |
#ifndef MAUDIODEVICE_H |
---|
24 |
#define MAUDIODEVICE_H |
---|
25 |
|
---|
26 |
#include "debugmodule/debugmodule.h" |
---|
27 |
#include "libfreebobavc/avc_definitions.h" |
---|
28 |
#include "libfreebobavc/avc_extended_cmd_generic.h" |
---|
29 |
#include "libfreebob/xmlparser.h" |
---|
30 |
|
---|
31 |
#include "libstreaming/AmdtpStreamProcessor.h" |
---|
32 |
#include "libstreaming/AmdtpPort.h" |
---|
33 |
#include "libstreaming/AmdtpPortInfo.h" |
---|
34 |
|
---|
35 |
#include "iavdevice.h" |
---|
36 |
|
---|
37 |
class ConfigRom; |
---|
38 |
class Ieee1394Service; |
---|
39 |
|
---|
40 |
namespace MAudio { |
---|
41 |
|
---|
42 |
class AvDevice : public IAvDevice { |
---|
43 |
public: |
---|
44 |
AvDevice( std::auto_ptr<ConfigRom>( configRom ), |
---|
45 |
Ieee1394Service& ieee1394Service, |
---|
46 |
int nodeId, |
---|
47 |
int verboseLevel ); |
---|
48 |
virtual ~AvDevice(); |
---|
49 |
|
---|
50 |
static bool probe( ConfigRom& configRom ); |
---|
51 |
virtual bool discover(); |
---|
52 |
virtual ConfigRom& getConfigRom() const; |
---|
53 |
virtual bool addXmlDescription( xmlNodePtr pDeviceNode ); |
---|
54 |
virtual void showDevice() const; |
---|
55 |
|
---|
56 |
virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); |
---|
57 |
virtual int getSamplingFrequency( ); |
---|
58 |
|
---|
59 |
virtual bool setId(unsigned int id); |
---|
60 |
|
---|
61 |
virtual int getStreamCount(); |
---|
62 |
virtual FreebobStreaming::StreamProcessor *getStreamProcessorByIndex(int i); |
---|
63 |
|
---|
64 |
virtual bool prepare(); |
---|
65 |
|
---|
66 |
virtual int startStreamByIndex(int i); |
---|
67 |
virtual int stopStreamByIndex(int i); |
---|
68 |
|
---|
69 |
protected: |
---|
70 |
std::auto_ptr<ConfigRom>( m_pConfigRom ); |
---|
71 |
Ieee1394Service* m_p1394Service; |
---|
72 |
int m_iNodeId; |
---|
73 |
int m_iVerboseLevel; |
---|
74 |
const char* m_pFilename; |
---|
75 |
|
---|
76 |
unsigned int m_id; |
---|
77 |
|
---|
78 |
// streaming stuff |
---|
79 |
FreebobStreaming::AmdtpReceiveStreamProcessor *m_receiveProcessor; |
---|
80 |
int m_receiveProcessorBandwidth; |
---|
81 |
|
---|
82 |
FreebobStreaming::AmdtpTransmitStreamProcessor *m_transmitProcessor; |
---|
83 |
int m_transmitProcessorBandwidth; |
---|
84 |
|
---|
85 |
DECLARE_DEBUG_MODULE; |
---|
86 |
}; |
---|
87 |
|
---|
88 |
} |
---|
89 |
|
---|
90 |
#endif |
---|
91 |
|
---|
92 |
#endif //#ifdef ENABLE_BEBOB |
---|