add python launch file

This commit is contained in:
Joe Dong
2023-08-29 14:34:29 +08:00
parent a079331e75
commit 16c052f54d
20 changed files with 1662 additions and 6 deletions
@@ -3,17 +3,18 @@
#include <gst/gst.h>
namespace orbbec_camera {
std::string hwDecoderToString(HWDecoder hw_decoder);
class GstreamerMjpegDecoder : public MjpegDecoder {
public:
GstreamerMjpegDecoder(int width, int height, HWDecoder hw_decoder);
GstreamerMjpegDecoder(int width, int height, std::string jpeg_decoder, std::string video_convert,
std::string jpeg_parse);
~GstreamerMjpegDecoder() override;
bool decode(const std::shared_ptr<ob::ColorFrame>& frame, uint8_t* dest) override;
private:
std::string hw_decoder_;
std::string jpeg_decoder_;
std::string video_convert_;
std::string jpeg_parse_;
guint buffer_size_ = 0;
GstBufferPool* buffer_pool_ = nullptr;
GstElement* pipeline_ = nullptr;
@@ -409,6 +409,8 @@ class OBCameraNode {
// mjpeg decoder
std::shared_ptr<MjpegDecoder> mjpeg_decoder_ = nullptr;
uint8_t* rgb_buffer_ = nullptr;
HWDecoder hw_decoder_ = HWDecoder::AV_CODEC;
std::string jpeg_decoder_ = "avdec_mjpeg"; // avdec_mjpeg, mppjpegdec, nvjpegdec, jpegdec
std::string jpeg_parse_ = "jpegparse";
std::string video_convert_ = "videoconvert"; // videoconvert, nvvidconv
};
} // namespace orbbec_camera