mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 12:40:31 +00:00
Libug: option to decode to CUDA_RGBA and force GPUJPEG
This commit is contained in:
@@ -32,6 +32,10 @@ void exit_uv(int status) {
|
||||
LOG(LOG_LEVEL_WARNING) << "Requested exit with code " << status << ".\n";
|
||||
}
|
||||
|
||||
static_assert(static_cast<int>(UG_RGBA) == static_cast<int>(RGBA));
|
||||
static_assert(static_cast<int>(UG_I420) == static_cast<int>(I420));
|
||||
static_assert(static_cast<int>(UG_CUDA_RGBA) == static_cast<int>(CUDA_RGBA));
|
||||
|
||||
////////////////////////////////////
|
||||
// SENDER
|
||||
////////////////////////////////////
|
||||
@@ -221,6 +225,10 @@ struct ug_receiver *ug_receiver_start(struct ug_receiver_parameters *init_params
|
||||
commandline_params["decoder-use-codec"] = get_codec_name((codec_t) init_params->decompress_to);
|
||||
}
|
||||
|
||||
if (init_params->force_gpu_decoding) {
|
||||
commandline_params["decompress"] = "gpujpeg";
|
||||
}
|
||||
|
||||
if (initialize_video_display(&s->root_module, display, display_cfg, 0, nullptr, &s->display) != 0) {
|
||||
LOG(LOG_LEVEL_ERROR) << "Unable to initialize VRG display!\n";
|
||||
delete s;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define UG_LIB_87DD87FE_8111_4485_B05F_805029047F81
|
||||
|
||||
#if ! defined __cplusplus
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#else
|
||||
#include <cstddef>
|
||||
@@ -26,6 +27,7 @@ typedef void (*render_packet_received_callback_t)(void *udata, struct RenderPack
|
||||
typedef enum {
|
||||
UG_RGBA = 1, ///< RGBA 8-bit
|
||||
UG_I420 = 29, ///< planar YUV 4:2:0 in one buffer
|
||||
UG_CUDA_RGBA = 31, ///< RGBA 8-bit in CUDA buffer (Unified Memory pointer also possible)
|
||||
} libug_pixfmt_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -69,6 +71,7 @@ struct ug_receiver_parameters {
|
||||
int tx_port; ///< TX port for RTCP (optional, unused if sender unset, default 5004)
|
||||
int rx_port; ///< RX port for RTCP (optional, unused if sender unset, default 5004)
|
||||
libug_pixfmt_t decompress_to; ///< optional - pixel format to decompress to
|
||||
bool force_gpu_decoding; ///< force GPU decoding (decode with GPUJPEG)
|
||||
};
|
||||
LIBUG_DLL struct ug_receiver *ug_receiver_start(struct ug_receiver_parameters *init_params);
|
||||
LIBUG_DLL void ug_receiver_done(struct ug_receiver *state);
|
||||
|
||||
Reference in New Issue
Block a user