root/branches/streaming-rework/src/bounce/bounce_avdevice.h

Revision 404, 2.8 kB (checked in by pieterpalmers, 16 years ago)

- introduce support framework for DICE and Metric Halo
- change probe/discovery code to make adding devices easier
- made conditional compilation effectively work.

./configure now has the following switches:

--enable-bebob build BeBoB support (default=yes)
--enable-motu build Motu support (default=no)
--enable-dice build DICE support (default=no)
--enable-metric-halo build Metric Halo support (note: completely useless)

(default=no)

--enable-rme build RME support (note: completely useless)

(default=no)

--enable-bounce build Bounce device support (default=no)
--enable-all-devices build support for all supported devices (default=no)

these now turn on/off compilation effectively.

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