| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 // Definition of class GtkVideoRenderer that implements the abstract class | 11 // Definition of class GtkVideoRenderer that implements the abstract class |
| 12 // cricket::VideoRenderer via GTK. | 12 // cricket::VideoRenderer via GTK. |
| 13 | 13 |
| 14 #ifndef WEBRTC_MEDIA_DEVICES_GTKVIDEORENDERER_H_ | 14 #ifndef WEBRTC_MEDIA_DEVICES_GTKVIDEORENDERER_H_ |
| 15 #define WEBRTC_MEDIA_DEVICES_GTKVIDEORENDERER_H_ | 15 #define WEBRTC_MEDIA_DEVICES_GTKVIDEORENDERER_H_ |
| 16 | 16 |
| 17 #include <memory> | 17 #include <memory> |
| 18 | 18 |
| 19 #include "webrtc/base/basictypes.h" | 19 #include "webrtc/base/basictypes.h" |
| 20 #include "webrtc/media/base/videoframe.h" |
| 20 #include "webrtc/media/base/videosinkinterface.h" | 21 #include "webrtc/media/base/videosinkinterface.h" |
| 21 | 22 |
| 22 typedef struct _GtkWidget GtkWidget; // forward declaration, defined in gtk.h | 23 typedef struct _GtkWidget GtkWidget; // forward declaration, defined in gtk.h |
| 23 | 24 |
| 24 namespace cricket { | 25 namespace cricket { |
| 25 | 26 |
| 27 // TODO(nisse): For some reason, forward declaration doens't work when |
| 28 // the definition is a "using" alias. |
| 29 #if 0 |
| 26 class VideoFrame; | 30 class VideoFrame; |
| 31 #endif |
| 27 | 32 |
| 28 class GtkVideoRenderer : public rtc::VideoSinkInterface<VideoFrame> { | 33 class GtkVideoRenderer : public rtc::VideoSinkInterface<VideoFrame> { |
| 29 public: | 34 public: |
| 30 GtkVideoRenderer(int x, int y); | 35 GtkVideoRenderer(int x, int y); |
| 31 virtual ~GtkVideoRenderer(); | 36 virtual ~GtkVideoRenderer(); |
| 32 | 37 |
| 33 // Implementation of VideoSinkInterface. | 38 // Implementation of VideoSinkInterface. |
| 34 void OnFrame(const VideoFrame& frame) override; | 39 void OnFrame(const VideoFrame& frame) override; |
| 35 | 40 |
| 36 private: | 41 private: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 49 int initial_x_; | 54 int initial_x_; |
| 50 int initial_y_; | 55 int initial_y_; |
| 51 | 56 |
| 52 int width_; | 57 int width_; |
| 53 int height_; | 58 int height_; |
| 54 }; | 59 }; |
| 55 | 60 |
| 56 } // namespace cricket | 61 } // namespace cricket |
| 57 | 62 |
| 58 #endif // WEBRTC_MEDIA_DEVICES_GTKVIDEORENDERER_H_ | 63 #endif // WEBRTC_MEDIA_DEVICES_GTKVIDEORENDERER_H_ |
| OLD | NEW |