Constructing the Boilerplate Construction template file In this chapter, you’ll learn how to build minimal code for a new plugin. Starting from scratch, you will see how to obtain the GStreamer template source. You’ll then learn how to use some basic tools to copy and modify template plugins to create new plugins. If you follow […]
Tag: gstreamer
It takes time to convert gstreamer’s I420 to jpeg format data
1. Convert I430 data into jpg data JPegEncoder.h #pragma once #include <cstdint> #include <vector> #include <functional> #include <gst/gst.h> #include <gst/app/gstappsink.h> #include “Resolution.h” #include “VideoSettings.h” namespace sinftech { namespace tv { class JpegEncoder { public: using Handler = std::function<void(const uint8_t* data, size_t size, const Resolution & amp; resolution)>; JpegEncoder(Handler & amp; & amp; handler); ~JpegEncoder(); void […]
Gstreamer implements rtsp streaming, preview, and dynamic recording
#include <gst/gst.h> #include <stdio.h> #include <linux/input.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> #define MAX_PIPELINE_CNT 1 #define MAX_INPUT_SIZE 128 #define GSTCAM_INFO(fmt, args…) do { \ g_print(“[INFO] %s %d:” fmt, __FUNCTION__, __LINE__, ##args); \ } while (0) #define GSTCAM_ERROR(fmt, args…) do { \ g_print(“[ERROR] %s %d:” fmt, __FUNCTION__, __LINE__, ##args); \ } while (0) #define […]
Gstreamer implements preview and dynamic recording
The goal is to be able to enter the recording command in the command line during preview to record. The code is as follows: #include <gst/gst.h> #include <stdio.h> #include <linux/input.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> static gboolean bus_call (GstBus * bus, GstMessage * msg, gpointer data) { GMainLoop *loop = (GMainLoop *) […]
Gstreamer – local UDP port receives H264 data and decodes (mppvideodec) to YUV
The following code usage scenarios: It is used for other processes in the current RK device to forward the video data to the local port after receiving the video data. The current process reads the video data from the local port, decodes it into YUV through the hard decoder mppvideodec, and converts YUV into RGB […]
RockChip3568 MPP hard decoding and gstreamer1.0 compilation
MPP video hardware decoding and compiling 1. Configure the rock sdk environment The currently used rk3568 sdk package provided by rockchip has an unknown version and should be relatively new. Configure the environment before compiling: source envsetup.sh Select rk3568 configuration (67 rockchip_rk3568) Note: Every time you compile make in the skd directory, you must run […]
Guide for compiling and installing using gstreamer under ubuntu22.04
Environment preparation The ubuntu release version 22.04 has built-in Gstreamer1.20.1, and the latest version of the gstreamer source code is 1.20.3, the gap is not big Download gstreamer source code Install git <strong>sudo apt install -y git</strong> fuqiang@fuqiang-VivoBook:~/Workspace/gstreamer$ git –version git version 2.34.1 Download gstreamer git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git git checkout –track -b 1.20 origin/1.20 —>1.20 […]
GStreamer writes a video player
Official link https://gstreamer.freedesktop.org/documentation/?gi-language=c // GstreamerWrapper.h file #ifndef GSTREAMERWRAPPER_H #define GSTREAMERWRAPPER_H #include <functional> #include <string> #include <vector> #include <gst/gst.h> #include <gst/pbutils/pbutils.h> struct MetadataItem {<!– –> std::string filename; uint64_t duration = 0; bool isValid = false; std::vector<std::string> audioTitles; std::vector<std::string> videoTitles; }; struct MetadataInfo {<!– –> std::vector<MetadataItem> items; }; enum DigitalHelpStatus {<!– –> DHS_INVALID = 0, DHS_STOPPED, DHS_PLAYING, […]
GStreamer porting-list-0.11.txt
Port grouping corresponding to all plugins .Ported? |.Module | | .Name | | |.Description ——————————– *-core core elements * -core staticelements: bin: Generic bin * -core staticelements: pipeline: Pipeline object * -base adder: adder: Adder * -base alsa: alsamixer: Alsa mixer * -base alsa: alsasink: Audio sink (ALSA) * -base alsa: alsasrc: Audio source (ALSA) […]
Ubuntu system intel graphics card installs vaapi hard codec plug-in for gstreamer
Foreword The host has installed gstreamer1.0. If gstreamer is not installed, the installation tutorial link: gstreamer official tutorial Reference link: How to install Gstreamer VAAPI plugins on Ubuntu? – LifeStyleTransfer (over the wall required) vaapi hardware requirements Hardware requirements intel graphics card nvidia (gstreamer + vaapi failed, follow-up to be tried) Independent display: independent graphics […]