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

Side by Side Diff: media/cast/sender/fake_software_video_encoder.cc

Issue 2113783002: Refactoring: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mek's comment. Created 4 years, 5 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 | « media/cast/sender/fake_software_video_encoder.h ('k') | media/cast/sender/h264_vt_encoder.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 // 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "media/base/video_frame.h" 11 #include "media/base/video_frame.h"
12 #include "media/cast/common/rtp_time.h" 12 #include "media/cast/common/rtp_time.h"
13 #include "media/cast/constants.h" 13 #include "media/cast/constants.h"
14 14
15 #ifndef OFFICIAL_BUILD 15 #ifndef OFFICIAL_BUILD
16 16
17 namespace media { 17 namespace media {
18 namespace cast { 18 namespace cast {
19 19
20 FakeSoftwareVideoEncoder::FakeSoftwareVideoEncoder( 20 FakeSoftwareVideoEncoder::FakeSoftwareVideoEncoder(
21 const VideoSenderConfig& video_config) 21 const FrameSenderConfig& video_config)
22 : video_config_(video_config), 22 : video_config_(video_config),
23 next_frame_is_key_(true), 23 next_frame_is_key_(true),
24 frame_id_(FrameId::first()), 24 frame_id_(FrameId::first()),
25 frame_size_(0) {} 25 frame_size_(0) {
26 DCHECK_GT(video_config_.max_frame_rate, 0);
27 }
26 28
27 FakeSoftwareVideoEncoder::~FakeSoftwareVideoEncoder() {} 29 FakeSoftwareVideoEncoder::~FakeSoftwareVideoEncoder() {}
28 30
29 void FakeSoftwareVideoEncoder::Initialize() {} 31 void FakeSoftwareVideoEncoder::Initialize() {}
30 32
31 void FakeSoftwareVideoEncoder::Encode( 33 void FakeSoftwareVideoEncoder::Encode(
32 const scoped_refptr<media::VideoFrame>& video_frame, 34 const scoped_refptr<media::VideoFrame>& video_frame,
33 const base::TimeTicks& reference_time, 35 const base::TimeTicks& reference_time,
34 SenderEncodedFrame* encoded_frame) { 36 SenderEncodedFrame* encoded_frame) {
35 DCHECK(encoded_frame); 37 DCHECK(encoded_frame);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 78 }
77 79
78 void FakeSoftwareVideoEncoder::GenerateKeyFrame() { 80 void FakeSoftwareVideoEncoder::GenerateKeyFrame() {
79 next_frame_is_key_ = true; 81 next_frame_is_key_ = true;
80 } 82 }
81 83
82 } // namespace cast 84 } // namespace cast
83 } // namespace media 85 } // namespace media
84 86
85 #endif 87 #endif
OLDNEW
« no previous file with comments | « media/cast/sender/fake_software_video_encoder.h ('k') | media/cast/sender/h264_vt_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698