blob: 5162dc6a9344e0250fc419dce0ab0abac81ba19c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright 2020 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 MEDIA_RENDERERS_WIN_MEDIA_FOUNDATION_RENDERER_EXTENSION_H_
#define MEDIA_RENDERERS_WIN_MEDIA_FOUNDATION_RENDERER_EXTENSION_H_
#include "base/callback.h"
#include "base/macros.h"
#include "base/win/scoped_handle.h"
#include "media/base/media_export.h"
#include "ui/gfx/geometry/rect.h"
namespace media {
// C++ interface equivalent to mojom::MediaFoundationRendererExtension.
// This interface allows MediaFoundationRenderer to support video rendering
// using Direct Compositon.
class MEDIA_EXPORT MediaFoundationRendererExtension {
public:
virtual ~MediaFoundationRendererExtension() = default;
// TODO(frankli): naming: Change DComp into DirectComposition for interface
// method names in a separate CL.
// Enables Direct Composition video rendering and returns the Direct
// Composition Surface handle.
using GetDCompSurfaceCB = base::OnceCallback<void(base::win::ScopedHandle)>;
virtual void GetDCompSurface(GetDCompSurfaceCB callback) = 0;
// Notifies renderer whether video is enabled.
virtual void SetVideoStreamEnabled(bool enabled) = 0;
// Notifies renderer of output composition parameters.
virtual void SetOutputParams(const ::gfx::Rect& rect) = 0;
};
} // namespace media
#endif // MEDIA_RENDERERS_WIN_MEDIA_FOUNDATION_RENDERER_EXTENSION_H_
|