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

Side by Side Diff: media/video/video_encode_types.cc

Issue 12379011: Interfaces for encoded video sources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "media/video/video_encode_types.h"
6
7 #include "base/stringprintf.h"
8
9 namespace media {
10
11 std::string VideoEncodingLimits::EncoderConfig::Range::ToDebugString() const {
12 return base::StringPrintf("%i...%i@%i", min, max, step);
13 }
14
15 VideoEncodingLimits::EncoderConfig::EncoderConfig() {
16 // Intentionally empty.
17 }
18
19 VideoEncodingLimits::EncoderConfig::~EncoderConfig() {
20 // Intentionally empty.
21 }
22
23 std::string VideoEncodingLimits::EncoderConfig::ToDebugString() const {
24 std::string debug_string;
25 base::StringAppendF(&debug_string, "%s", resolution.ToString().c_str());
26 base::StringAppendF(&debug_string, "@[");
27 std::vector<int>::const_iterator it;
28 for (it = frames_per_second.begin(); it != frames_per_second.end(); ++it) {
29 if (it == frames_per_second.begin())
30 base::StringAppendF(&debug_string, "%i", *it);
31 else
32 base::StringAppendF(&debug_string, ", %i", *it);
33 }
34 base::StringAppendF(&debug_string, "] fps");
35 base::StringAppendF(&debug_string,
36 ", bitrate: %s",
37 average_bitrate.ToDebugString().c_str());
38 base::StringAppendF(&debug_string,
39 ", qp_range: %s",
40 qp.ToDebugString().c_str());
41 base::StringAppendF(&debug_string,
42 ", num_of_streams: %s",
43 stream_count.ToDebugString().c_str());
44 base::StringAppendF(&debug_string,
45 ", num_of_temporal_layers: %s",
46 temporal_layer_count.ToDebugString().c_str());
47 return debug_string;
48 }
49
50 VideoEncodingLimits::VideoEncodingLimits() {
51 // Intentionally empty.
52 }
53
54 VideoEncodingLimits::~VideoEncodingLimits() {
55 // Intentionally empty.
56 }
57
58 std::string VideoEncodingLimits::ToDebugString() const {
59 std::string debug_string;
60 std::vector<media::VideoEncodingLimits::EncoderConfig>::const_iterator it;
61 for (it = configs.begin(); it != configs.end(); it++) {
62 base::StringAppendF(&debug_string, ", %s", it->ToDebugString().c_str());
63 }
64 return debug_string;
65 }
66
67 RuntimeVideoEncodingParameters::RuntimeVideoEncodingParameters() {
68 // Intentionally empty.
69 }
70
71 RuntimeVideoEncodingParameters::~RuntimeVideoEncodingParameters() {
72 // Intentionally empty.
73 }
74
75 } // namespace media
76
OLDNEW
« media/video/video_encode_types.h ('K') | « media/video/video_encode_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698