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/i_list.h>
8 #include <nx/sdk/analytics/i_metadata_packet.h>
9 #include <nx/sdk/analytics/i_uncompressed_media_frame.h>
10 
11 namespace nx {
12 namespace sdk {
13 namespace analytics {
14 
15 class IUncompressedVideoFrame0: public Interface<IUncompressedVideoFrame0, IUncompressedMediaFrame>
16 {
17 public:
18  static auto interfaceId() { return makeId("nx::sdk::analytics::IUncompressedVideoFrame"); }
19 
20  enum class PixelFormat: int
21  {
22  yuv420,
23  argb,
24  abgr,
25  rgba,
26  bgra,
27  rgb,
28  bgr,
29  count
30  };
31 
33  {
34  int numerator;
35  int denominator;
36  };
37 
41  virtual int width() const = 0;
42 
46  virtual int height() const = 0;
47 
49  protected: virtual void getPixelAspectRatio(PixelAspectRatio* outValue) const = 0;
54  {
55  PixelAspectRatio value;
56  getPixelAspectRatio(&value);
57  return value;
58  }
59 
60  virtual PixelFormat pixelFormat() const = 0;
61 
66  virtual int lineSize(int plane) const = 0;
67 };
68 
72 class IUncompressedVideoFrame: public Interface<IUncompressedVideoFrame, IUncompressedVideoFrame0>
73 {
74 public:
75  static auto interfaceId() { return makeId("nx::sdk::analytics::IUncompressedVideoFrame1"); }
76 
78  protected: virtual IList<IMetadataPacket>* getMetadataList() const = 0;
79  public: Ptr<IList<IMetadataPacket>> metadataList() const
80  {
81  return toPtr(getMetadataList());
82  }
83 };
84 
85 } // namespace analytics
86 } // namespace sdk
87 } // namespace nx
virtual void getPixelAspectRatio(PixelAspectRatio *outValue) const =0
virtual int lineSize(int plane) const =0
Definition: interface.h:28
PixelAspectRatio pixelAspectRatio() const
Definition: i_uncompressed_video_frame.h:53
Definition: ptr.h:18
Definition: apple_utils.h:6
Definition: i_uncompressed_video_frame.h:15
Definition: i_uncompressed_video_frame.h:72
virtual IList< IMetadataPacket > * getMetadataList() const =0
Definition: i_list.h:9
Definition: i_uncompressed_video_frame.h:32