mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-12 09:37:37 +01:00
ac2cc54e13
The old shared surface implementation has been removed and will need to be re-implemented using the Viz code path.
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#ifndef LIBCEF_BROWSER_OSR_VIDEO_CONSUMER_OSR_H_
|
|
#define LIBCEF_BROWSER_OSR_VIDEO_CONSUMER_OSR_H_
|
|
|
|
#include "base/callback.h"
|
|
#include "base/memory/weak_ptr.h"
|
|
#include "components/viz/host/client_frame_sink_video_capturer.h"
|
|
|
|
class CefRenderWidgetHostViewOSR;
|
|
|
|
class CefVideoConsumerOSR : public viz::mojom::FrameSinkVideoConsumer {
|
|
public:
|
|
explicit CefVideoConsumerOSR(CefRenderWidgetHostViewOSR* view);
|
|
~CefVideoConsumerOSR() override;
|
|
|
|
void SetActive(bool active);
|
|
void SetFrameRate(base::TimeDelta frame_rate);
|
|
void SizeChanged();
|
|
|
|
private:
|
|
// viz::mojom::FrameSinkVideoConsumer implementation.
|
|
void OnFrameCaptured(
|
|
base::ReadOnlySharedMemoryRegion data,
|
|
::media::mojom::VideoFrameInfoPtr info,
|
|
const gfx::Rect& content_rect,
|
|
viz::mojom::FrameSinkVideoConsumerFrameCallbacksPtr callbacks) override;
|
|
void OnStopped() override;
|
|
|
|
CefRenderWidgetHostViewOSR* const view_;
|
|
std::unique_ptr<viz::ClientFrameSinkVideoCapturer> video_capturer_;
|
|
|
|
base::WeakPtrFactory<CefVideoConsumerOSR> weak_ptr_factory_;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefVideoConsumerOSR);
|
|
};
|
|
|
|
#endif // LIBCEF_BROWSER_OSR_VIDEO_CONSUMER_OSR_H_
|