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

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

Issue 1613433002: Remove SendStreamFormat and ViewRequests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 10 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/mediachannel.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 2011 Google Inc. 3 * Copyright 2011 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 bool RemoveDataStream(const StreamSelector& selector); 240 bool RemoveDataStream(const StreamSelector& selector);
241 241
242 private: 242 private:
243 std::vector<StreamParams> audio_; 243 std::vector<StreamParams> audio_;
244 std::vector<StreamParams> video_; 244 std::vector<StreamParams> video_;
245 std::vector<StreamParams> data_; 245 std::vector<StreamParams> data_;
246 246
247 RTC_DISALLOW_COPY_AND_ASSIGN(MediaStreams); 247 RTC_DISALLOW_COPY_AND_ASSIGN(MediaStreams);
248 }; 248 };
249 249
250 // A request for a specific format of a specific stream.
251 struct StaticVideoView {
252 StaticVideoView(const StreamSelector& selector,
253 int width, int height, int framerate)
254 : selector(selector),
255 width(width),
256 height(height),
257 framerate(framerate),
258 preference(0) {
259 }
260
261 StreamSelector selector;
262 int width;
263 int height;
264 int framerate;
265 int preference;
266 };
267
268 typedef std::vector<StaticVideoView> StaticVideoViews;
269
270 // A request for several streams in various formats.
271 struct ViewRequest {
272 StaticVideoViews static_video_views;
273 };
274
275 template <class Condition> 250 template <class Condition>
276 const StreamParams* GetStream(const StreamParamsVec& streams, 251 const StreamParams* GetStream(const StreamParamsVec& streams,
277 Condition condition) { 252 Condition condition) {
278 StreamParamsVec::const_iterator found = 253 StreamParamsVec::const_iterator found =
279 std::find_if(streams.begin(), streams.end(), condition); 254 std::find_if(streams.begin(), streams.end(), condition);
280 return found == streams.end() ? nullptr : &(*found); 255 return found == streams.end() ? nullptr : &(*found);
281 } 256 }
282 257
283 inline const StreamParams* GetStreamBySsrc(const StreamParamsVec& streams, 258 inline const StreamParams* GetStreamBySsrc(const StreamParamsVec& streams,
284 uint32_t ssrc) { 259 uint32_t ssrc) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 bool IsOneSsrcStream(const StreamParams& sp); 311 bool IsOneSsrcStream(const StreamParams& sp);
337 312
338 // Checks if |sp| defines parameters for one Simulcast stream. There may be RTX 313 // Checks if |sp| defines parameters for one Simulcast stream. There may be RTX
339 // streams associated with the simulcast streams. Leaving as non-static so we 314 // streams associated with the simulcast streams. Leaving as non-static so we
340 // can test this function. 315 // can test this function.
341 bool IsSimulcastStream(const StreamParams& sp); 316 bool IsSimulcastStream(const StreamParams& sp);
342 317
343 } // namespace cricket 318 } // namespace cricket
344 319
345 #endif // TALK_MEDIA_BASE_STREAMPARAMS_H_ 320 #endif // TALK_MEDIA_BASE_STREAMPARAMS_H_
OLDNEW
« no previous file with comments | « talk/media/base/mediachannel.h ('k') | talk/media/base/videoengine_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698