root/branches/libfreebob-2.0/src/bounce/bounce_avdevice.h

Revision 336, 2.7 kB (checked in by pieterpalmers, 16 years ago)

- Merged the developments on trunk since branch-off:

branch occurred at rev 194
svn merge -r 194:HEAD https://svn.sourceforge.net/svnroot/freebob/trunk/libfreebob

- Modified libfreebobavc to use the messagebuffer for debug info.
- This should compile and run

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 #ifndef BOUNCEDEVICE_H
23 #define BOUNCEDEVICE_H
24
25 #include "debugmodule/debugmodule.h"
26 #include "libfreebobavc/avc_definitions.h"
27 #include "libfreebobavc/avc_extended_cmd_generic.h"
28 #include "libfreebob/xmlparser.h"
29
30 #include "libstreaming/AmdtpStreamProcessor.h"
31 #include "libstreaming/AmdtpPort.h"
32 #include "libstreaming/AmdtpPortInfo.h"
33
34 #include "iavdevice.h"
35 #include "libfreebob/freebob_bounce.h"
36
37 class ConfigRom;
38 class Ieee1394Service;
39
40 namespace Bounce {
41
42 class BounceDevice : public IAvDevice {
43 public:
44     BounceDevice( std::auto_ptr<ConfigRom>( configRom ),
45                   Ieee1394Service& ieee1394Service,
46                   int nodeId,
47                   int verboseLevel );
48     virtual ~BounceDevice();
49
50     static bool probe( ConfigRom& configRom );
51     virtual bool discover();
52     virtual ConfigRom& getConfigRom() const;
53    
54     virtual bool addXmlDescription( xmlNodePtr deviceNode );
55    
56     virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency );
57         virtual int getSamplingFrequency( );
58    
59         virtual bool prepare();
60        
61         virtual int getStreamCount();
62        
63         virtual FreebobStreaming::StreamProcessor *getStreamProcessorByIndex(int i);
64        
65         virtual int startStreamByIndex(int i);
66        
67         virtual int stopStreamByIndex(int i);
68    
69     virtual void showDevice() const;
70     virtual bool setId(unsigned int id);
71
72 protected:
73     std::auto_ptr<ConfigRom>( m_configRom );
74     Ieee1394Service* m_1394Service;
75     int              m_nodeId;
76     int              m_verboseLevel;
77
78 private:
79         std::string xmlDescription;
80
81     unsigned int m_samplerate;
82     unsigned int m_id;
83
84         // streaming stuff
85         FreebobStreaming::AmdtpReceiveStreamProcessor *m_receiveProcessor;
86         int m_receiveProcessorBandwidth;
87        
88         FreebobStreaming::AmdtpTransmitStreamProcessor *m_transmitProcessor;
89         int m_transmitProcessorBandwidth;
90
91     bool addPortsToProcessor(
92            FreebobStreaming::StreamProcessor *processor,
93            FreebobStreaming::AmdtpAudioPort::E_Direction direction);
94
95
96     DECLARE_DEBUG_MODULE;
97 };
98
99 }
100
101 #endif
Note: See TracBrowser for help on using the browser.