Move VideoCodecType from common_types.h to api/video/video_codec_type.h

Bug: webrtc:7660
Change-Id: I9381364a64113dbb622b26acbf2b71228c3c4b96
Reviewed-on: https://webrtc-review.googlesource.com/c/111480
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25710}
This commit is contained in:
Niels Möller
2018-11-20 11:06:58 +01:00
committed by Commit Bot
parent 22ff1a437a
commit 22b70ff1d4
14 changed files with 41 additions and 19 deletions

View File

@ -439,6 +439,7 @@ rtc_source_set("webrtc_common") {
deps = [
"api:array_view",
"api/video:video_bitrate_allocation",
"api/video:video_frame",
"rtc_base:checks",
"//third_party/abseil-cpp/absl/strings",
]

View File

@ -15,6 +15,7 @@ rtc_source_set("video_frame") {
"color_space.h",
"hdr_metadata.cc",
"hdr_metadata.h",
"video_codec_type.h",
"video_content_type.cc",
"video_content_type.h",
"video_frame.cc",

View File

@ -16,6 +16,7 @@
#include "absl/types/optional.h"
#include "api/video/hdr_metadata.h"
#include "api/video/video_bitrate_allocation.h"
#include "api/video/video_codec_type.h"
#include "api/video/video_content_type.h"
#include "api/video/video_rotation.h"
#include "api/video/video_timing.h"

View File

@ -0,0 +1,30 @@
/*
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef API_VIDEO_VIDEO_CODEC_TYPE_H_
#define API_VIDEO_VIDEO_CODEC_TYPE_H_
namespace webrtc {
// Video codec types
enum VideoCodecType {
// There are various memset(..., 0, ...) calls in the code that rely on
// kVideoCodecGeneric being zero.
kVideoCodecGeneric = 0,
kVideoCodecVP8,
kVideoCodecVP9,
kVideoCodecH264,
kVideoCodecI420,
kVideoCodecMultiplex,
};
} // namespace webrtc
#endif // API_VIDEO_VIDEO_CODEC_TYPE_H_

View File

@ -16,6 +16,7 @@
#include <string>
#include "api/video/video_bitrate_allocation.h"
#include "api/video/video_codec_type.h"
#include "common_types.h" // NOLINT(build/include)
#include "rtc_base/system/rtc_export.h"

View File

@ -17,6 +17,8 @@
#include "absl/strings/match.h"
// TODO(sprang): Remove this include when all usage includes it directly.
#include "api/video/video_bitrate_allocation.h"
// TODO(bugs.webrtc.org/7660): Delete include once downstream code is updated.
#include "api/video/video_codec_type.h"
#include "rtc_base/checks.h"
#if defined(_MSC_VER)
@ -243,18 +245,6 @@ enum Profile {
} // namespace H264
// Video codec types
enum VideoCodecType {
// There are various memset(..., 0, ...) calls in the code that rely on
// kVideoCodecGeneric being zero.
kVideoCodecGeneric = 0,
kVideoCodecVP8,
kVideoCodecVP9,
kVideoCodecH264,
kVideoCodecI420,
kVideoCodecMultiplex,
};
struct SpatialLayer {
bool operator==(const SpatialLayer& other) const;
bool operator!=(const SpatialLayer& other) const { return !(*this == other); }

View File

@ -252,8 +252,8 @@ rtc_static_library("rtc_internal_video_codecs") {
deps += [
":rtc_constants",
":rtc_media_base",
"..:webrtc_common",
"../api/video:video_bitrate_allocation",
"../api/video:video_frame",
"../api/video_codecs:rtc_software_fallback_wrappers",
"../api/video_codecs:video_codecs_api",
"../call:call_interfaces",

View File

@ -13,7 +13,7 @@
#include <string>
#include "common_types.h" // NOLINT(build/include)
#include "api/video/video_codec_type.h"
#include "media/base/codec.h"
#include "rtc_base/refcount.h"
#include "rtc_base/system/rtc_export.h"

View File

@ -14,7 +14,7 @@
#include <string>
#include <vector>
#include "common_types.h" // NOLINT(build/include)
#include "api/video/video_codec_type.h"
#include "media/base/codec.h"
#include "rtc_base/system/rtc_export.h"

View File

@ -15,6 +15,7 @@
#include "absl/container/inlined_vector.h"
#include "absl/types/optional.h"
#include "absl/types/variant.h"
#include "api/video/video_codec_type.h"
#include "api/video/video_content_type.h"
#include "api/video/video_frame_marking.h"
#include "api/video/video_rotation.h"

View File

@ -78,7 +78,6 @@ rtc_source_set("rtc_base_approved") {
":safe_compare",
":safe_minmax",
":type_traits",
"..:webrtc_common",
"../api:array_view",
"../system_wrappers:field_trial",
"experiments:field_trial_parser",

View File

@ -56,7 +56,6 @@ rtc_static_library("quality_scaling_experiment") {
]
deps = [
"../:rtc_base_approved",
"../..:webrtc_common",
"../../api/video_codecs:video_codecs_api",
"../../system_wrappers:field_trial",
"//third_party/abseil-cpp/absl/types:optional",

View File

@ -12,7 +12,6 @@
#include "absl/types/optional.h"
#include "api/video_codecs/video_encoder.h"
#include "common_types.h" // NOLINT(build/include)
namespace webrtc {
class QualityScalingExperiment {

View File

@ -15,8 +15,8 @@
#include <vector>
#include "absl/types/optional.h"
#include "api/video/video_codec_type.h"
#include "api/video/video_content_type.h"
#include "common_types.h" // NOLINT(build/include)
#include "rtc_base/numerics/sample_counter.h"
namespace webrtc {