Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: talk/session/media/channel.h

Issue 1505253004: Support for remote audio into tracks (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address comments Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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"
47 #include "webrtc/audio/audio_sink.h"
49 #include "webrtc/base/asyncudpsocket.h" 48 #include "webrtc/base/asyncudpsocket.h"
50 #include "webrtc/base/criticalsection.h" 49 #include "webrtc/base/criticalsection.h"
51 #include "webrtc/base/network.h" 50 #include "webrtc/base/network.h"
52 #include "webrtc/base/sigslot.h" 51 #include "webrtc/base/sigslot.h"
53 #include "webrtc/base/window.h" 52 #include "webrtc/base/window.h"
53 #include "webrtc/p2p/base/transportcontroller.h"
54 #include "webrtc/p2p/client/socketmonitor.h"
55
56 namespace webrtc {
57 class AudioSinkInterface;
58 } // namespace webrtc
54 59
55 namespace cricket { 60 namespace cricket {
56 61
57 struct CryptoParams; 62 struct CryptoParams;
58 class MediaContentDescription; 63 class MediaContentDescription;
59 struct ViewRequest; 64 struct ViewRequest;
60 65
61 enum SinkType { 66 enum SinkType {
62 SINK_PRE_CRYPTO, // Sink packets before encryption or after decryption. 67 SINK_PRE_CRYPTO, // Sink packets before encryption or after decryption.
63 SINK_POST_CRYPTO // Sink packets after encryption or before decryption. 68 SINK_POST_CRYPTO // Sink packets after encryption or before decryption.
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 365
361 // Returns if the telephone-event has been negotiated. 366 // Returns if the telephone-event has been negotiated.
362 bool CanInsertDtmf(); 367 bool CanInsertDtmf();
363 // Send and/or play a DTMF |event| according to the |flags|. 368 // Send and/or play a DTMF |event| according to the |flags|.
364 // The DTMF out-of-band signal will be used on sending. 369 // The DTMF out-of-band signal will be used on sending.
365 // The |ssrc| should be either 0 or a valid send stream ssrc. 370 // 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 371 // The valid value for the |event| are 0 which corresponding to DTMF
367 // event 0-9, *, #, A-D. 372 // event 0-9, *, #, A-D.
368 bool InsertDtmf(uint32_t ssrc, int event_code, int duration); 373 bool InsertDtmf(uint32_t ssrc, int event_code, int duration);
369 bool SetOutputVolume(uint32_t ssrc, double volume); 374 bool SetOutputVolume(uint32_t ssrc, double volume);
375 void SetRawAudioSink(uint32_t ssrc,
376 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink);
377
370 // Get statistics about the current media session. 378 // Get statistics about the current media session.
371 bool GetStats(VoiceMediaInfo* stats); 379 bool GetStats(VoiceMediaInfo* stats);
372 380
373 // Monitoring functions 381 // Monitoring functions
374 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> 382 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&>
375 SignalConnectionMonitor; 383 SignalConnectionMonitor;
376 384
377 void StartMediaMonitor(int cms); 385 void StartMediaMonitor(int cms);
378 void StopMediaMonitor(); 386 void StopMediaMonitor();
379 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor; 387 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 // SetSendParameters. 644 // SetSendParameters.
637 DataSendParameters last_send_params_; 645 DataSendParameters last_send_params_;
638 // Last DataRecvParameters sent down to the media_channel() via 646 // Last DataRecvParameters sent down to the media_channel() via
639 // SetRecvParameters. 647 // SetRecvParameters.
640 DataRecvParameters last_recv_params_; 648 DataRecvParameters last_recv_params_;
641 }; 649 };
642 650
643 } // namespace cricket 651 } // namespace cricket
644 652
645 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ 653 #endif // TALK_SESSION_MEDIA_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698