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

Side by Side Diff: media/base/video_frame.h

Issue 2745743002: Added BitsPerChannel method to video frame class. (Closed)
Patch Set: Added BitsPerChannel method to video frame class. Created 3 years, 9 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 | « cc/resources/video_resource_updater.cc ('k') | media/base/video_frame.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ 5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_
6 #define MEDIA_BASE_VIDEO_FRAME_H_ 6 #define MEDIA_BASE_VIDEO_FRAME_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 // This method is thread safe. Both blink and compositor threads can call it. 386 // This method is thread safe. Both blink and compositor threads can call it.
387 void UpdateReleaseSyncToken(SyncTokenClient* client); 387 void UpdateReleaseSyncToken(SyncTokenClient* client);
388 388
389 // Returns a human-readable string describing |*this|. 389 // Returns a human-readable string describing |*this|.
390 std::string AsHumanReadableString(); 390 std::string AsHumanReadableString();
391 391
392 // Unique identifier for this video frame; generated at construction time and 392 // Unique identifier for this video frame; generated at construction time and
393 // guaranteed to be unique within a single process. 393 // guaranteed to be unique within a single process.
394 int unique_id() const { return unique_id_; } 394 int unique_id() const { return unique_id_; }
395 395
396 // Returns the number of bits per channel for given |format|.
397 int BitsPerChannel(VideoPixelFormat format);
398
396 protected: 399 protected:
397 friend class base::RefCountedThreadSafe<VideoFrame>; 400 friend class base::RefCountedThreadSafe<VideoFrame>;
398 401
399 // Clients must use the static factory/wrapping methods to create a new frame. 402 // Clients must use the static factory/wrapping methods to create a new frame.
400 // Derived classes should create their own factory/wrapping methods, and use 403 // Derived classes should create their own factory/wrapping methods, and use
401 // this constructor to do basic initialization. 404 // this constructor to do basic initialization.
402 VideoFrame(VideoPixelFormat format, 405 VideoFrame(VideoPixelFormat format,
403 StorageType storage_type, 406 StorageType storage_type,
404 const gfx::Size& coded_size, 407 const gfx::Size& coded_size,
405 const gfx::Rect& visible_rect, 408 const gfx::Rect& visible_rect,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 const int unique_id_; 545 const int unique_id_;
543 546
544 gfx::ColorSpace color_space_; 547 gfx::ColorSpace color_space_;
545 548
546 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 549 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
547 }; 550 };
548 551
549 } // namespace media 552 } // namespace media
550 553
551 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 554 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698