root/branches/ppalmers-streaming/src/bebob/bebob_avdevice.h

Revision 712, 3.4 kB (checked in by ppalmers, 15 years ago)

almost there...

Line 
1 /*
2  * Copyright (C) 2005-2007 by Daniel Wagner
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 BEBOB_AVDEVICE_H
25 #define BEBOB_AVDEVICE_H
26
27 #include <stdint.h>
28
29 #include "debugmodule/debugmodule.h"
30
31 #include "libieee1394/configrom.h"
32 #include "libieee1394/ieee1394service.h"
33
34 #include "libavc/avc_definitions.h"
35 #include "libavc/general/avc_extended_cmd_generic.h"
36 #include "libavc/general/avc_unit.h"
37 #include "libavc/general/avc_subunit.h"
38 #include "libavc/general/avc_plug.h"
39
40 #include "bebob/bebob_avplug.h"
41 #include "bebob/bebob_avdevice_subunit.h"
42 #include "bebob/bebob_mixer.h"
43
44 #include "libstreaming/amdtp/AmdtpReceiveStreamProcessor.h"
45 #include "libstreaming/amdtp/AmdtpTransmitStreamProcessor.h"
46 #include "libstreaming/amdtp/AmdtpPort.h"
47 #include "libstreaming/amdtp/AmdtpPortInfo.h"
48
49 #include "libutil/serialize.h"
50
51 #include "genericavc/avc_avdevice.h"
52
53 #include "ffadodevice.h"
54
55 #include <sstream>
56 #include <vector>
57
58 namespace BeBoB {
59
60 class AvDevice : public GenericAVC::AvDevice {
61 public:
62     AvDevice( Ieee1394Service& ieee1394Service,
63               std::auto_ptr<ConfigRom>( configRom ));
64     virtual ~AvDevice();
65
66     static bool probe( ConfigRom& configRom );
67     virtual bool loadFromCache();
68     virtual bool saveCache();
69     virtual bool discover();
70
71     static FFADODevice * createDevice( Ieee1394Service& ieee1394Service,
72                                         std::auto_ptr<ConfigRom>( configRom ));
73
74     virtual AVC::Subunit* createSubunit(AVC::Unit& unit,
75                                         AVC::ESubunitType type,
76                                         AVC::subunit_t id );
77     virtual AVC::Plug *createPlug( AVC::Unit* unit,
78                                    AVC::Subunit* subunit,
79                                    AVC::function_block_type_t functionBlockType,
80                                    AVC::function_block_type_t functionBlockId,
81                                    AVC::Plug::EPlugAddressType plugAddressType,
82                                    AVC::Plug::EPlugDirection plugDirection,
83                                    AVC::plug_id_t plugId );
84
85     virtual void showDevice();
86 protected:
87     virtual bool propagatePlugInfo();
88    
89     virtual bool buildMixer();
90     virtual bool destroyMixer();
91
92 public:
93     virtual bool serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const;
94     virtual bool deserialize( Glib::ustring basePath, Util::IODeserialize& deser );
95
96     int getConfigurationIdSampleRate();
97     int getConfigurationIdNumberOfChannel( AVC::PlugAddress::EPlugDirection ePlugDirection );
98     int getConfigurationIdSyncMode();
99     int getConfigurationId();
100
101     Glib::ustring getCachePath();
102
103 protected:
104     Mixer*             m_Mixer;
105
106 };
107
108 }
109
110 #endif
Note: See TracBrowser for help on using the browser.