converter.hpp
1 #pragma once
2 
3 #include "../_cexports/c_webstreaming.h"
4 #include "webstreaming.hpp"
5 
6 #include "../global.hpp"
7 
8 namespace Cvb
9 {
10 
11 CVB_BEGIN_INLINE_NS
12 
13 template <>
14 inline HandleGuard<WebStreaming::Converter>::HandleGuard(void* handle) noexcept
15  : HandleGuard<WebStreaming::Converter>(handle, [](void* handle) { CVB_CALL_CAPI(ReleaseObject(handle)); })
16 {
17 }
18 
19 namespace WebStreaming
20 {
21 
28 class Converter
29 {
30  public:
31 
32  using GuardType = HandleGuard<Converter>;
33 
34  virtual ~Converter() = default;
35 
41  void* Handle() const noexcept
42  {
43  return handle_.Handle();
44  }
45 
46  protected:
47 
48  Converter(HandleGuard<Converter>&& guard) noexcept
49  : handle_(std::move(guard))
50  {
51  }
52 
53  private:
54 
55  HandleGuard<Converter> handle_;
56 };
57 
58 }
59 
60 CVB_END_INLINE_NS
61 
62 }
void * Handle() const noexcept
Returns C-API style handle to Converter Object.
Definition: converter.hpp:41
A converter object.
Definition: converter.hpp:28
Root namespace for the Image Manager interface.
Definition: version.hpp:11