diff options
author | Lajos Molnar <lajos@google.com> | 2015-05-06 14:01:08 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-05-07 11:46:15 -0700 |
commit | b2d0b487efd40700199852c9a18b369b1651f15b (patch) | |
tree | abfee9d4cd5df8e4e99d3cb6b5350ef54d543011 /include/media/stagefright | |
parent | 70c75d8c15707d5eade38fe3e622f8500c29556b (diff) | |
download | frameworks_av-b2d0b487efd40700199852c9a18b369b1651f15b.zip frameworks_av-b2d0b487efd40700199852c9a18b369b1651f15b.tar.gz frameworks_av-b2d0b487efd40700199852c9a18b369b1651f15b.tar.bz2 |
stagefright: move native window helpers into SurfaceUtils
Bug: 20885565
Change-Id: I2ed14be8a7cb08b1ed4ea65cb9286dc1384fe64a
Diffstat (limited to 'include/media/stagefright')
-rw-r--r-- | include/media/stagefright/ACodec.h | 5 | ||||
-rw-r--r-- | include/media/stagefright/OMXCodec.h | 2 | ||||
-rw-r--r-- | include/media/stagefright/SurfaceUtils.h | 34 |
3 files changed, 34 insertions, 7 deletions
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h index cdb923d..0a54df9 100644 --- a/include/media/stagefright/ACodec.h +++ b/include/media/stagefright/ACodec.h @@ -236,9 +236,6 @@ private: status_t freeBuffer(OMX_U32 portIndex, size_t i); status_t handleSetSurface(const sp<Surface> &surface); - status_t setNativeWindowSizeFormatAndUsage( - ANativeWindow *nativeWindow /* nonnull */, - int width, int height, int format, int rotation, int usage); status_t setupNativeWindowSizeFormatAndUsage(ANativeWindow *nativeWindow /* nonnull */); status_t configureOutputBuffersFromNativeWindow( @@ -332,8 +329,6 @@ private: status_t initNativeWindow(); - status_t pushBlankBuffersToNativeWindow(); - // Returns true iff all buffers on the given port have status // OWNED_BY_US or OWNED_BY_NATIVE_WINDOW. bool allYourBuffersAreBelongToUs(OMX_U32 portIndex); diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h index 84b1b1a..7fabcb3 100644 --- a/include/media/stagefright/OMXCodec.h +++ b/include/media/stagefright/OMXCodec.h @@ -298,7 +298,6 @@ private: status_t queueBufferToNativeWindow(BufferInfo *info); status_t cancelBufferToNativeWindow(BufferInfo *info); BufferInfo* dequeueBufferFromNativeWindow(); - status_t pushBlankBuffersToNativeWindow(); status_t freeBuffersOnPort( OMX_U32 portIndex, bool onlyThoseWeOwn = false); @@ -347,7 +346,6 @@ private: status_t configureCodec(const sp<MetaData> &meta); - status_t applyRotation(); status_t waitForBufferFilled_l(); int64_t getDecodingTimeUs(); diff --git a/include/media/stagefright/SurfaceUtils.h b/include/media/stagefright/SurfaceUtils.h new file mode 100644 index 0000000..c1a9c0a --- /dev/null +++ b/include/media/stagefright/SurfaceUtils.h @@ -0,0 +1,34 @@ +/* + * Copyright 2015 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 SURFACE_UTILS_H_ + +#define SURFACE_UTILS_H_ + +#include <utils/Errors.h> + +struct ANativeWindow; + +namespace android { + +status_t setNativeWindowSizeFormatAndUsage( + ANativeWindow *nativeWindow /* nonnull */, + int width, int height, int format, int rotation, int usage); +status_t pushBlankBuffersToNativeWindow(ANativeWindow *nativeWindow /* nonnull */); + +} // namespace android + +#endif // SURFACE_UTILS_H_ |