root/branches/streaming-rework/src/rme/rme_avdevice.h

Revision 426, 1.9 kB (checked in by pieterpalmers, 15 years ago)

- changed the IAvDevice from an interface to a base class,

since there is some code duplication starting to
appear.

Line 
1 /* rme_avdevice.h
2  * Copyright (C) 2006 Jonathan Woithe
3  * Copyright (C) 2006,2007 by Pieter Palmers
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 #ifndef RMEDEVICE_H
22 #define RMEDEVICE_H
23
24 #include "iavdevice.h"
25
26 #include "debugmodule/debugmodule.h"
27 #include "libavc/avc_definitions.h"
28 #include "libfreebob/xmlparser.h"
29
30 // #include "libstreaming/RmeStreamProcessor.h"
31
32 class ConfigRom;
33 class Ieee1394Service;
34
35 namespace Rme {
36
37 // struct to define the supported devices
38 struct VendorModelEntry {
39     unsigned int vendor_id;
40     unsigned int model_id;
41     char *vendor_name;
42     char *model_name;
43 };
44
45 class RmeDevice : public IAvDevice {
46 public:
47
48     RmeDevice( std::auto_ptr<ConfigRom>( configRom ),
49               Ieee1394Service& ieee1394Service,
50                   int nodeId );
51     virtual ~RmeDevice();
52
53     static bool probe( ConfigRom& configRom );
54     bool discover();
55
56     void showDevice() const;
57
58     bool setSamplingFrequency( ESamplingFrequency samplingFrequency );
59     int getSamplingFrequency( );
60
61     int getStreamCount();
62     Streaming::StreamProcessor *getStreamProcessorByIndex(int i);
63
64     bool prepare();
65     bool lock();
66     bool unlock();
67
68     bool startStreamByIndex(int i);
69     bool stopStreamByIndex(int i);
70
71 protected:
72     struct VendorModelEntry *m_model;
73 };
74
75 }
76
77 #endif
Note: See TracBrowser for help on using the browser.