Shaka Player Embedded
apple_video_renderer.h
Go to the documentation of this file.
1 // Copyright 2019 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef SHAKA_EMBEDDED_MEDIA_APPLE_VIDEO_RENDERER_H_
16 #define SHAKA_EMBEDDED_MEDIA_APPLE_VIDEO_RENDERER_H_
17 
18 #include <VideoToolbox/VideoToolbox.h>
19 
20 #include <memory>
21 
22 #include "../macros.h"
23 #include "../utils.h"
24 #include "renderer.h"
25 
26 namespace shaka {
27 namespace media {
28 
35  public:
37  ~AppleVideoRenderer() override;
38 
40  VideoFillMode fill_mode() const;
41 
54  CGImageRef Render(double* delay = nullptr,
55  Rational<uint32_t>* sample_aspect_ratio = nullptr);
56 
57 
58  void SetPlayer(const MediaPlayer* player) override;
59  void Attach(const DecodedStream* stream) override;
60  void Detach() override;
61 
62  struct VideoPlaybackQuality VideoPlaybackQuality() const override;
63  bool SetVideoFillMode(VideoFillMode mode) override;
64 
65  private:
66  class Impl;
67  std::shared_ptr<Impl> impl_;
68 };
69 
70 } // namespace media
71 } // namespace shaka
72 
73 #endif // SHAKA_EMBEDDED_MEDIA_APPLE_VIDEO_RENDERER_H_
#define SHAKA_EXPORT
Definition: macros.h:30
VideoFillMode
Definition: utils.h:41