root/trunk/libffado/src/metrichalo/mh_avdevice.h

Revision 479, 2.1 kB (checked in by wagi, 15 years ago)

- added all missing 'virtual' to function declared in avdevice implementation
- added getConfigurationId function (used for av/c model caching)

Line 
1 /*
2  * Copyright (C) 2005-2007 by Pieter Palmers
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software Foundation;
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23
24 #ifndef MHDEVICE_H
25 #define MHDEVICE_H
26
27 #include "iavdevice.h"
28
29 #include "debugmodule/debugmodule.h"
30 #include "libavc/avc_definitions.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     virtual ~MHAvDevice();
53
54     static bool probe( ConfigRom& configRom );
55     virtual bool discover();
56
57     virtual void showDevice();
58
59     virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency );
60     virtual int getSamplingFrequency( );
61     virtual int getConfigurationId();
62
63     virtual int getStreamCount();
64     virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i);
65
66     virtual bool prepare();
67     virtual bool lock();
68     virtual bool unlock();
69
70     virtual bool startStreamByIndex(int i);
71     virtual bool stopStreamByIndex(int i);
72
73     signed int getIsoRecvChannel(void);
74     signed int getIsoSendChannel(void);
75
76 protected:
77     struct VendorModelEntry *m_model;
78
79 };
80
81 }
82
83 #endif
Note: See TracBrowser for help on using the browser.