root/trunk/freebob/src/avdevice.h

Revision 42, 3.0 kB (checked in by wagi, 19 years ago)

Register/unregister AvDevice? in AvDevicePool? when detected/disappeared.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* avdevice.h
2  * Copyright (C) 2004 by Daniel Wagner, Pieter Palmers
3  *
4  *
5  * This file is part of FreeBob.
6  *
7  * FreeBob is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  * FreeBob is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with FreeBob; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19  * MA 02111-1307 USA.
20  */
21 #ifndef AVDEVICE_H
22 #define AVDEVICE_H
23
24 #include "ieee1394service.h"
25
26 #include <vector>
27 using std::vector;
28
29 class AvDeviceSubunit;
30
31 class AvDevice {
32  public:
33     AvDevice( octlet_t oGuid );
34     virtual ~AvDevice();
35
36     void setNodeId( int iNodeId )
37         { m_iNodeId = iNodeId; }
38     int getNodeId()
39         { return m_iNodeId; }
40     void setPort( int iPort )
41         { m_iPort = iPort; }
42     void setGeneration( unsigned int iGeneration )
43         { m_iGeneration = iGeneration; }
44     unsigned int getGeneration()
45         { return m_iGeneration; }
46     octlet_t getGuid()
47         { return m_oGuid; }
48
49     quadlet_t * avcExecuteTransaction( quadlet_t *request,
50                                        unsigned int request_len,
51                                        unsigned int response_len );
52    
53     FBReturnCodes initialize();
54     bool isInitialised();
55
56     FBReturnCodes setInputPlugSignalFormat(unsigned char plug, unsigned char fmt, quadlet_t fdf);
57     FBReturnCodes getInputPlugSignalFormat(unsigned char plug, unsigned char *fmt, quadlet_t *fdf); 
58     FBReturnCodes setOutputPlugSignalFormat(unsigned char plug, unsigned char fmt, quadlet_t fdf);
59     FBReturnCodes getOutputPlugSignalFormat(unsigned char plug, unsigned char *fmt, quadlet_t *fdf); 
60    
61 //      getSourcePlugConnection();
62         void printConnections();
63            
64         unsigned char getNbAsyncSourcePlugs() { return iNbAsyncSourcePlugs; } ;
65     unsigned char getNbAsyncDestinationPlugs() { return iNbAsyncDestinationPlugs; } ;
66     unsigned char getNbIsoSourcePlugs() { return iNbIsoSourcePlugs; } ; // oPCR
67     unsigned char getNbIsoDestinationPlugs() { return iNbIsoDestinationPlugs; } ; // iPCR
68     unsigned char getNbExtSourcePlugs() { return iNbExtSourcePlugs; } ;
69     unsigned char getNbExtDestinationPlugs() { return iNbExtDestinationPlugs; } ;
70
71  protected:
72         AvDeviceSubunit *getSubunit(unsigned char type, unsigned char id);
73  
74  private:
75     int m_iNodeId;
76     raw1394handle_t m_handle;
77     int m_iPort;
78     bool m_bInitialised;
79     octlet_t m_oGuid;
80     unsigned int m_iGeneration;  //Which generation this device belongs to
81     vector< AvDeviceSubunit * > cSubUnits;
82    
83     unsigned char iNbAsyncDestinationPlugs;
84     unsigned char iNbAsyncSourcePlugs;
85     unsigned char iNbIsoDestinationPlugs;
86     unsigned char iNbIsoSourcePlugs;
87     unsigned char iNbExtDestinationPlugs;
88     unsigned char iNbExtSourcePlugs;
89 };
90
91 #endif
Note: See TracBrowser for help on using the browser.