summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-11-18 23:27:45 +0059
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-11-18 23:27:45 +0059
commit0276f3f84cbfca7897aef642fd20d52ba656a606 (patch)
tree5052e58b2ef3cb4645630e89d8eab9753845e737
parentfd1d05a01a704db47f6e60425c0ac3e1bd4cffbf (diff)
downloadbase-0276f3f84cbfca7897aef642fd20d52ba656a606.tar.gz
frameworks/base: Assorted build fixes
Assorted build fixes for gcc 4.6 and -DNDEBUG Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--include/media/stagefright/AACWriter.h1
-rw-r--r--include/media/stagefright/SurfaceMediaSource.h19
-rw-r--r--libs/rs/driver/rsdCore.cpp4
3 files changed, 21 insertions, 3 deletions
diff --git a/include/media/stagefright/AACWriter.h b/include/media/stagefright/AACWriter.h
index fa3ab8af17eb..a8c397d2c0cd 100644
--- a/include/media/stagefright/AACWriter.h
+++ b/include/media/stagefright/AACWriter.h
@@ -17,6 +17,7 @@
#ifndef AAC_WRITER_H_
#define AAC_WRITER_H_
+#include <media/stagefright/foundation/ABase.h> // DISALLOW_EVIL_CONSTRUCTORS
#include <media/stagefright/MediaWriter.h>
#include <utils/threads.h>
diff --git a/include/media/stagefright/SurfaceMediaSource.h b/include/media/stagefright/SurfaceMediaSource.h
index d0940bb64242..e8577564a571 100644
--- a/include/media/stagefright/SurfaceMediaSource.h
+++ b/include/media/stagefright/SurfaceMediaSource.h
@@ -24,6 +24,23 @@
#include <media/stagefright/MediaSource.h>
#include <media/stagefright/MediaBuffer.h>
+
+#ifndef DISALLOW_COPY_AND_ASSIGN
+// Convenience Macro to make copy constructor and assignment operator private
+// (thereby disallowing copying and assigning).
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
+#endif
+
+#ifndef DISALLOW_IMPLICIT_CONSTRUCTORS
+// A macro to disallow all the implicit constructors, namely the
+// default constructor, copy constructor and operator= functions.
+#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
+ TypeName(); \
+ DISALLOW_COPY_AND_ASSIGN(TypeName)
+#endif
+
namespace android {
// ----------------------------------------------------------------------------
@@ -111,7 +128,7 @@ public:
// Make sure this is called when the mutex is locked
virtual status_t onFrameReceivedLocked();
- virtual status_t setScalingMode(int mode) { } // no op for encoding
+ virtual status_t setScalingMode(int mode) { return OK; } // no op for encoding
virtual int query(int what, int* value);
// Just confirming to the ISurfaceTexture interface as of now
diff --git a/libs/rs/driver/rsdCore.cpp b/libs/rs/driver/rsdCore.cpp
index f8107d9ff633..8ec497bda4dd 100644
--- a/libs/rs/driver/rsdCore.cpp
+++ b/libs/rs/driver/rsdCore.cpp
@@ -274,10 +274,10 @@ void Shutdown(Context *rsc) {
for (uint32_t ct = 0; ct < dc->mWorkers.mCount; ct++) {
dc->mWorkers.mLaunchSignals[ct].set();
}
- int status;
+ //int status;
void *res;
for (uint32_t ct = 0; ct < dc->mWorkers.mCount; ct++) {
- status = pthread_join(dc->mWorkers.mThreadId[ct], &res);
+ /*status =*/ pthread_join(dc->mWorkers.mThreadId[ct], &res);
}
rsAssert(android_atomic_acquire_load(&dc->mWorkers.mRunningCount) == 0);