summaryrefslogtreecommitdiffstats
path: root/remoting/client/frame_consumer.h
diff options
context:
space:
mode:
authorlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 06:53:58 +0000
committerlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 06:53:58 +0000
commit596c78f82f1092e486f38eeb8e27a3118f90e807 (patch)
tree55c2d399a75f58d6b8e66ac297bcd9963f49673e /remoting/client/frame_consumer.h
parent77787cf1a890f6318c0f4dfb1ee5deb4ee068e85 (diff)
downloadchromium_src-596c78f82f1092e486f38eeb8e27a3118f90e807.zip
chromium_src-596c78f82f1092e486f38eeb8e27a3118f90e807.tar.gz
chromium_src-596c78f82f1092e486f38eeb8e27a3118f90e807.tar.bz2
Byte-swap the video frame pixels before passing them to Java.
When a complete video frame is decoded, this CL converts the pixels from BGRA to a format suitable for loading into a Java Bitmap directly. This removes the need to create a temporary int[] array in Java. Review URL: https://codereview.chromium.org/23677011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/frame_consumer.h')
-rw-r--r--remoting/client/frame_consumer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/remoting/client/frame_consumer.h b/remoting/client/frame_consumer.h
index 4df7595..165cedd 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() {}