FfmpegSampler.h 368 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include "FfmpegHeaders.h"
#include "Interface.h"

/**
 * Class sample data from AVFrame
 */
class FfmpegSampler {
 public:
  virtual ~FfmpegSampler() = default;
  // return 0 on success and negative number on failure
  virtual int init() = 0;
  // sample from the given frame
  virtual std::unique_ptr<DecodedFrame> sample(const AVFrame* frame) = 0;
};