webrtc/common_video/frame_counts.h
Niels Möller a8327d4415 Move FrameCounts and FrameCountObserver to common_video/frame_counts.h
Bug: webrtc:7660
Change-Id: Ic42227508e0e26b5443de0ef0e0722126cbbb8fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182501
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32005}
2020-08-27 09:53:18 +00:00

32 lines
963 B
C++

/*
* Copyright (c) 2020 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_VIDEO_FRAME_COUNTS_H_
#define COMMON_VIDEO_FRAME_COUNTS_H_
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;
};
} // namespace webrtc
#endif // COMMON_VIDEO_FRAME_COUNTS_H_