MediaX v1.0.0rc7 [7e6cb74]
Video streaming for military vehicles
Loading...
Searching...
No Matches
rtp_jpeg_depayloader.h
1
2//
3// Copyright (c) 2025, Astute Systems PTY LTD
4//
5// This file is part of the VivoeX project developed by Astute Systems.
6//
7// Licensed under the Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
8// License. See the LICENSE file in the project root for full license details.
9//
14
15#ifndef JPEG_GST_RTP_JPEG_DEPAYLOADER_H_
16#define JPEG_GST_RTP_JPEG_DEPAYLOADER_H_
17
18#include <gst/app/gstappsink.h>
19#include <gst/gst.h>
20
21#include <vector>
22
23#include "rtp/rtp_depayloader.h"
24
26namespace mediax::rtp::jpeg::gst {
27
30 public:
36
42
49 RtpJpegGstDepayloader &operator=(const RtpJpegGstDepayloader &other);
50
57
63 void SetStreamInfo(const ::mediax::rtp::StreamInformation &stream_information) final;
64
71 bool Open() final;
72
77 void Start() final;
78
83 void Stop() final;
84
89 void Close() final;
90
99 bool Receive(mediax::rtp::RtpFrameData *data, int32_t timeout = 0) final;
100
106 void Callback(::mediax::rtp::RtpFrameData frame) const final;
107
112 void NewFrame();
113
114 private:
122 static GstFlowReturn NewFrameCallback(GstAppSink *appsink, gpointer user_data);
123
125 GstElement *pipeline_;
127 std::vector<uint8_t> buffer_in_;
129 bool new_rx_frame_ = false;
130};
131
132} // namespace mediax::rtp::jpeg::gst
133
134#endif // JPEG_GST_RTP_JPEG_DEPAYLOADER_H_
Manage an RTP stream.
Definition rtp_depayloader.h:61
A RTP payloader for JPEG DEF-STAN 00-82 video streams.
Definition rtp_jpeg_depayloader.h:29
void NewFrame()
Set new frame available.
Definition rtp_jpeg_depayloader.cc:270
void Start() final
Start the stream.
Definition rtp_jpeg_depayloader.cc:189
void Callback(::mediax::rtp::RtpFrameData frame) const final
Call the callback.
Definition rtp_jpeg_depayloader.cc:266
void Close() final
Close the RTP stream.
Definition rtp_jpeg_depayloader.cc:221
bool new_rx_frame_
A flag indication a new frame is available.
Definition rtp_jpeg_depayloader.h:129
void Stop() final
Stop the stream, can be quickly re-started.
Definition rtp_jpeg_depayloader.cc:206
RtpJpegGstDepayloader()
Construct a new Rtpvraw Depayloader object.
Definition rtp_jpeg_depayloader.cc:37
~RtpJpegGstDepayloader() final
Destroy the Rtpvraw Depayloader object.
std::vector< uint8_t > buffer_in_
The video buffer.
Definition rtp_jpeg_depayloader.h:127
bool Open() final
Open the RTP stream.
Definition rtp_jpeg_depayloader.cc:130
static GstFlowReturn NewFrameCallback(GstAppSink *appsink, gpointer user_data)
GStreamer callback for new frames.
Definition rtp_jpeg_depayloader.cc:68
void SetStreamInfo(const ::mediax::rtp::StreamInformation &stream_information) final
Configure at RTP input stream and dont wait for the SAP/SDP announcement.
Definition rtp_jpeg_depayloader.cc:48
GstElement * pipeline_
The GStreamer pipeline.
Definition rtp_jpeg_depayloader.h:125
bool Receive(mediax::rtp::RtpFrameData *data, int32_t timeout=0) final
Recieve a frame or timeout.
Definition rtp_jpeg_depayloader.cc:243
The JPEG video compression GStreamer namespace.
Definition rtp_jpeg_depayloader.cc:35
The Astute Systems (MediaX) library for video streaming.
Definition rtp_av1_depayloader.cc:34
RTP streaming video class for uncompressed DEF-STAN 00-82 video streams.
The RTP callback data.
Definition rtp_types.h:201
Struct capturing all stream information.
Definition rtp_types.h:223