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

Unified Diff: remoting/client/frame_consumer.h

Issue 23677011: Byte-swap the video frame pixels before passing them to Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Narrow the synchronization block Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/frame_consumer.h
diff --git a/remoting/client/frame_consumer.h b/remoting/client/frame_consumer.h
index 4df75950a0f081c153a034aa069847a7d670468a..165ceddee30aa3a3a72f38f2b1e033472332a2d2 100644
--- a/remoting/client/frame_consumer.h
+++ b/remoting/client/frame_consumer.h
@@ -19,6 +19,13 @@ namespace remoting {
class FrameConsumer {
public:
+
+ // List of supported pixel formats needed by various platforms.
+ enum PixelFormat {
+ FORMAT_BGRA, // Used by the Pepper plugin.
+ FORMAT_RGBA, // Used for Android's Bitmap class.
+ };
+
// Accepts a buffer to be painted to the screen. The buffer's dimensions and
// relative position within the frame are specified by |clip_area|. Only
// pixels falling within |region| and the current clipping area are painted.
@@ -41,6 +48,9 @@ class FrameConsumer {
virtual void SetSourceSize(const webrtc::DesktopSize& source_size,
const webrtc::DesktopVector& dpi) = 0;
+ // Returns the preferred pixel encoding for the platform.
+ virtual PixelFormat GetPixelFormat() = 0;
+
protected:
FrameConsumer() {}
virtual ~FrameConsumer() {}
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java ('k') | remoting/client/frame_consumer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698