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

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

Issue 1311533009: - Rename VoiceChannel::MuteStream() -> SetAudioSend() (incl. media channel) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@lj_remove_typingmonitor_files
Patch Set: typo in comment Created 5 years, 3 months 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
« no previous file with comments | « talk/media/base/fakemediaengine.h ('k') | talk/media/base/videoengine_unittest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // multiple SSRCs. 559 // multiple SSRCs.
560 virtual bool RemoveSendStream(uint32 ssrc) = 0; 560 virtual bool RemoveSendStream(uint32 ssrc) = 0;
561 // Creates a new incoming media stream with SSRCs and CNAME as described 561 // Creates a new incoming media stream with SSRCs and CNAME as described
562 // by sp. 562 // by sp.
563 virtual bool AddRecvStream(const StreamParams& sp) = 0; 563 virtual bool AddRecvStream(const StreamParams& sp) = 0;
564 // Removes an incoming media stream. 564 // Removes an incoming media stream.
565 // ssrc must be the first SSRC of the media stream if the stream uses 565 // ssrc must be the first SSRC of the media stream if the stream uses
566 // multiple SSRCs. 566 // multiple SSRCs.
567 virtual bool RemoveRecvStream(uint32 ssrc) = 0; 567 virtual bool RemoveRecvStream(uint32 ssrc) = 0;
568 568
569 // Mutes the channel.
570 virtual bool MuteStream(uint32 ssrc, bool on) = 0;
571
572 // Sets the RTP extension headers and IDs to use when sending RTP. 569 // Sets the RTP extension headers and IDs to use when sending RTP.
573 virtual bool SetRecvRtpHeaderExtensions( 570 virtual bool SetRecvRtpHeaderExtensions(
574 const std::vector<RtpHeaderExtension>& extensions) = 0; 571 const std::vector<RtpHeaderExtension>& extensions) = 0;
575 virtual bool SetSendRtpHeaderExtensions( 572 virtual bool SetSendRtpHeaderExtensions(
576 const std::vector<RtpHeaderExtension>& extensions) = 0; 573 const std::vector<RtpHeaderExtension>& extensions) = 0;
577 // Returns the absoulte sendtime extension id value from media channel. 574 // Returns the absoulte sendtime extension id value from media channel.
578 virtual int GetRtpSendTimeExtnId() const { 575 virtual int GetRtpSendTimeExtnId() const {
579 return -1; 576 return -1;
580 } 577 }
581 // Sets the maximum allowed bandwidth to use when sending data. 578 // Sets the maximum allowed bandwidth to use when sending data.
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 SetRecvRtpHeaderExtensions(params.extensions)); 1087 SetRecvRtpHeaderExtensions(params.extensions));
1091 } 1088 }
1092 // Sets the codecs/payload types to be used for incoming media. 1089 // Sets the codecs/payload types to be used for incoming media.
1093 virtual bool SetRecvCodecs(const std::vector<AudioCodec>& codecs) = 0; 1090 virtual bool SetRecvCodecs(const std::vector<AudioCodec>& codecs) = 0;
1094 // Sets the codecs/payload types to be used for outgoing media. 1091 // Sets the codecs/payload types to be used for outgoing media.
1095 virtual bool SetSendCodecs(const std::vector<AudioCodec>& codecs) = 0; 1092 virtual bool SetSendCodecs(const std::vector<AudioCodec>& codecs) = 0;
1096 // Starts or stops playout of received audio. 1093 // Starts or stops playout of received audio.
1097 virtual bool SetPlayout(bool playout) = 0; 1094 virtual bool SetPlayout(bool playout) = 0;
1098 // Starts or stops sending (and potentially capture) of local audio. 1095 // Starts or stops sending (and potentially capture) of local audio.
1099 virtual bool SetSend(SendFlags flag) = 0; 1096 virtual bool SetSend(SendFlags flag) = 0;
1097 // Configure stream for sending.
1098 virtual bool SetAudioSend(uint32 ssrc, bool mute, const AudioOptions* options,
1099 AudioRenderer* renderer) = 0;
1100 // Sets the renderer object to be used for the specified remote audio stream. 1100 // Sets the renderer object to be used for the specified remote audio stream.
1101 virtual bool SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer) = 0; 1101 virtual bool SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer) = 0;
1102 // Sets the renderer object to be used for the specified local audio stream.
1103 virtual bool SetLocalRenderer(uint32 ssrc, AudioRenderer* renderer) = 0;
1104 // Gets current energy levels for all incoming streams. 1102 // Gets current energy levels for all incoming streams.
1105 virtual bool GetActiveStreams(AudioInfo::StreamList* actives) = 0; 1103 virtual bool GetActiveStreams(AudioInfo::StreamList* actives) = 0;
1106 // Get the current energy level of the stream sent to the speaker. 1104 // Get the current energy level of the stream sent to the speaker.
1107 virtual int GetOutputLevel() = 0; 1105 virtual int GetOutputLevel() = 0;
1108 // Get the time in milliseconds since last recorded keystroke, or negative. 1106 // Get the time in milliseconds since last recorded keystroke, or negative.
1109 virtual int GetTimeSinceLastTyping() = 0; 1107 virtual int GetTimeSinceLastTyping() = 0;
1110 // Temporarily exposed field for tuning typing detect options. 1108 // Temporarily exposed field for tuning typing detect options.
1111 virtual void SetTypingDetectionParameters(int time_window, 1109 virtual void SetTypingDetectionParameters(int time_window,
1112 int cost_per_typing, int reporting_threshold, int penalty_decay, 1110 int cost_per_typing, int reporting_threshold, int penalty_decay,
1113 int type_event_delay) = 0; 1111 int type_event_delay) = 0;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 // Sets the codecs/payload types to be used for outgoing media. 1187 // Sets the codecs/payload types to be used for outgoing media.
1190 virtual bool SetSendCodecs(const std::vector<VideoCodec>& codecs) = 0; 1188 virtual bool SetSendCodecs(const std::vector<VideoCodec>& codecs) = 0;
1191 // Gets the currently set codecs/payload types to be used for outgoing media. 1189 // Gets the currently set codecs/payload types to be used for outgoing media.
1192 virtual bool GetSendCodec(VideoCodec* send_codec) = 0; 1190 virtual bool GetSendCodec(VideoCodec* send_codec) = 0;
1193 // Sets the format of a specified outgoing stream. 1191 // Sets the format of a specified outgoing stream.
1194 virtual bool SetSendStreamFormat(uint32 ssrc, const VideoFormat& format) = 0; 1192 virtual bool SetSendStreamFormat(uint32 ssrc, const VideoFormat& format) = 0;
1195 // Starts or stops playout of received video. 1193 // Starts or stops playout of received video.
1196 virtual bool SetRender(bool render) = 0; 1194 virtual bool SetRender(bool render) = 0;
1197 // Starts or stops transmission (and potentially capture) of local video. 1195 // Starts or stops transmission (and potentially capture) of local video.
1198 virtual bool SetSend(bool send) = 0; 1196 virtual bool SetSend(bool send) = 0;
1197 // Configure stream for sending.
1198 virtual bool SetVideoSend(uint32 ssrc, bool mute,
1199 const VideoOptions* options) = 0;
1199 // Sets the renderer object to be used for the specified stream. 1200 // Sets the renderer object to be used for the specified stream.
1200 // If SSRC is 0, the renderer is used for the 'default' stream. 1201 // If SSRC is 0, the renderer is used for the 'default' stream.
1201 virtual bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) = 0; 1202 virtual bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) = 0;
1202 // If |ssrc| is 0, replace the default capturer (engine capturer) with 1203 // If |ssrc| is 0, replace the default capturer (engine capturer) with
1203 // |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC. 1204 // |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC.
1204 virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) = 0; 1205 virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) = 0;
1205 // Gets quality stats for the channel. 1206 // Gets quality stats for the channel.
1206 virtual bool GetStats(VideoMediaInfo* info) = 0; 1207 virtual bool GetStats(VideoMediaInfo* info) = 0;
1207 // Send an intra frame to the receivers. 1208 // Send an intra frame to the receivers.
1208 virtual bool SendIntraFrame() = 0; 1209 virtual bool SendIntraFrame() = 0;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 } 1331 }
1331 // TODO(pthatcher): Remove SetRecvCodecs and 1332 // TODO(pthatcher): Remove SetRecvCodecs and
1332 // SetRecvRtpHeaderExtensions once all implementations implement 1333 // SetRecvRtpHeaderExtensions once all implementations implement
1333 // SetRecvParameters. 1334 // SetRecvParameters.
1334 virtual bool SetRecvParameters(const DataRecvParameters& params) { 1335 virtual bool SetRecvParameters(const DataRecvParameters& params) {
1335 return SetRecvCodecs(params.codecs); 1336 return SetRecvCodecs(params.codecs);
1336 } 1337 }
1337 virtual bool SetSendCodecs(const std::vector<DataCodec>& codecs) = 0; 1338 virtual bool SetSendCodecs(const std::vector<DataCodec>& codecs) = 0;
1338 virtual bool SetRecvCodecs(const std::vector<DataCodec>& codecs) = 0; 1339 virtual bool SetRecvCodecs(const std::vector<DataCodec>& codecs) = 0;
1339 1340
1340 virtual bool MuteStream(uint32 ssrc, bool on) { return false; }
1341 // TODO(pthatcher): Implement this. 1341 // TODO(pthatcher): Implement this.
1342 virtual bool GetStats(DataMediaInfo* info) { return true; } 1342 virtual bool GetStats(DataMediaInfo* info) { return true; }
1343 1343
1344 virtual bool SetSend(bool send) = 0; 1344 virtual bool SetSend(bool send) = 0;
1345 virtual bool SetReceive(bool receive) = 0; 1345 virtual bool SetReceive(bool receive) = 0;
1346 1346
1347 virtual bool SendData( 1347 virtual bool SendData(
1348 const SendDataParams& params, 1348 const SendDataParams& params,
1349 const rtc::Buffer& payload, 1349 const rtc::Buffer& payload,
1350 SendDataResult* result = NULL) = 0; 1350 SendDataResult* result = NULL) = 0;
1351 // Signals when data is received (params, data, len) 1351 // Signals when data is received (params, data, len)
1352 sigslot::signal3<const ReceiveDataParams&, 1352 sigslot::signal3<const ReceiveDataParams&,
1353 const char*, 1353 const char*,
1354 size_t> SignalDataReceived; 1354 size_t> SignalDataReceived;
1355 // Signal errors from MediaChannel. Arguments are: 1355 // Signal errors from MediaChannel. Arguments are:
1356 // ssrc(uint32), and error(DataMediaChannel::Error). 1356 // ssrc(uint32), and error(DataMediaChannel::Error).
1357 sigslot::signal2<uint32, DataMediaChannel::Error> SignalMediaError; 1357 sigslot::signal2<uint32, DataMediaChannel::Error> SignalMediaError;
1358 // Signal when the media channel is ready to send the stream. Arguments are: 1358 // Signal when the media channel is ready to send the stream. Arguments are:
1359 // writable(bool) 1359 // writable(bool)
1360 sigslot::signal1<bool> SignalReadyToSend; 1360 sigslot::signal1<bool> SignalReadyToSend;
1361 // Signal for notifying that the remote side has closed the DataChannel. 1361 // Signal for notifying that the remote side has closed the DataChannel.
1362 sigslot::signal1<uint32> SignalStreamClosedRemotely; 1362 sigslot::signal1<uint32> SignalStreamClosedRemotely;
1363 }; 1363 };
1364 1364
1365 } // namespace cricket 1365 } // namespace cricket
1366 1366
1367 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_ 1367 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW
« no previous file with comments | « talk/media/base/fakemediaengine.h ('k') | talk/media/base/videoengine_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698