Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
video.h
Go to the documentation of this file.
1//
2// Copyright (c) 2023, DefenceX PTY LTD
3//
4// This file is part of the VivoeX project developed by DefenceX.
5//
6// Licensed under the Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
7// License. See the LICENSE file in the project root for full license details.
8//
12
13#ifndef HMICORE_WIDGETS_CANVAS_VIDEO_H_
14#define HMICORE_WIDGETS_CANVAS_VIDEO_H_
15
16#include <uncompressed/rtp_uncompressed_depayloader.h>
17
18#include <cstdint>
19#include <string>
20#include <vector>
21
25
26namespace gva {
27
29class WidgetVideo : public WidgetCanvas {
30 public:
36 explicit WidgetVideo(const RendererGva& renderer);
37
42 ~WidgetVideo() final;
43
48 void SetReceiveTimeout(uint32_t timeout_ms);
49
54 void Draw() final;
55
60 void Start();
61
66 void Stop();
67
73 void SetSessionName(std::string_view session_name);
74
80 void SetIpAddress(std::string_view ip_address);
81
82 private:
84 std::array<uint8_t, 640 * 480 * 3> rgb_buffer_;
86 mediax::rtp::uncompressed::RtpUncompressedDepayloader video_feed_;
88 uint32_t timeout_ms_ = 5;
90 const bool kSapEnabled = false;
91};
92
93} // namespace gva
94
95#endif // HMICORE_WIDGETS_CANVAS_VIDEO_H_
Class definition of the GVA renderer.
Definition renderer_gva.h:29
Class defining the mode widget.
Definition canvas.h:26
Class defining the video widget.
Definition video.h:29
void SetReceiveTimeout(uint32_t timeout_ms)
Set the Receive timeout attribute for frame data, default 80ms.
Definition video.cc:42
void SetSessionName(std::string_view session_name)
Set the Session Name attribute.
Definition video.cc:85
~WidgetVideo() final
Destroy the Widget video object.
Definition video.cc:40
void Draw() final
This will update the video frame if one available.
Definition video.cc:44
void Start()
Start the video stream.
Definition video.cc:81
void SetIpAddress(std::string_view ip_address)
Set the Ipaddress attribute.
Definition video.cc:87
void Stop()
Stop the video stream.
Definition video.cc:77