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

Unified Diff: content/renderer/pepper/pepper_video_encoder_host.h

Issue 956893002: content: pepper: VideoEncoder: add software encoder support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/renderer/pepper/pepper_video_encoder_host.h
diff --git a/content/renderer/pepper/pepper_video_encoder_host.h b/content/renderer/pepper/pepper_video_encoder_host.h
index 18c9a8efd6cd592362131e596e1aa32371868c8c..81d9ff587f2e800f87445f8dea27a712d7336d21 100644
--- a/content/renderer/pepper/pepper_video_encoder_host.h
+++ b/content/renderer/pepper/pepper_video_encoder_host.h
@@ -26,6 +26,7 @@ namespace content {
class CommandBufferProxyImpl;
class GpuChannelHost;
class RendererPpapiHost;
+class VideoEncoderShim;
class CONTENT_EXPORT PepperVideoEncoderHost
: public ppapi::host::ResourceHost,
@@ -38,6 +39,8 @@ class CONTENT_EXPORT PepperVideoEncoderHost
~PepperVideoEncoderHost() override;
private:
+ friend class VideoEncoderShim;
+
// Shared memory buffers.
struct ShmBuffer {
ShmBuffer(uint32_t id, scoped_ptr<base::SharedMemory> shm);
@@ -98,6 +101,10 @@ class CONTENT_EXPORT PepperVideoEncoderHost
const gfx::Size& input_visible_size,
media::VideoCodecProfile output_profile,
uint32_t initial_bitrate);
+ bool InitializeSoftware(media::VideoFrame::Format input_format,
+ const gfx::Size& input_visible_size,
+ media::VideoCodecProfile output_profile,
+ uint32_t initial_bitrate);
void Close();
void AllocateVideoFrames();
void SendGetFramesErrorReply(int32_t error);
@@ -108,6 +115,9 @@ class CONTENT_EXPORT PepperVideoEncoderHost
uint32_t frame_id);
void NotifyPepperError(int32_t error);
+ // Helper method for VideoEncoderShim.
+ uint8_t* ShmHandleToAddress(int32 buffer_id);
+
// Non-owning pointer.
RendererPpapiHost* renderer_ppapi_host_;

Powered by Google App Engine
This is Rietveld 408576698