diff --git a/src/Lib/AbstractMediaContext.hh b/src/Lib/AbstractMediaContext.hh index 1267b175146f8bac7889e3e687e10f7fe59ce15c..a2611c1d92e8f0f16c52c2ce7f332fea8ba70881 100644 --- a/src/Lib/AbstractMediaContext.hh +++ b/src/Lib/AbstractMediaContext.hh @@ -52,6 +52,9 @@ template <size_t AVMEDIA_TYPE> class AbstractMediaStream { public: static inline constexpr AVMediaType avMediaType = static_cast<AVMediaType>(AVMEDIA_TYPE); +protected: + using Super = AbstractMediaStream<AVMEDIA_TYPE>; + protected: AbstractMediaStream(AVCodec *streamCodec, AVFormatContext *formatArg, AVStream *streamArg, int index) @@ -117,6 +120,9 @@ public: using StreamPtr = std::shared_ptr<Stream>; using StreamWeakPtr = std::weak_ptr<Stream>; +protected: + using Super = AbstractMediaContext<Stream>; + public: AbstractMediaContext(const QString &path) : filePath(path) diff --git a/src/Lib/Audio.hh b/src/Lib/Audio.hh index 15d73c52a17324fa1eb26ff23fee737739b7f647..1e34c4943c87d6062d1fdd09b5f76aeb48bec50a 100644 --- a/src/Lib/Audio.hh +++ b/src/Lib/Audio.hh @@ -27,15 +27,11 @@ class AudioContext; // the AudioContext class. class AudioStream final : public AbstractMediaStream<AVMEDIA_TYPE_AUDIO> { VIVY_UNMOVABLE_OBJECT(AudioStream) - using Super = AbstractMediaStream<AVMEDIA_TYPE_AUDIO>; public: AudioStream(AVCodec *, AVFormatContext *, AVStream *, int index); ~AudioStream() noexcept override; - // The non-owning view of the stream's data - using DataWeakPtr = std::weak_ptr<double[]>; - // Decode the stream void decodeData(); void cleanUpData() noexcept; @@ -72,7 +68,6 @@ private: // from it. class AudioContext final : public AbstractMediaContext<AudioStream> { VIVY_UNMOVABLE_OBJECT(AudioContext) - using Super = AbstractMediaContext<AudioStream>; public: using StreamPtr = std::shared_ptr<AudioStream>; diff --git a/src/Lib/Video.hh b/src/Lib/Video.hh index e0826f0c3c191234e594b33f990b4de7b8360dff..42032b885b991982eb21a0a020e148807250f8be 100644 --- a/src/Lib/Video.hh +++ b/src/Lib/Video.hh @@ -25,7 +25,6 @@ namespace Vivy // VideoContext instance. class VideoStream final : public AbstractMediaStream<AVMEDIA_TYPE_VIDEO> { VIVY_UNMOVABLE_OBJECT(VideoStream) - using Super = AbstractMediaStream<AVMEDIA_TYPE_VIDEO>; public: VideoStream(AVCodec *, AVFormatContext *, AVStream *, int index); @@ -47,7 +46,6 @@ private: // Like an audio context, but for videos. class VideoContext final : public AbstractMediaContext<VideoStream> { VIVY_UNMOVABLE_OBJECT(VideoContext) - using Super = AbstractMediaContext<VideoStream>; public: VideoContext(const QString &path);