mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
frame_importer.h
Go to the documentation of this file.
1 #ifndef MF_FRAME_IMPORTER_H_
2 #define MF_FRAME_IMPORTER_H_
3 
4 #include "../common.h"
5 #include "../ndarray/ndcoord.h"
6 #include "../ndarray/ndarray_view.h"
7 
8 namespace mf {
9 
11 
13 template<std::size_t Dim, typename Elem>
15 private:
16  ndsize<Dim> frame_shape_;
17 
18 protected:
20  frame_shape_(frame_shape) { }
21 
22 public:
24  using elem_type = Elem;
25  constexpr static std::size_t dimension = Dim;
26  constexpr static bool is_seekable = false;
27 
28  virtual ~frame_importer() { }
29 
30  const ndsize<Dim>& frame_shape() { return frame_shape_; }
31 
32  virtual void read_frame(const frame_view_type&) = 0;
33  virtual bool reached_end() const = 0;
34 };
35 
36 
37 }
38 
39 #endif
40 
static constexpr std::size_t dimension
Definition: frame_importer.h:25
Mapping between coordinates, indices, and addresses of multi-dimensional data.
Definition: ndarray_view.h:16
virtual void read_frame(const frame_view_type &)=0
frame_importer(const ndsize< Dim > &frame_shape)
Definition: frame_importer.h:19
virtual bool reached_end() const =0
YCbCr color, 8 bit.
Definition: color.h:74
const ndsize< Dim > & frame_shape()
Definition: frame_importer.h:30
static constexpr bool is_seekable
Definition: frame_importer.h:26
Vector of n-dimensional coordinates.
Definition: ndcoord.h:18
virtual ~frame_importer()
Definition: frame_importer.h:28
ndarray_view< Dim, Elem > frame_view_type
Definition: frame_importer.h:23
Frame importer, abstract base class.
Definition: frame_importer.h:14