OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/cast/sender/fake_software_video_encoder.h" | 5 #include "media/cast/sender/fake_software_video_encoder.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "media/base/video_frame.h" | 9 #include "media/base/video_frame.h" |
10 #include "media/cast/cast_defines.h" | 10 #include "media/cast/cast_defines.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 if (encoded_frame->dependency == EncodedFrame::KEY) { | 64 if (encoded_frame->dependency == EncodedFrame::KEY) { |
65 encoded_frame->deadline_utilization = 1.0; | 65 encoded_frame->deadline_utilization = 1.0; |
66 encoded_frame->lossy_utilization = 6.0; | 66 encoded_frame->lossy_utilization = 6.0; |
67 } else { | 67 } else { |
68 encoded_frame->deadline_utilization = 0.8; | 68 encoded_frame->deadline_utilization = 0.8; |
69 encoded_frame->lossy_utilization = 0.8; | 69 encoded_frame->lossy_utilization = 0.8; |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 void FakeSoftwareVideoEncoder::UpdateRates(uint32 new_bitrate) { | 73 void FakeSoftwareVideoEncoder::UpdateRates(uint32_t new_bitrate) { |
74 frame_size_ = new_bitrate / video_config_.max_frame_rate / 8; | 74 frame_size_ = new_bitrate / video_config_.max_frame_rate / 8; |
75 } | 75 } |
76 | 76 |
77 void FakeSoftwareVideoEncoder::GenerateKeyFrame() { | 77 void FakeSoftwareVideoEncoder::GenerateKeyFrame() { |
78 next_frame_is_key_ = true; | 78 next_frame_is_key_ = true; |
79 } | 79 } |
80 | 80 |
81 } // namespace cast | 81 } // namespace cast |
82 } // namespace media | 82 } // namespace media |
83 | 83 |
84 #endif | 84 #endif |
OLD | NEW |