root/branches/streaming-rework/src/metrichalo/mh_avdevice.h

Revision 404, 2.7 kB (checked in by pieterpalmers, 17 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 /* mh_avdevice.h
2  * Copyright (C) 2007 by Pieter Palmers
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_METRIC_HALO
22
23 #ifndef MHDEVICE_H
24 #define MHDEVICE_H
25
26 #include "iavdevice.h"
27
28 #include "debugmodule/debugmodule.h"
29 #include "libfreebobavc/avc_definitions.h"
30 #include "libfreebob/xmlparser.h"
31
32 // #include "libstreaming/MHStreamProcessor.h"
33
34 class ConfigRom;
35 class Ieee1394Service;
36
37 namespace MetricHalo {
38
39 // struct to define the supported devices
40 struct VendorModelEntry {
41     unsigned int vendor_id;
42     unsigned int model_id;
43     char *vendor_name;
44     char *model_name;
45 };
46
47 class MHAvDevice : public IAvDevice {
48 public:
49     MHAvDevice( std::auto_ptr<ConfigRom>( configRom ),
50               Ieee1394Service& ieee1394Service,
51                   int nodeId,
52                   int verboseLevel );
53     virtual ~MHAvDevice();
54
55     static bool probe( ConfigRom& configRom );
56     virtual bool discover();
57     virtual ConfigRom& getConfigRom() const;
58
59     // obsolete, will be removed soon, unused
60     virtual bool addXmlDescription( xmlNodePtr deviceNode ) {return true;};
61
62     virtual void showDevice() const;
63
64     virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency );
65     virtual int getSamplingFrequency( );
66
67     virtual bool setId(unsigned int id);
68
69     virtual int getStreamCount();
70     virtual FreebobStreaming::StreamProcessor *getStreamProcessorByIndex(int i);
71
72     virtual bool prepare();
73
74     virtual int startStreamByIndex(int i);
75     virtual int stopStreamByIndex(int i);
76
77     signed int getIsoRecvChannel(void);
78     signed int getIsoSendChannel(void);
79  
80 protected:
81     std::auto_ptr<ConfigRom>( m_configRom );
82     Ieee1394Service* m_1394Service;
83    
84     struct VendorModelEntry *m_model;
85    
86     int              m_nodeId;
87     int              m_verboseLevel;
88     signed int m_id;
89     signed int m_iso_recv_channel, m_iso_send_channel;
90    
91 //      FreebobStreaming::MHReceiveStreamProcessor *m_receiveProcessor;
92 //      FreebobStreaming::MHTransmitStreamProcessor *m_transmitProcessor;
93
94 private:
95     // debug support
96     DECLARE_DEBUG_MODULE;
97 };
98
99 }
100
101 #endif
102
103 #endif //#ifdef ENABLE_MH
Note: See TracBrowser for help on using the browser.