Show
Ignore:
Timestamp:
11/28/07 05:03:31 (16 years ago)
Author:
ppalmers
Message:

merge ppalmers-streaming branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/bebob/bebob_avdevice.h

    r661 r734  
    4242#include "bebob/bebob_mixer.h" 
    4343 
    44 #include "libstreaming/AmdtpStreamProcessor.h" 
    45 #include "libstreaming/AmdtpPort.h" 
    46 #include "libstreaming/AmdtpPortInfo.h" 
     44#include "libstreaming/amdtp/AmdtpReceiveStreamProcessor.h" 
     45#include "libstreaming/amdtp/AmdtpTransmitStreamProcessor.h" 
     46#include "libstreaming/amdtp/AmdtpPort.h" 
     47#include "libstreaming/amdtp/AmdtpPortInfo.h" 
    4748 
    4849#include "libutil/serialize.h" 
  • trunk/libffado/src/bebob/bebob_avdevice_subunit.cpp

    r716 r734  
    8282{ 
    8383    debugOutput(DEBUG_LEVEL_NORMAL, "Discovering %s...\n", getName()); 
    84  
     84     
    8585    // discover the AV/C generic part 
    8686    if ( !AVC::SubunitAudio::discover() ) { 
     
    160160#ifdef DEBUG 
    161161    if ((int)getDebugLevel() >= DEBUG_LEVEL_NORMAL) { 
    162  
     162     
    163163        for ( FunctionBlockVector::iterator it = m_functions.begin(); 
    164164            it != m_functions.end(); 
     
    340340bool 
    341341BeBoB::SubunitAudio::serializeChild( Glib::ustring basePath, 
    342                                      Util::IOSerialize& ser ) const 
     342                                             Util::IOSerialize& ser ) const 
    343343{ 
    344344    bool result = true; 
     
    363363bool 
    364364BeBoB::SubunitAudio::deserializeChild( Glib::ustring basePath, 
    365                                        Util::IODeserialize& deser, 
    366                                        AVC::Unit& avDevice ) 
     365                                               Util::IODeserialize& deser, 
     366                                               AVC::Unit& avDevice ) 
    367367{ 
    368368    int i = 0; 
     
    426426{ 
    427427    debugOutput(DEBUG_LEVEL_NORMAL, "Discovering %s...\n", getName()); 
    428  
     428     
    429429    // discover the AV/C generic part 
    430430    if ( !AVC::SubunitMusic::discover() ) { 
  • trunk/libffado/src/bebob/bebob_functionblock.cpp

    r716 r734  
    160160 
    161161bool 
     162serializePlugVector( Glib::ustring basePath, 
     163                       Util::IOSerialize& ser, 
     164                       const PlugVector& vec ) 
     165{ 
     166    bool result = true; 
     167    int i = 0; 
     168    for ( PlugVector::const_iterator it = vec.begin(); 
     169          it != vec.end(); 
     170          ++it ) 
     171    { 
     172        std::ostringstream strstrm; 
     173        strstrm << basePath << i; 
     174        result &= ser.write( strstrm.str(), ( *it )->getGlobalId() ); 
     175        i++; 
     176    } 
     177    return result; 
     178} 
     179 
     180bool 
     181deserializePlugVector( Glib::ustring basePath, 
     182                         Util::IODeserialize& deser, 
     183                         AVC::Unit& unit, 
     184                         PlugVector& vec ) 
     185{ 
     186    int i = 0; 
     187    bool bFinished = false; 
     188    bool result = true; 
     189    do { 
     190        plug_id_t plugId; 
     191        std::ostringstream strstrm; 
     192        strstrm << basePath << i; 
     193 
     194        if ( deser.isExisting( strstrm.str() ) ) { 
     195            result &= deser.read( strstrm.str(), plugId ); 
     196            AVC::Plug* pPlug = unit.getPlugManager().getPlug( plugId ); 
     197 
     198            if ( result && pPlug ) { 
     199                vec.push_back( pPlug ); 
     200                i++; 
     201            } else { 
     202                bFinished = true; 
     203            } 
     204        } else { 
     205            bFinished = true; 
     206        } 
     207    } while ( !bFinished ); 
     208 
     209    return result; 
     210} 
     211 
     212bool 
    162213FunctionBlock::serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const 
    163214{ 
     
    178229FunctionBlock* 
    179230FunctionBlock::deserialize( Glib::ustring basePath, 
    180                             Util::IODeserialize& deser, 
    181                             AVC::Unit& unit, 
    182                             AVC::Subunit& subunit ) 
     231                                   Util::IODeserialize& deser, 
     232                                   AVC::Unit& unit, 
     233                                   AVC::Subunit& subunit ) 
    183234{ 
    184235    bool result; 
     
    227278    result &= deser.read( basePath + "m_nrOfOutputPlugs", pFB->m_nrOfOutputPlugs ); 
    228279    result &= deser.read( basePath + "m_verbose", pFB->m_verbose ); 
    229     result &= deserializePlugVector( basePath + "m_plugs", deser, 
    230                                      unit.getPlugManager(), pFB->m_plugs ); 
     280    result &= deserializePlugVector( basePath + "m_plugs", deser, unit, pFB->m_plugs ); 
    231281 
    232282    return 0; 
  • trunk/libffado/src/bebob/bebob_functionblock.h

    r716 r734  
    6969 
    7070    virtual const char* getName() = 0; 
    71  
     71     
    7272    AVC::function_block_type_t getType() {return m_type;}; 
    7373    AVC::function_block_type_t getSubtype() {return m_subtype;}; 
    7474    AVC::function_block_id_t getId() {return m_id;}; 
    75  
     75     
    7676    AVC::no_of_input_plugs_t getNrOfInputPlugs() {return m_nrOfInputPlugs;}; 
    7777    AVC::no_of_output_plugs_t getNrOfOutputPlugs() {return m_nrOfOutputPlugs;}; 
    7878 
    7979    bool serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const; 
    80  
    8180    static FunctionBlock* deserialize( Glib::ustring basePath, 
    8281                       Util::IODeserialize& deser, 
     
    145144 
    146145    virtual const char* getName(); 
    147  
     146     
    148147    // FIXME: this is not pretty! 
    149148    enum EControlSelectorEncoding {