Merge change Id3e3d0a3

* changes:
  Fix the broken build of omxjpegdecoder: http://b/2299035.
This commit is contained in:
Android (Google) Code Review
2009-12-03 21:28:53 -08:00
4 changed files with 16 additions and 4 deletions

View File

@@ -34,6 +34,7 @@ LOCAL_SHARED_LIBRARIES := \
libstagefright
LOCAL_C_INCLUDES := \
$(JNI_H_INCLUDE) \
$(TOP)/external/jpeg \
$(TOP)/external/skia/include/config \
$(TOP)/external/skia/include/core \

View File

@@ -31,11 +31,11 @@ StreamSource::~StreamSource() {
mStream = NULL;
}
status_t StreamSource::InitCheck() const {
status_t StreamSource::initCheck() const {
return mStream != NULL ? OK : NO_INIT;
}
ssize_t StreamSource::read_at(off_t offset, void *data, size_t size) {
ssize_t StreamSource::readAt(off_t offset, void *data, size_t size) {
Mutex::Autolock autoLock(mLock);
mStream->rewind();

View File

@@ -31,8 +31,8 @@ class StreamSource : public DataSource {
public:
// Pass the ownership of SkStream to StreamSource.
StreamSource(SkStream *SkStream);
status_t InitCheck() const;
virtual ssize_t read_at(off_t offset, void *data, size_t size);
virtual status_t initCheck() const;
virtual ssize_t readAt(off_t offset, void *data, size_t size);
virtual status_t getSize(off_t *size);
protected:

View File

@@ -25,6 +25,17 @@
#include "SkStream.h"
#include "omx_jpeg_decoder.h"
class SkJPEGImageDecoder : public SkImageDecoder {
public:
virtual Format getFormat() const {
return kJPEG_Format;
}
protected:
virtual bool onDecode(SkStream* stream, SkBitmap* bm,
SkBitmap::Config pref, Mode);
};
int nullObjectReturn(const char msg[]) {
if (msg) {
SkDebugf("--- %s\n", msg);