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

Side by Side Diff: webrtc/media/devices/carbonvideorenderer.h

Issue 2321493002: Reland of move all reference to carbon api (Closed)
Patch Set: fix chromium build issues Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/media/BUILD.gn ('k') | webrtc/media/devices/carbonvideorenderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 // Definition of class CarbonVideoRenderer that implements the abstract class
12 // cricket::VideoRenderer via Carbon.
13
14 #ifndef WEBRTC_MEDIA_DEVICES_CARBONVIDEORENDERER_H_
15 #define WEBRTC_MEDIA_DEVICES_CARBONVIDEORENDERER_H_
16
17 #include <memory>
18
19 #include <Carbon/Carbon.h>
20
21 #include "webrtc/base/criticalsection.h"
22 #include "webrtc/media/base/videosinkinterface.h"
23
24 namespace cricket {
25
26 class CarbonVideoRenderer
27 : public rtc::VideoSinkInterface<cricket::VideoFrame> {
28 public:
29 CarbonVideoRenderer(int x, int y);
30 virtual ~CarbonVideoRenderer();
31
32 // Implementation of VideoSinkInterface.
33 void OnFrame(const VideoFrame& frame) override;
34
35 // Needs to be called on the main thread.
36 bool Initialize();
37
38 private:
39 bool SetSize(int width, int height);
40 bool DrawFrame();
41
42 static OSStatus DrawEventHandler(EventHandlerCallRef handler,
43 EventRef event,
44 void* data);
45 std::unique_ptr<uint8_t[]> image_;
46 rtc::CriticalSection image_crit_;
47 int image_width_;
48 int image_height_;
49 int x_;
50 int y_;
51 WindowRef window_ref_;
52 };
53
54 } // namespace cricket
55
56 #endif // WEBRTC_MEDIA_DEVICES_CARBONVIDEORENDERER_H_
OLDNEW
« no previous file with comments | « webrtc/media/BUILD.gn ('k') | webrtc/media/devices/carbonvideorenderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698