Changeset 2
- Timestamp:
- 05/19/07 22:37:35
(1 year ago)
- Author:
- sip
- Message:
It compiles!
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1 |
r2 |
|
| 22 | 22 | int StartSendingVideo(int id,char *sendVideoIp,int sendVideoPort); |
|---|
| 23 | 23 | int StopSendingVideo(int id); |
|---|
| 24 | | int StartReceivingVideo(int id,int recVideoPort); |
|---|
| | 24 | int StartReceivingVideo(int id); |
|---|
| 25 | 25 | int StopReceivingVideo(int id); |
|---|
| 26 | 26 | int IsSendingVideo(int id); |
|---|
| … | … | |
| 31 | 31 | int StartSendingAudio(int id,char *sendAudioIp,int sendAudioPort); |
|---|
| 32 | 32 | int StopSendingAudio(int id); |
|---|
| 33 | | int StartReceivingAudio(int id,int recAudioPort); |
|---|
| | 33 | int StartReceivingAudio(int id); |
|---|
| 34 | 34 | int StopReceivingAudio(int id); |
|---|
| 35 | 35 | int IsSendingAudio(int id); |
|---|
| r1 |
r2 |
|
| 243 | 243 | * StartReceivingVideo |
|---|
| 244 | 244 | *************************/ |
|---|
| 245 | | int MultiConf::StartReceivingVideo(int id,int recVideoPort) |
|---|
| 246 | | { |
|---|
| 247 | | Log("-StartReceivingVideo [%d,%d]\n",id,recVideoPort); |
|---|
| 248 | | |
|---|
| 249 | | //El iterator |
|---|
| 250 | | LstParticipants::iterator it = lstParticipants.find(id); |
|---|
| 251 | | |
|---|
| 252 | | //Si no esta |
|---|
| 253 | | if (it == lstParticipants.end()) |
|---|
| 254 | | return 0; |
|---|
| 255 | | |
|---|
| 256 | | //LO obtenemos |
|---|
| 257 | | Participant *part = (*it).second; |
|---|
| 258 | | |
|---|
| 259 | | //Terminamos el audio y el video |
|---|
| 260 | | return part->video.StartReceiving(recVideoPort); |
|---|
| | 245 | int MultiConf::StartReceivingVideo(int id) |
|---|
| | 246 | { |
|---|
| | 247 | Log("-StartReceivingVideo [%d]\n",id); |
|---|
| | 248 | |
|---|
| | 249 | //El iterator |
|---|
| | 250 | LstParticipants::iterator it = lstParticipants.find(id); |
|---|
| | 251 | |
|---|
| | 252 | //Si no esta |
|---|
| | 253 | if (it == lstParticipants.end()) |
|---|
| | 254 | return 0; |
|---|
| | 255 | |
|---|
| | 256 | //LO obtenemos |
|---|
| | 257 | Participant *part = (*it).second; |
|---|
| | 258 | |
|---|
| | 259 | //Terminamos el audio y el video |
|---|
| | 260 | return part->video.StartReceiving(); |
|---|
| 261 | 261 | } |
|---|
| 262 | 262 | |
|---|
| … | … | |
| 398 | 398 | * StartReceivingAudio |
|---|
| 399 | 399 | *************************/ |
|---|
| 400 | | int MultiConf::StartReceivingAudio(int id,int recAudioPort) |
|---|
| | 400 | int MultiConf::StartReceivingAudio(int id) |
|---|
| 401 | 401 | { |
|---|
| 402 | 402 | Log("-StartReceivingAudio [%d]\n",id); |
|---|
| … | … | |
| 413 | 413 | |
|---|
| 414 | 414 | //Terminamos el audio y el video |
|---|
| 415 | | return part->audio.StartReceiving(recAudioPort); |
|---|
| | 415 | return part->audio.StartReceiving(); |
|---|
| 416 | 416 | } |
|---|
| 417 | 417 | |
|---|
| r1 |
r2 |
|
| 1 | 1 | #include "xmlrpcmcu.h" |
|---|
| 2 | 2 | #include "mcu.h" |
|---|
| 3 | | |
|---|
| 4 | | int port=20000; |
|---|
| 5 | | |
|---|
| 6 | 3 | |
|---|
| 7 | 4 | McuCmd mcuCmdList[] = |
|---|
| … | … | |
| 292 | 289 | int confId; |
|---|
| 293 | 290 | int partId; |
|---|
| 294 | | int recVideoPort = port;port+=2; |
|---|
| 295 | | xmlrpc_parse_value(env, param_array, "(ii)", &confId,&partId); |
|---|
| 296 | | |
|---|
| 297 | | //Comprobamos si ha habido error |
|---|
| 298 | | if(env->fault_occurred) |
|---|
| 299 | | return 0; |
|---|
| 300 | | |
|---|
| 301 | | //Obtenemos la referencia |
|---|
| 302 | | if(!mcu->GetConferenceRef(confId,&conf)) |
|---|
| 303 | | return xmlerror(env,"La conferencia no existe\n"); |
|---|
| 304 | | |
|---|
| 305 | | //La borramos |
|---|
| 306 | | int res = conf->StartReceivingVideo(partId,recVideoPort); |
|---|
| 307 | | |
|---|
| 308 | | //Liberamos la referencia |
|---|
| 309 | | mcu->ReleaseConferenceRef(confId); |
|---|
| 310 | | |
|---|
| 311 | | //Salimos |
|---|
| 312 | | if(!res) |
|---|
| | 291 | xmlrpc_parse_value(env, param_array, "(ii)", &confId,&partId); |
|---|
| | 292 | |
|---|
| | 293 | //Comprobamos si ha habido error |
|---|
| | 294 | if(env->fault_occurred) |
|---|
| | 295 | return 0; |
|---|
| | 296 | |
|---|
| | 297 | //Obtenemos la referencia |
|---|
| | 298 | if(!mcu->GetConferenceRef(confId,&conf)) |
|---|
| | 299 | return xmlerror(env,"La conferencia no existe\n"); |
|---|
| | 300 | |
|---|
| | 301 | //La borramos |
|---|
| | 302 | int recVideoPort = conf->StartReceivingVideo(partId); |
|---|
| | 303 | |
|---|
| | 304 | //Liberamos la referencia |
|---|
| | 305 | mcu->ReleaseConferenceRef(confId); |
|---|
| | 306 | |
|---|
| | 307 | //Salimos |
|---|
| | 308 | if(!recVideoPort) |
|---|
| 313 | 309 | return xmlerror(env,"No se ha podido terminar la conferencia\n"); |
|---|
| 314 | 310 | |
|---|
| … | … | |
| 514 | 510 | int confId; |
|---|
| 515 | 511 | int partId; |
|---|
| 516 | | int recAudioPort=port;port+=2; |
|---|
| 517 | | xmlrpc_parse_value(env, param_array, "(ii)", &confId,&partId); |
|---|
| 518 | | |
|---|
| 519 | | //Comprobamos si ha habido error |
|---|
| 520 | | if(env->fault_occurred) |
|---|
| 521 | | return 0; |
|---|
| 522 | | |
|---|
| 523 | | //Obtenemos la referencia |
|---|
| 524 | | if(!mcu->GetConferenceRef(confId,&conf)) |
|---|
| 525 | | return xmlerror(env,"La conferencia no existe\n"); |
|---|
| 526 | | |
|---|
| 527 | | //La borramos |
|---|
| 528 | | int res = conf->StartReceivingAudio(partId,recAudioPort); |
|---|
| 529 | | |
|---|
| 530 | | //Liberamos la referencia |
|---|
| 531 | | mcu->ReleaseConferenceRef(confId); |
|---|
| 532 | | |
|---|
| 533 | | //Salimos |
|---|
| 534 | | if(!res) |
|---|
| | 512 | xmlrpc_parse_value(env, param_array, "(ii)", &confId,&partId); |
|---|
| | 513 | |
|---|
| | 514 | //Comprobamos si ha habido error |
|---|
| | 515 | if(env->fault_occurred) |
|---|
| | 516 | return 0; |
|---|
| | 517 | |
|---|
| | 518 | //Obtenemos la referencia |
|---|
| | 519 | if(!mcu->GetConferenceRef(confId,&conf)) |
|---|
| | 520 | return xmlerror(env,"La conferencia no existe\n"); |
|---|
| | 521 | |
|---|
| | 522 | //La borramos |
|---|
| | 523 | int recAudioPort = conf->StartReceivingAudio(partId); |
|---|
| | 524 | |
|---|
| | 525 | //Liberamos la referencia |
|---|
| | 526 | mcu->ReleaseConferenceRef(confId); |
|---|
| | 527 | |
|---|
| | 528 | //Salimos |
|---|
| | 529 | if(!recAudioPort) |
|---|
| 535 | 530 | return xmlerror(env,"No se ha podido terminar la conferencia\n"); |
|---|
| 536 | 531 | |
|---|
| 537 | 532 | //Devolvemos el resultado |
|---|
| 538 | | return xmlok(env,xmlrpc_build_value(env,"(i)",res,recAudioPort)); |
|---|
| | 533 | return xmlok(env,xmlrpc_build_value(env,"(i)",recAudioPort,recAudioPort)); |
|---|
| 539 | 534 | } |
|---|
| 540 | 535 | |
|---|
Download in other formats:
|
|