Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75c3398b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add Overloads to Frame and Image Extract Functions" into main am:...

Merge "Add Overloads to Frame and Image Extract Functions" into main am: 87f29ca9 am: 81597369 am: 38634b63

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2746519



Change-Id: I107b142ad8c9d090c2da86964520ecac1d81246b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9586333e 38634b63
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -96,13 +96,19 @@ public:
    status_t setDataSource(
    status_t setDataSource(
            const sp<IDataSource>& dataSource, const char *mime = NULL);
            const sp<IDataSource>& dataSource, const char *mime = NULL);
    sp<IMemory> getFrameAtTime(int64_t timeUs, int option,
    sp<IMemory> getFrameAtTime(int64_t timeUs, int option,
            int colorFormat = HAL_PIXEL_FORMAT_RGB_565, bool metaOnly = false);
            int colorFormat, bool metaOnly = false);
    sp<IMemory> getFrameAtTime(int64_t timeUs, int option,
            bool metaOnly = false);
    sp<IMemory> getImageAtIndex(int index,
            int colorFormat, bool metaOnly = false, bool thumbnail = false);
    sp<IMemory> getImageAtIndex(int index,
    sp<IMemory> getImageAtIndex(int index,
            int colorFormat = HAL_PIXEL_FORMAT_RGB_565, bool metaOnly = false, bool thumbnail = false);
            bool metaOnly = false, bool thumbnail = false);
    sp<IMemory> getImageRectAtIndex(
    sp<IMemory> getImageRectAtIndex(
            int index, int colorFormat, int left, int top, int right, int bottom);
            int index, int colorFormat, int left, int top, int right, int bottom);
    sp<IMemory>  getFrameAtIndex(
    sp<IMemory>  getFrameAtIndex(
            int index, int colorFormat = HAL_PIXEL_FORMAT_RGB_565, bool metaOnly = false);
            int index, int colorFormat, bool metaOnly = false);
    sp<IMemory>  getFrameAtIndex(
            int index, bool metaOnly = false);
    sp<IMemory> extractAlbumArt();
    sp<IMemory> extractAlbumArt();
    const char* extractMetadata(int keyCode);
    const char* extractMetadata(int keyCode);


+15 −0
Original line number Original line Diff line number Diff line
@@ -141,6 +141,11 @@ status_t MediaMetadataRetriever::setDataSource(
    return mRetriever->setDataSource(dataSource, mime);
    return mRetriever->setDataSource(dataSource, mime);
}
}


sp<IMemory> MediaMetadataRetriever::getFrameAtTime(
        int64_t timeUs, int option, bool metaOnly) {
    return getFrameAtTime(timeUs, option, HAL_PIXEL_FORMAT_RGB_565, metaOnly);
}

sp<IMemory> MediaMetadataRetriever::getFrameAtTime(
sp<IMemory> MediaMetadataRetriever::getFrameAtTime(
        int64_t timeUs, int option, int colorFormat, bool metaOnly)
        int64_t timeUs, int option, int colorFormat, bool metaOnly)
{
{
@@ -154,6 +159,11 @@ sp<IMemory> MediaMetadataRetriever::getFrameAtTime(
    return mRetriever->getFrameAtTime(timeUs, option, colorFormat, metaOnly);
    return mRetriever->getFrameAtTime(timeUs, option, colorFormat, metaOnly);
}
}


sp<IMemory> MediaMetadataRetriever::getImageAtIndex(
        int index, bool metaOnly, bool thumbnail) {
    return getImageAtIndex(index, HAL_PIXEL_FORMAT_RGB_565, metaOnly, thumbnail);
}

sp<IMemory> MediaMetadataRetriever::getImageAtIndex(
sp<IMemory> MediaMetadataRetriever::getImageAtIndex(
        int index, int colorFormat, bool metaOnly, bool thumbnail) {
        int index, int colorFormat, bool metaOnly, bool thumbnail) {
    ALOGV("getImageAtIndex: index(%d) colorFormat(%d) metaOnly(%d) thumbnail(%d)",
    ALOGV("getImageAtIndex: index(%d) colorFormat(%d) metaOnly(%d) thumbnail(%d)",
@@ -179,6 +189,11 @@ sp<IMemory> MediaMetadataRetriever::getImageRectAtIndex(
            index, colorFormat, left, top, right, bottom);
            index, colorFormat, left, top, right, bottom);
}
}


sp<IMemory>  MediaMetadataRetriever::getFrameAtIndex(
        int index, bool metaOnly) {
    return getFrameAtIndex(index, HAL_PIXEL_FORMAT_RGB_565, metaOnly);
}

sp<IMemory>  MediaMetadataRetriever::getFrameAtIndex(
sp<IMemory>  MediaMetadataRetriever::getFrameAtIndex(
        int index, int colorFormat, bool metaOnly) {
        int index, int colorFormat, bool metaOnly) {
    ALOGV("getFrameAtIndex: index(%d), colorFormat(%d) metaOnly(%d)",
    ALOGV("getFrameAtIndex: index(%d), colorFormat(%d) metaOnly(%d)",