Changeset 186:7dbceed6df30 in verona
- Timestamp:
- May 12, 2011 4:58:07 PM (2 years ago)
- Branch:
- default
- Files:
-
- 3 edited
-
.hgsubstate (modified) (1 diff)
-
phapi/phms_audiostream.c (modified) (22 diffs)
-
phapi/phms_videostream.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r185 r186 1 1 a1bd05cf1becfa567d269e68ab312ed4154d4ab2 libs/hlibpp 2 2 3c961ba9aba9bb9031527dc9037e0132354698e8 libs/miniini 3 391f0d359a4586f08cf1af3c18ab3c84928d6f4cmediastreamer23 929207d6eeaee115a3fc5a861f9c97a2787250d1 mediastreamer2 -
phapi/phms_audiostream.c
r177 r186 61 61 #include "phms_audiostream.h" 62 62 63 void rtp_session_rtcp_parse(RtpSession *session, mblk_t *mp);64 65 66 63 #ifndef USE_PHMS_AUDIOSTREAM 67 64 int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char *remip,int remport, … … 85 82 const char* JITTER_BUFFER_ENV = "PH_JITTER_BUFFER_MS"; 86 83 87 void audio_stream_change_decoder(AudioStream *stream, int payload);84 void rtp_session_rtcp_parse(RtpSession *session, mblk_t *mp); 88 85 89 86 … … 107 104 108 105 /* this code is not part of the library itself, it is part of the mediastream program */ 109 void audio_stream_free(AudioStream *stream);110 106 void phms_audio_stream_free(AudioStream *stream) 111 107 { … … 135 131 if (stream->volrecv!=NULL) ms_filter_destroy(stream->volrecv); 136 132 if (stream->soundread!=NULL) ms_filter_destroy(stream->soundread); 137 if (stream->dtmfgen2!=NULL) ms_filter_destroy(stream->dtmfgen2);133 //if (stream->dtmfgen2!=NULL) ms_filter_destroy(stream->dtmfgen2); 138 134 if (stream->soundwrite!=NULL) ms_filter_destroy(stream->soundwrite); 139 135 if (stream->encoder!=NULL) ms_filter_destroy(stream->encoder); … … 334 330 FILTER_LINK(stream->volrecv,0,stream->soundwrite,0); 335 331 #endif 336 FILTER_LINK(stream->ec,1,stream->dtmfgen2,0);337 FILTER_LINK(stream->dtmfgen2, 0,stream->encoder,0);332 //FILTER_LINK(stream->ec,1,stream->dtmfgen2,0); 333 //FILTER_LINK(stream->dtmfgen2, 0,stream->encoder,0); 338 334 FILTER_LINK(stream->dtmfgen,0,stream->ec,0); 339 335 … … 348 344 #else 349 345 FILTER_LINK(stream->soundread,0,stream->volsend,0); 350 FILTER_LINK(stream->volsend,0,stream->dtmfgen2,0);346 // FILTER_LINK(stream->volsend,0,stream->dtmfgen2,0); 351 347 FILTER_LINK(stream->dtmfgen,0,stream->volrecv,0); 352 348 FILTER_LINK(stream->volrecv,0,stream->soundwrite,0); 353 349 #endif 354 FILTER_LINK(stream->dtmfgen2,0,stream->encoder,0);350 // FILTER_LINK(stream->dtmfgen2,0,stream->encoder,0); 355 351 } 356 352 FILTER_LINK(stream->encoder,0,stream->rtpsend,0); … … 377 373 FILTER_UNLINK(stream->volrecv,0,stream->soundwrite,0); 378 374 #endif 379 FILTER_UNLINK(stream->ec,1,stream->dtmfgen2,0);380 FILTER_UNLINK(stream->dtmfgen2, 0,stream->encoder,0);375 // FILTER_UNLINK(stream->ec,1,stream->dtmfgen2,0); 376 // FILTER_UNLINK(stream->dtmfgen2, 0,stream->encoder,0); 381 377 FILTER_UNLINK(stream->dtmfgen,0,stream->ec,0); 382 378 }else{ … … 390 386 #else 391 387 FILTER_UNLINK(stream->soundread,0,stream->volsend,0); 392 FILTER_UNLINK(stream->volsend,0,stream->dtmfgen2,0);388 // FILTER_UNLINK(stream->volsend,0,stream->dtmfgen2,0); 393 389 FILTER_UNLINK(stream->dtmfgen,0,stream->volrecv,0); 394 390 FILTER_UNLINK(stream->volrecv,0,stream->soundwrite,0); 395 391 #endif 396 FILTER_UNLINK(stream->dtmfgen2,0,stream->encoder,0);392 // FILTER_UNLINK(stream->dtmfgen2,0,stream->encoder,0); 397 393 } 398 394 … … 477 473 if (outfile!=NULL) audio_stream_record(stream,outfile); 478 474 } 479 stream->dtmfgen2=ms_filter_new(MS_DTMF_GEN_ID);475 // stream->dtmfgen2=ms_filter_new(MS_DTMF_GEN_ID); 480 476 // ms_filter_call_method(stream->dtmfgen2, MS_FILTER_SET_DTMF_DURATION, &dtmf_dur); 481 477 … … 540 536 ms_filter_call_method(stream->decoder,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate); 541 537 ms_filter_call_method(stream->dtmfgen,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate); 542 ms_filter_call_method(stream->dtmfgen2,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate);538 // ms_filter_call_method(stream->dtmfgen2,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate); 543 539 544 540 if (pt->send_fmtp!=NULL) ms_filter_call_method(stream->encoder,MS_FILTER_ADD_FMTP, (void*)pt->send_fmtp); … … 709 705 FILTER_UNLINK(stream->volrecv,0,stream->soundwrite,0); 710 706 #endif 711 FILTER_UNLINK(stream->ec,1,stream->dtmfgen2,0);712 FILTER_UNLINK(stream->dtmfgen2, 0,stream->encoder,0);707 // FILTER_UNLINK(stream->ec,1,stream->dtmfgen2,0); 708 // FILTER_UNLINK(stream->dtmfgen2, 0,stream->encoder,0); 713 709 FILTER_UNLINK(stream->dtmfgen,0,stream->ec,0); 714 710 }else{ … … 722 718 #else 723 719 FILTER_UNLINK(stream->soundread,0,stream->volsend,0); 724 FILTER_UNLINK(stream->volsend,0,stream->dtmfgen2,0);720 // FILTER_UNLINK(stream->volsend,0,stream->dtmfgen2,0); 725 721 FILTER_UNLINK(stream->dtmfgen,0,stream->volrecv,0); 726 722 FILTER_UNLINK(stream->volrecv,0,stream->soundwrite,0); 727 723 #endif 728 FILTER_UNLINK(stream->dtmfgen2,0,stream->encoder,0);724 // FILTER_UNLINK(stream->dtmfgen2,0,stream->encoder,0); 729 725 } 730 726 … … 743 739 if (stream->decoder!=NULL) ms_filter_destroy(stream->decoder); 744 740 if (stream->dtmfgen!=NULL) ms_filter_destroy(stream->dtmfgen); 745 if (stream->dtmfgen2!=NULL) ms_filter_destroy(stream->dtmfgen2);741 // if (stream->dtmfgen2!=NULL) ms_filter_destroy(stream->dtmfgen2); 746 742 if (stream->ec!=NULL) ms_filter_destroy(stream->ec); 747 743 if (stream->ticker!=NULL) ms_ticker_destroy(stream->ticker); … … 760 756 if (!stream) 761 757 return -1; 762 if (!mode || mode > DTMF_BOTH) 763 { 764 mode = DTMF_BOTH; 765 } 766 // stream->sent_dtmfs=mode; 758 767 759 return(audio_stream_send_dtmf(stream, dtmf)); 768 760 } … … 886 878 #endif 887 879 FILTER_LINK(pas->dtmfgen,0, pas->ec,0); 888 FILTER_LINK(pas->ec,1, pas->dtmfgen2,0);889 FILTER_LINK(pas->dtmfgen2, 0, pas->encoder, 0);880 // FILTER_LINK(pas->ec,1, pas->dtmfgen2,0); 881 // FILTER_LINK(pas->dtmfgen2, 0, pas->encoder, 0); 890 882 } 891 883 else … … 897 889 FILTER_LINK(pas->upsample,0, pas->soundwrite,0); 898 890 #else 899 FILTER_LINK(pas->soundread, 0, pas->dtmfgen2, 0);891 // FILTER_LINK(pas->soundread, 0, pas->dtmfgen2, 0); 900 892 FILTER_LINK(pas->dtmfgen,0, pas->soundwrite,0); 901 893 #endif 902 FILTER_LINK(pas->dtmfgen2, 0, pas->encoder,0);894 // FILTER_LINK(pas->dtmfgen2, 0, pas->encoder,0); 903 895 } 904 896 if(flags & PH_MSTREAM_FLAG_SUSPENDED) … … 925 917 #endif 926 918 FILTER_UNLINK(pas->dtmfgen,0, pas->ec,0); 927 FILTER_UNLINK(pas->ec,1, pas->dtmfgen2,0);928 FILTER_UNLINK(pas->dtmfgen2, 0, pas->encoder, 0);919 // FILTER_UNLINK(pas->ec,1, pas->dtmfgen2,0); 920 // FILTER_UNLINK(pas->dtmfgen2, 0, pas->encoder, 0); 929 921 } 930 922 else … … 936 928 FILTER_UNLINK(pas->upsample,0, pas->soundwrite,0); 937 929 #else 938 FILTER_UNLINK(pas->soundread, 0, pas->dtmfgen2, 0);930 // FILTER_UNLINK(pas->soundread, 0, pas->dtmfgen2, 0); 939 931 FILTER_UNLINK(pas->dtmfgen,0, pas->soundwrite,0); 940 932 #endif 941 FILTER_UNLINK(pas->dtmfgen2, 0, pas->encoder,0);933 // FILTER_UNLINK(pas->dtmfgen2, 0, pas->encoder,0); 942 934 } 943 935 } … … 1015 1007 #endif 1016 1008 FILTER_LINK(pcs->conf, 0, pcs->ec, 0); 1017 FILTER_LINK(pcs->ec, 1, pas1->dtmfgen2, 0);1018 FILTER_LINK(pas1->dtmfgen2, 0, pcs->conf, 0);1009 // FILTER_LINK(pcs->ec, 1, pas1->dtmfgen2, 0); 1010 // FILTER_LINK(pas1->dtmfgen2, 0, pcs->conf, 0); 1019 1011 } 1020 1012 else … … 1026 1018 FILTER_LINK(pas1->upsample, 0, pas1->soundwrite, 0); 1027 1019 #else 1028 FILTER_LINK(pas1->soundread, 0, pas1->dtmfgen2, 0);1020 // FILTER_LINK(pas1->soundread, 0, pas1->dtmfgen2, 0); 1029 1021 FILTER_LINK(pcs->conf, 0, pas1->soundwrite, 0); 1030 1022 #endif 1031 FILTER_LINK(pas1->dtmfgen2, 0, pcs->conf, 0);1023 // FILTER_LINK(pas1->dtmfgen2, 0, pcs->conf, 0); 1032 1024 } 1033 1025 … … 1109 1101 #endif 1110 1102 FILTER_UNLINK(pcs->conf, 0, pcs->ec, 0); 1111 FILTER_UNLINK(pcs->ec, 1, pas1->dtmfgen2, 0);1112 FILTER_UNLINK(pas1->dtmfgen2, 0,pcs->conf, 0);1103 // FILTER_UNLINK(pcs->ec, 1, pas1->dtmfgen2, 0); 1104 // FILTER_UNLINK(pas1->dtmfgen2, 0,pcs->conf, 0); 1113 1105 } 1114 1106 else … … 1120 1112 FILTER_UNLINK(pas1->upsample, 0, pas1->soundwrite, 0); 1121 1113 #else 1122 FILTER_UNLINK(pas1->soundread, 0, pas1->dtmfgen2, 1);1114 // FILTER_UNLINK(pas1->soundread, 0, pas1->dtmfgen2, 1); 1123 1115 FILTER_UNLINK(pcs->conf, 0, pas1->soundwrite, 0); 1124 1116 #endif 1125 FILTER_UNLINK(pas1->dtmfgen2, 0,pcs->conf, 0);1117 // FILTER_UNLINK(pas1->dtmfgen2, 0,pcs->conf, 0); 1126 1118 } 1127 1119 -
phapi/phms_videostream.c
r179 r186 51 51 #define USE_NEW_CAPTURE 1 52 52 53 void video_stream_change_decoder(VideoStream *stream, int payload);54 55 53 static void get_default_display_vsize(MSVideoSize *vsize) 56 54 { … … 326 324 tmp=1; 327 325 ms_filter_call_method(stream->output,MS_FILTER_SET_VIDEO_SIZE,&disp_size); 328 ms_filter_call_method(stream->output,MS_VIDEO_OUT_AUTO_FIT,&tmp);326 //ms_filter_call_method(stream->output,MS_VIDEO_OUT_AUTO_FIT,&tmp); 329 327 ms_filter_call_method(stream->output,MS_FILTER_SET_PIX_FMT,&format); 330 328 … … 610 608 tmp=1; 611 609 ms_filter_call_method(stream->output,MS_FILTER_SET_VIDEO_SIZE,&disp_size); 612 ms_filter_call_method(stream->output,MS_VIDEO_OUT_AUTO_FIT,&tmp);610 //ms_filter_call_method(stream->output,MS_VIDEO_OUT_AUTO_FIT,&tmp); 613 611 ms_filter_call_method(stream->output,MS_FILTER_SET_PIX_FMT,&format); 614 612 … … 1056 1054 phStream * phms_video_start_preview(const char *deviceid, VideoStreamRenderCallback cb) 1057 1055 { 1058 MSVideoSize size;1059 1056 phStream * phstream = (phStream *)osip_malloc(sizeof(phStream)); 1060 1057 MSWebCam *cam = ms_web_cam_manager_get_cam(ms_web_cam_manager_get(),deviceid); 1058 VideoStream * videoStream; 1059 1061 1060 if(cam == NULL) 1062 1061 return NULL; 1063 1064 get_default_display_vsize(&size); 1065 1066 phstream->stream = video_preview_start(cam,size); 1067 video_stream_set_render_callback(phstream->stream,cb,NULL); 1068 1062 1063 videoStream = video_preview_new(); 1064 phstream->stream = videoStream; 1065 video_stream_use_preview_video_window(videoStream,0); 1066 video_stream_set_render_callback(videoStream,cb,NULL); 1067 video_preview_start(videoStream,cam); 1068 1069 1069 return phstream; 1070 1070 }
Note: See TracChangeset
for help on using the changeset viewer.
