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