| Index: content/renderer/pepper/pepper_media_stream_video_track_host.h
|
| diff --git a/content/renderer/pepper/pepper_media_stream_video_track_host.h b/content/renderer/pepper/pepper_media_stream_video_track_host.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..55a3757689f2eec5597c3aeb1002e6ccde5d2881
|
| --- /dev/null
|
| +++ b/content/renderer/pepper/pepper_media_stream_video_track_host.h
|
| @@ -0,0 +1,69 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_
|
| +#define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "base/synchronization/lock.h"
|
| +#include "content/common/content_export.h"
|
| +#include "content/public/renderer/media_stream_video_sink.h"
|
| +#include "content/renderer/pepper/pepper_io_stream_host.h"
|
| +#include "media/base/video_frame.h"
|
| +#include "ppapi/host/host_message_context.h"
|
| +#include "ppapi/host/resource_host.h"
|
| +#include "ppapi/shared_impl/io_stream_shared.h"
|
| +#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
|
| +#include "ui/gfx/size.h"
|
| +
|
| +namespace content {
|
| +
|
| +class PepperMediaStreamVideoTrackHost :
|
| + public PepperIOStreamHost,
|
| + public MediaStreamVideoSink {
|
| + public:
|
| + PepperMediaStreamVideoTrackHost(RendererPpapiHost* host,
|
| + PP_Instance instance,
|
| + PP_Resource resource,
|
| + const blink::WebMediaStreamTrack& track);
|
| +
|
| + virtual ~PepperMediaStreamVideoTrackHost();
|
| +
|
| + virtual int32_t OnResourceMessageReceived(
|
| + const IPC::Message& msg,
|
| + ppapi::host::HostMessageContext* context) OVERRIDE;
|
| +
|
| + virtual void OnVideoFrame(
|
| + const scoped_refptr<media::VideoFrame>& frame) OVERRIDE;
|
| +
|
| + protected:
|
| + virtual void DidConnectPendingHostToResource() OVERRIDE;
|
| +
|
| + private:
|
| + int32_t OnHostMsgStartCapture(ppapi::host::HostMessageContext* context);
|
| +
|
| + void AllocFrameBuffers();
|
| +
|
| + blink::WebMediaStreamTrack track_;
|
| +
|
| + // frame buffer size in frames.
|
| + uint32_t frame_buffer_size_;
|
| +
|
| + // frame size.
|
| + gfx::Size frame_size_;
|
| +
|
| + // frame format.
|
| + media::VideoFrame::Format frame_format_;
|
| +
|
| + // frame data size in bytes.
|
| + uint32_t frame_data_size_;
|
| +
|
| + uint32_t slot_size_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamVideoTrackHost);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_VIDEO_TRACK_HOST_H_
|
|
|