nx_metadata_sdk  1.0
Metadata SDK
i_uncompressed_video_frame.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #pragma once
4 
5 #include <nx/sdk/interface.h>
6 
7 #include <nx/sdk/analytics/i_uncompressed_media_frame.h>
8 
9 namespace nx {
10 namespace sdk {
11 namespace analytics {
12 
13 class IUncompressedVideoFrame: public Interface<IUncompressedVideoFrame, IUncompressedMediaFrame>
14 {
15 public:
16  static auto interfaceId() { return makeId("nx::sdk::analytics::IUncompressedVideoFrame"); }
17 
18  enum class PixelFormat: int
19  {
20  yuv420,
21  argb,
22  abgr,
23  rgba,
24  bgra,
25  rgb,
26  bgr,
27  count
28  };
29 
31  {
32  int numerator;
33  int denominator;
34  };
35 
39  virtual int width() const = 0;
40 
44  virtual int height() const = 0;
45 
49  protected: virtual void getPixelAspectRatio(PixelAspectRatio* outValue) const = 0;
50  public: PixelAspectRatio pixelAspectRatio() const
51  {
52  PixelAspectRatio value;
53  getPixelAspectRatio(&value);
54  return value;
55  }
56 
57  virtual PixelFormat pixelFormat() const = 0;
58 
63  virtual int lineSize(int plane) const = 0;
64 };
65 
66 } // namespace analytics
67 } // namespace sdk
68 } // namespace nx
Definition: interface.h:28
virtual void getPixelAspectRatio(PixelAspectRatio *outValue) const =0
Definition: i_uncompressed_video_frame.h:30
Definition: apple_utils.h:6
Definition: i_uncompressed_video_frame.h:13
virtual int lineSize(int plane) const =0