root/branches/streaming-rework/src/libstreaming/AmdtpPortInfo.h

Revision 415, 2.4 kB (checked in by pieterpalmers, 16 years ago)

ieee1394service:
- implemented 64bit compare-swap-lock operation (needed for DICE)
- small name change of (un)registerARMhandler to (un)registerARMHandler

iavdevice.h:
- made the stream start/stop functions return bool instead of int
- updated function documentation for consistency and to reflect changes

BeBoB avdevice:
- replaced the 2 fixed streamprocessor pointers with a 2 vectors of streamprocessors
- implemented the 'snoop mode' (cannot be activated yet)

libstreaming:
- removed unused 'type' attribute from AmdtpPortInfo? & children

mh_avdevice, motu_avdevice, rme_avdevice:
- replaced m_1394service with m_p1394service for consistence

maudio_avdevice.cpp:
- removed unused code

Line 
1 /* $Id$ */
2
3 /*
4  *   FreeBob Streaming API
5  *   FreeBob = Firewire (pro-)audio for linux
6  *
7  *   http://freebob.sf.net
8  *
9  *   Copyright (C) 2005,2006,2007 Pieter Palmers <pieterpalmers@users.sourceforge.net>
10  *
11  *   This program is free software {} you can redistribute it and/or modify
12  *   it under the terms of the GNU General Public License as published by
13  *   the Free Software Foundation {} either version 2 of the License, or
14  *   (at your option) any later version.
15  *
16  *   This program is distributed in the hope that it will be useful,
17  *   but WITHOUT ANY WARRANTY {} without even the implied warranty of
18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *   GNU General Public License for more details.
20  *
21  *   You should have received a copy of the GNU General Public License
22  *   along with this program {} if not, write to the Free Software
23  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  *
25  *
26  *
27  */
28 #ifndef __FREEBOB_AMDTPPORTINFO__
29 #define __FREEBOB_AMDTPPORTINFO__
30
31 #include "../debugmodule/debugmodule.h"
32 #include <string>
33
34 namespace FreebobStreaming {
35 /*!
36 \brief Class containing the stream information for an AMDTP channel
37
38  Contains the information that maps the port to an AMDTP stream position (i.e. channel)
39  this allows the AMDTP stream demultiplexer to find the channel associated
40  to this port.
41  
42 */
43 class AmdtpPortInfo {
44
45 public:
46     /**
47      * Sometimes a channel can have multiple formats, depending on the
48      * device configuration (e.g. an SPDIF port could be plain audio in 24bit integer
49      * or AC3 passthrough in IEC compliant frames.)
50      *
51      * This kind of enum allows to discriminate these formats when decoding
52      * If all channels always have the same format, you won't be needing this
53      */
54         enum E_Formats {
55                 E_MBLA, ///< multibit linear audio
56                 E_Midi, ///< midi
57                 E_SPDIF,///< IEC.... format
58         };
59
60         AmdtpPortInfo(std::string name, int position, int location, enum E_Formats format)
61           : m_name(name), m_position(position), m_location(location), m_format(format)
62         {};
63         virtual ~AmdtpPortInfo() {};
64
65
66         std::string getName() {return m_name;};
67         int getLocation()     {return m_location;};
68         int getPosition()     {return m_position;};
69         enum E_Formats getFormat()       {return m_format;};
70
71 protected:
72     std::string m_name;
73
74     int m_position;
75     int m_location;
76     enum E_Formats m_format;
77
78 };
79
80 } // end of namespace FreebobStreaming
81
82 #endif /* __FREEBOB_AMDTPPORTINFO__ */
Note: See TracBrowser for help on using the browser.