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

Unified Diff: media/cast/test/fake_video_encode_accelerator.h

Issue 185403020: Make VEA client of command buffer; move sync. IPC to VDA/VEA::Initialize() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 7da5b6ec Rebase. Created 6 years, 9 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 | « content/renderer/pepper/ppb_video_decoder_impl.cc ('k') | media/cast/test/fake_video_encode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/fake_video_encode_accelerator.h
diff --git a/media/cast/test/fake_video_encode_accelerator.h b/media/cast/test/fake_video_encode_accelerator.h
index 2e0c93aec5c2b80c56ef607c1c3395db373de923..eb7ca48876d7a6de93c9a4502bfb9da1e32306a7 100644
--- a/media/cast/test/fake_video_encode_accelerator.h
+++ b/media/cast/test/fake_video_encode_accelerator.h
@@ -9,18 +9,24 @@
#include <list>
+#include "base/memory/weak_ptr.h"
#include "media/base/bitstream_buffer.h"
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
namespace media {
namespace cast {
namespace test {
class FakeVideoEncodeAccelerator : public VideoEncodeAccelerator {
public:
- FakeVideoEncodeAccelerator();
+ explicit FakeVideoEncodeAccelerator(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
virtual ~FakeVideoEncodeAccelerator();
- virtual void Initialize(media::VideoFrame::Format input_format,
+ virtual bool Initialize(media::VideoFrame::Format input_format,
const gfx::Size& input_visible_size,
VideoCodecProfile output_profile,
uint32 initial_bitrate,
@@ -37,11 +43,22 @@ class FakeVideoEncodeAccelerator : public VideoEncodeAccelerator {
virtual void Destroy() OVERRIDE;
private:
+ void DoRequireBitstreamBuffers(unsigned int input_count,
+ const gfx::Size& input_coded_size,
+ size_t output_buffer_size) const;
+ void DoBitstreamBufferReady(int32 bitstream_buffer_id,
+ size_t payload_size,
+ bool key_frame) const;
+
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+
VideoEncodeAccelerator::Client* client_;
bool first_;
std::list<int32> available_buffer_ids_;
+ base::WeakPtrFactory<FakeVideoEncodeAccelerator> weak_this_factory_;
+
DISALLOW_COPY_AND_ASSIGN(FakeVideoEncodeAccelerator);
};
« no previous file with comments | « content/renderer/pepper/ppb_video_decoder_impl.cc ('k') | media/cast/test/fake_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698