mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00

This CL was generated by running git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \ grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \ grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \ grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \ grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \ | xargs clang-format -i ; git cl format Most of these changes are clang-format grouping and reordering includes differently. Bug: webrtc:9340 Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051 Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28505}
98 lines
2.8 KiB
C++
98 lines
2.8 KiB
C++
/*
|
|
* Copyright (c) 2012 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 COMMON_TYPES_H_
|
|
#define COMMON_TYPES_H_
|
|
|
|
#include <stddef.h> // For size_t
|
|
|
|
#include <cstdint>
|
|
|
|
namespace webrtc {
|
|
|
|
struct FrameCounts {
|
|
FrameCounts() : key_frames(0), delta_frames(0) {}
|
|
int key_frames;
|
|
int delta_frames;
|
|
};
|
|
|
|
// Callback, used to notify an observer whenever frame counts have been updated.
|
|
class FrameCountObserver {
|
|
public:
|
|
virtual ~FrameCountObserver() {}
|
|
virtual void FrameCountUpdated(const FrameCounts& frame_counts,
|
|
uint32_t ssrc) = 0;
|
|
};
|
|
|
|
// Callback, used to notify an observer when the overhead per packet
|
|
// has changed.
|
|
class OverheadObserver {
|
|
public:
|
|
virtual ~OverheadObserver() = default;
|
|
virtual void OnOverheadChanged(size_t overhead_bytes_per_packet) = 0;
|
|
};
|
|
|
|
// ==================================================================
|
|
// Video specific types
|
|
// ==================================================================
|
|
|
|
// TODO(magjed): Move this and other H264 related classes out to their own file.
|
|
namespace H264 {
|
|
|
|
enum Profile {
|
|
kProfileConstrainedBaseline,
|
|
kProfileBaseline,
|
|
kProfileMain,
|
|
kProfileConstrainedHigh,
|
|
kProfileHigh,
|
|
};
|
|
|
|
} // namespace H264
|
|
|
|
struct SpatialLayer {
|
|
bool operator==(const SpatialLayer& other) const;
|
|
bool operator!=(const SpatialLayer& other) const { return !(*this == other); }
|
|
|
|
unsigned short width;
|
|
unsigned short height;
|
|
float maxFramerate; // fps.
|
|
unsigned char numberOfTemporalLayers;
|
|
unsigned int maxBitrate; // kilobits/sec.
|
|
unsigned int targetBitrate; // kilobits/sec.
|
|
unsigned int minBitrate; // kilobits/sec.
|
|
unsigned int qpMax; // minimum quality
|
|
bool active; // encoded and sent.
|
|
};
|
|
|
|
// Simulcast is when the same stream is encoded multiple times with different
|
|
// settings such as resolution.
|
|
typedef SpatialLayer SimulcastStream;
|
|
|
|
// Minimum and maximum playout delay values from capture to render.
|
|
// These are best effort values.
|
|
//
|
|
// A value < 0 indicates no change from previous valid value.
|
|
//
|
|
// min = max = 0 indicates that the receiver should try and render
|
|
// frame as soon as possible.
|
|
//
|
|
// min = x, max = y indicates that the receiver is free to adapt
|
|
// in the range (x, y) based on network jitter.
|
|
//
|
|
// Note: Given that this gets embedded in a union, it is up-to the owner to
|
|
// initialize these values.
|
|
struct PlayoutDelay {
|
|
int min_ms;
|
|
int max_ms;
|
|
};
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // COMMON_TYPES_H_
|