1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
media / mojo / mojom / video_encoder_info.mojom [blame]
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module media.mojom;
import "ui/gfx/geometry/mojom/geometry.mojom";
// The following mojom classes are the corresponding classes in webrtc project.
// See third_party/webrtc/api/video_codecs/video_encoder.h for details.
// TODO(crbug.com/382015342): Add missing max_framerate_numerator and
// max_framerate_denominator as member to the corresponding class in webrtc.
struct ResolutionRateLimit {
// Maximum frame size in width and height.
gfx.mojom.Size frame_size;
// Minimum allowed start encoding bitrate in bps.
int32 min_start_bitrate_bps;
// Minimum allowed encoding bitrate in bps.
int32 min_bitrate_bps;
// Maximum allowed encoding bitrate in bps.
int32 max_bitrate_bps;
// Maximum allowed encoding frame rate's numerator.
uint32 max_framerate_numerator;
// Maximum allowed encoding frame rate's denominator.
uint32 max_framerate_denominator;
};
// TODO(crbug.com/40489779): Remove |has_*| values and use nullable types.
struct VideoEncoderInfo {
string implementation_name;
bool has_frame_delay = false;
int32 frame_delay;
bool has_input_capacity = false;
int32 input_capacity;
bool supports_native_handle;
bool has_trusted_rate_controller;
bool is_hardware_accelerated;
bool supports_simulcast;
bool reports_average_qp;
uint32 requested_resolution_alignment;
bool apply_alignment_to_all_simulcast_layers;
// True if encoder supports frame size change without re-initialization.
bool supports_frame_size_change = false;
// This array size is equal to media::VideoEncoderInfo::kMaxSpatialLayers.
array<array<uint8>, 5> fps_allocation;
array<ResolutionRateLimit> resolution_rate_limits;
};