From 86eafce035bf9ee96ac25336415e074d314aa543 Mon Sep 17 00:00:00 2001 From: voylin <0voylin0@gmail.com> Date: Thu, 15 Aug 2024 06:50:40 +0900 Subject: [PATCH] Removing codecs + adding static get meta data --- src/renderer.cpp | 11 ----------- src/renderer.hpp | 22 ---------------------- src/video.hpp | 1 + 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/src/renderer.cpp b/src/renderer.cpp index c499691..e14cf5e 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -12,12 +12,8 @@ Dictionary Renderer::get_supported_codecs() { {A_AAC, "AAC"}, {A_OPUS, "OPUS"}, {A_VORBIS, "VORBIS"}, - {A_FLAC, "FLAC"}, {A_PCM_UNCOMPRESSED, "PCM_UNCOMPRESSED"}, - {A_AC3, "AC3"}, - {A_EAC3, "EAC3"}, {A_WAV, "WAV"}, - {A_MP2, "MP2"}, }; std::pair l_video_codecs[] = { {V_H264, "H264"}, @@ -29,20 +25,13 @@ Dictionary Renderer::get_supported_codecs() { {V_AV1, "AV1"}, {V_VP8, "VP8"}, {V_AMV, "AMV"}, - {V_GOPRO_CINEFORM, "GOPRO_CINEFORM"}, - {V_CINEPAK, "CINEPAK"}, - {V_DIRAC, "DIRAC"}, - {V_FLV1, "FLV1"}, {V_GIF, "GIF"}, - {V_H261, "H261"}, - {V_H263, "H263"}, {V_THEORA, "THEORA"}, {V_WEBP, "WEBP"}, {V_DNXHD, "DNXHD"}, {V_MJPEG, "MJPEG"}, {V_PRORES, "PRORES"}, {V_RAWVIDEO, "RAWVIDEO"}, - {V_YUV4, "YUV4"}, }; Dictionary l_dic = {}, l_audio_dic = {}, l_video_dic = {}; diff --git a/src/renderer.hpp b/src/renderer.hpp index ee44bf9..d6e6800 100644 --- a/src/renderer.hpp +++ b/src/renderer.hpp @@ -64,12 +64,8 @@ class Renderer : public Resource { A_AAC = AV_CODEC_ID_AAC, A_OPUS = AV_CODEC_ID_OPUS, A_VORBIS = AV_CODEC_ID_VORBIS, - A_FLAC = AV_CODEC_ID_FLAC, A_PCM_UNCOMPRESSED = AV_CODEC_ID_PCM_S16LE, - A_AC3 = AV_CODEC_ID_AC3, - A_EAC3 = AV_CODEC_ID_EAC3, A_WAV = AV_CODEC_ID_WAVPACK, - A_MP2 = AV_CODEC_ID_MP2, }; enum RENDERER_VIDEO_CODEC { V_H264 = AV_CODEC_ID_H264, @@ -81,20 +77,13 @@ class Renderer : public Resource { V_AV1 = AV_CODEC_ID_AV1, V_VP8 = AV_CODEC_ID_VP8, V_AMV = AV_CODEC_ID_AMV, - V_GOPRO_CINEFORM = AV_CODEC_ID_CFHD, - V_CINEPAK = AV_CODEC_ID_CINEPAK, - V_DIRAC = AV_CODEC_ID_DIRAC, - V_FLV1 = AV_CODEC_ID_FLV1, V_GIF = AV_CODEC_ID_GIF, - V_H261 = AV_CODEC_ID_H261, - V_H263 = AV_CODEC_ID_H263, V_THEORA = AV_CODEC_ID_THEORA, V_WEBP = AV_CODEC_ID_WEBP, V_DNXHD = AV_CODEC_ID_DNXHD, V_MJPEG = AV_CODEC_ID_MJPEG, V_PRORES = AV_CODEC_ID_PRORES, V_RAWVIDEO = AV_CODEC_ID_RAWVIDEO, - V_YUV4 = AV_CODEC_ID_YUV4, }; enum RENDERER_SUBTITLE_CODEC { S_ASS = AV_CODEC_ID_ASS, @@ -178,12 +167,8 @@ class Renderer : public Resource { BIND_ENUM_CONSTANT(A_AAC); BIND_ENUM_CONSTANT(A_OPUS); BIND_ENUM_CONSTANT(A_VORBIS); - BIND_ENUM_CONSTANT(A_FLAC); BIND_ENUM_CONSTANT(A_PCM_UNCOMPRESSED); - BIND_ENUM_CONSTANT(A_AC3); - BIND_ENUM_CONSTANT(A_EAC3); BIND_ENUM_CONSTANT(A_WAV); - BIND_ENUM_CONSTANT(A_MP2); /* VIDEO CODEC ENUMS */ BIND_ENUM_CONSTANT(V_H264); @@ -195,20 +180,13 @@ class Renderer : public Resource { BIND_ENUM_CONSTANT(V_AV1); BIND_ENUM_CONSTANT(V_VP8); BIND_ENUM_CONSTANT(V_AMV); - BIND_ENUM_CONSTANT(V_GOPRO_CINEFORM); - BIND_ENUM_CONSTANT(V_CINEPAK); - BIND_ENUM_CONSTANT(V_DIRAC); - BIND_ENUM_CONSTANT(V_FLV1); BIND_ENUM_CONSTANT(V_GIF); - BIND_ENUM_CONSTANT(V_H261); - BIND_ENUM_CONSTANT(V_H263); BIND_ENUM_CONSTANT(V_THEORA); BIND_ENUM_CONSTANT(V_WEBP); BIND_ENUM_CONSTANT(V_DNXHD); BIND_ENUM_CONSTANT(V_MJPEG); BIND_ENUM_CONSTANT(V_PRORES); BIND_ENUM_CONSTANT(V_RAWVIDEO); - BIND_ENUM_CONSTANT(V_YUV4); /* SUBTITLE CODEC ENUMS */ BIND_ENUM_CONSTANT(S_ASS); diff --git a/src/video.hpp b/src/video.hpp index 9a38509..759ac4a 100644 --- a/src/video.hpp +++ b/src/video.hpp @@ -84,6 +84,7 @@ class Video : public Resource { protected: static inline void _bind_methods() { + ClassDB::bind_static_method("Video", D_METHOD("get_video_file_meta", "a_path"), &Video::get_video_file_meta); ClassDB::bind_method(D_METHOD("open_video", "a_path", "a_load_audio"), &Video::open_video, DEFVAL(""), DEFVAL(true)); ClassDB::bind_method(D_METHOD("close_video"), &Video::close_video);