diff --git a/.cache/clangd/index/ChargeVideo.hpp.FC737CB2F79F6A46.idx b/.cache/clangd/index/ChargeVideo.hpp.FC737CB2F79F6A46.idx new file mode 100644 index 0000000..c1c2a14 Binary files /dev/null and b/.cache/clangd/index/ChargeVideo.hpp.FC737CB2F79F6A46.idx differ diff --git a/.cache/clangd/index/Time.cpp.42E9C9CF672FA4BC.idx b/.cache/clangd/index/Time.cpp.42E9C9CF672FA4BC.idx new file mode 100644 index 0000000..0199041 Binary files /dev/null and b/.cache/clangd/index/Time.cpp.42E9C9CF672FA4BC.idx differ diff --git a/.cache/clangd/index/Video.cpp.8ED47A0C1A7736F5.idx b/.cache/clangd/index/Video.cpp.8ED47A0C1A7736F5.idx new file mode 100644 index 0000000..8389c1c Binary files /dev/null and b/.cache/clangd/index/Video.cpp.8ED47A0C1A7736F5.idx differ diff --git a/src/ChargeVideo.hpp b/src/ChargeVideo.hpp index 35fe86e..730bcd8 100644 --- a/src/ChargeVideo.hpp +++ b/src/ChargeVideo.hpp @@ -1,5 +1,20 @@ #ifndef CHARGE_VIDEO_BASE_H #define CHARGE_VIDEO_BASE_H + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace ChargeVideo { +namespace _dependencies { extern "C" { #include #include @@ -14,26 +29,12 @@ extern "C" { #include #include } - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include +} // namespace _dependencies using namespace Corrade; using namespace Magnum; using namespace Math::Literals; - -namespace ChargeVideo { +using namespace _dependencies; // ======================== CLASSES ======================== class Time { public: @@ -101,7 +102,7 @@ private: // Buffering std::queue frameBuffer; - uint32_t bufferMaxFrames = 0, p = 0, z = 0; + uint32_t bufferMaxFrames = 0; // SAR / Sizing uint32_t scaleFactor = 1; diff --git a/src/Video.cpp b/src/Video.cpp index 5c3d707..a285cae 100644 --- a/src/Video.cpp +++ b/src/Video.cpp @@ -1,12 +1,13 @@ #include "ChargeVideo.hpp" +#include #include #include #include -#include - using namespace ChargeVideo; +#include +#include // ================== Video Construct/Destruct ================== // ShouldVideoLoop default is true @@ -131,7 +132,6 @@ void Video::continueVideo() { Pause(); // Here we did that (check comment below) return; // We remove what we are returning TO } - Utility::Debug{} << "Audio" << p << "Video" << z; restartVideo(); } @@ -179,9 +179,6 @@ Containers::Array Video::loadNextFrame() { swr_convert(swrCtx, convertedAudioFrame->data, convertedAudioFrame->nb_samples, audioFrame->data, audioFrame->nb_samples); - - p++; - Utility::Debug{} << "Loaded an audio frame"; } } @@ -198,14 +195,11 @@ Containers::Array Video::loadNextFrame() { frameConvert(frame, convertedFrame); // FrameDebug(convertedFrame); - z++; - Utility::Debug{} << "Loaded a video frame"; break; } } av_packet_unref(packet); } - Utility::Debug{} << "Finished Load"; // You cannot use strlen(data) it does not work size_t dataSize = av_image_get_buffer_size( static_cast(convertedFrame->format), Dimensions.x(),