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

Side by Side Diff: trunk/src/media/cast/video_sender/video_encoder.cc

Issue 25546003: Revert 226264 "Be able to build cast_unittest and related target..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/video_sender/video_encoder.h" 5 #include "media/cast/video_sender/video_encoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if (encoded_frame->data.size() <= 0) { 78 if (encoded_frame->data.size() <= 0) {
79 VLOG(1) << "Encoding resulted in an empty frame"; 79 VLOG(1) << "Encoding resulted in an empty frame";
80 return; 80 return;
81 } 81 }
82 cast_thread_->PostTask(CastThread::MAIN, FROM_HERE, 82 cast_thread_->PostTask(CastThread::MAIN, FROM_HERE,
83 base::Bind(frame_encoded_callback, 83 base::Bind(frame_encoded_callback,
84 base::Passed(&encoded_frame), capture_time)); 84 base::Passed(&encoded_frame), capture_time));
85 } 85 }
86 86
87 // Inform the encoder about the new target bit rate. 87 // Inform the encoder about the new target bit rate.
88 void VideoEncoder::SetBitRate(int new_bit_rate) { 88 void VideoEncoder::SetBitRate(int new_bit_rate) OVERRIDE {
89 dynamic_config_.bit_rate = new_bit_rate; 89 dynamic_config_.bit_rate = new_bit_rate;
90 } 90 }
91 91
92 // Inform the encoder to not encode the next frame. 92 // Inform the encoder to not encode the next frame.
93 void VideoEncoder::SkipNextFrame(bool skip_next_frame) { 93 void VideoEncoder::SkipNextFrame(bool skip_next_frame) OVERRIDE {
94 skip_next_frame_ = skip_next_frame; 94 skip_next_frame_ = skip_next_frame;
95 } 95 }
96 96
97 // Inform the encoder to encode the next frame as a key frame. 97 // Inform the encoder to encode the next frame as a key frame.
98 void VideoEncoder::GenerateKeyFrame() { 98 void VideoEncoder::GenerateKeyFrame() OVERRIDE {
99 dynamic_config_.key_frame_requested = true; 99 dynamic_config_.key_frame_requested = true;
100 } 100 }
101 101
102 // Inform the encoder to only reference frames older or equal to frame_id; 102 // Inform the encoder to only reference frames older or equal to frame_id;
103 void VideoEncoder::LatestFrameIdToReference(uint8 frame_id) { 103 void VideoEncoder::LatestFrameIdToReference(uint8 frame_id) OVERRIDE {
104 dynamic_config_.latest_frame_id_to_reference = frame_id; 104 dynamic_config_.latest_frame_id_to_reference = frame_id;
105 } 105 }
106 106
107 int VideoEncoder::NumberOfSkippedFrames() const { 107 int VideoEncoder::NumberOfSkippedFrames() const OVERRIDE {
108 return skip_count_; 108 return skip_count_;
109 } 109 }
110 110
111 } // namespace cast 111 } // namespace cast
112 } // namespace media 112 } // namespace media
OLDNEW
« no previous file with comments | « trunk/src/media/cast/video_sender/video_encoder.h ('k') | trunk/src/media/cast/video_sender/video_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698