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

Side by Side Diff: talk/media/devices/carbonvideorenderer.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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 | « talk/media/devices/carbonvideorenderer.h ('k') | talk/media/devices/filevideocapturer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 CGImageRelease(image_ref); 109 CGImageRelease(image_ref);
110 return true; 110 return true;
111 } 111 }
112 112
113 bool CarbonVideoRenderer::SetSize(int width, int height, int reserved) { 113 bool CarbonVideoRenderer::SetSize(int width, int height, int reserved) {
114 if (width != image_width_ || height != image_height_) { 114 if (width != image_width_ || height != image_height_) {
115 // Grab the image lock while changing its size. 115 // Grab the image lock while changing its size.
116 rtc::CritScope cs(&image_crit_); 116 rtc::CritScope cs(&image_crit_);
117 image_width_ = width; 117 image_width_ = width;
118 image_height_ = height; 118 image_height_ = height;
119 image_.reset(new uint8[width * height * 4]); 119 image_.reset(new uint8_t[width * height * 4]);
120 memset(image_.get(), 255, width * height * 4); 120 memset(image_.get(), 255, width * height * 4);
121 } 121 }
122 return true; 122 return true;
123 } 123 }
124 124
125 bool CarbonVideoRenderer::RenderFrame(const VideoFrame* video_frame) { 125 bool CarbonVideoRenderer::RenderFrame(const VideoFrame* video_frame) {
126 if (!video_frame) { 126 if (!video_frame) {
127 return false; 127 return false;
128 } 128 }
129 { 129 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (err != noErr) { 181 if (err != noErr) {
182 LOG(LS_ERROR) << "Failed to install event handler, error code: " << err; 182 LOG(LS_ERROR) << "Failed to install event handler, error code: " << err;
183 return false; 183 return false;
184 } 184 }
185 SelectWindow(window_ref_); 185 SelectWindow(window_ref_);
186 ShowWindow(window_ref_); 186 ShowWindow(window_ref_);
187 return true; 187 return true;
188 } 188 }
189 189
190 } // namespace cricket 190 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/devices/carbonvideorenderer.h ('k') | talk/media/devices/filevideocapturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698