root/branches/streaming-rework/src/maudio/maudio_avdevice.h

Revision 412, 2.6 kB (checked in by pieterpalmers, 17 years ago)

- added some documentation
- added a lock()/unlock() to IAvDevice (see header)
- reimplemented test-freebob to the new C++ api
- started with support for AddressRangeMapping?, i.e. response

to reads/writes of the 1394 memory space on the host

Line 
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 #ifndef MAUDIODEVICE_H
22 #define MAUDIODEVICE_H
23
24 #include "debugmodule/debugmodule.h"
25 #include "libfreebobavc/avc_definitions.h"
26 #include "libfreebobavc/avc_extended_cmd_generic.h"
27 #include "libfreebob/xmlparser.h"
28
29 #include "libstreaming/AmdtpStreamProcessor.h"
30 #include "libstreaming/AmdtpPort.h"
31 #include "libstreaming/AmdtpPortInfo.h"
32
33 #include "iavdevice.h"
34
35 class ConfigRom;
36 class Ieee1394Service;
37
38 namespace MAudio {
39
40 class AvDevice : public IAvDevice {
41 public:
42     AvDevice( std::auto_ptr<ConfigRom>( configRom ),
43               Ieee1394Service& ieee1394Service,
44               int nodeId,
45               int verboseLevel );
46     virtual ~AvDevice();
47
48     static bool probe( ConfigRom& configRom );
49     virtual bool discover();
50     virtual ConfigRom& getConfigRom() const;
51     virtual bool addXmlDescription( xmlNodePtr pDeviceNode );
52     virtual void showDevice() const;
53    
54     virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency );
55     virtual int getSamplingFrequency( );
56        
57     virtual bool setId(unsigned int id);
58
59     virtual int getStreamCount();
60     virtual FreebobStreaming::StreamProcessor *getStreamProcessorByIndex(int i);
61
62     virtual bool prepare();
63     bool lock();
64     bool unlock();
65    
66
67     virtual int startStreamByIndex(int i);
68     virtual int stopStreamByIndex(int i);
69
70 protected:
71     std::auto_ptr<ConfigRom>( m_pConfigRom );
72     Ieee1394Service* m_p1394Service;
73     int              m_iNodeId;
74     int              m_iVerboseLevel;
75     const char*      m_pFilename;
76    
77     unsigned int m_id;
78
79     // streaming stuff
80     FreebobStreaming::AmdtpReceiveStreamProcessor *m_receiveProcessor;
81     int m_receiveProcessorBandwidth;
82
83     FreebobStreaming::AmdtpTransmitStreamProcessor *m_transmitProcessor;
84     int m_transmitProcessorBandwidth;
85    
86     DECLARE_DEBUG_MODULE;
87 };
88
89 }
90
91 #endif
Note: See TracBrowser for help on using the browser.