| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "talk/media/base/videoframe.h" | 33 #include "talk/media/base/videoframe.h" |
| 34 #include "webrtc/base/logging.h" | 34 #include "webrtc/base/logging.h" |
| 35 | 35 |
| 36 namespace cricket { | 36 namespace cricket { |
| 37 | 37 |
| 38 CarbonVideoRenderer::CarbonVideoRenderer(int x, int y) | 38 CarbonVideoRenderer::CarbonVideoRenderer(int x, int y) |
| 39 : image_width_(0), | 39 : image_width_(0), |
| 40 image_height_(0), | 40 image_height_(0), |
| 41 x_(x), | 41 x_(x), |
| 42 y_(y), | 42 y_(y), |
| 43 image_ref_(NULL), | |
| 44 window_ref_(NULL) { | 43 window_ref_(NULL) { |
| 45 } | 44 } |
| 46 | 45 |
| 47 CarbonVideoRenderer::~CarbonVideoRenderer() { | 46 CarbonVideoRenderer::~CarbonVideoRenderer() { |
| 48 if (window_ref_) { | 47 if (window_ref_) { |
| 49 DisposeWindow(window_ref_); | 48 DisposeWindow(window_ref_); |
| 50 } | 49 } |
| 51 } | 50 } |
| 52 | 51 |
| 53 // Called from the main event loop. All renderering needs to happen on | 52 // Called from the main event loop. All renderering needs to happen on |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 if (err != noErr) { | 180 if (err != noErr) { |
| 182 LOG(LS_ERROR) << "Failed to install event handler, error code: " << err; | 181 LOG(LS_ERROR) << "Failed to install event handler, error code: " << err; |
| 183 return false; | 182 return false; |
| 184 } | 183 } |
| 185 SelectWindow(window_ref_); | 184 SelectWindow(window_ref_); |
| 186 ShowWindow(window_ref_); | 185 ShowWindow(window_ref_); |
| 187 return true; | 186 return true; |
| 188 } | 187 } |
| 189 | 188 |
| 190 } // namespace cricket | 189 } // namespace cricket |
| OLD | NEW |