root/trunk/libffado/src/bebob/bebob_avdevice.h

Revision 630, 3.3 kB (checked in by wagi, 17 years ago)

Some more fixing of the cashing code. The loading is still disabled because it seems not to work right. But at least it doesn't crash anymore. Some further debugging is
needed.

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/AmdtpStreamProcessor.h"
45 #include "libstreaming/AmdtpPort.h"
46 #include "libstreaming/AmdtpPortInfo.h"
47
48 #include "libutil/serialize.h"
49
50 #include "genericavc/avc_avdevice.h"
51
52 #include "ffadodevice.h"
53
54 #include <sstream>
55 #include <vector>
56
57 namespace BeBoB {
58
59 class AvDevice : public GenericAVC::AvDevice {
60 public:
61     AvDevice( Ieee1394Service& ieee1394Service,
62               std::auto_ptr<ConfigRom>( configRom ));
63     virtual ~AvDevice();
64
65     static bool probe( ConfigRom& configRom );
66     virtual bool loadFromCache();
67     virtual bool saveCache();
68     virtual bool discover();
69
70     static FFADODevice * createDevice( Ieee1394Service& ieee1394Service,
71                                         std::auto_ptr<ConfigRom>( configRom ));
72
73     virtual AVC::Subunit* createSubunit(AVC::Unit& unit,
74                                         AVC::ESubunitType type,
75                                         AVC::subunit_t id );
76     virtual AVC::Plug *createPlug( AVC::Unit* unit,
77                                    AVC::Subunit* subunit,
78                                    AVC::function_block_type_t functionBlockType,
79                                    AVC::function_block_type_t functionBlockId,
80                                    AVC::Plug::EPlugAddressType plugAddressType,
81                                    AVC::Plug::EPlugDirection plugDirection,
82                                    AVC::plug_id_t plugId );
83
84     virtual void showDevice();
85 protected:
86     virtual bool propagatePlugInfo();
87
88 public:
89     virtual bool serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const;
90     virtual bool deserialize( Glib::ustring basePath, Util::IODeserialize& deser );
91
92     int getConfigurationIdSampleRate();
93     int getConfigurationIdNumberOfChannel( AVC::PlugAddress::EPlugDirection ePlugDirection );
94     int getConfigurationIdSyncMode();
95     int getConfigurationId();
96
97     Glib::ustring getCachePath();
98
99 protected:
100     Mixer*             m_Mixer;
101
102 };
103
104 }
105
106 #endif
Note: See TracBrowser for help on using the browser.