Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 2643733002: Allow to use {FFmpeg/Vpx}VideoDecoder from a UtilityProcess (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | media/mojo/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 9f8d786ce2d99b00faab09c8d6cec4aa334e002b..22bab44e3a28c0d5f76bf11b55510fe4cee42584 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -35,6 +35,7 @@
#include "media/base/bind_to_current_loop.h"
#include "media/base/decoder_buffer.h"
#include "media/base/media_switches.h"
+#include "media/base/video_frame_provider.h"
// Include libvpx header files.
// VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide
@@ -341,6 +342,15 @@ VpxVideoDecoder::VpxVideoDecoder()
thread_checker_.DetachFromThread();
}
+VpxVideoDecoder::VpxVideoDecoder(
+ std::unique_ptr<VideoFrameProvider> video_frame_provider)
+ : state_(kUninitialized),
+ vpx_codec_(nullptr),
+ vpx_codec_alpha_(nullptr),
+ frame_pool_(std::move(video_frame_provider)) {
+ thread_checker_.DetachFromThread();
+}
+
VpxVideoDecoder::~VpxVideoDecoder() {
DCHECK(thread_checker_.CalledOnValidThread());
CloseDecoder();
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | media/mojo/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698