From b79fb3af4779d6837a6a8f146f94f2a05bccd208 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Mon, 22 Apr 2024 03:49:25 +0200 Subject: [PATCH] update (#689) * add infiray T2 * add audio test mode param * audio playback on by default * remove releative include path and change include path order (#678) * improve/export decoding pipelines (#680) * Revert "remove releative include path and change include path order (#678)" This reverts commit e5ece7092cd9fc04089920f50ff114688c43e5fd. * fix h264 service * mkae services more sensable * move drop down select list(s) for camera type to camera.hpp fetch camera type from cpp (in qml) renames geekworm to hdmi to csi * move drop down select list(s) for camera type to camera.hpp fetch camera type from cpp (in qml) renames geekworm to hdmi to csi * fix documentation * experiment - debug drm / kms * disable audio on android * drm / kms debug off for non-dev branch * i need to merge this (with failing CIs) to test rock * uncomment the debug_kms stuff, not needed anymore * custom hw make 1 selectable * custom hw make 1 selectable * update platform, camera * improve UI if card sub type is known * don't show 2.4G on X20 * change version code to beta --------- Co-authored-by: Consti10 Co-authored-by: tbago --- QOpenHD.pro | 2 + app/main.cpp | 37 ++++ app/telemetry/models/aohdsystem.cpp | 2 +- app/telemetry/models/camerastreammodel.cpp | 45 ++++ app/telemetry/models/camerastreammodel.h | 17 ++ app/telemetry/models/openhd_core/camera.hpp | 202 ++++++++++++++++-- app/telemetry/models/openhd_core/platform.hpp | 87 +++++--- app/telemetry/models/wificard.cpp | 1 + app/telemetry/models/wificard.h | 5 + app/telemetry/settings/documentedparam.cpp | 10 +- app/util/qopenhd.h | 2 +- .../vscommon/audio_playback.cpp | 6 +- package.sh | 17 +- .../openhd_settings/ChooseCameraDialoque.qml | 199 +++-------------- .../openhd_settings/LinkQuickPanel.qml | 8 + .../openhd_settings/PopupTxPowerEditor.qml | 53 +++-- qml/ui/elements/AppSettings.qml | 2 +- systemd/h264_decode.service | 14 ++ systemd/h265_decode.service | 14 ++ systemd/rock3_h264_decode.service | 13 -- systemd/rock3_h265_decode.service | 14 -- systemd/rock3_mjpeg_decode.service | 14 -- systemd/rock5_h264_decode.service | 14 -- systemd/rock5_h264a_decode.service | 14 -- systemd/rock5_h265_decode.service | 14 -- systemd/rock5_h265a_decode.service | 14 -- systemd/rock5_mjpeg_decode.service | 14 -- systemd/rock5_mjpega_decode.service | 14 -- systemd/rpi_h264_decode.service | 18 -- systemd/x86_ubuntu_h264_decode.service | 15 -- systemd/x86_ubuntu_h265_decode.service | 15 -- systemd/x86_ubuntu_mjpeg_decode.service | 15 -- 32 files changed, 458 insertions(+), 453 deletions(-) create mode 100644 systemd/h264_decode.service create mode 100644 systemd/h265_decode.service delete mode 100644 systemd/rock3_h264_decode.service delete mode 100644 systemd/rock3_h265_decode.service delete mode 100644 systemd/rock3_mjpeg_decode.service delete mode 100644 systemd/rock5_h264_decode.service delete mode 100644 systemd/rock5_h264a_decode.service delete mode 100644 systemd/rock5_h265_decode.service delete mode 100644 systemd/rock5_h265a_decode.service delete mode 100644 systemd/rock5_mjpeg_decode.service delete mode 100644 systemd/rock5_mjpega_decode.service delete mode 100644 systemd/rpi_h264_decode.service delete mode 100644 systemd/x86_ubuntu_h264_decode.service delete mode 100644 systemd/x86_ubuntu_h265_decode.service delete mode 100644 systemd/x86_ubuntu_mjpeg_decode.service diff --git a/QOpenHD.pro b/QOpenHD.pro index a5e5a2a14..51050fabc 100755 --- a/QOpenHD.pro +++ b/QOpenHD.pro @@ -72,6 +72,8 @@ QT +=core quick qml gui \ widgets QT += opengl QT += charts +#QT += gui-private +#LIBS += Ldrm INCLUDEPATH += $$PWD/lib INCLUDEPATH += $$PWD/app diff --git a/app/main.cpp b/app/main.cpp index 81d9b5313..613a11a37 100755 --- a/app/main.cpp +++ b/app/main.cpp @@ -70,6 +70,9 @@ RESOLVEFUNC(SSL_get1_peer_certificate); RESOLVEFUNC(EVP_PKEY_get_base_id); #endif // OPENSSL_VERSION_MAJOR >= 3 +//#include +//#include +//#include // Load all the fonts we use ?! static void load_fonts(){ @@ -197,6 +200,39 @@ static void android_check_permissions(){ #endif } +/*static void debug_kms(){ + qDebug()<<"platform name:"<nativeResourceForIntegration("dri_fd"); + if (drifd) + fd = static_cast(reinterpret_cast(drifd)); + auto * crtcid = pni->nativeResourceForScreen("dri_crtcid", qScreen); + if (crtcid) + crtc = static_cast(reinterpret_cast(crtcid)); + auto * connid = pni->nativeResourceForScreen("dri_connectorid", qScreen); + if (connid) + connector = static_cast(reinterpret_cast(connid)); + auto * atomic = pni->nativeResourceForIntegration("dri_atomic_request"); + if (atomic){ + //auto * request = reinterpret_cast(atomic); + auto * request = atomic; + if (request != nullptr) + useatomic = true; + } + qDebug()< list{ + QCameraNameAndType{"XLOL",1} + }; + auto tmp= QManufacturerForPlatform{ + "LOL", + list + }; + QVariantList ret; + return ret; +} + +QStringList CameraStreamModel::get_manufacturer_choices(int platform_type) +{ + auto all_choices=get_camera_choices_for_platform(platform_type,m_camera_index!=0); + QStringList ret; + for(auto& choice: all_choices){ + ret.push_back(choice.manufacturer_name.c_str()); + } + return ret; +} + +QList CameraStreamModel::get_manufacturer_cameras_type(int platform_type, int index) +{ + auto all_choices=get_camera_choices_for_platform(platform_type,m_camera_index!=0); + QList ret; + if(index>=all_choices.size())index=0; + for(auto& choice: all_choices[index].cameras){ + ret.push_back(choice.type); + } + return ret; +} + +QStringList CameraStreamModel::get_manufacturer_cameras_names(int platform_type, int index) +{ + auto all_choices=get_camera_choices_for_platform(platform_type,m_camera_index!=0); + QStringList ret; + if(index>=all_choices.size())index=0; + for(auto& choice: all_choices[index].cameras){ + ret.push_back(choice.name.c_str()); + } + return ret; +} diff --git a/app/telemetry/models/camerastreammodel.h b/app/telemetry/models/camerastreammodel.h index 8ee61f83f..ad320d3ed 100644 --- a/app/telemetry/models/camerastreammodel.h +++ b/app/telemetry/models/camerastreammodel.h @@ -2,11 +2,23 @@ #define AIRCAMERAMODEL_H #include +#include #include "../tutil/mavlink_include.h" #include "util/lqutils_include.h" +struct QCameraNameAndType{ + QString name; + int type; +}; +struct QManufacturerForPlatform{ + QString manufacturer_name; + QList cameras; +}; +Q_DECLARE_METATYPE(QCameraNameAndType); +Q_DECLARE_METATYPE(QManufacturerForPlatform); + // NOTE1: This class exists to avoid duplicated code for primary and secondary camera(stream)-stats displayed in the HUD // NOTE2: Here we have only stats for one camera / camera stream that are transmitted via lossy // telemetry messages, aka in regular intervalls. @@ -114,6 +126,11 @@ class CameraStreamModel : public QObject private: std::chrono::steady_clock::time_point m_last_tx_frame_drop_calculation=std::chrono::steady_clock::now(); int m_last_tx_frame_drop_calculation_count=-1; +public: + Q_INVOKABLE QVariantList get_camera_choices(int platform_type); + Q_INVOKABLE QStringList get_manufacturer_choices(int platform_type); + Q_INVOKABLE QList get_manufacturer_cameras_type(int platform_type,int index); + Q_INVOKABLE QStringList get_manufacturer_cameras_names(int platform_type,int index); }; #endif // AIRCAMERAMODEL_H diff --git a/app/telemetry/models/openhd_core/camera.hpp b/app/telemetry/models/openhd_core/camera.hpp index b3621c49e..931b9e0f2 100644 --- a/app/telemetry/models/openhd_core/camera.hpp +++ b/app/telemetry/models/openhd_core/camera.hpp @@ -12,6 +12,8 @@ #include #include +#include "platform.hpp" + /** * NOTE: This file is copied into QOpenHD to populate the UI. */ @@ -35,7 +37,10 @@ static constexpr int X_CAM_TYPE_DEVELOPMENT_FILESRC = 4; // H264 usb cameras are not supported, since in general, they do not support // changing bitrate/ encoding parameters. static constexpr int X_CAM_TYPE_USB_GENERIC = 10; +// 384x292@25 cam static constexpr int X_CAM_TYPE_USB_INFIRAY = 11; +// 256x192@25 but only 0x0@0 works (urghs) +static constexpr int X_CAM_TYPE_USB_INFIRAY_T2 = 12; // ... reserved for future (Thermal) USB cameras // @@ -75,12 +80,16 @@ static constexpr int X_CAM_TYPE_X20_RUNCAM_NANO = 70; // ROCK Specific starts here // static constexpr int X_CAM_TYPE_ROCK_HDMI_IN = 80; -static constexpr int X_CAM_TYPE_ROCK_IMX219 = 81; +static constexpr int X_CAM_TYPE_ROCK_RK3566_IMX219 = 81; +static constexpr int X_CAM_TYPE_ROCK_RK3566_PLACEHOLDER1 = 82; +static constexpr int X_CAM_TYPE_ROCK_RK3566_PLACEHOLDER2 = 83; // // OpenIPC specific starts here static constexpr int X_CAM_TYPE_OPENIPC_SOMETHING = 90; // - +// +// NVIDIA XAVIER specific starts here +static constexpr int X_CAM_TYPE_NVIDIA_XAVIER_IMX577 = 100; // ... rest is reserved for future use // no camera, only exists to have a default value for secondary camera (which is // disabled by default). NOTE: The primary camera cannot be disabled ! @@ -100,6 +109,8 @@ static std::string x_cam_type_to_string(int camera_type) { return "USB"; case X_CAM_TYPE_USB_INFIRAY: return "INFIRAY"; + case X_CAM_TYPE_USB_INFIRAY_T2: + return "INFIRAY_T2"; // All the rpi stuff begin case X_CAM_TYPE_RPI_MMAL_HDMI_TO_CSI: return "MMAL_HDMI"; @@ -139,12 +150,18 @@ static std::string x_cam_type_to_string(int camera_type) { // All the rock begin case X_CAM_TYPE_ROCK_HDMI_IN: return "ROCK_HDMI_IN"; - case X_CAM_TYPE_ROCK_IMX219: + case X_CAM_TYPE_ROCK_RK3566_IMX219: return "ROCK_IMX219"; + case X_CAM_TYPE_ROCK_RK3566_PLACEHOLDER1: + return "ROCK_PLACEHOLDER1"; + case X_CAM_TYPE_ROCK_RK3566_PLACEHOLDER2: + return "ROCK_PLACEHOLDER2"; case X_CAM_TYPE_DISABLED: return "DISABLED"; case X_CAM_TYPE_OPENIPC_SOMETHING: return "OPENIPC_X"; + case X_CAM_TYPE_NVIDIA_XAVIER_IMX577: + return "XAVIER_IMX577"; default: break; } @@ -191,7 +208,8 @@ struct XCamera { return x_cam_type_to_string(camera_type); } bool is_camera_type_usb_infiray() const { - return camera_type == X_CAM_TYPE_USB_INFIRAY; + return camera_type == X_CAM_TYPE_USB_INFIRAY || + camera_type == X_CAM_TYPE_USB_INFIRAY_T2; }; // Returns a list of known supported resolution(s). // They should be ordered in ascending resolution / framerate @@ -215,9 +233,17 @@ struct XCamera { return {ResolutionFramerate{1280, 720, 60}}; } else if (camera_type == X_CAM_TYPE_USB_INFIRAY) { return {ResolutionFramerate{384, 292, 25}}; + } else if (camera_type == X_CAM_TYPE_USB_INFIRAY_T2) { + // return {ResolutionFramerate{256,192,25}}; for whatever reason doesn't + // work ... + return {ResolutionFramerate{0, 0, 0}}; } else if (camera_type == X_CAM_TYPE_USB_GENERIC) { - // Return what's most likely going to work - return {ResolutionFramerate{640, 480, 30}}; + std::vector ret; + // most likely working resolution + ret.push_back(ResolutionFramerate{640, 480, 30}); + // auto is also a good choice on usb + ret.push_back(ResolutionFramerate{0, 0, 0}); + return ret; } else if (requires_rpi_libcamera_pipeline()) { std::vector ret; if (camera_type == X_CAM_TYPE_RPI_LIBCAMERA_ARDUCAM_IMX462 || @@ -283,6 +309,24 @@ struct XCamera { ret.push_back(ResolutionFramerate{1280, 720, 60}); ret.push_back(ResolutionFramerate{1920, 1080, 60}); return ret; + } else if (camera_type == X_CAM_TYPE_ROCK_RK3566_IMX219) { + std::vector ret; + ret.push_back(ResolutionFramerate{640, 480, 30}); + ret.push_back(ResolutionFramerate{848, 480, 30}); + ret.push_back(ResolutionFramerate{1280, 720, 30}); + ret.push_back(ResolutionFramerate{1920, 1080, 30}); + return ret; + } else if (camera_type == X_CAM_TYPE_ROCK_HDMI_IN) { + // Standard hdmi in resolutions for now + std::vector ret; + ret.push_back(ResolutionFramerate{1280, 720, 60}); + ret.push_back(ResolutionFramerate{1920, 1080, 60}); + return ret; + } else if (camera_type == X_CAM_TYPE_NVIDIA_XAVIER_IMX577) { + std::vector ret; + ret.push_back(ResolutionFramerate{1280, 720, 60}); + ret.push_back(ResolutionFramerate{1920, 1080, 60}); + return ret; } // Not mapped yet // return something that might work or might not work @@ -295,34 +339,38 @@ struct XCamera { } }; -static bool is_valid_primary_cam_type(int cam_type) { - if (cam_type >= 0 && cam_type < X_CAM_TYPE_DISABLED) return true; - return false; -} -static bool is_valid_secondary_cam_type(int cam_type) { - if (cam_type == X_CAM_TYPE_DUMMY_SW || cam_type == X_CAM_TYPE_USB_INFIRAY || - cam_type == X_CAM_TYPE_USB_GENERIC || cam_type == X_CAM_TYPE_EXTERNAL || - cam_type == X_CAM_TYPE_EXTERNAL_IP || cam_type == X_CAM_TYPE_DISABLED) { - return true; - } - return false; -} - static bool is_rpi_csi_camera(int cam_type) { return cam_type >= 20 && cam_type <= 69; } static bool is_rock_csi_camera(int cam_type) { - return cam_type == X_CAM_TYPE_ROCK_IMX219; + return cam_type == X_CAM_TYPE_ROCK_RK3566_IMX219 || + cam_type == X_CAM_TYPE_ROCK_RK3566_PLACEHOLDER1 || + cam_type == X_CAM_TYPE_ROCK_RK3566_PLACEHOLDER2; } static bool is_usb_camera(int cam_type) { return cam_type >= 10 && cam_type < 19; } +static bool is_valid_primary_cam_type(int cam_type) { + if (cam_type >= 0 && cam_type < X_CAM_TYPE_DISABLED) return true; + return false; +} +static bool is_valid_secondary_cam_type(int cam_type) { + if (is_usb_camera(cam_type)) return true; + if (cam_type == X_CAM_TYPE_DUMMY_SW || cam_type == X_CAM_TYPE_EXTERNAL || + cam_type == X_CAM_TYPE_EXTERNAL_IP || cam_type == X_CAM_TYPE_DISABLED) { + return true; + } + return false; +} // Takes a string in the from {width}x{height}@{framerate} // e.g. 1280x720@30 static std::optional parse_video_format( const std::string& videoFormat) { + // 0x0@0 is a valid resolution (omit resolution / fps in the pipeline) + if (videoFormat == "0x0@0") return ResolutionFramerate{0, 0, 0}; + // Otherwise, we need at least 6 characters (0x0@0 is 5 characters) if (videoFormat.size() <= 5) { return std::nullopt; } @@ -383,4 +431,118 @@ static std::string get_v4l2_device_name_string(int value) { return ss.str(); } +/** + * On platforms with many cameras (e.g. rpi) we need a differentiation by + * manufacturer to make a nice UI - otherwise, the choices are overwhelming. + * Manufacturer is not really the right name for all categories that result + * here, but it is 'okay' for the UI in qopenhd. + */ +struct CameraNameAndType { + std::string name; + int type; +}; +struct ManufacturerForPlatform { + std::string manufacturer_name; + std::vector cameras; +}; +/** + * Return: a list of categories for this platform. + * Each category has a list of valid camera types (for this platform). + * @param platform_type unique platform type + * @param is_secondary selection is different for secondary cam,most notably, we + * only support usb, develop and a 'disabled' type. + */ +static std::vector get_camera_choices_for_platform( + int platform_type, bool is_secondary) { + std::vector usb_cameras{ + CameraNameAndType{"INFIRAY USB", X_CAM_TYPE_USB_INFIRAY}, + CameraNameAndType{"INFIRAY USB T2", X_CAM_TYPE_USB_INFIRAY_T2}, + CameraNameAndType{"EXP USB GENERIC", X_CAM_TYPE_USB_GENERIC}}; + ManufacturerForPlatform MANUFACTURER_USB{"USB", usb_cameras}; + std::vector debug_cameras{ + CameraNameAndType{"Dummy (debug)", 0}, + CameraNameAndType{"External (DEV)", 2}, + // CameraNameAndType{"External IP (DEV)",3}, + CameraNameAndType{"DEV Filecamera", 4}, + }; + ManufacturerForPlatform MANUFACTURER_DEBUG{"DEV/DEBUG", debug_cameras}; + // Secondary can only be used with USB and / or the debug cameras. CSI is not + // usable for secondary. + if (is_secondary) { + // Not really a manufacturer, but ui looks okay with this + std::vector disable_camera{ + CameraNameAndType{"DISABLE", X_CAM_TYPE_DISABLED}, + }; + ManufacturerForPlatform MANUFACTURER_DISABLE{"DISABLE", disable_camera}; + return std::vector{ + MANUFACTURER_DISABLE, MANUFACTURER_USB, MANUFACTURER_DEBUG}; + } + if (platform_type == X_PLATFORM_TYPE_RPI_OLD || + platform_type == X_PLATFORM_TYPE_RPI_4 || + platform_type == X_PLATFORM_TYPE_RPI_CM4) { + std::vector arducam_cameras{ + CameraNameAndType{"SKYMASTERHDR", 40}, + CameraNameAndType{"SKYVISIONPRO", 41}, + CameraNameAndType{"IMX477m", 42}, + CameraNameAndType{"IMX462", 43}, + CameraNameAndType{"IMX327", 44}, + CameraNameAndType{"IMX290", 45}, + CameraNameAndType{"IMX462_LOWLIGHT_MINI", 46}}; + std::vector veye_cameras{ + CameraNameAndType{"2MP", 60}, + CameraNameAndType{"CSIMX307", 61}, + CameraNameAndType{"CSSC132", 62}, + CameraNameAndType{"MVCAM", 63}, + }; + std::vector rpif_cameras{ + CameraNameAndType{"V1 OV5647", 30}, + CameraNameAndType{"V2 IMX219", 31}, + CameraNameAndType{"V3 IMX708", 32}, + CameraNameAndType{"HQ IMX477", 33}, + }; + std::vector hdmi_to_csi_cameras{ + CameraNameAndType{"GENERIC HDMI to CSI", 20}}; + return std::vector{ + ManufacturerForPlatform{"ARDUCAM", arducam_cameras}, + ManufacturerForPlatform{"VEYE", veye_cameras}, + ManufacturerForPlatform{"RPI FOUNDATION", rpif_cameras}, + ManufacturerForPlatform{"HDMI TO CSI", hdmi_to_csi_cameras}, + MANUFACTURER_USB, + MANUFACTURER_DEBUG}; + } else if (platform_type == X_PLATFORM_TYPE_ALWINNER_X20) { + std::vector runcam_cameras{ + CameraNameAndType{"RUNCAM NANO", X_CAM_TYPE_X20_RUNCAM_NANO}, + }; + return std::vector{ + ManufacturerForPlatform{"RUNCAM", runcam_cameras}}; + } else if (platform_type == X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_ZERO3W) { + std::vector arducam_cameras{ + CameraNameAndType{"IMX219", X_CAM_TYPE_ROCK_RK3566_IMX219}, + CameraNameAndType{"PLACEHOLDER1", X_CAM_TYPE_ROCK_RK3566_PLACEHOLDER1}, + CameraNameAndType{"PLACEHOLDER2", X_CAM_TYPE_ROCK_RK3566_PLACEHOLDER2}, + }; + return std::vector{ + ManufacturerForPlatform{"ARDUCAM", arducam_cameras}, MANUFACTURER_USB, + MANUFACTURER_DEBUG}; + } else if (platform_type == X_PLATFORM_TYPE_ROCKCHIP_RK3588_RADXA_ROCK5) { + std::vector hdmi_cameras{ + CameraNameAndType{"HDMI IN", X_CAM_TYPE_ROCK_HDMI_IN}, + }; + return std::vector{ + ManufacturerForPlatform{"HDMI IN", hdmi_cameras}, MANUFACTURER_USB, + MANUFACTURER_DEBUG}; + } else if (platform_type == X_PLATFORM_TYPE_X86) { + return std::vector{MANUFACTURER_USB, + MANUFACTURER_DEBUG}; + } else if (platform_type == X_PLATFORM_TYPE_NVIDIA_XAVIER) { + std::vector nvidia_leopard_csi_cameras{ + CameraNameAndType{"IMX577", X_CAM_TYPE_NVIDIA_XAVIER_IMX577}, + }; + return std::vector{ + ManufacturerForPlatform{"LEOPARD", nvidia_leopard_csi_cameras}, + MANUFACTURER_USB, MANUFACTURER_DEBUG}; + } + return std::vector{MANUFACTURER_DEBUG}; +} + #endif // OPENHD_CAMERA_HPP diff --git a/app/telemetry/models/openhd_core/platform.hpp b/app/telemetry/models/openhd_core/platform.hpp index 4efc18222..8eb4c6021 100644 --- a/app/telemetry/models/openhd_core/platform.hpp +++ b/app/telemetry/models/openhd_core/platform.hpp @@ -3,52 +3,73 @@ #include +#include -namespace openhd{ +// Some things conditionally depend on the platform we are running on -// When this one shows up a bit more work has to be done to run openhd on the platform (probably) ;) -static constexpr int X_PLATFORM_TYPE_UNKNOWN=0; +// When this one shows up a bit more work has to be done to run openhd on the +// platform (probably) ;) +static constexpr int X_PLATFORM_TYPE_UNKNOWN = 0; // Generic X86 -static constexpr int X_PLATFORM_TYPE_X86=1; +static constexpr int X_PLATFORM_TYPE_X86 = 1; // Numbers 10..20 are reserved for rpi // Right now we are only interested if it is an RPI of the // generation RPI 4 / RPI CM4 or the generation before - -// NOTE: RPI 5 is currently not supported due to the complete lack of suitable HW acceleration -static constexpr int X_PLATFORM_TYPE_RPI_OLD=10; -static constexpr int X_PLATFORM_TYPE_RPI_4=11; -static constexpr int X_PLATFORM_TYPE_RPI_CM4=12; -static constexpr int X_PLATFORM_TYPE_RPI_5=12; +// NOTE: RPI 5 is currently not supported due to the complete lack of suitable +// HW acceleration +static constexpr int X_PLATFORM_TYPE_RPI_OLD = 10; +static constexpr int X_PLATFORM_TYPE_RPI_4 = 11; +static constexpr int X_PLATFORM_TYPE_RPI_CM4 = 12; +static constexpr int X_PLATFORM_TYPE_RPI_5 = 12; // Numbers 20..30 are reserved for rockchip -static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_ZERO3W=20; // Zero 3 W -static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3588_RADXA_ROCK5=21; // ROCK 5 -static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RV1126_UNDEFINED=22; // FUTRE +static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_ZERO3W = + 20; // Zero 3 W +static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RK3588_RADXA_ROCK5 = + 21; // ROCK 5 +static constexpr int X_PLATFORM_TYPE_ROCKCHIP_RV1126_UNDEFINED = 22; // FUTRE // Numbers 30..35 are reserved for allwinner -static constexpr int X_PLATFORM_TYPE_ALWINNER_X20=30; - -// @Buldo is working on openipc / sigmastar, 36..40 -static constexpr int X_PLATFORM_TYPE_SIGMASTAR_UNDEFINED=36; - -std::string x_platform_type_to_string(int platform_type) { - switch (platform_type) { - case X_PLATFORM_TYPE_UNKNOWN:return "UNKNOWN"; - case X_PLATFORM_TYPE_X86:return "X86"; - case X_PLATFORM_TYPE_RPI_OLD: return "RPI<=3"; - case X_PLATFORM_TYPE_RPI_4: return "RPI 4"; - case X_PLATFORM_TYPE_RPI_5: return "RPI 5"; +static constexpr int X_PLATFORM_TYPE_ALWINNER_X20 = 30; + +// @Buldo is working on openipc / sigmastar, 36..39 +static constexpr int X_PLATFORM_TYPE_OPENIPC_SIGMASTAR_UNDEFINED = 36; + +// Numbers 40..50 are reserved for NVIDIA +static constexpr int X_PLATFORM_TYPE_NVIDIA_XAVIER = 40; + +static std::string x_platform_type_to_string(int platform_type) { + switch (platform_type) { + case X_PLATFORM_TYPE_UNKNOWN: + return "UNKNOWN"; + case X_PLATFORM_TYPE_X86: + return "X86"; + case X_PLATFORM_TYPE_RPI_OLD: + return "RPI<=3"; + case X_PLATFORM_TYPE_RPI_4: + return "RPI 4"; + case X_PLATFORM_TYPE_RPI_5: + return "RPI 5"; // RPI END - case X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_ZERO3W: return "RADXA ZERO3W"; - case X_PLATFORM_TYPE_ROCKCHIP_RK3588_RADXA_ROCK5: return "RADXA ROCK5"; - case X_PLATFORM_TYPE_ROCKCHIP_RV1126_UNDEFINED: return "RV1126 UNDEFINED"; + case X_PLATFORM_TYPE_ROCKCHIP_RK3566_RADXA_ZERO3W: + return "RADXA ZERO3W"; + case X_PLATFORM_TYPE_ROCKCHIP_RK3588_RADXA_ROCK5: + return "RADXA ROCK5"; + case X_PLATFORM_TYPE_ROCKCHIP_RV1126_UNDEFINED: + return "RV1126 UNDEFINED"; // ROCK END - case X_PLATFORM_TYPE_ALWINNER_X20: return "X20"; - case X_PLATFORM_TYPE_SIGMASTAR_UNDEFINED: return "SIGMASTAR UNDEFINED"; + case X_PLATFORM_TYPE_ALWINNER_X20: + return "X20"; + case X_PLATFORM_TYPE_OPENIPC_SIGMASTAR_UNDEFINED: + return "OPENIPC SIGMASTAR"; + case X_PLATFORM_TYPE_NVIDIA_XAVIER: + return "NVIDIA_XAVIER"; default: - break; - } - return "ERR-UNDEFINED"; -} + break; + } + std::stringstream ss; + ss << "ERR-UNDEFINED{" << platform_type << "}"; + return ss.str(); } diff --git a/app/telemetry/models/wificard.cpp b/app/telemetry/models/wificard.cpp index 5ebb11c5e..1f3ba7669 100644 --- a/app/telemetry/models/wificard.cpp +++ b/app/telemetry/models/wificard.cpp @@ -139,6 +139,7 @@ void WiFiCard::process_mavlink(const mavlink_openhd_stats_monitor_mode_wifi_card bool supported = false; if(card_type==0 || card_type==1)supported=true; set_card_type_supported(supported); + set_card_sub_type(msg.dummy2); } int WiFiCard::helper_get_gnd_curr_best_rssi() diff --git a/app/telemetry/models/wificard.h b/app/telemetry/models/wificard.h index 5054edfbe..24c73f1cc 100644 --- a/app/telemetry/models/wificard.h +++ b/app/telemetry/models/wificard.h @@ -32,6 +32,11 @@ class WiFiCard : public QObject L_RO_PROP(int,card_type,set_card_type,-1) // -1 = no info available yet, otherwise, openhd card type (0..?) L_RO_PROP(QString,card_type_as_string,set_card_type_as_string,"N/A") L_RO_PROP(int,card_type_supported,set_card_type_supported,false) + // exta + L_RO_PROP(int,card_sub_type,set_card_sub_type,-1) +public: + L_RO_PROP(int,mWIFI_CARD_SUB_TYPE_RTL8812AU_ASUS,unused_WIFI_CARD_SUB_TYPE_RTL8812AU_ASUS,1) + L_RO_PROP(int,mWIFI_CARD_SUB_TYPE_RTL8812AU_X20,unused_WIFI_CARD_SUB_TYPE_RTL8812AU_X20,2) public: explicit WiFiCard(bool is_air,int card_idx,QObject *parent = nullptr); static constexpr int N_CARDS=4; diff --git a/app/telemetry/settings/documentedparam.cpp b/app/telemetry/settings/documentedparam.cpp index dbdf17467..2807c8f46 100644 --- a/app/telemetry/settings/documentedparam.cpp +++ b/app/telemetry/settings/documentedparam.cpp @@ -587,9 +587,17 @@ static std::vector> get_parameters_list(){ "No effect if joy rc is disabled."); } { - append_int(ret,"AUDIO_ENABLE", + /*append_int(ret,"AUDIO_ENABLE", ImprovedIntSetting::createEnumEnableDisable(), "enables / disables audio streaming from air to ground. In development. Enabling automatically restarts the air unit !" + );*/ + auto audio_items=std::vector{ + {"DISABLE",0}, + {"ENABLE",1}, + {"TEST",100}, + }; + append_int(ret,"AUDIO_ENABLE",ImprovedIntSetting(0,1000000,audio_items), + "enables / disables audio streaming from air to ground. In development. Use test mode to validate your ground audio output." ); } return ret; diff --git a/app/util/qopenhd.h b/app/util/qopenhd.h index ad4c0901b..96fa55c9f 100644 --- a/app/util/qopenhd.h +++ b/app/util/qopenhd.h @@ -69,7 +69,7 @@ class QOpenHD : public QObject // Tries to mimic android toast as much as possible // Q_INVOKABLE void show_toast(QString message,bool long_toast=false); - L_RO_PROP(QString,version_string,set_version_string,"2.5.4-evo-alpha"); + L_RO_PROP(QString,version_string,set_version_string,"2.5.4-evo-beta"); // // Shows a message popup to the user that needs to be clicked away - use sparingly // diff --git a/app/videostreaming/vscommon/audio_playback.cpp b/app/videostreaming/vscommon/audio_playback.cpp index 240694824..e020d365c 100644 --- a/app/videostreaming/vscommon/audio_playback.cpp +++ b/app/videostreaming/vscommon/audio_playback.cpp @@ -13,8 +13,12 @@ void platform_start_audio_streaming_if_enabled() { + if(QOpenHD::instance().is_android()){ + // audio r.n crashes on android + return; + } QSettings settings; - const bool dev_enable_live_audio_playback=settings.value("dev_enable_live_audio_playback", false).toBool(); + const bool dev_enable_live_audio_playback=settings.value("dev_enable_live_audio_playback", true).toBool(); if(!dev_enable_live_audio_playback){ qDebug()<<"Live audio playback is disabled"; return; diff --git a/package.sh b/package.sh index a6866e479..33fd41960 100755 --- a/package.sh +++ b/package.sh @@ -57,17 +57,16 @@ ls -a release/ echo "here we should have built the file correctly" cp release/QOpenHD /tmp/qopenhd/usr/local/bin/ || exit 1 +cp systemd/h264_decode.service /tmp/qopenhd/etc/systemd/system/ || exit 1 +cp systemd/h265_decode.service /tmp/qopenhd/etc/systemd/system/ || exit 1 # copying services if [[ "${PACKAGE_ARCH}" = "armhf" ]]; then PACKAGE_NAME=qopenhd cp systemd/rpi_qopenhd.service /tmp/qopenhd/etc/systemd/system/qopenhd.service || exit 1 -cp systemd/rpi_h264_decode.service /tmp/qopenhd/etc/systemd/system/h264_decode.service || exit 1 elif [[ "${PACKAGE_ARCH}" = "arm64" ]]; then mkdir -p /tmp/qopenhd/etc/systemd/system/ cp systemd/rock3_qopenhd.service /tmp/qopenhd/etc/systemd/system/qopenhd.service -# cp systemd/rock3_h264_decode.service /tmp/qopenhd/etc/systemd/system/h264_decode.service -# cp systemd/rock3_h265_decode.service /tmp/qopenhd/etc/systemd/system/h265_decode.service PACKAGE_NAME=qopenhd_rk3566 else PACKAGE_NAME=qopenhd @@ -103,28 +102,16 @@ elif [[ "${PACKAGE_ARCH}" = "arm64" ]]; then ${PLATFORM_PACKAGES} || exit 1 #Rock5Package - rm /tmp/qopenhd/etc/systemd/system/qopenhd.service - # rm /tmp/qopenhd/etc/systemd/system/h264_decode.service - # rm /tmp/qopenhd/etc/systemd/system/h265_decode.service - cp systemd/rock5_qopenhd.service /tmp/qopenhd/etc/systemd/system/qopenhd.service - # cp systemd/rock5_h264_decode.service /tmp/qopenhd/etc/systemd/system/h264_decode.service - # cp systemd/rock5_h265_decode.service /tmp/qopenhd/etc/systemd/system/h265_decode.service fpm -a ${PACKAGE_ARCH} -s dir -t deb -n qopenhd_rk3588 -v ${VERSION} -C ${TMPDIR} \ -p qopenhd_rk3588_VERSION_ARCH.deb \ --after-install after-install.sh \ ${PLATFORM_PACKAGES} || exit 1 #Rock5aPackage - rm /tmp/qopenhd/etc/systemd/system/qopenhd.service - rm /tmp/qopenhd/etc/systemd/system/h264_decode.service - rm /tmp/qopenhd/etc/systemd/system/h265_decode.service - cp systemd/rock5_qopenhd.service /tmp/qopenhd/etc/systemd/system/qopenhd.service - cp systemd/rock5_h264a_decode.service /tmp/qopenhd/etc/systemd/system/h264_decode.service - cp systemd/rock5_h265a_decode.service /tmp/qopenhd/etc/systemd/system/h265_decode.service fpm -a ${PACKAGE_ARCH} -s dir -t deb -n qopenhd_rk3588a -v ${VERSION} -C ${TMPDIR} \ -p qopenhd_rk3588a_VERSION_ARCH.deb \ diff --git a/qml/ui/configpopup/openhd_settings/ChooseCameraDialoque.qml b/qml/ui/configpopup/openhd_settings/ChooseCameraDialoque.qml index aa68662e2..10b7bc58c 100644 --- a/qml/ui/configpopup/openhd_settings/ChooseCameraDialoque.qml +++ b/qml/ui/configpopup/openhd_settings/ChooseCameraDialoque.qml @@ -17,11 +17,6 @@ Card { cardNameColor: "black" visible: false - // Supported platform types: - readonly property int mPLATFORM_TYPE_RPI:0; - readonly property int mPLATFORM_TYPE_ROCK:1; - readonly property int mPLATFORM_TYPE_X20:2; - readonly property int mPLATFORM_TYPE_X86:3; property int m_platform_type: 0; // Secondary camera only supports a few options - we can omit @@ -40,34 +35,15 @@ Card { function set_ohd_platform_type(){ const ohd_platform_type=_ohdSystemAir.ohd_platform_type; console.log("Platform:"+ohd_platform_type) - if(ohd_platform_type>=10 && ohd_platform_type<20){ - m_platform_type=mPLATFORM_TYPE_RPI; - return true; - } - if(ohd_platform_type>=20 && ohd_platform_type<30){ - m_platform_type=mPLATFORM_TYPE_ROCK; - return true; - } - if(ohd_platform_type==1){ - m_platform_type=mPLATFORM_TYPE_X86; - return true; - } - if(ohd_platform_type==30){ - m_platform_type=mPLATFORM_TYPE_X20; + m_platform_type=ohd_platform_type; + if(ohd_platform_type>=1){ return true; } return false; } function get_platform_name(){ - if(m_platform_type==mPLATFORM_TYPE_RPI){ - return "RPI"; - }else if(m_platform_type==mPLATFORM_TYPE_ROCK){ - return "ROCK"; - }else if(m_platform_type==mPLATFORM_TYPE_X20){ - return "X20"; - } - return "X86"; + return _ohdSystemAir.ohd_platform_type_as_string } // For debugging @@ -91,101 +67,14 @@ Card { // The manufacturer model(s) don't need a value ListModel{ - id: model_manufacturers_rpi - ListElement {title: "ARDUCAM"} - ListElement {title: "VEYE"} - ListElement {title: "RPI FOUNDATION"} - ListElement {title: "GEEKWORM"} - ListElement {title: "USB"} - ListElement {title: "DEV/DEBUG"} - } - ListModel{ - id: model_manufacturers_rock - ListElement {title: "ARDUCAM"} - ListElement {title: "RADXA"} - ListElement {title: "USB"} - ListElement {title: "DEV/DEBUG"} + id: model_manufacturers + ListElement {title: "DUMMY_MANUFACTURER"} } ListModel{ - id: model_manufacturers_x20 - ListElement {title: "RUNCAM"} - } - ListModel{ // X86 doesn't reall have manufacturers - id: model_manufacturers_x86 - ListElement {title: "USB"} - ListElement {title: "DEV/DEBUG"} - } - ListModel{ // Secondary camera doesn't reall have manufacturers - id: model_manufacturers_secondary_cam - ListElement {title: "SECONDARY CAM"} + id: model_cameras_for_this_manufacturer + ListElement {title: "CAM TYPE"; value: 0} } - // Actual CAMERA model(s) - // Value needs to map to the corrseponding openhd camera type ! - ListModel{ - id: rpi_arducam_cameras - ListElement {title: "SKYMASTERHDR"; value: 40} - ListElement {title: "SKYVISIONPRO"; value: 41} - ListElement {title: "IMX477m"; value: 42} - ListElement {title: "IMX462"; value: 43} - ListElement {title: "IMX327"; value: 44} - ListElement {title: "IMX290"; value: 45} - ListElement {title: "IMX462_LOWLIGHT_MINI"; value: 46} - } - ListModel{ - id: rpi_veye_cameras - ListElement {title: "2MP"; value: 60} - ListElement {title: "CSIMX307"; value: 61} - ListElement {title: "CSSC132"; value: 62} - ListElement {title: "MVCAM"; value: 63} - } - ListModel{ - id: rpi_rpif_cameras - ListElement {title: "V1 OV5647"; value: 30} - ListElement {title: "V2 IMX219"; value: 31} - ListElement {title: "V3 IMX708"; value: 32} - ListElement {title: "HQ IMX477"; value: 33} - } - ListModel{ - id: rpi_geekworm_cameras - ListElement {title: "HDMI to CSI"; value: 20} - } - ListModel{ - id: cameras_usb - ListElement {title: "INFIRAY USB"; value: 11} - ListElement {title: "EXP USB GENERIC"; value: 10} - } - ListModel{ - id: cameras_debug - ListElement {title: "Dummy (debug)"; value: 0} - ListElement {title: "External (DEV)"; value: 2} - ListElement {title: "External IP (DEV)"; value: 3} - ListElement {title: "DEV Filecamera"; value: 4} - } - ListModel{ - id: x20_runcam_cameras - ListElement {title: "RUNCAM NANO"; value: 70} - } - ListModel{ - id: rock_arducam_cameras - ListElement {title: "ARDUCAM ROCK 0"; value: 0} - ListElement {title: "ARDUCAM ROCK 1"; value: 1} - } - ListModel{ - id: rock_raxca_cameras - ListElement {title: "HDMI IN"; value: 0} - } - ListModel{ - id: generic_secondary_camera_options - ListElement {title: "DISABLED (Default)"; value: 255} - ListElement {title: "INFIRAY USB"; value: 11} - ListElement {title: "EXP USB GENERIC"; value: 10} - ListElement {title: "Dummy (debug)"; value: 0} - ListElement {title: "External (DEV)"; value: 2} - ListElement {title: "External IP (DEV)"; value: 3} - } - - function initialize_and_show(){ console.log("Choose camera dialoque opened with "+get_platform_name()); comboBoxManufacturers.model=get_manufacturers_model(); @@ -210,12 +99,7 @@ Card { combobox_cameras.model=get_cameras_model(0); combobox_cameras.currentIndex=0; } - if(m_is_for_secondary_camera){ - comboBoxManufacturers.model=model_manufacturers_secondary_cam; - combobox_cameras.model=generic_secondary_camera_options; - }else{ - comboBoxManufacturers.enabled=true; - } + comboBoxManufacturers.enabled=true; // If there is only one manufacturer choice, disable the combobox. if(comboBoxManufacturers.model.count<=1){ comboBoxManufacturers.enabled=false; @@ -225,65 +109,34 @@ Card { m_user_selected_camera_type=-1; visible=true; enabled=true; + populate_main_camera_selector() } + function get_manufacturers_model(){ - if(m_is_for_secondary_camera){ - return model_manufacturers_secondary_cam - } - if(m_platform_type==mPLATFORM_TYPE_RPI){ - return model_manufacturers_rpi; - }else if(m_platform_type==mPLATFORM_TYPE_ROCK){ - return model_manufacturers_rock - }else if(m_platform_type==mPLATFORM_TYPE_X20){ - return model_manufacturers_x20 - }else if(m_platform_type==mPLATFORM_TYPE_X86){ - return model_manufacturers_x86 + var manufacturers=m_cam_model.get_manufacturer_choices(m_platform_type); + model_manufacturers.clear(); + for(var i=0;i=0){ + comboBoxCardSelectManufacturer.currentIndex=m_user_selected_card_manufacturer; + }else{ + comboBoxCardSelectManufacturer.currentIndex=0; + } combo_box_txpower_disarmed.currentIndex=0; combo_box_txpower_armed.currentIndex=0; - m_user_selected_card_manufacturer=-1; + visible=true; enabled=true; } @@ -62,24 +84,15 @@ PopupBigGeneric{ return _wifi_card_gnd0.card_type; } - function get_card_chipset_str(){ - var chipset=get_chipset_type(); - if(chipset==0){ - return "RTL88XXAU"; - }else if(chipset==1){ - return "RTL88XXBU"; - } - return "ERROR"; - } // Should never show up ! ListModel{ - id: model_error - ListElement {title: "Not Enabled"; value: -1} + id: model_manufacturer_unknown_chipset + ListElement {title: "Unknown chipset"; value: -1} } ListModel{ id: model_rtl8812au_manufacturers - ListElement {title: "Wifi Card [RTL88XXAU]"; value: -1} + ListElement {title: "Please Select"; value: -1} ListElement {title: "AC56/AWUS036ACH [RTL88XXAU]"; value: 0} ListElement {title: "AC180 [RTL88XXAU]"; value: 1} ListElement {title: "OpenHD HW [RTL88XXAU]"; value: 2} @@ -99,7 +112,7 @@ PopupBigGeneric{ }else if(chip_type==1){ return model_rtl8812bu_manufacturers; } - return model_error; + return model_manufacturer_unknown_chipset; } // TX power choices for each chipset / manufacturer @@ -125,7 +138,8 @@ PopupBigGeneric{ ListModel{ id: model_rtl8812au_manufacturer_openhd ListElement {title: "Please select"; value: -1} - ListElement {title: "LOW [3] ~25mW"; value: 3} + ListElement {title: "BENCH [1] "; value: 1} + ListElement {title: "LOW [2] ~25mW"; value: 2} ListElement {title: "MEDIUM [5] ~200mW"; value: 5} ListElement {title: "HIGH [14] ~800mW"; value: 14} ListElement {title: "MAX1 [18] >1W"; value: 18} @@ -171,7 +185,7 @@ PopupBigGeneric{ var chip_type=get_chipset_type(); var manufacturer=m_user_selected_card_manufacturer; if(manufacturer<0){ - return model_error; + return model_manufacturer_unknown_chipset; } var ret; if(chip_type==0){ @@ -250,16 +264,17 @@ PopupBigGeneric{ id: comboBoxCardSelectManufacturer Layout.minimumWidth: 180 Layout.preferredWidth: 480 - model: get_model_manufacturer_for_chip_type() + model: model_manufacturer_unknown_chipset textRole: "title" onCurrentIndexChanged: { var manufacturer = comboBoxCardSelectManufacturer.model.get(comboBoxCardSelectManufacturer.currentIndex).value; m_user_selected_card_manufacturer = manufacturer; } font.pixelSize: 14 + // If the card type is provided by openhd, no need to let the user select + enabled: !m_card_type_provided_by_openhd } } - RowLayout { Layout.fillWidth: true Button { diff --git a/qml/ui/elements/AppSettings.qml b/qml/ui/elements/AppSettings.qml index bf603abe9..d4e7c6a50 100644 --- a/qml/ui/elements/AppSettings.qml +++ b/qml/ui/elements/AppSettings.qml @@ -381,7 +381,7 @@ Settings { property bool dev_force_show_full_screen: false // experimental - property bool dev_enable_live_audio_playback: false + property bool dev_enable_live_audio_playback: true // might / might not work property bool dev_set_swap_interval_zero: false diff --git a/systemd/h264_decode.service b/systemd/h264_decode.service new file mode 100644 index 000000000..c9311cf61 --- /dev/null +++ b/systemd/h264_decode.service @@ -0,0 +1,14 @@ +[Unit] +Description=rock_h264_decode + +[Service] +User=root + +# Platform-specific video decode service +ExecStart=/usr/local/bin/h264_decode.sh + +Restart=always +RestartSec=2 + +[Install] +WantedBy=multi-user.target diff --git a/systemd/h265_decode.service b/systemd/h265_decode.service new file mode 100644 index 000000000..4b18eaff4 --- /dev/null +++ b/systemd/h265_decode.service @@ -0,0 +1,14 @@ +[Unit] +Description=rock_h265_decode + +[Service] +User=root + +# Platform-specific video decode service +ExecStart=/usr/local/bin/h265_decode.sh + +Restart=always +RestartSec=1 + +[Install] +WantedBy=multi-user.target diff --git a/systemd/rock3_h264_decode.service b/systemd/rock3_h264_decode.service deleted file mode 100644 index 150be5c3a..000000000 --- a/systemd/rock3_h264_decode.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=rock_h264_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H264' ! rtph264depay ! h264parse ! mppvideodec format=23 fast-mode=true ! queue ! kmssink plane-id=54 force-modesetting=false" -Restart=always -RestartSec=2 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rock3_h265_decode.service b/systemd/rock3_h265_decode.service deleted file mode 100644 index 51a1f50f4..000000000 --- a/systemd/rock3_h265_decode.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=rock_h265_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H265' ! rtph265depay ! h265parse ! mppvideodec format=23 fast-mode=true ! queue ! kmssink plane-id=54 force-modesetting=false" - -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rock3_mjpeg_decode.service b/systemd/rock3_mjpeg_decode.service deleted file mode 100644 index a281d9362..000000000 --- a/systemd/rock3_mjpeg_decode.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=rock_mjpeg_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)26, clock-rate=(int)90000, media=(string)video, encoding-name=(string)JPEG' ! rtpjpegdepay ! jpegdec ! queue ! kmssink plane-id=54 force-modesetting=false" - -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rock5_h264_decode.service b/systemd/rock5_h264_decode.service deleted file mode 100644 index 819b69801..000000000 --- a/systemd/rock5_h264_decode.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=rock_h264_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H264' ! rtph264depay ! h264parse ! mppvideodec format=23 fast-mode=true width=1920 height=1080 ! queue ! kmssink plane-id=54" - -Restart=always -RestartSec=2 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rock5_h264a_decode.service b/systemd/rock5_h264a_decode.service deleted file mode 100644 index 098cf26ac..000000000 --- a/systemd/rock5_h264a_decode.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=rock_h264_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H264' ! rtph264depay ! h264parse ! mppvideodec format=23 fast-mode=true width=1920 height=1080 ! queue ! kmssink plane-id=68" - -Restart=always -RestartSec=2 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rock5_h265_decode.service b/systemd/rock5_h265_decode.service deleted file mode 100644 index f3ff59140..000000000 --- a/systemd/rock5_h265_decode.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=rock_h265_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H265' ! rtph265depay ! h265parse ! mppvideodec format=23 fast-mode=true widt=1920 height=1080 ! queue ! kmssink plane-id=54" - -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rock5_h265a_decode.service b/systemd/rock5_h265a_decode.service deleted file mode 100644 index bf272a215..000000000 --- a/systemd/rock5_h265a_decode.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=rock_h265_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H265' ! rtph265depay ! h265parse ! mppvideodec format=23 fast-mode=true widt=1920 height=1080 ! queue ! kmssink plane-id=68" - -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rock5_mjpeg_decode.service b/systemd/rock5_mjpeg_decode.service deleted file mode 100644 index e35c317ef..000000000 --- a/systemd/rock5_mjpeg_decode.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=rock_mjpeg_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)26, clock-rate=(int)90000, media=(string)video, encoding-name=(string)JPEG' ! rtpjpegdepay ! jpegdec ! queue ! kmssink plane-id=54 force-modesetting=true" - -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rock5_mjpega_decode.service b/systemd/rock5_mjpega_decode.service deleted file mode 100644 index 2822131a4..000000000 --- a/systemd/rock5_mjpega_decode.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=rock_mjpeg_decode - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)26, clock-rate=(int)90000, media=(string)video, encoding-name=(string)JPEG' ! rtpjpegdepay ! jpegdec ! queue ! kmssink plane-id=68 force-modesetting=true" - -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/rpi_h264_decode.service b/systemd/rpi_h264_decode.service deleted file mode 100644 index 72389cda3..000000000 --- a/systemd/rpi_h264_decode.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=rpi_h264_decode - -[Service] -User=root - -# This way we get params from qopenhd (which starts this service) -# EnvironmentFile = /tmp/decode_service_params.txt - - -# Video decode via omx, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtph264depay ! 'video/x-h264,stream-format=byte-stream' ! fdsink | fpv_video0.bin /dev/stdin" - -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/x86_ubuntu_h264_decode.service b/systemd/x86_ubuntu_h264_decode.service deleted file mode 100644 index 622b936be..000000000 --- a/systemd/x86_ubuntu_h264_decode.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=ubuntu x86 h264 decode service - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 -v udpsrc port=5600 caps = "application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink" - -Restart=always -RestartSec=2 - -[Install] -WantedBy=multi-user.target - diff --git a/systemd/x86_ubuntu_h265_decode.service b/systemd/x86_ubuntu_h265_decode.service deleted file mode 100644 index 5e262f964..000000000 --- a/systemd/x86_ubuntu_h265_decode.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=ubuntu x86 h264 decode service - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 -v udpsrc port=5600 caps = "application/x-rtp, media=(string)video, encoding-name=(string)H265" ! rtph265depay ! decodebin ! videoconvert ! autovideosink" - -Restart=always -RestartSec=2 - -[Install] -WantedBy=multi-user.target - diff --git a/systemd/x86_ubuntu_mjpeg_decode.service b/systemd/x86_ubuntu_mjpeg_decode.service deleted file mode 100644 index 5402fcd8e..000000000 --- a/systemd/x86_ubuntu_mjpeg_decode.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=ubuntu x86 h264 decode service - -[Service] -User=root - -# Video decode via mpp, started by QOpenHD if needed (and stopped if needed) -ExecStart=/bin/sh -c "gst-launch-1.0 -v udpsrc port=5600 caps = "application/x-rtp, media=(string)video, encoding-name=(string)mjpeg" ! rtpjpegdepay ! decodebin ! videoconvert ! autovideosink" - -Restart=always -RestartSec=2 - -[Install] -WantedBy=multi-user.target -