summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-08-08 19:14:03 -0700
committerMathias Agopian <mathias@google.com>2011-08-08 20:25:44 -0700
commit053b02df2d350466a2226a90709e50fedef54747 (patch)
tree28a844d96bfc2fdd0e3714305a8cb86e977a1d90 /media
parentfc4ba1141570fab7734e53586dc3d6f3afde10de (diff)
downloadframeworks_base-053b02df2d350466a2226a90709e50fedef54747.zip
frameworks_base-053b02df2d350466a2226a90709e50fedef54747.tar.gz
frameworks_base-053b02df2d350466a2226a90709e50fedef54747.tar.bz2
return correct value from query after connecting a surface
the first time a surface was connected, the values returned by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call to queueBuffer was performed. Bug: 5137366, 5121607 Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/SurfaceMediaSource.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp
index 3d8c56a..ddfd9ff 100644
--- a/media/libstagefright/SurfaceMediaSource.cpp
+++ b/media/libstagefright/SurfaceMediaSource.cpp
@@ -371,7 +371,8 @@ status_t SurfaceMediaSource::setSynchronousMode(bool enabled) {
return err;
}
-status_t SurfaceMediaSource::connect(int api) {
+status_t SurfaceMediaSource::connect(int api,
+ uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
LOGV("SurfaceMediaSource::connect");
Mutex::Autolock lock(mMutex);
status_t err = NO_ERROR;
@@ -384,6 +385,9 @@ status_t SurfaceMediaSource::connect(int api) {
err = -EINVAL;
} else {
mConnectedApi = api;
+ *outWidth = mDefaultWidth;
+ *outHeight = mDefaultHeight;
+ *outTransform = 0;
}
break;
default: