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

Side by Side Diff: remoting/base/util.cc

Issue 4476003: Add VideoPacket struct for video packets. Refactor Decode interface to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « remoting/base/util.h ('k') | remoting/client/chromoting_client.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 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/base/util.h" 5 #include "remoting/base/util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 using media::VideoFrame;
10
9 namespace remoting { 11 namespace remoting {
10 12
11 int GetBytesPerPixel(PixelFormat format) { 13 int GetBytesPerPixel(VideoFrame::Format format) {
12 // Note: The order is important here for performance. This is sorted from the 14 // Note: The order is important here for performance. This is sorted from the
13 // most common to the less common (PIXEL_FORMAT_ASCII is mostly used 15 // most common to the less common (PIXEL_FORMAT_ASCII is mostly used
14 // just for testing). 16 // just for testing).
15 switch (format) { 17 switch (format) {
16 case PIXEL_FORMAT_RGB24: return 3; 18 case VideoFrame::RGB24: return 3;
17 case PIXEL_FORMAT_RGB565: return 2; 19 case VideoFrame::RGB565: return 2;
18 case PIXEL_FORMAT_RGB32: return 4; 20 case VideoFrame::RGB32: return 4;
19 case PIXEL_FORMAT_ASCII: return 1; 21 case VideoFrame::ASCII: return 1;
20 default: 22 default:
21 NOTREACHED() << "Pixel format not supported"; 23 NOTREACHED() << "Pixel format not supported";
22 return 0; 24 return 0;
23 } 25 }
24 } 26 }
25 27
26 } // namespace remoting 28 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/util.h ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698