Changeset 4
- Timestamp:
- 06/06/07 11:02:54
(1 year ago)
- Author:
- sip
- Message:
--
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2 |
r4 |
|
| 6 | 6 | LOG = yes |
|---|
| 7 | 7 | DEBUG = yes |
|---|
| 8 | | SRCDIR = /usr/mcu |
|---|
| | 8 | SRCDIR = /root/mcu |
|---|
| r2 |
r4 |
|
| 53 | 53 | VPATH += %.cpp $(SRCDIR)/media/src/$(H263DIR) |
|---|
| 54 | 54 | |
|---|
| 55 | | INCLUDE+= -I$(SRCDIR)/media/include/ -I$(SRCDIR)/xmlrpc/include |
|---|
| | 55 | INCLUDE+= -I$(SRCDIR)/media/include/ -I$(SRCDIR)/xmlrpc/include -I$(SRCDIR)/xmlrpc/lib/abyss/src |
|---|
| 56 | 56 | LDFLAGS+= -lavcodec -lgsm -lpthread |
|---|
| 57 | 57 | LDXMLFLAGS+= -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_abyss -lxmlrpc_server -L$(SRCDIR)/xmlrpc/lib |
|---|
| 58 | 58 | LDFLAGS+= $(LDXMLFLAGS) |
|---|
| | 59 | |
|---|
| | 60 | #For abyss |
|---|
| | 61 | OPTS += -D_UNIX |
|---|
| 59 | 62 | |
|---|
| 60 | 63 | CFLAGS += $(INCLUDE) $(OPTS) |
|---|
| r1 |
r4 |
|
| 29 | 29 | AudioInput* GetInput(int id); |
|---|
| 30 | 30 | AudioOutput* GetOutput(int id); |
|---|
| 31 | | void AudioMixer::Process(void); |
|---|
| | 31 | void Process(void); |
|---|
| 32 | 32 | int End(); |
|---|
| 33 | 33 | |
|---|
| r2 |
r4 |
|
| 4 | 4 | #include "config.h" |
|---|
| 5 | 5 | |
|---|
| 6 | | #define PCMA 8 |
|---|
| 7 | | #define PCMU 0 |
|---|
| 8 | | #define GSM 3 |
|---|
| 9 | | #define H261 31 |
|---|
| 10 | | #define H263 34 |
|---|
| 11 | | #define MPEG4 35 |
|---|
| | 6 | #define PCMA 8 |
|---|
| | 7 | #define PCMU 0 |
|---|
| | 8 | #define GSM 3 |
|---|
| | 9 | #define H261 31 |
|---|
| | 10 | #define H263_1996 34 |
|---|
| | 11 | #define H263_1998 96 |
|---|
| | 12 | #define MPEG4 35 |
|---|
| 12 | 13 | |
|---|
| 13 | 14 | class AudioCodec |
|---|
| r1 |
r4 |
|
| 1 | 1 | #ifndef _XMLRPCMCUCLIENT_H_ |
|---|
| 2 | 2 | #define _XMLRPCMCUCLIENT_H_ |
|---|
| | 3 | |
|---|
| | 4 | #ifdef __cplusplus |
|---|
| | 5 | |
|---|
| 3 | 6 | #include "xmlrpcclient.h" |
|---|
| 4 | 7 | #include <string> |
|---|
| … | … | |
| 41 | 44 | XmlRpcClient rpc; |
|---|
| 42 | 45 | }; |
|---|
| | 46 | |
|---|
| | 47 | extern "C" |
|---|
| | 48 | { |
|---|
| | 49 | |
|---|
| | 50 | void * CreateMCUClient(char *url) |
|---|
| | 51 | { return new XmlRpcMcuClient(url); } |
|---|
| | 52 | void DestroyMCUClient(void *mcu) |
|---|
| | 53 | { delete (XmlRpcMcuClient*)mcu; } |
|---|
| | 54 | |
|---|
| | 55 | int CreateConference(void *mcu,char *name) |
|---|
| | 56 | { return ((XmlRpcMcuClient*)mcu)->CreateConference(name); } |
|---|
| | 57 | int CreateParticipant(void *mcu,int confId) |
|---|
| | 58 | { return ((XmlRpcMcuClient*)mcu)->CreateParticipant(confId); } |
|---|
| | 59 | |
|---|
| | 60 | //Video |
|---|
| | 61 | int SetVideoCodec(void *mcu,int confId,int partId,int codec,int mode,int fps,int bitrate) |
|---|
| | 62 | { return ((XmlRpcMcuClient*)mcu)->SetVideoCodec(confId,partId,codec,mode,fps,bitrate); } |
|---|
| | 63 | int StartSendingVideo(void *mcu,int confId,int partId,char *sendVideoIp,int sendVideoPort) |
|---|
| | 64 | { return ((XmlRpcMcuClient*)mcu)->StartSendingVideo(confId,partId,sendVideoIp,sendVideoPort); } |
|---|
| | 65 | int StopSendingVideo(void *mcu,int confId,int partId) |
|---|
| | 66 | { return ((XmlRpcMcuClient*)mcu)->StopSendingVideo(confId,partId); } |
|---|
| | 67 | int StartReceivingVideo(void *mcu,int confId,int partId,int *recVideoPort) |
|---|
| | 68 | { return ((XmlRpcMcuClient*)mcu)->StartReceivingVideo(confId,partId,recVideoPort); } |
|---|
| | 69 | int StopReceivingVideo(void *mcu,int confId,int partId) |
|---|
| | 70 | { return ((XmlRpcMcuClient*)mcu)->StopReceivingVideo(confId,partId); } |
|---|
| | 71 | int IsSendingVideo(void *mcu,int confId,int partId,int *isSending) |
|---|
| | 72 | { return ((XmlRpcMcuClient*)mcu)->IsSendingVideo(confId,partId,isSending); } |
|---|
| | 73 | int IsReceivingVideo(void *mcu,int confId,int partId,int *isReceiving) |
|---|
| | 74 | { return ((XmlRpcMcuClient*)mcu)->IsReceivingVideo(confId,partId,isReceiving); } |
|---|
| | 75 | |
|---|
| | 76 | //Audio |
|---|
| | 77 | int SetAudioCodec(void *mcu,int confId,int partId,int codec) |
|---|
| | 78 | { return ((XmlRpcMcuClient*)mcu)->SetAudioCodec(confId,partId,codec); } |
|---|
| | 79 | int StartSendingAudio(void *mcu,int confId,int partId,char *sendAudioIp,int sendAudioPort) |
|---|
| | 80 | { return ((XmlRpcMcuClient*)mcu)->StartSendingAudio(confId,partId,sendAudioIp,sendAudioPort); } |
|---|
| | 81 | int StopSendingAudio(void *mcu,int confId,int partId) |
|---|
| | 82 | { return ((XmlRpcMcuClient*)mcu)->StopSendingAudio(confId,partId); } |
|---|
| | 83 | int StartReceivingAudio(void *mcu,int confId,int partId,int *recAudioPort) |
|---|
| | 84 | { return ((XmlRpcMcuClient*)mcu)->StartReceivingAudio(confId,partId,recAudioPort); } |
|---|
| | 85 | int StopReceivingAudio(void *mcu,int confId,int partId) |
|---|
| | 86 | { return ((XmlRpcMcuClient*)mcu)->StopReceivingAudio(confId,partId); } |
|---|
| | 87 | int IsSendingAudio(void *mcu,int confId,int partId,int *isSending) |
|---|
| | 88 | { return ((XmlRpcMcuClient*)mcu)->IsSendingAudio(confId,partId,isSending); } |
|---|
| | 89 | int IsReceivingAudio(void *mcu,int confId,int partId,int *isReceiving) |
|---|
| | 90 | { return ((XmlRpcMcuClient*)mcu)->IsReceivingAudio(confId,partId,isReceiving); } |
|---|
| | 91 | |
|---|
| | 92 | int DeleteParticipant(void *mcu,int confId,int partId) |
|---|
| | 93 | { return ((XmlRpcMcuClient*)mcu)->DeleteParticipant(confId,partId); } |
|---|
| | 94 | int DeleteConference(void *mcu,int confId) |
|---|
| | 95 | { return ((XmlRpcMcuClient*)mcu)->DeleteConference(confId); } |
|---|
| | 96 | } |
|---|
| | 97 | #else |
|---|
| | 98 | |
|---|
| | 99 | void * CreateMCUClient(char *url); |
|---|
| | 100 | void DestroyMCUClient(void *mcu); |
|---|
| | 101 | |
|---|
| | 102 | int CreateConference(void *mcu,char *name); |
|---|
| | 103 | int CreateParticipant(void *mcu,int confId); |
|---|
| | 104 | |
|---|
| | 105 | //Video |
|---|
| | 106 | int SetVideoCodec(void *mcu,int confId,int partId,int codec,int mode,int fps,int bitrate); |
|---|
| | 107 | int StartSendingVideo(void *mcu,int confId,int partId,char *sendVideoIp,int sendVideoPort); |
|---|
| | 108 | int StopSendingVideo(void *mcu,int confId,int partId); |
|---|
| | 109 | int StartReceivingVideo(void *mcu,int confId,int partId,int *recVideoPort); |
|---|
| | 110 | int StopReceivingVideo(void *mcu,int confId,int partId); |
|---|
| | 111 | int IsSendingVideo(void *mcu,int confId,int partId,int *isSending); |
|---|
| | 112 | int IsReceivingVideo(void *mcu,int confId,int partId,int *isReceiving); |
|---|
| | 113 | |
|---|
| | 114 | //Audio |
|---|
| | 115 | int SetAudioCodec(void *mcu,int confId,int partId,int codec); |
|---|
| | 116 | int StartSendingAudio(void *mcu,int confId,int partId,char *sendAudioIp,int sendAudioPort); |
|---|
| | 117 | int StopSendingAudio(void *mcu,int confId,int partId); |
|---|
| | 118 | int StartReceivingAudio(void *mcu,int confId,int partId,int *recAudioPort); |
|---|
| | 119 | int StopReceivingAudio(void *mcu,int confId,int partId); |
|---|
| | 120 | int IsSendingAudio(void *mcu,int confId,int partId,int *isSending); |
|---|
| | 121 | int IsReceivingAudio(void *mcu,int confId,int partId,int *isReceiving); |
|---|
| | 122 | int DeleteParticipant(void *mcu,int confId,int partId); |
|---|
| | 123 | int DeleteConference(void *mcu,int confId); |
|---|
| | 124 | |
|---|
| | 125 | |
|---|
| | 126 | #endif //__cplusplus |
|---|
| | 127 | |
|---|
| 43 | 128 | #endif |
|---|
| 44 | 129 | |
|---|
| r1 |
r4 |
|
| 32 | 32 | int DispatchRequest(TSession * const r); |
|---|
| 33 | 33 | |
|---|
| 34 | | public: |
|---|
| | 34 | private: |
|---|
| 35 | 35 | typedef map<string,Handler *> LstHandlers; |
|---|
| | 36 | |
|---|
| 36 | 37 | TServer srv; |
|---|
| 37 | 38 | LstHandlers lstHandlers; |
|---|
| r1 |
r4 |
|
| 3 | 3 | #include "xmlrpcmcuclient.h" |
|---|
| 4 | 4 | |
|---|
| | 5 | #define PCMA 8 |
|---|
| | 6 | #define PCMU 0 |
|---|
| | 7 | #define GSM 3 |
|---|
| | 8 | #define H261 31 |
|---|
| | 9 | #define H263 96 |
|---|
| | 10 | #define MPEG4 35 |
|---|
| | 11 | |
|---|
| | 12 | #define CIF 0 |
|---|
| | 13 | #define QCIF 1 |
|---|
| | 14 | |
|---|
| 5 | 15 | int main() |
|---|
| 6 | 16 | { |
|---|
| 7 | | XmlRpcMcuClient mcu("http://localhost:8080/mcu"); |
|---|
| | 17 | XmlRpcMcuClient mcu("http://127.0.0.1:8080/mcu"); |
|---|
| 8 | 18 | |
|---|
| 9 | | mcu.CreateConference("Sergio"); |
|---|
| | 19 | int confId = mcu.CreateConference("Sergio"); |
|---|
| 10 | 20 | |
|---|
| | 21 | int partId = mcu.CreateParticipant(confId); |
|---|
| | 22 | |
|---|
| | 23 | mcu.SetVideoCodec(confId,partId,H263,CIF,300,5,4,8); |
|---|
| | 24 | |
|---|
| | 25 | mcu.SetAudioCodec(confId,partId,PCMU); |
|---|
| | 26 | |
|---|
| | 27 | mcu.StartSendingAudio(confId,partId,"192.168.195.1",1234); |
|---|
| | 28 | mcu.StartSendingVideo(confId,partId,"192.168.195.1",1236); |
|---|
| | 29 | int port; |
|---|
| | 30 | mcu.StartReceivingVideo(confId,partId,&port); |
|---|
| | 31 | printf("%d",port); |
|---|
| 11 | 32 | } |
|---|
| 12 | 33 | |
|---|
| r2 |
r4 |
|
| 36 | 36 | //Guardamos los valores por defecto |
|---|
| 37 | 37 | codec = NULL; |
|---|
| 38 | | type = H263; |
|---|
| | 38 | type = H263_1996; |
|---|
| 39 | 39 | bufLen = 0; |
|---|
| 40 | 40 | |
|---|
| r2 |
r4 |
|
| 20 | 20 | // Set default values |
|---|
| 21 | 21 | codec = NULL; |
|---|
| 22 | | type = H263; |
|---|
| | 22 | type = H263_1998; |
|---|
| 23 | 23 | qMin = qualityMin; |
|---|
| 24 | 24 | qMax = qualityMax; |
|---|
| … | … | |
| 28 | 28 | SetFrameRate(5,300); |
|---|
| 29 | 29 | |
|---|
| | 30 | //Inicializamos la libreria |
|---|
| | 31 | avcodec_init(); |
|---|
| | 32 | |
|---|
| | 33 | //Register all |
|---|
| | 34 | avcodec_register_all(); |
|---|
| | 35 | |
|---|
| 30 | 36 | // Get encoder |
|---|
| 31 | 37 | codec = avcodec_find_encoder(CODEC_ID_H263); |
|---|
| … | … | |
| 33 | 39 | // Check codec |
|---|
| 34 | 40 | if(!codec) |
|---|
| 35 | | Error("No codec found"); |
|---|
| | 41 | Error("No codec found\n"); |
|---|
| 36 | 42 | |
|---|
| 37 | 43 | //No estamos abiertos |
|---|
| … | … | |
| 209 | 215 | memcpy(out+2, bufEncode+bufIni, len-2); |
|---|
| 210 | 216 | //Set header |
|---|
| 211 | | out[0] = 0x04; |
|---|
| | 217 | out[0] = 0x00; |
|---|
| 212 | 218 | out[1] = 0x00; |
|---|
| 213 | 219 | //Increase pointer |
|---|
| … | … | |
| 235 | 241 | //Guardamos los valores por defecto |
|---|
| 236 | 242 | codec = NULL; |
|---|
| 237 | | type = H263; |
|---|
| | 243 | type = H263_1998; |
|---|
| 238 | 244 | bufLen = 0; |
|---|
| 239 | 245 | |
|---|
| … | … | |
| 318 | 324 | if (p) |
|---|
| 319 | 325 | { |
|---|
| 320 | | /* Decrease ini */ |
|---|
| 321 | | i -= 2; |
|---|
| 322 | | len += 2; |
|---|
| 323 | 326 | /* Append 0s */ |
|---|
| 324 | | buffer[0] = 0; |
|---|
| 325 | | buffer[1] = 0; |
|---|
| | 327 | buffer[bufLen] = 0; |
|---|
| | 328 | buffer[bufLen+1] = 0; |
|---|
| | 329 | /* Increase buffer */ |
|---|
| | 330 | bufLen += 2; |
|---|
| 326 | 331 | } |
|---|
| 327 | 332 | |
|---|
| … | … | |
| 339 | 344 | |
|---|
| 340 | 345 | //Decodificamos |
|---|
| 341 | | if (avcodec_decode_video(ctx,picture,&got_picture,buffer,bufLen)<0) |
|---|
| 342 | | return 0; |
|---|
| | 346 | avcodec_decode_video(ctx,picture,&got_picture,buffer,bufLen); |
|---|
| 343 | 347 | |
|---|
| 344 | 348 | //Y resetamos el buffer |
|---|
| r2 |
r4 |
|
| 122 | 122 | // Set default values |
|---|
| 123 | 123 | codec = NULL; |
|---|
| 124 | | type = H263; |
|---|
| | 124 | type = MPEG4; |
|---|
| 125 | 125 | qMin = qualityMin; |
|---|
| 126 | 126 | qMax = qualityMax; |
|---|
| r2 |
r4 |
|
| 84 | 84 | |
|---|
| 85 | 85 | //Ponemos el codec favorito |
|---|
| 86 | | part->video.SetVideoCodec(H263,CIF,300,5,4,8); |
|---|
| | 86 | part->video.SetVideoCodec(H263_1998,CIF,300,5,4,8); |
|---|
| 87 | 87 | part->audio.SetAudioCodec(GSM); |
|---|
| 88 | 88 | |
|---|
| r1 |
r4 |
|
| 152 | 152 | int PipeVideoInput::SetFrame(BYTE * buffer, int width, int height) |
|---|
| 153 | 153 | { |
|---|
| | 154 | Log("-SetFrame [%d]\n",capturing); |
|---|
| | 155 | |
|---|
| 154 | 156 | //Protegemos |
|---|
| 155 | 157 | pthread_mutex_lock(&newPicMutex); |
|---|
| r1 |
r4 |
|
| 59 | 59 | { |
|---|
| 60 | 60 | int id; |
|---|
| 61 | | int mosaicChanged;; |
|---|
| | 61 | int mosaicChanged = true; |
|---|
| 62 | 62 | VideoSource *video; |
|---|
| 63 | 63 | |
|---|
| … | … | |
| 66 | 66 | |
|---|
| 67 | 67 | Log(">MixVideo\n"); |
|---|
| 68 | | |
|---|
| | 68 | |
|---|
| 69 | 69 | //Mientras estemos mezclando |
|---|
| 70 | 70 | while(mixingVideo) |
|---|
| 71 | 71 | { |
|---|
| | 72 | //Protegemos la lista |
|---|
| | 73 | lstVideosUse.IncUse(); |
|---|
| | 74 | |
|---|
| | 75 | //Si no ha cambiado el frame volvemos al principio |
|---|
| | 76 | if (mosaicChanged) |
|---|
| | 77 | { |
|---|
| | 78 | Log("-Updating\n"); |
|---|
| | 79 | |
|---|
| | 80 | //Nos recorremos los videos |
|---|
| | 81 | for (it=lstVideos.begin();it!=lstVideos.end();it++) |
|---|
| | 82 | { |
|---|
| | 83 | //Obtenemos el indice y el video |
|---|
| | 84 | id = (*it).first; |
|---|
| | 85 | video = (*it).second; |
|---|
| | 86 | |
|---|
| | 87 | //Colocamos el frame |
|---|
| | 88 | video->input->SetFrame(mosaic,mosaicTotalWidth,mosaicTotalHeight); |
|---|
| | 89 | } |
|---|
| | 90 | } |
|---|
| | 91 | |
|---|
| | 92 | //Reset |
|---|
| | 93 | mosaicChanged = false; |
|---|
| | 94 | |
|---|
| | 95 | //Desprotege la lista |
|---|
| | 96 | lstVideosUse.DecUse(); |
|---|
| | 97 | |
|---|
| 72 | 98 | //Esperamos que nos seƱalicen |
|---|
| 73 | 99 | pthread_cond_wait(&mixVideoCond,&mixVideoMutex); |
|---|
| 74 | | |
|---|
| 75 | | //Iniciamos |
|---|
| 76 | | mosaicChanged = false; |
|---|
| 77 | 100 | |
|---|
| 78 | 101 | //Protegemos la lista |
|---|
| … | … | |
| 99 | 122 | //Desbloqueamos |
|---|
| 100 | 123 | pthread_mutex_unlock(&mixVideoMutex); |
|---|
| 101 | | |
|---|
| 102 | | //Si no ha cambiado el frame volvemos al principio |
|---|
| 103 | | if (mosaicChanged) |
|---|
| 104 | | { |
|---|
| 105 | | //Nos recorremos los videos |
|---|
| 106 | | for (it=lstVideos.begin();it!=lstVideos.end();it++) |
|---|
| 107 | | { |
|---|
| 108 | | //Obtenemos el indice y el video |
|---|
| 109 | | id = (*it).first; |
|---|
| 110 | | video = (*it).second; |
|---|
| 111 | | |
|---|
| 112 | | //Colocamos el frame |
|---|
| 113 | | video->input->SetFrame(mosaic,mosaicTotalWidth,mosaicTotalHeight); |
|---|
| 114 | | } |
|---|
| 115 | | } |
|---|
| 116 | | |
|---|
| | 124 | |
|---|
| 117 | 125 | //Desprotege la lista |
|---|
| 118 | 126 | lstVideosUse.DecUse(); |
|---|
| r2 |
r4 |
|
| 58 | 58 | switch(codec) |
|---|
| 59 | 59 | { |
|---|
| 60 | | case H263: |
|---|
| | 60 | case H263_1998: |
|---|
| 61 | 61 | videoQuality=1; |
|---|
| 62 | 62 | videoFillLevel=6; |
|---|
| … | … | |
| 131 | 131 | switch(codec) |
|---|
| 132 | 132 | { |
|---|
| 133 | | case H263: |
|---|
| | 133 | case H263_1998: |
|---|
| 134 | 134 | return 1; |
|---|
| 135 | 135 | } |
|---|
| … | … | |
| 254 | 254 | Log("-StartReceiving Video [%d]\n",recVideoPort); |
|---|
| 255 | 255 | |
|---|
| 256 | | return 1; |
|---|
| | 256 | return recVideoPort; |
|---|
| 257 | 257 | } |
|---|
| 258 | 258 | |
|---|
| … | … | |
| 404 | 404 | gettimeofday(&lastCaptureTime,NULL); |
|---|
| 405 | 405 | |
|---|
| | 406 | //Started |
|---|
| | 407 | Log("-Sending video\n"); |
|---|
| | 408 | |
|---|
| 406 | 409 | //Mientras tengamos que capturar |
|---|
| 407 | 410 | while(sendingVideo) |
|---|
| … | … | |
| 409 | 412 | //Nos quedamos con el puntero antes de que lo cambien |
|---|
| 410 | 413 | pic=videoInput->GrabFrame(); |
|---|
| | 414 | Log("-PIC\n"); |
|---|
| 411 | 415 | |
|---|
| 412 | 416 | //Si es nulo |
|---|
| … | … | |
| 436 | 440 | bitRateControl=0; |
|---|
| 437 | 441 | } |
|---|
| | 442 | Log("-NEC\n"); |
|---|
| 438 | 443 | |
|---|
| 439 | 444 | //Procesamos el frame |
|---|
| 440 | 445 | videoEncoder->EncodeFrame(pic,videoInput->GetBufferSize()); |
|---|
| | 446 | Log("-ENC\n"); |
|---|
| 441 | 447 | |
|---|
| 442 | 448 | //Actualizamos el timepod e captura y codificacion del frame |
|---|
| … | … | |
| 710 | 716 | encoder = (VideoEncoder*) new Mpeg4Encoder(videoQuality,videoFillLevel); |
|---|
| 711 | 717 | break; |
|---|
| 712 | | case H263: |
|---|
| | 718 | case H263_1998: |
|---|
| 713 | 719 | encoder = (VideoEncoder*) new H263Encoder(videoQuality,videoFillLevel); |
|---|
| 714 | 720 | break; |
|---|
| … | … | |
| 733 | 739 | switch(type) |
|---|
| 734 | 740 | { |
|---|
| 735 | | case H263: |
|---|
| | 741 | case H263_1998: |
|---|
| 736 | 742 | videoDecoder = (VideoDecoder*) new H263Decoder(); |
|---|
| | 743 | break; |
|---|
| | 744 | case H263_1996: |
|---|
| | 745 | videoDecoder = (VideoDecoder*) new H263Decoder1996(); |
|---|
| 737 | 746 | break; |
|---|
| 738 | 747 | case MPEG4: |
|---|
| r1 |
r4 |
|
| 22 | 22 | |
|---|
| 23 | 23 | //Le pasamos como nombre un puntero a nosotros mismos |
|---|
| 24 | | sprintf(name,"%d",this); |
|---|
| | 24 | sprintf(name,"0x%x",this); |
|---|
| 25 | 25 | |
|---|
| 26 | 26 | //Creamos el servidor |
|---|
| … | … | |
| 53 | 53 | int XmlRpcServer::Run() |
|---|
| 54 | 54 | { |
|---|
| 55 | | Log(">Run [%d]\n",this); |
|---|
| | 55 | Log(">Run [0x%x]\n",this); |
|---|
| 56 | 56 | |
|---|
| 57 | 57 | //Vamos a buscar en orden inverso |
|---|
| … | … | |
| 96 | 96 | { |
|---|
| 97 | 97 | //Obtenemos el servidor |
|---|
| 98 | | XmlRpcServer *serv = (XmlRpcServer *)atoi(r->server->name); |
|---|
| | 98 | XmlRpcServer *serv; |
|---|
| | 99 | |
|---|
| | 100 | //Get pointer |
|---|
| | 101 | sscanf(r->server->name,"%x", &serv); |
|---|
| 99 | 102 | |
|---|
| 100 | 103 | //Procesamos la llamada |
|---|
| … | … | |
| 133 | 136 | /************************************** |
|---|
| 134 | 137 | * GetBody |
|---|
| 135 | | * Devuelve el body de una peticion |
|---|
| | 138 | Devuelve el body de una peticion |
|---|
| 136 | 139 | **************************************/ |
|---|
| 137 | 140 | int XmlRpcServer::GetBody(TSession *r,char *body,short bodyLen) |
|---|
Download in other formats:
|
|