root/branches/ppalmers-streaming/src/libstreaming/amdtp/AmdtpPortInfo.h

Revision 705, 2.2 kB (checked in by ppalmers, 13 years ago)

restructure the streaming directory

Line 
1 /*
2  * Copyright (C) 2005-2007 by Pieter Palmers
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 __FFADO_AMDTPPORTINFO__
25 #define __FFADO_AMDTPPORTINFO__
26
27 #include "debugmodule/debugmodule.h"
28 #include <string>
29
30 namespace Streaming {
31 /*!
32 \brief Class containing the stream information for an AMDTP channel
33
34  Contains the information that maps the port to an AMDTP stream position (i.e. channel)
35  this allows the AMDTP stream demultiplexer to find the channel associated
36  to this port.
37
38 */
39 class AmdtpPortInfo {
40
41 public:
42     /**
43      * Sometimes a channel can have multiple formats, depending on the
44      * device configuration (e.g. an SPDIF port could be plain audio in 24bit integer
45      * or AC3 passthrough in IEC compliant frames.)
46      *
47      * This kind of enum allows to discriminate these formats when decoding
48      * If all channels always have the same format, you won't be needing this
49      */
50     enum E_Formats {
51         E_MBLA, ///< multibit linear audio
52         E_Midi, ///< midi
53         E_SPDIF,///< IEC.... format
54     };
55
56     AmdtpPortInfo( int position, int location, enum E_Formats format)
57       : m_position(position), m_location(location), m_format(format)
58     {};
59     virtual ~AmdtpPortInfo() {};
60
61
62     int getLocation()     {return m_location;};
63     int getPosition()     {return m_position;};
64     enum E_Formats getFormat()       {return m_format;};
65
66 protected:
67     int m_position;
68     int m_location;
69     enum E_Formats m_format;
70
71 };
72
73 } // end of namespace Streaming
74
75 #endif /* __FFADO_AMDTPPORTINFO__ */
Note: See TracBrowser for help on using the browser.