ADTF
Loading...
Searching...
No Matches
streammetatypeimage.h
Go to the documentation of this file.
1
7#pragma once
9#include <adtfbase/property.h>
10#include "streamtype_intf.h"
11#include "streamimageformat.h"
12#include "streamtype.h"
13
15
16namespace adtf
17{
18namespace streaming
19{
20namespace ant
21{
22
31{
33 static constexpr const tChar *const MetaTypeName = "adtf/image";
38 static constexpr const tChar *const FormatName = "format_name";
43 static constexpr const tChar *const MaxByteSize = "max_byte_size";
48 static constexpr const tChar *const PixelWidth = "pixel_width";
53 static constexpr const tChar *const PixelHeight = "pixel_height";
58 static constexpr const tChar *const DataEndianess = "data_endianess";
59
65 {
66 pProperties->SetProperty(adtf::base::property<adtf_util::cString>(FormatName, ""));
67 pProperties->SetProperty(adtf::base::property<uint32_t>(MaxByteSize, 0));
68 pProperties->SetProperty(adtf::base::property<unsigned int>(PixelWidth, 0));
69 pProperties->SetProperty(adtf::base::property<unsigned int>(PixelHeight, 0));
70 pProperties->SetProperty(adtf::base::property<unsigned int>(DataEndianess, PLATFORM_BYTEORDER));
71 }
72};
73
81
90
91} // namespace ant
92
93namespace lucky
94{
95
101{
102public:
108 {
110 }
111
127 const adtf::streaming::ant::IStreamType& oTypeExpected);
128};
129
136ADTF3_DEPRECATED("Use adtf::ucom::make_object_ptr<stream_type_image<>>() instead.")
141
149ADTF3_DEPRECATED("Use adtf::ucom::make_object_ptr<stream_type_image<>>(const ant::tStreamImageFormat&) instead.")
151{
153 THROW_IF_FAILED(ant::set_stream_type_image_format(*oCreatedType, oFormat));
154 return oCreatedType;
155}
156
157} //namespace lucky
158
159namespace penguin
160{
168template<typename T = ant::tStreamImageFormat>
169class stream_type_image : public ant::cStreamType
170{
171 static_assert(std::is_same_v<ant::tStreamImageFormat, T>,
172 "Currently only T=ant::tStreamImageFormat is possible."
173 "To support your own type you need to specialize this template stream_type_image<T>");
174
175public:
176 stream_type_image():
178 {
179 }
180 stream_type_image(const T& sImageFormat):
182 {
184 }
185};
186}
187
193
194} // namespace streaming
195} // namespace adtf
#define ADTF3_DEPRECATED(_depr_message_)
Definition adtf_base_deprecated.h:27
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define THROW_IF_FAILED(s)
throws if the expression returns a failed tResult
Definition result.h:88
Definition properties_v2.h:283
Defines access methods for the interface of a Stream Type.
Definition streamtype_intf.h:96
Definition streamtype.h:276
Generator template to create an instance of a ant::IStreamType class for lucky::stream_meta_type_imag...
Definition streammetatypeimage.h:170
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Definition bindingproxyoutport.h:16
tResult get_stream_type_image_format(tStreamImageFormat &oFormat, const IStreamType &oType)
tResult set_stream_type_image_format(IStreamType &oType, const tStreamImageFormat &oFormat)
Namespace for all functionality of the ADTF Streaming SDK provided since v3.11.
Definition streammetatypeaudio.h:76
ucom::ant::object_ptr< ant::IStreamType > create_adtf_image_stream_type()
Definition streammetatypeimage.h:137
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
object_ptr< Implementation > make_object_ptr(Args &&... args)
Create an instance of type object_ptr with Implementation as the shared resource.
Definition object_ptr_utilities.h:129
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
Use this Stream Meta Type for describing a video stream with single frames and there format and set t...
Definition streammetatypeimage.h:31
static constexpr const tChar *const PixelHeight
Name for the Property of the pixel height.
Definition streammetatypeimage.h:53
static constexpr const tChar *const MaxByteSize
Name for the Property of the max byte size.
Definition streammetatypeimage.h:43
static void SetProperties(const adtf::ucom::iobject_ptr< adtf::base::IProperties > &pProperties)
Definition streammetatypeimage.h:64
static constexpr const tChar *const MetaTypeName
StreamMetaTypeName for imagetype (video stream).
Definition streammetatypeimage.h:33
static constexpr const tChar *const FormatName
Name for the Property of the format name.
Definition streammetatypeimage.h:38
static constexpr const tChar *const PixelWidth
Name for the Property of the pixel width.
Definition streammetatypeimage.h:48
static constexpr const tChar *const DataEndianess
Name for the Property of the data endianess (usually pixel endianess).
Definition streammetatypeimage.h:58
Definition streamimageformat.h:30
Use this Stream Meta Type for describing a video stream with single frames and there format and set t...
Definition streammetatypeimage.h:101
static void SetProperties(const adtf::ucom::iobject_ptr< adtf::base::IProperties > &pProperties)
Definition streammetatypeimage.h:107
static tResult IsCompatible(const adtf::streaming::ant::IStreamType &oTypeToCheck, const adtf::streaming::ant::IStreamType &oTypeExpected)
Compares the oTypeExpected Stream Type with the oTypeToCheck.