NVIDIA DeepStream SDK API Reference

8.0 Release
mediainfo.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
19 #ifndef NVIDIA_DEEPSTREAM_MEDIAINFO
20 #define NVIDIA_DEEPSTREAM_MEDIAINFO
21 
22 #include <string>
23 #include <memory>
24 #include <vector>
25 
26 namespace deepstream {
27 
28 struct StreamInfo {
29  std::string codec;
30 
31  virtual ~StreamInfo() {}
32 };
33 
34 struct AudioStreamInfo : public StreamInfo {
35  unsigned int channels;
36 };
37 
38 struct VideoStreamInfo : public StreamInfo {
39  unsigned int width;
40  unsigned int height;
41  struct {
42  unsigned int num;
43  unsigned int denom;
44  } framerate;
45 };
46 
47 struct MediaInfo {
48  bool error = false;
49  uint64_t duration = 0;
50  bool live = false;
51  operator bool() const { return !error; };
52  std::vector<std::unique_ptr<StreamInfo>> streams;
53  static std::unique_ptr<struct MediaInfo> discover(std::string uri);
54 };
55 
56 }
57 #endif
deepstream::VideoStreamInfo::denom
unsigned int denom
Definition: mediainfo.hpp:43
deepstream::MediaInfo
Definition: mediainfo.hpp:47
deepstream::VideoStreamInfo::width
unsigned int width
Definition: mediainfo.hpp:39
deepstream::AudioStreamInfo::channels
unsigned int channels
Definition: mediainfo.hpp:35
deepstream::StreamInfo::~StreamInfo
virtual ~StreamInfo()
Definition: mediainfo.hpp:31
deepstream::MediaInfo::discover
static std::unique_ptr< struct MediaInfo > discover(std::string uri)
deepstream::VideoStreamInfo::height
unsigned int height
Definition: mediainfo.hpp:40
deepstream::StreamInfo
Definition: mediainfo.hpp:28
deepstream::VideoStreamInfo::num
unsigned int num
Definition: mediainfo.hpp:42
deepstream::MediaInfo::live
bool live
Definition: mediainfo.hpp:50
deepstream::VideoStreamInfo::framerate
struct deepstream::VideoStreamInfo::@40 framerate
deepstream::MediaInfo::error
bool error
Definition: mediainfo.hpp:48
deepstream
Definition: buffer.hpp:33
deepstream::VideoStreamInfo
Definition: mediainfo.hpp:38
deepstream::StreamInfo::codec
std::string codec
Definition: mediainfo.hpp:29
deepstream::MediaInfo::duration
uint64_t duration
Definition: mediainfo.hpp:49
deepstream::MediaInfo::streams
std::vector< std::unique_ptr< StreamInfo > > streams
Definition: mediainfo.hpp:51
deepstream::AudioStreamInfo
Definition: mediainfo.hpp:34