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

Unified Diff: talk/media/base/fakemediaengine.h

Issue 1613433002: Remove SendStreamFormat and ViewRequests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | talk/media/base/mediachannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/base/fakemediaengine.h
diff --git a/talk/media/base/fakemediaengine.h b/talk/media/base/fakemediaengine.h
index 5d809a0260a11f1cb171573655904de567049d7f..c35959e86c490aacb8a643ddd8ca68f8b5ae2754 100644
--- a/talk/media/base/fakemediaengine.h
+++ b/talk/media/base/fakemediaengine.h
@@ -456,20 +456,6 @@ class FakeVideoMediaChannel : public RtpHelper<VideoMediaChannel> {
return renderers_;
}
int max_bps() const { return max_bps_; }
- bool GetSendStreamFormat(uint32_t ssrc, VideoFormat* format) {
- if (send_formats_.find(ssrc) == send_formats_.end()) {
- return false;
- }
- *format = send_formats_[ssrc];
- return true;
- }
- virtual bool SetSendStreamFormat(uint32_t ssrc, const VideoFormat& format) {
- if (send_formats_.find(ssrc) == send_formats_.end()) {
- return false;
- }
- send_formats_[ssrc] = format;
- return true;
- }
virtual bool SetSendParameters(const VideoSendParameters& params) {
return (SetSendCodecs(params.codecs) &&
SetSendRtpHeaderExtensions(params.extensions) &&
@@ -482,14 +468,9 @@ class FakeVideoMediaChannel : public RtpHelper<VideoMediaChannel> {
SetRecvRtpHeaderExtensions(params.extensions));
}
virtual bool AddSendStream(const StreamParams& sp) {
- if (!RtpHelper<VideoMediaChannel>::AddSendStream(sp)) {
- return false;
- }
- SetSendStreamDefaultFormat(sp.first_ssrc());
- return true;
+ return RtpHelper<VideoMediaChannel>::AddSendStream(sp);
}
virtual bool RemoveSendStream(uint32_t ssrc) {
- send_formats_.erase(ssrc);
return RtpHelper<VideoMediaChannel>::RemoveSendStream(ssrc);
}
@@ -559,10 +540,6 @@ class FakeVideoMediaChannel : public RtpHelper<VideoMediaChannel> {
}
send_codecs_ = codecs;
- for (std::vector<StreamParams>::const_iterator it = send_streams().begin();
- it != send_streams().end(); ++it) {
- SetSendStreamDefaultFormat(it->first_ssrc());
- }
return true;
}
bool SetOptions(const VideoOptions& options) {
@@ -574,21 +551,10 @@ class FakeVideoMediaChannel : public RtpHelper<VideoMediaChannel> {
return true;
}
- // Be default, each send stream uses the first send codec format.
- void SetSendStreamDefaultFormat(uint32_t ssrc) {
- if (!send_codecs_.empty()) {
- send_formats_[ssrc] = VideoFormat(
- send_codecs_[0].width, send_codecs_[0].height,
- cricket::VideoFormat::FpsToInterval(send_codecs_[0].framerate),
- cricket::FOURCC_I420);
- }
- }
-
FakeVideoEngine* engine_;
std::vector<VideoCodec> recv_codecs_;
std::vector<VideoCodec> send_codecs_;
std::map<uint32_t, VideoRenderer*> renderers_;
- std::map<uint32_t, VideoFormat> send_formats_;
std::map<uint32_t, VideoCapturer*> capturers_;
VideoOptions options_;
int max_bps_;
« no previous file with comments | « no previous file | talk/media/base/mediachannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698