root/branches/streaming-rework/src/dice/dice_avdevice.h

Revision 407, 2.7 kB (checked in by pieterpalmers, 17 years ago)

- Changed the way the device class configure options are handled. Now they are handled in the makefiles instead of the source files. The only source file that still contains the #ifdef's is devicemanager.cpp, to conditionally include the device class include files and to conditionally probe the classes that might be supported.
- added a configure option to disable the compilation of the test programs in tests/
- cleaned up the ADMTP transmit streamprocessor. Now it sends silenced packets when in the disabled state, instead of no-data packets
- added a getNodeID() to ieee1394service
- made comments in ieee1394service.h doxygen compliant

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