summaryrefslogtreecommitdiff
path: root/chromium/media/capture/video/win/sink_filter_observer_win.h
blob: 646c443e72287975e09115d0c1c484296f8502e7 (plain)
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
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Observer class of Sinkfilter. The implementor of this class receive video
// frames from the SinkFilter DirectShow filter.

#ifndef MEDIA_CAPTURE_VIDEO_WIN_SINK_FILTER_OBSERVER_WIN_H_
#define MEDIA_CAPTURE_VIDEO_WIN_SINK_FILTER_OBSERVER_WIN_H_

#include <stdint.h>
#include "media/capture/video_capture_types.h"

namespace media {

class SinkFilterObserver {
 public:
  // SinkFilter will call this function with all frames delivered to it.
  // |buffer| is only valid during this function call.
  virtual void FrameReceived(const uint8_t* buffer,
                             int length,
                             const VideoCaptureFormat& format,
                             base::TimeDelta timestamp,
                             bool flip_y) = 0;

  virtual void FrameDropped(VideoCaptureFrameDropReason reason) = 0;

 protected:
  virtual ~SinkFilterObserver();
};

}  // namespace media

#endif  // MEDIA_CAPTURE_VIDEO_WIN_SINK_FILTER_OBSERVER_WIN_H_