summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-08-13 14:00:16 -0700
committerAndreas Huber <andih@google.com>2010-08-23 12:29:52 -0700
commit2d82f83d997062313dfdd37e2e8c3f2146e2ab84 (patch)
treeb2cee7cab40eb51551a6a9fdf838389626b8aac9
parentb0f539585158c8dc768241d720944172c17a4080 (diff)
downloadmsm7k-2d82f83d997062313dfdd37e2e8c3f2146e2ab84.tar.gz
We're no longer using the ISurface-based rendering code on Passion.
Change-Id: Iee7b086bfcec2552e6f5bfbee974fffa12fe7835
-rw-r--r--libstagefrighthw/Android.mk3
-rw-r--r--libstagefrighthw/QComHardwareRenderer.cpp139
-rw-r--r--libstagefrighthw/QComHardwareRenderer.h57
-rw-r--r--libstagefrighthw/stagefright_surface_output_msm72xx.cpp43
4 files changed, 0 insertions, 242 deletions
diff --git a/libstagefrighthw/Android.mk b/libstagefrighthw/Android.mk
index 97ab4c7..c9816f5 100644
--- a/libstagefrighthw/Android.mk
+++ b/libstagefrighthw/Android.mk
@@ -18,9 +18,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- stagefright_surface_output_msm72xx.cpp \
QComOMXPlugin.cpp \
- QComHardwareRenderer.cpp
LOCAL_CFLAGS := $(PV_CFLAGS_MINUS_VISIBILITY)
@@ -33,7 +31,6 @@ LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
libui \
- libsurfaceflinger_client\
LOCAL_MODULE := libstagefrighthw
diff --git a/libstagefrighthw/QComHardwareRenderer.cpp b/libstagefrighthw/QComHardwareRenderer.cpp
deleted file mode 100644
index 8dd505b..0000000
--- a/libstagefrighthw/QComHardwareRenderer.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "QComHardwareRenderer.h"
-
-#include <binder/MemoryHeapBase.h>
-#include <binder/MemoryHeapPmem.h>
-#include <media/stagefright/MediaDebug.h>
-#include <surfaceflinger/ISurface.h>
-
-namespace android {
-
-////////////////////////////////////////////////////////////////////////////////
-
-typedef struct PLATFORM_PRIVATE_ENTRY
-{
- /* Entry type */
- uint32_t type;
-
- /* Pointer to platform specific entry */
- void *entry;
-
-} PLATFORM_PRIVATE_ENTRY;
-
-typedef struct PLATFORM_PRIVATE_LIST
-{
- /* Number of entries */
- uint32_t nEntries;
-
- /* Pointer to array of platform specific entries *
- * Contiguous block of PLATFORM_PRIVATE_ENTRY elements */
- PLATFORM_PRIVATE_ENTRY *entryList;
-
-} PLATFORM_PRIVATE_LIST;
-
-// data structures for tunneling buffers
-typedef struct PLATFORM_PRIVATE_PMEM_INFO
-{
- /* pmem file descriptor */
- uint32_t pmem_fd;
- uint32_t offset;
-
-} PLATFORM_PRIVATE_PMEM_INFO;
-
-#define PLATFORM_PRIVATE_PMEM 1
-
-QComHardwareRenderer::QComHardwareRenderer(
- const sp<ISurface> &surface,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight)
- : mISurface(surface),
- mDisplayWidth(displayWidth),
- mDisplayHeight(displayHeight),
- mDecodedWidth(decodedWidth),
- mDecodedHeight(decodedHeight),
- mFrameSize((mDecodedWidth * mDecodedHeight * 3) / 2) {
- CHECK(mISurface.get() != NULL);
- CHECK(mDecodedWidth > 0);
- CHECK(mDecodedHeight > 0);
-}
-
-QComHardwareRenderer::~QComHardwareRenderer() {
- mISurface->unregisterBuffers();
-}
-
-void QComHardwareRenderer::render(
- const void *data, size_t size, void *platformPrivate) {
- size_t offset;
- if (!getOffset(platformPrivate, &offset)) {
- return;
- }
-
- mISurface->postBuffer(offset);
-}
-
-bool QComHardwareRenderer::getOffset(void *platformPrivate, size_t *offset) {
- *offset = 0;
-
- PLATFORM_PRIVATE_LIST *list = (PLATFORM_PRIVATE_LIST *)platformPrivate;
- for (uint32_t i = 0; i < list->nEntries; ++i) {
- if (list->entryList[i].type != PLATFORM_PRIVATE_PMEM) {
- continue;
- }
-
- PLATFORM_PRIVATE_PMEM_INFO *info =
- (PLATFORM_PRIVATE_PMEM_INFO *)list->entryList[i].entry;
-
- if (info != NULL) {
- if (mMemoryHeap.get() == NULL) {
- publishBuffers(info->pmem_fd);
- }
-
- if (mMemoryHeap.get() == NULL) {
- return false;
- }
-
- *offset = info->offset;
-
- return true;
- }
- }
-
- return false;
-}
-
-void QComHardwareRenderer::publishBuffers(uint32_t pmem_fd) {
- sp<MemoryHeapBase> master =
- reinterpret_cast<MemoryHeapBase *>(pmem_fd);
-
- master->setDevice("/dev/pmem");
-
- uint32_t heap_flags = master->getFlags() & MemoryHeapBase::NO_CACHING;
- mMemoryHeap = new MemoryHeapPmem(master, heap_flags);
- mMemoryHeap->slap();
-
- ISurface::BufferHeap bufferHeap(
- mDisplayWidth, mDisplayHeight,
- mDecodedWidth, mDecodedHeight,
- HAL_PIXEL_FORMAT_YCrCb_420_SP,
- mMemoryHeap);
-
- status_t err = mISurface->registerBuffers(bufferHeap);
- CHECK_EQ(err, OK);
-}
-
-} // namespace android
diff --git a/libstagefrighthw/QComHardwareRenderer.h b/libstagefrighthw/QComHardwareRenderer.h
deleted file mode 100644
index 8292dd5..0000000
--- a/libstagefrighthw/QComHardwareRenderer.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef QCOM_HARDWARE_RENDERER_H_
-
-#define QCOM_HARDWARE_RENDERER_H_
-
-#include <media/stagefright/VideoRenderer.h>
-#include <utils/RefBase.h>
-
-namespace android {
-
-class ISurface;
-class MemoryHeapPmem;
-
-class QComHardwareRenderer : public VideoRenderer {
-public:
- QComHardwareRenderer(
- const sp<ISurface> &surface,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight);
-
- virtual ~QComHardwareRenderer();
-
- virtual void render(
- const void *data, size_t size, void *platformPrivate);
-
-private:
- sp<ISurface> mISurface;
- size_t mDisplayWidth, mDisplayHeight;
- size_t mDecodedWidth, mDecodedHeight;
- size_t mFrameSize;
- sp<MemoryHeapPmem> mMemoryHeap;
-
- bool getOffset(void *platformPrivate, size_t *offset);
- void publishBuffers(uint32_t pmem_fd);
-
- QComHardwareRenderer(const QComHardwareRenderer &);
- QComHardwareRenderer &operator=(const QComHardwareRenderer &);
-};
-
-} // namespace android
-
-#endif // QCOM_HARDWARE_RENDERER_H_
diff --git a/libstagefrighthw/stagefright_surface_output_msm72xx.cpp b/libstagefrighthw/stagefright_surface_output_msm72xx.cpp
deleted file mode 100644
index 3cfa7fc..0000000
--- a/libstagefrighthw/stagefright_surface_output_msm72xx.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <media/stagefright/HardwareAPI.h>
-
-#include "QComHardwareRenderer.h"
-
-using android::sp;
-using android::ISurface;
-using android::VideoRenderer;
-
-VideoRenderer *createRenderer(
- const sp<ISurface> &surface,
- const char *componentName,
- OMX_COLOR_FORMATTYPE colorFormat,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight) {
- using android::QComHardwareRenderer;
-
- static const int OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00;
-
- if (colorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar
- && !strncmp(componentName, "OMX.qcom.video.decoder.", 23)) {
- return new QComHardwareRenderer(
- surface, displayWidth, displayHeight,
- decodedWidth, decodedHeight);
- }
-
- return NULL;
-}