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

Side by Side Diff: webrtc/video/video_send_stream_tests.cc

Issue 2633493002: Delete VideoFrame::set_render_time_ms. (Closed)
Patch Set: Add deprecation comments. Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include <algorithm> // max 10 #include <algorithm> // max
(...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 } 1940 }
1941 1941
1942 VideoFrame CreateVideoFrame(int width, int height, uint8_t data) { 1942 VideoFrame CreateVideoFrame(int width, int height, uint8_t data) {
1943 const int kSizeY = width * height * 2; 1943 const int kSizeY = width * height * 2;
1944 std::unique_ptr<uint8_t[]> buffer(new uint8_t[kSizeY]); 1944 std::unique_ptr<uint8_t[]> buffer(new uint8_t[kSizeY]);
1945 memset(buffer.get(), data, kSizeY); 1945 memset(buffer.get(), data, kSizeY);
1946 VideoFrame frame( 1946 VideoFrame frame(
1947 I420Buffer::Create(width, height, width, width / 2, width / 2), 1947 I420Buffer::Create(width, height, width, width / 2, width / 2),
1948 kVideoRotation_0, data); 1948 kVideoRotation_0, data);
1949 frame.set_timestamp(data); 1949 frame.set_timestamp(data);
1950 frame.set_render_time_ms(data); 1950 // Use data as a ms timestamp.
1951 frame.set_timestamp_us(data * rtc::kNumMicrosecsPerMillisec);
1951 return frame; 1952 return frame;
1952 } 1953 }
1953 1954
1954 TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) { 1955 TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
1955 class EncoderStateObserver : public test::SendTest, public VideoEncoder { 1956 class EncoderStateObserver : public test::SendTest, public VideoEncoder {
1956 public: 1957 public:
1957 EncoderStateObserver() 1958 EncoderStateObserver()
1958 : SendTest(kDefaultTimeoutMs), 1959 : SendTest(kDefaultTimeoutMs),
1959 stream_(nullptr), 1960 stream_(nullptr),
1960 initialized_(false), 1961 initialized_(false),
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
3236 private: 3237 private:
3237 Call* call_; 3238 Call* call_;
3238 rtc::CriticalSection crit_; 3239 rtc::CriticalSection crit_;
3239 uint32_t max_bitrate_kbps_ GUARDED_BY(&crit_); 3240 uint32_t max_bitrate_kbps_ GUARDED_BY(&crit_);
3240 } test; 3241 } test;
3241 3242
3242 RunBaseTest(&test); 3243 RunBaseTest(&test);
3243 } 3244 }
3244 3245
3245 } // namespace webrtc 3246 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698