blob: 900e786f24b203e53cb91cf74bdfa47ec8cc6117 [file] [log] [blame]
nissee73afba2016-01-28 04:47:08 -08001/*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MEDIA_BASE_VIDEOSINKINTERFACE_H_
12#define MEDIA_BASE_VIDEOSINKINTERFACE_H_
nissee73afba2016-01-28 04:47:08 -080013
Ilya Nikolaevskiyd79314f2017-10-23 10:45:37 +020014#include <rtc_base/checks.h>
nisse7ade7b32016-03-23 04:48:10 -070015// TODO(nisse): Consider moving this interface (and possibly
16// VideoSourceInterface too) from media/base to common_video, to
17// reduce dependency cycles.
nissee73afba2016-01-28 04:47:08 -080018namespace rtc {
19
20template <typename VideoFrameT>
21class VideoSinkInterface {
22 public:
sakala536bfe2016-06-21 00:08:49 -070023 virtual ~VideoSinkInterface() {}
tommi2e82f382016-06-21 00:26:43 -070024
25 virtual void OnFrame(const VideoFrameT& frame) = 0;
Ilya Nikolaevskiyd79314f2017-10-23 10:45:37 +020026
27 // Should be called by the source when it discards the frame due to rate
28 // limiting.
Steve Antone78bcb92017-10-31 09:53:08 -070029 virtual void OnDiscardedFrame() {}
nissee73afba2016-01-28 04:47:08 -080030};
31
32} // namespace rtc
33
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020034#endif // MEDIA_BASE_VIDEOSINKINTERFACE_H_