summaryrefslogtreecommitdiff
path: root/chromium/media/base/video_decoder.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/media/base/video_decoder.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/media/base/video_decoder.h')
-rw-r--r--chromium/media/base/video_decoder.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/chromium/media/base/video_decoder.h b/chromium/media/base/video_decoder.h
index bbb0b11b151..06488700d0a 100644
--- a/chromium/media/base/video_decoder.h
+++ b/chromium/media/base/video_decoder.h
@@ -39,6 +39,7 @@ class MEDIA_EXPORT VideoDecoder {
using DecodeCB = base::OnceCallback<void(DecodeStatus)>;
VideoDecoder();
+ virtual ~VideoDecoder();
// Returns the name of the decoder for logging and decoder selection purposes.
// This name should be available immediately after construction (e.g. before
@@ -134,39 +135,9 @@ class MEDIA_EXPORT VideoDecoder {
// [|limits::kMinVideoDecodeThreads|, |limits::kMaxVideoDecodeThreads|].
static int GetRecommendedThreadCount(int desired_threads);
- protected:
- // Deletion is only allowed via Destroy().
- virtual ~VideoDecoder();
-
- private:
- friend struct std::default_delete<VideoDecoder>;
-
- // Fires any pending callbacks, stops and destroys the decoder. After this
- // call, external resources (e.g. raw pointers) |this| holds might be
- // invalidated immediately. So if the decoder is destroyed asynchronously
- // (e.g. DeleteSoon), external resources must be released in this call.
- virtual void Destroy();
-
DISALLOW_COPY_AND_ASSIGN(VideoDecoder);
};
} // namespace media
-namespace std {
-
-// Specialize std::default_delete to call Destroy().
-template <>
-struct MEDIA_EXPORT default_delete<media::VideoDecoder> {
- constexpr default_delete() = default;
-
- template <typename U,
- typename = typename std::enable_if<
- std::is_convertible<U*, media::VideoDecoder*>::value>::type>
- default_delete(const default_delete<U>& d) {}
-
- void operator()(media::VideoDecoder* ptr) const;
-};
-
-} // namespace std
-
#endif // MEDIA_BASE_VIDEO_DECODER_H_