root/branches/streaming-rework/src/devicemanager.h

Revision 424, 2.2 kB (checked in by pieterpalmers, 17 years ago)

- The library can now be started in 'slave mode', creating a BounceSlaveDevice?.

On a discovering node, this slave device is discovered as a BounceDevice?.
Streaming does not work yet, something wrong with the timestamps.

- Implemented the 'snoop mode', that allows a client to 'snoop' the streams

between another host and a device. It is only implemented for BeBoB devices.
The channel numbers and stream configuration are automatically detected.
Note that it currently relies on a rather hackish support for reading the
{i,o}PCR plugs by using private functions of libiec61883

- changed jack backend to support these two new features

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* devicemanager.h
2  * Copyright (C) 2005 by Daniel Wagner
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
21 #ifndef FREEBOBDEVICEMANAGER_H
22 #define FREEBOBDEVICEMANAGER_H
23
24 #include "debugmodule/debugmodule.h"
25
26 #include "libfreebob/xmlparser.h"
27 #include "libutil/OptionContainer.h"
28
29 #include <glibmm/ustring.h>
30
31 #include <vector>
32
33 class Ieee1394Service;
34 class IAvDevice;
35 namespace Streaming {
36     class StreamProcessor;
37 }
38
39 typedef std::vector< IAvDevice* > IAvDeviceVector;
40 typedef std::vector< IAvDevice* >::iterator IAvDeviceVectorIterator;
41
42 class ConfigRom;
43
44
45 class DeviceManager : public Util::OptionContainer {
46  public:
47     DeviceManager();
48     ~DeviceManager();
49
50     bool initialize( int port );
51     bool deinitialize();
52
53     bool discover( int verboseLevel );
54
55     bool isValidNode( int node );
56     int getNbDevices();
57     int getDeviceNodeId( int deviceNr );
58
59     IAvDevice* getAvDevice( int nodeId );
60     IAvDevice* getAvDeviceByIndex( int idx );
61     unsigned int getAvDeviceCount();
62
63     xmlDocPtr getXmlDescription();
64
65     bool saveCache( Glib::ustring fileName );
66     bool loadCache( Glib::ustring fileName );
67
68     Streaming::StreamProcessor *getSyncSource();
69
70 protected:
71     IAvDevice* getDriverForDevice( std::auto_ptr<ConfigRom>( configRom ),
72                                    int id,
73                                    int level );
74     IAvDevice* getSlaveDriver( std::auto_ptr<ConfigRom>( configRom ),
75                                    int level );
76
77 protected:
78     Ieee1394Service* m_1394Service;
79     IAvDeviceVector  m_avDevices;
80
81     DECLARE_DEBUG_MODULE;
82 };
83
84 #endif
Note: See TracBrowser for help on using the browser.