[prev in list] [next in list] [prev in thread] [next in thread]
List: freebob-cvs
Subject: [Freebob-cvs] libfreebob/src avdevice.cpp,1.17,1.18 avdevice.h,1.11,1.12 avplug.cpp,1.10,1.11 avplug
From: Daniel Wagner <wagi () users ! sourceforge ! net>
Date: 2006-03-04 17:45:06
Message-ID: E1FFaoc-0000xu-0A () mail ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/freebob/libfreebob/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27729/src
Modified Files:
avdevice.cpp avdevice.h avplug.cpp avplug.h
Log Message:
2006-03-04 Daniel Wagner <wagi@monom.org>
* src/avdevice.cpp: Sync mode discovering improved.
* src/avdevice.h: Likewise.
* src/avplug.cpp: Likewise.
* src/avplug.h: Likewise.
Index: avplug.cpp
===================================================================
RCS file: /cvsroot/freebob/libfreebob/src/avplug.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** avplug.cpp 4 Mar 2006 15:14:27 -0000 1.10
--- avplug.cpp 4 Mar 2006 17:45:03 -0000 1.11
***************
*** 171,175 ****
int
! AvPlug::getNrOfStreams()
{
int nrOfChannels = 0;
--- 171,175 ----
int
! AvPlug::getNrOfStreams() const
{
int nrOfChannels = 0;
***************
*** 185,189 ****
int
! AvPlug::getNrOfChannels()
{
return m_nrOfChannels;
--- 185,189 ----
int
! AvPlug::getNrOfChannels() const
{
return m_nrOfChannels;
***************
*** 191,195 ****
int
! AvPlug::getSampleRate()
{
return convertESamplingFrequency( static_cast<ESamplingFrequency>( \
m_samplingFrequency ) );
--- 191,195 ----
int
! AvPlug::getSampleRate() const
{
return convertESamplingFrequency( static_cast<ESamplingFrequency>( \
m_samplingFrequency ) );
***************
*** 497,501 ****
{
ClusterInfo* clusterInfo =
! getClusterInfoByIndex( i );
if ( !clusterInfo ) {
--- 497,501 ----
{
ClusterInfo* clusterInfo =
! const_cast<ClusterInfo*>( getClusterInfoByIndex( i ) );
if ( !clusterInfo ) {
***************
*** 1106,1118 ****
}
! AvPlug::ClusterInfo*
! AvPlug::getClusterInfoByIndex(int index)
{
! for ( AvPlug::ClusterInfoVector::iterator clit =
m_clusterInfos.begin();
clit != m_clusterInfos.end();
++clit )
{
! ClusterInfo* info = &*clit;
if ( info->m_index == index ) {
return info;
--- 1106,1118 ----
}
! const AvPlug::ClusterInfo*
! AvPlug::getClusterInfoByIndex(int index) const
{
! for ( AvPlug::ClusterInfoVector::const_iterator clit =
m_clusterInfos.begin();
clit != m_clusterInfos.end();
++clit )
{
! const ClusterInfo* info = &*clit;
if ( info->m_index == index ) {
return info;
***************
*** 1123,1127 ****
PlugAddress::EPlugDirection
! AvPlug::convertPlugDirection()
{
PlugAddress::EPlugDirection dir;
--- 1123,1127 ----
PlugAddress::EPlugDirection
! AvPlug::convertPlugDirection() const
{
PlugAddress::EPlugDirection dir;
***************
*** 1139,1142 ****
--- 1139,1157 ----
}
+ void
+ AvPlug::showPlug() const
+ {
+ debugOutput( DEBUG_LEVEL_VERBOSE, "\tName = %s\n", getName() );
+ debugOutput( DEBUG_LEVEL_VERBOSE, "\tType = %s\n", \
extendedPlugInfoPlugTypeToString( getPlugType() ) ); + debugOutput( \
DEBUG_LEVEL_VERBOSE, "\tAddress Type = %s\n", avPlugAddressTypeToString( \
getPlugAddressType() ) ); + debugOutput( DEBUG_LEVEL_VERBOSE, "\tId \
= %d\n", getPlugId() ); + debugOutput( DEBUG_LEVEL_VERBOSE, "\tSubunitType \
= %d\n", getSubunitType() ); + debugOutput( DEBUG_LEVEL_VERBOSE, "\tSubunitId \
= %d\n", getSubunitId() ); + debugOutput( DEBUG_LEVEL_VERBOSE, "\tDirection \
= %s\n", avPlugDirectionToString( getPlugDirection() ) ); + debugOutput( \
DEBUG_LEVEL_VERBOSE, "\tSampling Rate = %d\n", getSampleRate() ); + \
debugOutput( DEBUG_LEVEL_VERBOSE, "\tNumber of Channels = %d\n", getNrOfChannels() \
); + debugOutput( DEBUG_LEVEL_VERBOSE, "\tNumber of Streams = %d\n", \
getNrOfStreams() ); + }
+
/////////////////////////////////////////
/////////////////////////////////////////
***************
*** 1196,1201 ****
! AvPlugManager::AvPlugManager()
{
}
--- 1211,1228 ----
! AvPlugManager::AvPlugManager( bool verbose )
! : m_verbose( verbose )
{
+ if ( m_verbose ) {
+ setDebugLevel( DEBUG_LEVEL_VERBOSE );
+ }
+ }
+
+ AvPlugManager::AvPlugManager( const AvPlugManager& rhs )
+ : m_verbose( rhs.m_verbose )
+ {
+ if ( m_verbose ) {
+ setDebugLevel( DEBUG_LEVEL_VERBOSE );
+ }
}
***************
*** 1228,1232 ****
void
! AvPlugManager::showPlugs()
{
// \todo The information provided here could be better arranged. For a start it \
is ok, but
--- 1255,1259 ----
void
! AvPlugManager::showPlugs() const
{
// \todo The information provided here could be better arranged. For a start it \
is ok, but
***************
*** 1239,1243 ****
printf( "-----------+----+-----+----------+-------------+-----------+-----\n" \
);
! for ( AvPlugVector::iterator it = m_plugs.begin();
it != m_plugs.end();
++it )
--- 1266,1270 ----
printf( "-----------+----+-----+----------+-------------+-----------+-----\n" \
);
! for ( AvPlugVector::const_iterator it = m_plugs.begin();
it != m_plugs.end();
++it )
***************
*** 1257,1261 ****
printf( "\nConnections\n" );
printf( "-----------\n" );
! for ( AvPlugVector::iterator it = m_plugs.begin();
it != m_plugs.end();
++it )
--- 1284,1288 ----
printf( "\nConnections\n" );
printf( "-----------\n" );
! for ( AvPlugVector::const_iterator it = m_plugs.begin();
it != m_plugs.end();
++it )
***************
*** 1276,1301 ****
}
! printf( "\nPlug details\n" );
! printf( "------------\n" );
int i = 0;
! for ( AvPlugVector::iterator it = m_plugs.begin();
it != m_plugs.end();
++it, ++i )
{
AvPlug* plug = *it;
- printf( "Plug %d:\n", i );
- printf( "\tName = %s\n", plug->getName() );
- printf( "\tType = %s\n", extendedPlugInfoPlugTypeToString( \
plug->getPlugType() ) );
- printf( "\tAddress Type = %s\n", avPlugAddressTypeToString( \
plug->getPlugAddressType() ) );
- printf( "\tId = %d\n", plug->getPlugId() );
- printf( "\tSubunitType = %d\n", plug->getSubunitType() );
- printf( "\tSubunitId = %d\n", plug->getSubunitId() );
- printf( "\tDirection = %s\n", avPlugDirectionToString( \
plug->getPlugDirection() ) );
- printf( "\tSampling Rate = %d\n", plug->getSampleRate() );
- printf( "\tNumber of Channels = %d\n", plug->getNrOfChannels() );
- printf( "\tNumber of Streams = %d\n", plug->getNrOfStreams() );
}
! printf( "\n" );
}
--- 1303,1320 ----
}
! /*
! debugOutput( DEBUG_LEVEL_VERBOSE, "Plug details\n" );
! debugOutput( DEBUG_LEVEL_VERBOSE, "------------\n" );
int i = 0;
! for ( AvPlugVector::const_iterator it = m_plugs.begin();
it != m_plugs.end();
++it, ++i )
{
AvPlug* plug = *it;
+ debugOutput( DEBUG_LEVEL_VERBOSE, "Plug %d:\n", i );
+ plug->showPlug();
}
! */
}
***************
*** 1305,1320 ****
AvPlug::EAvPlugAddressType plugAddressType,
AvPlug::EAvPlugDirection plugDirection,
! plug_id_t plugId )
{
! debugOutput( DEBUG_LEVEL_VERBOSE,
! "lookup (SubUnitType, SubUnitId, PlugType, Direction, Id) = "
! "(%d, %d, %d, %d, %d)\n",
! subunitType,
! subunitId,
! plugAddressType,
! plugDirection,
! plugId );
!
! for ( AvPlugVector::iterator it = m_plugs.begin();
it != m_plugs.end();
++it )
--- 1324,1330 ----
AvPlug::EAvPlugAddressType plugAddressType,
AvPlug::EAvPlugDirection plugDirection,
! plug_id_t plugId ) const
{
! for ( AvPlugVector::const_iterator it = m_plugs.begin();
it != m_plugs.end();
++it )
***************
*** 1328,1340 ****
&& ( plugId == plug->getPlugId() ) )
{
- debugOutput( DEBUG_LEVEL_VERBOSE,
- "found (SubUnitType, SubUnitId, PlugType, Direction, Id) \
= "
- "(%d, %d, %d, %d, %d) ('%s')\n",
- plug->getSubunitType(),
- plug->getSubunitId(),
- plug->getPlugAddressType(),
- plug->getPlugDirection(),
- plug->getPlugId(),
- plug->getName() );
return plug;
}
--- 1338,1341 ----
***************
*** 1344,1354 ****
}
! AvPlug* AvPlugManager::getPlugByType( AVCCommand::ESubunitType subunitType,
! subunit_id_t subunitId,
! AvPlug::EAvPlugAddressType plugAddressType,
! AvPlug::EAvPlugDirection plugDirection,
! AvPlug::EAvPlugType type)
{
! for ( AvPlugVector::iterator it = m_plugs.begin();
it != m_plugs.end();
++it )
--- 1345,1357 ----
}
! AvPlugVector
! AvPlugManager::getPlugsByType( AVCCommand::ESubunitType subunitType,
! subunit_id_t subunitId,
! AvPlug::EAvPlugAddressType plugAddressType,
! AvPlug::EAvPlugDirection plugDirection,
! AvPlug::EAvPlugType type) const
{
! AvPlugVector plugVector;
! for ( AvPlugVector::const_iterator it = m_plugs.begin();
it != m_plugs.end();
++it )
***************
*** 1362,1370 ****
&& ( type == plug->getPlugType() ) )
{
! return plug;
}
}
! return 0;
}
--- 1365,1373 ----
&& ( type == plug->getPlugType() ) )
{
! plugVector.push_back( plug );
}
}
! return plugVector;
}
Index: avplug.h
===================================================================
RCS file: /cvsroot/freebob/libfreebob/src/avplug.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** avplug.h 4 Mar 2006 15:14:27 -0000 1.9
--- avplug.h 4 Mar 2006 17:45:03 -0000 1.10
***************
*** 51,55 ****
enum EAvPlugType {
! eAPT_IsoStream,
eAPT_AsyncStream,
eAPT_Midi,
--- 51,55 ----
enum EAvPlugType {
! eAPT_IsoStream,
eAPT_AsyncStream,
eAPT_Midi,
***************
*** 57,61 ****
eAPT_Analog,
eAPT_Digital,
! eAPT_Unknown,
};
--- 57,61 ----
eAPT_Analog,
eAPT_Digital,
! eAPT_Unknown,
};
***************
*** 83,101 ****
bool inquireConnnection( AvPlug& plug );
! plug_id_t getPlugId()
{ return m_id; }
! AVCCommand::ESubunitType getSubunitType()
{ return m_subunitType; }
! subunit_id_t getSubunitId()
{ return m_subunitId; }
! const char* getName()
{ return m_name.c_str(); }
! EAvPlugDirection getPlugDirection()
{ return m_direction; }
! sampling_frequency_t getSamplingFrequency()
{ return m_samplingFrequency; }
! int getSampleRate(); // 22050, 24000, 32000, ...
! int getNrOfChannels();
! int getNrOfStreams();
EAvPlugDirection getDirection() const
--- 83,101 ----
bool inquireConnnection( AvPlug& plug );
! plug_id_t getPlugId() const
{ return m_id; }
! AVCCommand::ESubunitType getSubunitType() const
{ return m_subunitType; }
! subunit_id_t getSubunitId() const
{ return m_subunitId; }
! const char* getName() const
{ return m_name.c_str(); }
! EAvPlugDirection getPlugDirection() const
{ return m_direction; }
! sampling_frequency_t getSamplingFrequency() const
{ return m_samplingFrequency; }
! int getSampleRate() const; // 22050, 24000, 32000, ...
! int getNrOfChannels() const;
! int getNrOfStreams() const;
EAvPlugDirection getDirection() const
***************
*** 114,118 ****
bool addXmlDescriptionStreamFormats( xmlNodePtr streamFormats );
! PlugAddress::EPlugDirection convertPlugDirection();
protected:
--- 114,120 ----
bool addXmlDescriptionStreamFormats( xmlNodePtr streamFormats );
! PlugAddress::EPlugDirection convertPlugDirection() const;
!
! void showPlug() const;
protected:
***************
*** 200,204 ****
FormatInfoVector m_formatInfos;
! ClusterInfo* getClusterInfoByIndex( int index );
AvPlugVector m_inputConnections;
--- 202,206 ----
FormatInfoVector m_formatInfos;
! const ClusterInfo* getClusterInfoByIndex( int index ) const;
AvPlugVector m_inputConnections;
***************
*** 219,223 ****
{
public:
! AvPlugManager();
~AvPlugManager();
--- 221,226 ----
{
public:
! AvPlugManager( bool verbose );
! AvPlugManager( const AvPlugManager& rhs );
~AvPlugManager();
***************
*** 225,229 ****
bool remPlug( AvPlug& plug );
! void showPlugs();
AvPlug* getPlug( AVCCommand::ESubunitType subunitType,
--- 228,232 ----
bool remPlug( AvPlug& plug );
! void showPlugs() const;
AvPlug* getPlug( AVCCommand::ESubunitType subunitType,
***************
*** 231,243 ****
AvPlug::EAvPlugAddressType plugAddressType,
AvPlug::EAvPlugDirection plugDirection,
! plug_id_t plugId );
! // We expect only one sync plug which matches
! AvPlug* getPlugByType( AVCCommand::ESubunitType subunitType,
! subunit_id_t subunitId,
! AvPlug::EAvPlugAddressType plugAddressType,
! AvPlug::EAvPlugDirection plugDirection,
! AvPlug::EAvPlugType type);
private:
AvPlugVector m_plugs;
--- 234,246 ----
AvPlug::EAvPlugAddressType plugAddressType,
AvPlug::EAvPlugDirection plugDirection,
! plug_id_t plugId ) const;
! AvPlugVector getPlugsByType( AVCCommand::ESubunitType subunitType,
! subunit_id_t subunitId,
! AvPlug::EAvPlugAddressType plugAddressType,
! AvPlug::EAvPlugDirection plugDirection,
! AvPlug::EAvPlugType type) const;
private:
+ bool m_verbose;
AvPlugVector m_plugs;
Index: avdevice.cpp
===================================================================
RCS file: /cvsroot/freebob/libfreebob/src/avdevice.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** avdevice.cpp 4 Mar 2006 15:14:27 -0000 1.17
--- avdevice.cpp 4 Mar 2006 17:45:03 -0000 1.18
***************
*** 48,51 ****
--- 48,52 ----
, m_nodeId( nodeId )
, m_verbose( verbose )
+ , m_plugManager( verbose )
{
if ( m_verbose ) {
***************
*** 271,358 ****
// in the music subunit.
! AvPlug* syncInputPlug = getPlugByType( m_pcrPlugs,
! AvPlug::eAPD_Input,
! AvPlug::eAPT_Sync );
! if ( !syncInputPlug ) {
! debugError( "No sync input plug found\n" );
! return false;
! }
! AvPlug* syncOutputPlug = getPlugByType( m_pcrPlugs,
! AvPlug::eAPD_Output,
! AvPlug::eAPT_Sync );
! if ( !syncOutputPlug ) {
! debugError( "No sync output plug found with\n" );
! return false;
}
! AvPlug* syncMSUInputPlug = m_plugManager.getPlugByType( AVCCommand::eST_Music,
! 0,
! \
AvPlug::eAPA_SubunitPlug,
! AvPlug::eAPD_Input,
! AvPlug::eAPT_Sync );
! if ( !syncMSUInputPlug ) {
! debugError( "No sync input plug for MSU subunit found\n" );
! return false;
}
! AvPlug* syncMSUOutputPlug = m_plugManager.getPlugByType( AVCCommand::eST_Music,
! 0,
! \
AvPlug::eAPA_SubunitPlug,
! AvPlug::eAPD_Output,
! AvPlug::eAPT_Sync );
! if ( !syncMSUOutputPlug ) {
! debugError( "No sync output plug for MSU subunit found\n" );
! return false;
}
! debugOutput( DEBUG_LEVEL_VERBOSE, "syncInputPlug = '%s'\n", \
syncInputPlug->getName() );
! debugOutput( DEBUG_LEVEL_VERBOSE, "syncOutputPlug = '%s'\n", \
syncOutputPlug->getName() );
! debugOutput( DEBUG_LEVEL_VERBOSE, "syncMSUInputPlug = '%s'\n", \
syncMSUInputPlug->getName() );
! debugOutput( DEBUG_LEVEL_VERBOSE, "syncMSUOutputPlug = '%s'\n", \
syncMSUOutputPlug->getName() );
! // Just some simple tests with the plugs. Some more inquiries are needed.
! if ( syncOutputPlug->inquireConnnection( *syncMSUInputPlug ) ) {
! debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection '%s' -> '%s'\n",
! syncOutputPlug->getName(),
! syncMSUInputPlug->getName() );
}
! if ( syncMSUOutputPlug->inquireConnnection( *syncInputPlug ) ) {
! debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection '%s' -> '%s'\n",
! syncMSUOutputPlug->getName(),
! syncInputPlug->getName() );
}
! /*
! for ( AvPlugVector::iterator it = m_pcrPlugs.begin();
! it != m_pcrPlugs.end();
! ++it )
{
! AvPlug* plug = *it;
! if ( syncOutputPlug->inquireConnnection( *plug ) ) {
! debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection '%s' -> '%s'\n",
! syncInputPlug->getName(),
! plug->getName() );
}
}
! for ( AvPlugVector::iterator it = m_externalPlugs.begin();
! it != m_externalPlugs.end();
! ++it )
{
! AvPlug* plug = *it;
! if ( syncOutputPlug->inquireConnnection( *plug ) ) {
! debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection '%s' -> '%s'\n",
! syncInputPlug->getName(),
! plug->getName() );
}
}
! */
return true;
--- 272,447 ----
// in the music subunit.
! // Note PCR input means 1394bus-to-device where as
! // MSU input means subunit-to-device
! AvPlugVector syncPCRInputPlugs = getPlugsByType( m_pcrPlugs,
! AvPlug::eAPD_Input,
! AvPlug::eAPT_Sync );
! if ( !syncPCRInputPlugs.size() ) {
! debugWarning( "No PCR sync input plug found\n" );
}
! AvPlugVector syncPCROutputPlugs = getPlugsByType( m_pcrPlugs,
! AvPlug::eAPD_Output,
! AvPlug::eAPT_Sync );
! if ( !syncPCROutputPlugs.size() ) {
! debugWarning( "No PCR sync output plug found\n" );
}
! AvPlugVector isoPCRInputPlugs = getPlugsByType( m_pcrPlugs,
! AvPlug::eAPD_Input,
! AvPlug::eAPT_IsoStream );
! if ( !isoPCRInputPlugs.size() ) {
! debugWarning( "No PCR iso input plug found\n" );
!
}
+ AvPlugVector isoPCROutputPlugs = getPlugsByType( m_pcrPlugs,
+ AvPlug::eAPD_Output,
+ AvPlug::eAPT_IsoStream );
+ if ( !isoPCROutputPlugs.size() ) {
+ debugWarning( "No PCR iso output plug found\n" );
+
+ }
! AvPlugVector digitalPCRInputPlugs = getPlugsByType( m_externalPlugs,
! AvPlug::eAPD_Input,
! AvPlug::eAPT_Digital );
+ AvPlugVector syncMSUInputPlugs = m_plugManager.getPlugsByType( \
AVCCommand::eST_Music, + \
0, + \
AvPlug::eAPA_SubunitPlug, + \
AvPlug::eAPD_Input, + \
AvPlug::eAPT_Sync ); + if ( !syncMSUInputPlugs.size() ) {
+ debugWarning( "No sync input plug for MSU subunit found\n" );
+ }
! AvPlugVector syncMSUOutputPlugs = m_plugManager.getPlugsByType( \
AVCCommand::eST_Music,
! 0,
! \
AvPlug::eAPA_SubunitPlug,
! \
AvPlug::eAPD_Output,
! \
AvPlug::eAPT_Sync );
! if ( !syncMSUOutputPlugs.size() ) {
! debugWarning( "No sync output plug for MSU subunit found\n" );
}
! debugOutput( DEBUG_LEVEL_VERBOSE, "PCR Sync Input Plugs:\n" );
! showAvPlugs( syncPCRInputPlugs );
! debugOutput( DEBUG_LEVEL_VERBOSE, "PCR Sync Output Plugs:\n" );
! showAvPlugs( syncPCROutputPlugs );
! debugOutput( DEBUG_LEVEL_VERBOSE, "PCR Iso Input Plugs:\n" );
! showAvPlugs( isoPCRInputPlugs );
! debugOutput( DEBUG_LEVEL_VERBOSE, "PCR Iso Output Plugs:\n" );
! showAvPlugs( isoPCROutputPlugs );
! debugOutput( DEBUG_LEVEL_VERBOSE, "PCR digital Input Plugs:\n" );
! showAvPlugs( digitalPCRInputPlugs );
! debugOutput( DEBUG_LEVEL_VERBOSE, "MSU Sync Input Plugs:\n" );
! showAvPlugs( syncMSUInputPlugs );
! debugOutput( DEBUG_LEVEL_VERBOSE, "MSU Sync Output Plugs:\n" );
! showAvPlugs( syncMSUOutputPlugs );
+ // Check all possible PCR input to MSU input connections
+ // -> sync stream input
+ for ( AvPlugVector::iterator piIt = syncPCRInputPlugs.begin();
+ piIt != syncPCRInputPlugs.end();
+ ++piIt )
+ {
+ AvPlug* pi = *piIt;
+ for ( AvPlugVector::iterator miIt = syncMSUInputPlugs.begin();
+ miIt != syncMSUInputPlugs.end();
+ ++miIt )
+ {
+ AvPlug* mi = *miIt;
+ if ( pi->inquireConnnection( *mi ) ) {
+ debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection (Sync Stream \
Input) '%s' -> '%s'\n", + pi->getName(),
+ mi->getName() );
+ }
+ }
}
! // Check all possible MSU output to PCR output connections
! // -> sync stream output
! for ( AvPlugVector::iterator moIt = syncMSUOutputPlugs.begin();
! moIt != syncMSUOutputPlugs.end();
! ++moIt )
{
! AvPlug* mo = *moIt;
! for ( AvPlugVector::iterator poIt = syncPCROutputPlugs.begin();
! poIt != syncPCROutputPlugs.end();
! ++poIt )
! {
! AvPlug* po = *poIt;
! if ( mo->inquireConnnection( *po ) ) {
! debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection (Sync Stream \
Output) '%s' -> '%s'\n",
! mo->getName(),
! po->getName() );
! }
! }
! }
! // Check all PCR iso input to MSU input connections
! // -> SYT match
! for ( AvPlugVector::iterator iiIt = isoPCRInputPlugs.begin();
! iiIt != isoPCRInputPlugs.end();
! ++iiIt )
! {
! AvPlug* ii = *iiIt;
! for ( AvPlugVector::iterator miIt = syncMSUInputPlugs.begin();
! miIt != syncMSUInputPlugs.end();
! ++miIt )
! {
! AvPlug* mi = *miIt;
! if ( ii->inquireConnnection( *mi ) ) {
! debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection (SYT match) '%s' \
-> '%s'\n",
! ii->getName(),
! mi->getName() );
! }
}
}
! // Check all MSU sync output to MSU input connections
! // -> CSP
! for ( AvPlugVector::iterator moIt = syncMSUOutputPlugs.begin();
! moIt != syncMSUOutputPlugs.end();
! ++moIt )
{
! AvPlug* mo = *moIt;
! for ( AvPlugVector::iterator miIt = syncMSUInputPlugs.begin();
! miIt != syncMSUInputPlugs.end();
! ++miIt )
! {
! AvPlug* mi = *miIt;
! if ( mo->inquireConnnection( *mi ) ) {
! debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection (CSP) '%s' -> \
'%s'\n",
! mo->getName(),
! mi->getName() );
! }
! }
! }
! // Check all external PCR digital input to MSU input connections
! // -> SPDIF/ADAT sync
! for ( AvPlugVector::iterator diIt = digitalPCRInputPlugs.begin();
! diIt != digitalPCRInputPlugs.end();
! ++diIt )
! {
! AvPlug* di = *diIt;
! for ( AvPlugVector::iterator miIt = syncMSUInputPlugs.begin();
! miIt != syncMSUInputPlugs.end();
! ++miIt )
! {
! AvPlug* mi = *miIt;
! if ( di->inquireConnnection( *mi ) ) {
! debugOutput( DEBUG_LEVEL_NORMAL, "Sync connection (SPDIF/ADAT) '%s' \
-> '%s'\n",
! di->getName(),
! mi->getName() );
! }
}
}
!
! // Currently active connection
! // signal source cmd, command type status, source unknown, destination MSU sync \
input plug
return true;
***************
*** 502,510 ****
}
! AvPlug*
! AvDevice::getPlugByType( AvPlugVector& plugs,
! AvPlug::EAvPlugDirection plugDirection,
! AvPlug::EAvPlugType type)
{
for ( AvPlugVector::iterator it = plugs.begin();
it != plugs.end();
--- 591,600 ----
}
! AvPlugVector
! AvDevice::getPlugsByType( AvPlugVector& plugs,
! AvPlug::EAvPlugDirection plugDirection,
! AvPlug::EAvPlugType type)
{
+ AvPlugVector plugVector;
for ( AvPlugVector::iterator it = plugs.begin();
it != plugs.end();
***************
*** 515,523 ****
&& ( plugDirection == plug->getPlugDirection() ) )
{
! return plug;
}
}
! return 0;
}
--- 605,613 ----
&& ( plugDirection == plug->getPlugDirection() ) )
{
! plugVector.push_back( plug );
}
}
! return plugVector;
}
***************
*** 682,683 ****
--- 772,787 ----
m_plugManager.showPlugs();
}
+
+ void
+ AvDevice::showAvPlugs( AvPlugVector& plugs ) const
+ {
+ int i = 0;
+ for ( AvPlugVector::const_iterator it = plugs.begin();
+ it != plugs.end();
+ ++it, ++i )
+ {
+ AvPlug* plug = *it;
+ debugOutput( DEBUG_LEVEL_VERBOSE, "Plug %d\n", i );
+ plug->showPlug();
+ }
+ }
Index: avdevice.h
===================================================================
RCS file: /cvsroot/freebob/libfreebob/src/avdevice.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** avdevice.h 4 Mar 2006 15:14:27 -0000 1.11
--- avdevice.h 4 Mar 2006 17:45:03 -0000 1.12
***************
*** 87,98 ****
AvPlug::EAvPlugDirection plugDireciton,
int id );
! // We expect only one sync plug which matches
! AvPlug* getPlugByType( AvPlugVector& plugs,
! AvPlug::EAvPlugDirection plugDirection,
! AvPlug::EAvPlugType type);
bool setSamplingFrequencyPlug( AvPlug& plug,
AvPlug::EAvPlugDirection direction,
ESamplingFrequency samplingFrequency );
protected:
Ieee1394Service* m_1394Service;
--- 87,99 ----
AvPlug::EAvPlugDirection plugDireciton,
int id );
! AvPlugVector getPlugsByType( AvPlugVector& plugs,
! AvPlug::EAvPlugDirection plugDirection,
! AvPlug::EAvPlugType type);
bool setSamplingFrequencyPlug( AvPlug& plug,
AvPlug::EAvPlugDirection direction,
ESamplingFrequency samplingFrequency );
+
+ void showAvPlugs( AvPlugVector& plugs ) const;
protected:
Ieee1394Service* m_1394Service;
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Freebob-cvs mailing list
Freebob-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freebob-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic