From b706afb697c5117129400ec2d8104c476a371596 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Tue, 25 Jun 2024 10:51:23 +0900 Subject: [PATCH] Support m360 tag in mp4 m360 tag contains spherical, and stitched info. Change-Id: Ie3e86fa4223a68ff9c470698436e03e588675d3d Signed-off-by: Minje Ahn --- packaging/libmm-fileinfo.spec | 2 +- utils/mm_file_util_tag.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packaging/libmm-fileinfo.spec b/packaging/libmm-fileinfo.spec index 806c3c8..aff6a6a 100644 --- a/packaging/libmm-fileinfo.spec +++ b/packaging/libmm-fileinfo.spec @@ -1,6 +1,6 @@ Name: libmm-fileinfo Summary: Media Fileinfo -Version: 1.0.26 +Version: 1.1.0 Release: 0 Group: System/Libraries License: Apache-2.0 diff --git a/utils/mm_file_util_tag.c b/utils/mm_file_util_tag.c index 77b69f0..d96b525 100644 --- a/utils/mm_file_util_tag.c +++ b/utils/mm_file_util_tag.c @@ -2257,6 +2257,24 @@ int MMFileUtilGetMetaDataFromMP4(MMFileFormatContext *formatContext) GetValueFromCDISTagBox(formatContext, fp, &basic_header); break; } + case FOURCC('m', '3', '6', '0'): { + debug_msg(RELEASE, "MPEG4: [m360] SIZE: [%lld]Byte", chunk_size); + unsigned long mode[2] = {0, }; + int temp = 0; + + mmfile_read(fp, (unsigned char *)mode, sizeof(mode)); + + temp = mmfile_io_be_uint32(mode[1]); + if(temp == 0) { + formatContext->isSpherical = false; + formatContext->isStitched = 0; + } else { + formatContext->isSpherical = true; + formatContext->isStitched = temp * MMFILE_360_NON_STITCHED; + } + break; + } + /*/////////////////////////////////////////////////////////////// */ /* Extracting ID3 Tag Data // */ /*/////////////////////////////////////////////////////////////// */ -- 2.7.4