Changeset 177:db43877d8d4c in mediastreamer2
- Timestamp:
- Nov 25, 2008 9:44:38 PM (4 years ago)
- Branch:
- default
- Location:
- linphone
- Files:
-
- 5 edited
-
coreapi/linphonecore.c (modified) (2 diffs)
-
coreapi/linphonecore.h (modified) (2 diffs)
-
mediastreamer2/include/mediastreamer2/mediastream.h (modified) (2 diffs)
-
mediastreamer2/src/audiostream.c (modified) (4 diffs)
-
mediastreamer2/src/msv4l2.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
linphone/coreapi/linphonecore.c
r173 r177 1351 1351 lc->videostream=NULL; 1352 1352 #endif 1353 } 1354 1355 static void linphone_core_dtmf_received(RtpSession* s, int dtmf, void* user_data){ 1356 LinphoneCore* lc = (LinphoneCore*)user_data; 1357 if (lc->vtable.dtmf_received != NULL) 1358 lc->vtable.dtmf_received(lc, dtmf); 1353 1359 } 1354 1360 … … 1397 1403 lc->rec_file); 1398 1404 } 1405 if (lc->vtable.dtmf_received!=NULL){ 1406 /* replace by our default action*/ 1407 audio_stream_play_received_dtmfs(lc->audiostream,FALSE); 1408 rtp_session_signal_connect(lc->audiostream->session,"telephone-event",(RtpCallback)linphone_core_dtmf_received,(unsigned long)lc); 1409 } 1399 1410 audio_stream_set_rtcp_information(lc->audiostream, cname, tool); 1400 1411 } -
linphone/coreapi/linphonecore.h
r173 r177 405 405 typedef void (*TextMessageReceived)(struct _LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message); 406 406 typedef void (*GeneralStateChange)(struct _LinphoneCore *lc, LinphoneGeneralState *gstate); 407 typedef void (*DtmfReceived)(struct _LinphoneCore* lc, int dtmf); 407 408 408 409 typedef struct _LinphoneVTable … … 426 427 TextMessageReceived text_received; 427 428 GeneralStateChange general_state; 429 DtmfReceived dtmf_received; 428 430 } LinphoneCoreVTable; 429 431 -
linphone/mediastreamer2/include/mediastreamer2/mediastream.h
r117 r177 44 44 unsigned int last_packet_count; 45 45 time_t last_packet_time; 46 bool_t play_dtmfs; 46 47 }; 47 48 … … 78 79 79 80 void audio_stream_set_rtcp_information(AudioStream *st, const char *cname, const char *tool); 81 82 void audio_stream_play_received_dtmfs(AudioStream *st, bool_t yesno); 80 83 81 84 /* those two function do the same as audio_stream_start() but in two steps -
linphone/mediastreamer2/src/audiostream.c
r157 r177 63 63 static void on_dtmf_received(RtpSession *s, int dtmf, void * user_data) 64 64 { 65 MSFilter *dtmfgen=(MSFilter*)user_data;65 AudioStream *stream=(AudioStream*)user_data; 66 66 if (dtmf>15){ 67 67 ms_warning("Unsupported telephone-event type."); … … 69 69 } 70 70 ms_message("Receiving dtmf %c.",dtmf_tab[dtmf]); 71 if ( dtmfgen!=NULL){72 ms_filter_call_method( dtmfgen,MS_DTMF_GEN_PUT,&dtmf_tab[dtmf]);71 if (stream->dtmfgen!=NULL && stream->play_dtmfs){ 72 ms_filter_call_method(stream->dtmfgen,MS_DTMF_GEN_PUT,&dtmf_tab[dtmf]); 73 73 } 74 74 } … … 210 210 211 211 stream->dtmfgen=ms_filter_new(MS_DTMF_GEN_ID); 212 rtp_session_signal_connect(rtps,"telephone-event",(RtpCallback)on_dtmf_received,(unsigned long)stream ->dtmfgen);212 rtp_session_signal_connect(rtps,"telephone-event",(RtpCallback)on_dtmf_received,(unsigned long)stream); 213 213 rtp_session_signal_connect(rtps,"payload_type_changed",(RtpCallback)payload_type_changed,(unsigned long)stream); 214 214 … … 357 357 stream->session=create_duplex_rtpsession(locport,ipv6); 358 358 stream->rtpsend=ms_filter_new(MS_RTP_SEND_ID); 359 stream->play_dtmfs=TRUE; 359 360 return stream; 361 } 362 363 void audio_stream_play_received_dtmfs(AudioStream *st, bool_t yesno){ 364 st->play_dtmfs=yesno; 360 365 } 361 366 -
linphone/mediastreamer2/src/msv4l2.c
r163 r177 18 18 */ 19 19 20 #ifdef HAVE_CONFIG_H 20 21 #include "mediastreamer-config.h" 22 #endif 21 23 22 24 #ifdef HAVE_LINUX_VIDEODEV2_H
Note: See TracChangeset
for help on using the changeset viewer.
