ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
33{
35 static constexpr const tChar *const MetaTypeName = "adtf/image";
40 static constexpr const tChar *const FormatName = "format_name";
45 static constexpr const tChar *const MaxByteSize = "max_byte_size";
50 static constexpr const tChar *const PixelWidth = "pixel_width";
55 static constexpr const tChar *const PixelHeight = "pixel_height";
60 static constexpr const tChar *const DataEndianess = "data_endianess";
61
67 {
68 pProperties->SetProperty(adtf::base::property<adtf_util::cString>(FormatName, ""));
69 pProperties->SetProperty(adtf::base::property<uint32_t>(MaxByteSize, 0));
70 pProperties->SetProperty(adtf::base::property<unsigned int>(PixelWidth, 0));
71 pProperties->SetProperty(adtf::base::property<unsigned int>(PixelHeight, 0));
73 }
74};
75
83
92
93} // namespace ant
94
95namespace lucky
96{
97
103{
104public:
110 {
112 }
113
136 const adtf::streaming::ant::IStreamType& oTypeExpected);
137};
138
144ADTF3_DEPRECATED("Use adtf::ucom::make_object_ptr<stream_type_image<>>() instead!")
149
156ADTF3_DEPRECATED("Use adtf::ucom::make_object_ptr<stream_type_image<>>(const ant::tStreamImageFormat&) instead!")
158{
160 THROW_IF_FAILED(ant::set_stream_type_image_format(*oCreatedType, oFormat));
161 return oCreatedType;
162}
163
164} //namespace lucky
165
166namespace penguin
167{
175template<typename T = ant::tStreamImageFormat>
176class stream_type_image : public ant::cStreamType
177{
178 static_assert(std::is_same_v<ant::tStreamImageFormat, T>,
179 "Currently only T=ant::tStreamImageFormat is possible."
180 "To support your own type you need to specialize this template stream_type_image<T>");
181
182public:
183 stream_type_image():
185 {
186 }
187 stream_type_image(const T& sImageFormat):
189 {
191 }
192};
193}
194
200
201} // namespace streaming
202} // namespace adtf
Copyright © Audi Electronics Venture GmbH.
#define ADTF3_DEPRECATED(_depr_message_)
Mark a function or variable as deprecated.
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Defines access methods for the interface of a Stream Type - see also Stream Type and Stream Meta Type...
Default StreamType implementation.
Definition streamtype.h:282
Generator template to create an instance of a IStreamType class for stream_meta_type_image ("adtf/ima...
#define PLATFORM_BYTEORDER
defines a link to __get_platform_byteorder.
Definition constants.h:124
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
tResult set_stream_type_image_format(IStreamType &oType, const tStreamImageFormat &oFormat)
Helper function to set the properties of a IStreamType for a stream_meta_type_image.
tResult get_stream_type_image_format(tStreamImageFormat &oFormat, const IStreamType &oType)
Helper function to retrieve the oFormat (tStreamImageFormat) out of the of a IStreamType for a stream...
Namespace for all functionality of the ADTF Streaming SDK provided since v3.11.
ucom::ant::object_ptr< ant::IStreamType > create_adtf_image_stream_type()
Convenience functionality to create a stream type image - see sec_stream_type_image.
Namespace for the ADTF Streaming SDK.
object_ptr< Implementation > make_object_ptr(Args &&... args)
Create an instance of type object_ptr with Implementation as the shared resource.
Namespace for the ADTF uCOM3 SDK.
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Use this Stream Meta Type for describing a video stream with single frames and there format and set t...
static constexpr const tChar *const MaxByteSize
Name for the Property of the max byte size.
static constexpr const tChar *const DataEndianess
Name for the Property of the data endianess (usually pixel endianess).
static void SetProperties(const adtf::ucom::iobject_ptr< adtf::base::IProperties > &pProperties)
Sets the default properties to the given pProperties.
static constexpr const tChar *const FormatName
Name for the Property of the format name - see imageformat_definition and Generic Pixel Format.
static constexpr const tChar *const PixelWidth
Name for the Property of the pixel width.
static constexpr const tChar *const MetaTypeName
StreamMetaTypeName for imagetype (video stream).
static constexpr const tChar *const PixelHeight
Name for the Property of the pixel height.
Simple Stream Type and Stream Meta Type definition for video frames or an image sequence as a conveni...
Use this Stream Meta Type for describing a video stream with single frames and there format and set t...
static void SetProperties(const adtf::ucom::iobject_ptr< adtf::base::IProperties > &pProperties)
Sets the default properties to the given pProperties.
static tResult IsCompatible(const adtf::streaming::ant::IStreamType &oTypeToCheck, const adtf::streaming::ant::IStreamType &oTypeExpected)
Compares the oTypeExpected Stream Type with the oTypeToCheck - see Default Stream Meta Types in ADTF ...
#define THROW_IF_FAILED(s)
throws if the expression returns a failed tResult