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

Side by Side Diff: media/cast/video_sender/codecs/vp8/vp8_encoder.cc

Issue 112133002: Cast:Moving netwrok sender related code to a designated folder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moving const' to .cc Created 7 years 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 // TODO (pwestin): add a link to the design document describing the generic 5 // TODO (pwestin): add a link to the design document describing the generic
6 // protocol and the VP8 specific details. 6 // protocol and the VP8 specific details.
7 #include "media/cast/video_sender/codecs/vp8/vp8_encoder.h" 7 #include "media/cast/video_sender/codecs/vp8/vp8_encoder.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "media/base/video_frame.h" 12 #include "media/base/video_frame.h"
13 #include "media/cast/cast_defines.h" 13 #include "media/cast/cast_defines.h"
14 #include "media/cast/rtp_common/rtp_defines.h"
15 #include "third_party/libvpx/source/libvpx/vpx/vp8cx.h" 14 #include "third_party/libvpx/source/libvpx/vpx/vp8cx.h"
16 15
17 namespace media { 16 namespace media {
18 namespace cast { 17 namespace cast {
19 18
20 static const uint32 kMinIntra = 300; 19 static const uint32 kMinIntra = 300;
21 20
22 Vp8Encoder::Vp8Encoder(const VideoSenderConfig& video_config, 21 Vp8Encoder::Vp8Encoder(const VideoSenderConfig& video_config,
23 uint8 max_unacked_frames) 22 uint8 max_unacked_frames)
24 : cast_config_(video_config), 23 : cast_config_(video_config),
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 float scale_parameter = 0.5; 363 float scale_parameter = 0.5;
365 uint32 target_pct = optimal_buffer_size_ms * scale_parameter * 364 uint32 target_pct = optimal_buffer_size_ms * scale_parameter *
366 cast_config_.max_frame_rate / 10; 365 cast_config_.max_frame_rate / 10;
367 366
368 // Don't go below 3 times the per frame bandwidth. 367 // Don't go below 3 times the per frame bandwidth.
369 return std::max(target_pct, kMinIntra); 368 return std::max(target_pct, kMinIntra);
370 } 369 }
371 370
372 } // namespace cast 371 } // namespace cast
373 } // namespace media 372 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/video_receiver/video_receiver_unittest.cc ('k') | media/cast/video_sender/video_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698