OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include <string> | 31 #include <string> |
32 #include <vector> | 32 #include <vector> |
33 #include <map> | 33 #include <map> |
34 #include <set> | 34 #include <set> |
35 #include <utility> | 35 #include <utility> |
36 | 36 |
37 #include "talk/media/base/mediachannel.h" | 37 #include "talk/media/base/mediachannel.h" |
38 #include "talk/media/base/mediaengine.h" | 38 #include "talk/media/base/mediaengine.h" |
39 #include "talk/media/base/streamparams.h" | 39 #include "talk/media/base/streamparams.h" |
40 #include "talk/media/base/videocapturer.h" | 40 #include "talk/media/base/videocapturer.h" |
41 #include "webrtc/p2p/base/transportcontroller.h" | |
42 #include "webrtc/p2p/client/socketmonitor.h" | |
43 #include "talk/session/media/audiomonitor.h" | 41 #include "talk/session/media/audiomonitor.h" |
44 #include "talk/session/media/bundlefilter.h" | 42 #include "talk/session/media/bundlefilter.h" |
45 #include "talk/session/media/mediamonitor.h" | 43 #include "talk/session/media/mediamonitor.h" |
46 #include "talk/session/media/mediasession.h" | 44 #include "talk/session/media/mediasession.h" |
47 #include "talk/session/media/rtcpmuxfilter.h" | 45 #include "talk/session/media/rtcpmuxfilter.h" |
48 #include "talk/session/media/srtpfilter.h" | 46 #include "talk/session/media/srtpfilter.h" |
49 #include "webrtc/base/asyncudpsocket.h" | 47 #include "webrtc/base/asyncudpsocket.h" |
50 #include "webrtc/base/criticalsection.h" | 48 #include "webrtc/base/criticalsection.h" |
51 #include "webrtc/base/network.h" | 49 #include "webrtc/base/network.h" |
52 #include "webrtc/base/sigslot.h" | 50 #include "webrtc/base/sigslot.h" |
53 #include "webrtc/base/window.h" | 51 #include "webrtc/base/window.h" |
| 52 #include "webrtc/p2p/base/transportcontroller.h" |
| 53 #include "webrtc/p2p/client/socketmonitor.h" |
| 54 |
| 55 namespace webrtc { |
| 56 class AudioSinkInterface; |
| 57 } // namespace webrtc |
54 | 58 |
55 namespace cricket { | 59 namespace cricket { |
56 | 60 |
57 struct CryptoParams; | 61 struct CryptoParams; |
58 class MediaContentDescription; | 62 class MediaContentDescription; |
59 struct ViewRequest; | 63 struct ViewRequest; |
60 | 64 |
61 enum SinkType { | 65 enum SinkType { |
62 SINK_PRE_CRYPTO, // Sink packets before encryption or after decryption. | 66 SINK_PRE_CRYPTO, // Sink packets before encryption or after decryption. |
63 SINK_POST_CRYPTO // Sink packets after encryption or before decryption. | 67 SINK_POST_CRYPTO // Sink packets after encryption or before decryption. |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 | 364 |
361 // Returns if the telephone-event has been negotiated. | 365 // Returns if the telephone-event has been negotiated. |
362 bool CanInsertDtmf(); | 366 bool CanInsertDtmf(); |
363 // Send and/or play a DTMF |event| according to the |flags|. | 367 // Send and/or play a DTMF |event| according to the |flags|. |
364 // The DTMF out-of-band signal will be used on sending. | 368 // The DTMF out-of-band signal will be used on sending. |
365 // The |ssrc| should be either 0 or a valid send stream ssrc. | 369 // The |ssrc| should be either 0 or a valid send stream ssrc. |
366 // The valid value for the |event| are 0 which corresponding to DTMF | 370 // The valid value for the |event| are 0 which corresponding to DTMF |
367 // event 0-9, *, #, A-D. | 371 // event 0-9, *, #, A-D. |
368 bool InsertDtmf(uint32_t ssrc, int event_code, int duration); | 372 bool InsertDtmf(uint32_t ssrc, int event_code, int duration); |
369 bool SetOutputVolume(uint32_t ssrc, double volume); | 373 bool SetOutputVolume(uint32_t ssrc, double volume); |
| 374 void SetRawAudioSink(uint32_t ssrc, |
| 375 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink); |
| 376 |
370 // Get statistics about the current media session. | 377 // Get statistics about the current media session. |
371 bool GetStats(VoiceMediaInfo* stats); | 378 bool GetStats(VoiceMediaInfo* stats); |
372 | 379 |
373 // Monitoring functions | 380 // Monitoring functions |
374 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> | 381 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> |
375 SignalConnectionMonitor; | 382 SignalConnectionMonitor; |
376 | 383 |
377 void StartMediaMonitor(int cms); | 384 void StartMediaMonitor(int cms); |
378 void StopMediaMonitor(); | 385 void StopMediaMonitor(); |
379 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor; | 386 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor; |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 // SetSendParameters. | 643 // SetSendParameters. |
637 DataSendParameters last_send_params_; | 644 DataSendParameters last_send_params_; |
638 // Last DataRecvParameters sent down to the media_channel() via | 645 // Last DataRecvParameters sent down to the media_channel() via |
639 // SetRecvParameters. | 646 // SetRecvParameters. |
640 DataRecvParameters last_recv_params_; | 647 DataRecvParameters last_recv_params_; |
641 }; | 648 }; |
642 | 649 |
643 } // namespace cricket | 650 } // namespace cricket |
644 | 651 |
645 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ | 652 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ |
OLD | NEW |