Skip to content

Commit

Permalink
Merge pull request #10 from VoylinsGamedevJourney/Removing-codecs-+-A…
Browse files Browse the repository at this point in the history
…dding-get-static-meta

Removing codecs + adding static get meta data
  • Loading branch information
voylin authored Aug 14, 2024
2 parents e1a47f8 + 86eafce commit a6349c0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
11 changes: 0 additions & 11 deletions src/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<RENDERER_VIDEO_CODEC, String> l_video_codecs[] = {
{V_H264, "H264"},
Expand All @@ -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 = {};

Expand Down
22 changes: 0 additions & 22 deletions src/renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/video.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a6349c0

Please sign in to comment.