| 98 |
/* |
/* |
| 99 |
* Connect media. |
* Connect media. |
| 100 |
*/ |
*/ |
| 101 |
bool MmDevice::listen( DialogicDevice* other ) |
bool MmDevice::connect( DialogicDevice* other ) |
| 102 |
{ |
{ |
| 103 |
LOGDEBUG("MmDevice::listen() device: " << devName_ << |
LOGDEBUG("MmDevice::connect() device: " << devName_ << |
| 104 |
" other: " << other->getDeviceName()); |
" other: " << other->getDeviceName()); |
| 105 |
|
|
| 106 |
if ( listening_ != other ) |
if ( listening_ != other ) |
| 113 |
INIT_DM_PORT_CONNECT_INFO(&portConnectInfoList.port_connect_info[count]); |
INIT_DM_PORT_CONNECT_INFO(&portConnectInfoList.port_connect_info[count]); |
| 114 |
portConnectInfoList.port_connect_info[count].unFlags = DMFL_TRANSCODE_ON; |
portConnectInfoList.port_connect_info[count].unFlags = DMFL_TRANSCODE_ON; |
| 115 |
portConnectInfoList.port_connect_info[count].port_info_tx = getAudioTxPortInfo(); |
portConnectInfoList.port_connect_info[count].port_info_tx = getAudioTxPortInfo(); |
| 116 |
portConnectInfoList.port_connect_info[count].port_info_rx = ((IpmDevice*)other)->getAudioRxPortInfo(); //XXX |
portConnectInfoList.port_connect_info[count].port_info_rx = other->getAudioRxPortInfo(); |
| 117 |
count++; |
count++; |
| 118 |
|
|
| 119 |
INIT_DM_PORT_CONNECT_INFO(&portConnectInfoList.port_connect_info[count]); |
INIT_DM_PORT_CONNECT_INFO(&portConnectInfoList.port_connect_info[count]); |
| 120 |
portConnectInfoList.port_connect_info[count].unFlags = DMFL_TRANSCODE_ON; |
portConnectInfoList.port_connect_info[count].unFlags = DMFL_TRANSCODE_ON; |
| 121 |
portConnectInfoList.port_connect_info[count].port_info_tx = getVideoTxPortInfo(); |
portConnectInfoList.port_connect_info[count].port_info_tx = getVideoTxPortInfo(); |
| 122 |
portConnectInfoList.port_connect_info[count].port_info_rx = ((IpmDevice*)other)->getVideoRxPortInfo(); //XXX |
portConnectInfoList.port_connect_info[count].port_info_rx = other->getVideoRxPortInfo(); |
| 123 |
count++; |
count++; |
| 124 |
|
|
| 125 |
portConnectInfoList.unCount = count;; |
portConnectInfoList.unCount = count;; |
| 139 |
/* |
/* |
| 140 |
* Disconnect media. |
* Disconnect media. |
| 141 |
*/ |
*/ |
| 142 |
bool MmDevice::unListen() |
bool MmDevice::disconnect() |
| 143 |
{ |
{ |
| 144 |
LOGDEBUG("MmDevice::unListen() device: " << devName_); |
LOGDEBUG("MmDevice::disconnect() device: " << devName_); |
| 145 |
|
|
| 146 |
if ( listening_ ) |
if ( listening_ ) |
| 147 |
{ |
{ |
| 151 |
|
|
| 152 |
INIT_DM_PORT_CONNECT_INFO(&portConnectInfoList.port_connect_info[count]); |
INIT_DM_PORT_CONNECT_INFO(&portConnectInfoList.port_connect_info[count]); |
| 153 |
portConnectInfoList.port_connect_info[count].port_info_tx = getAudioTxPortInfo(); |
portConnectInfoList.port_connect_info[count].port_info_tx = getAudioTxPortInfo(); |
| 154 |
portConnectInfoList.port_connect_info[count].port_info_rx = ((IpmDevice*)listening_)->getAudioRxPortInfo(); //XXX |
portConnectInfoList.port_connect_info[count].port_info_rx = listening_->getAudioRxPortInfo(); |
| 155 |
count++; |
count++; |
| 156 |
|
|
| 157 |
INIT_DM_PORT_CONNECT_INFO(&portConnectInfoList.port_connect_info[count]); |
INIT_DM_PORT_CONNECT_INFO(&portConnectInfoList.port_connect_info[count]); |
| 158 |
portConnectInfoList.port_connect_info[count].port_info_tx = getVideoTxPortInfo(); |
portConnectInfoList.port_connect_info[count].port_info_tx = getVideoTxPortInfo(); |
| 159 |
portConnectInfoList.port_connect_info[count].port_info_rx = ((IpmDevice*)listening_)->getVideoRxPortInfo(); //XXX |
portConnectInfoList.port_connect_info[count].port_info_rx = listening_->getVideoRxPortInfo(); |
| 160 |
count++; |
count++; |
| 161 |
|
|
| 162 |
portConnectInfoList.unCount = count; |
portConnectInfoList.unCount = count; |