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

Side by Side Diff: talk/media/base/mediachannel.h

Issue 1505253004: Support for remote audio into tracks (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: New AudioSink added 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 13 matching lines...) Expand all
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #ifndef TALK_MEDIA_BASE_MEDIACHANNEL_H_ 28 #ifndef TALK_MEDIA_BASE_MEDIACHANNEL_H_
29 #define TALK_MEDIA_BASE_MEDIACHANNEL_H_ 29 #define TALK_MEDIA_BASE_MEDIACHANNEL_H_
30 30
31 #include <string> 31 #include <string>
32 #include <vector> 32 #include <vector>
33 33
34 #include "talk/media/base/audiorenderer.h"
perkj_webrtc 2015/12/13 19:26:48 nit , no need since it is still used as a pointer.
tommi 2015/12/13 19:46:33 Done.
34 #include "talk/media/base/codec.h" 35 #include "talk/media/base/codec.h"
35 #include "talk/media/base/constants.h" 36 #include "talk/media/base/constants.h"
36 #include "talk/media/base/streamparams.h" 37 #include "talk/media/base/streamparams.h"
38 #include "webrtc/audio/audio_sink.h"
37 #include "webrtc/base/basictypes.h" 39 #include "webrtc/base/basictypes.h"
38 #include "webrtc/base/buffer.h" 40 #include "webrtc/base/buffer.h"
39 #include "webrtc/base/dscp.h" 41 #include "webrtc/base/dscp.h"
40 #include "webrtc/base/logging.h" 42 #include "webrtc/base/logging.h"
41 #include "webrtc/base/optional.h" 43 #include "webrtc/base/optional.h"
42 #include "webrtc/base/sigslot.h" 44 #include "webrtc/base/sigslot.h"
43 #include "webrtc/base/socket.h" 45 #include "webrtc/base/socket.h"
44 #include "webrtc/base/window.h" 46 #include "webrtc/base/window.h"
45 // TODO(juberti): re-evaluate this include 47 // TODO(juberti): re-evaluate this include
46 #include "talk/session/media/audiomonitor.h" 48 #include "talk/session/media/audiomonitor.h"
47 49
48 namespace rtc { 50 namespace rtc {
49 class Buffer; 51 class Buffer;
50 class RateLimiter; 52 class RateLimiter;
51 class Timing; 53 class Timing;
52 } 54 }
53 55
54 namespace cricket { 56 namespace cricket {
55 57
56 class AudioRenderer;
57 struct RtpHeader; 58 struct RtpHeader;
58 class ScreencastId; 59 class ScreencastId;
59 struct VideoFormat; 60 struct VideoFormat;
60 class VideoCapturer; 61 class VideoCapturer;
61 class VideoRenderer; 62 class VideoRenderer;
62 63
63 const int kMinRtpHeaderExtensionId = 1; 64 const int kMinRtpHeaderExtensionId = 1;
64 const int kMaxRtpHeaderExtensionId = 255; 65 const int kMaxRtpHeaderExtensionId = 255;
65 const int kScreencastDefaultFps = 5; 66 const int kScreencastDefaultFps = 5;
66 67
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 virtual bool SetOutputVolume(uint32_t ssrc, double volume) = 0; 1022 virtual bool SetOutputVolume(uint32_t ssrc, double volume) = 0;
1022 // Returns if the telephone-event has been negotiated. 1023 // Returns if the telephone-event has been negotiated.
1023 virtual bool CanInsertDtmf() = 0; 1024 virtual bool CanInsertDtmf() = 0;
1024 // Send a DTMF |event|. The DTMF out-of-band signal will be used. 1025 // Send a DTMF |event|. The DTMF out-of-band signal will be used.
1025 // The |ssrc| should be either 0 or a valid send stream ssrc. 1026 // The |ssrc| should be either 0 or a valid send stream ssrc.
1026 // The valid value for the |event| are 0 to 15 which corresponding to 1027 // The valid value for the |event| are 0 to 15 which corresponding to
1027 // DTMF event 0-9, *, #, A-D. 1028 // DTMF event 0-9, *, #, A-D.
1028 virtual bool InsertDtmf(uint32_t ssrc, int event, int duration) = 0; 1029 virtual bool InsertDtmf(uint32_t ssrc, int event, int duration) = 0;
1029 // Gets quality stats for the channel. 1030 // Gets quality stats for the channel.
1030 virtual bool GetStats(VoiceMediaInfo* info) = 0; 1031 virtual bool GetStats(VoiceMediaInfo* info) = 0;
1032
1033 virtual void SetRawAudioSink(uint32_t ssrc,
1034 rtc::scoped_ptr<webrtc::AudioSink> sink) = 0;
1031 }; 1035 };
1032 1036
1033 struct VideoSendParameters : RtpSendParameters<VideoCodec, VideoOptions> { 1037 struct VideoSendParameters : RtpSendParameters<VideoCodec, VideoOptions> {
1034 }; 1038 };
1035 1039
1036 struct VideoRecvParameters : RtpParameters<VideoCodec> { 1040 struct VideoRecvParameters : RtpParameters<VideoCodec> {
1037 }; 1041 };
1038 1042
1039 class VideoMediaChannel : public MediaChannel { 1043 class VideoMediaChannel : public MediaChannel {
1040 public: 1044 public:
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 // Signal when the media channel is ready to send the stream. Arguments are: 1212 // Signal when the media channel is ready to send the stream. Arguments are:
1209 // writable(bool) 1213 // writable(bool)
1210 sigslot::signal1<bool> SignalReadyToSend; 1214 sigslot::signal1<bool> SignalReadyToSend;
1211 // Signal for notifying that the remote side has closed the DataChannel. 1215 // Signal for notifying that the remote side has closed the DataChannel.
1212 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 1216 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
1213 }; 1217 };
1214 1218
1215 } // namespace cricket 1219 } // namespace cricket
1216 1220
1217 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_ 1221 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698