From: Minje Ahn Date: Wed, 6 May 2020 05:03:31 +0000 (+0900) Subject: Remove codec related code X-Git-Tag: submit/tizen/20200528.061116~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ced03c130c5ebff09cc2d3102afe231cfa9955d;p=platform%2Fcore%2Fmultimedia%2Flibmm-fileinfo.git Remove codec related code 'bCompressed' is false always. So, codec related code are never called. Change-Id: I014e6ee44e317d8fc575d2b750ba40b558a6a526 Signed-off-by: Minje Ahn --- diff --git a/Makefile.am b/Makefile.am index 32f4bb2..d9b2d8d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ ACLOCAL_AMFLAGS=-I m4 SUBDIRS = utils \ - codecs \ formats \ . \ tests @@ -11,8 +10,7 @@ endif lib_LTLIBRARIES = libmmffile.la -noinst_HEADERS = include/mm_file_codecs.h \ - include/mm_file_formats.h \ +noinst_HEADERS = include/mm_file_formats.h \ include/mm_file_format_frame.h libmmffile_la_SOURCES = mm_file.c @@ -42,8 +40,7 @@ libmmffile_la_LIBADD = $(top_builddir)/utils/libmmfile_utils.la \ if USE_DYN libmmffile_la_CFLAGS += -D__MMFILE_DYN_LOADING__ else -libmmffile_la_LIBADD += $(top_builddir)/codecs/ffmpeg/libmmfile_codecs.la \ - $(top_builddir)/formats/ffmpeg/libmmfile_formats.la +libmmffile_la_LIBADD += $(top_builddir)/formats/ffmpeg/libmmfile_formats.la endif libmmffile_la_CFLAGS += $(DLOG_CFLAGS) diff --git a/codecs/Makefile.am b/codecs/Makefile.am deleted file mode 100755 index 3f63a41..0000000 --- a/codecs/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS= ffmpeg - diff --git a/codecs/ffmpeg/Makefile.am b/codecs/ffmpeg/Makefile.am deleted file mode 100755 index 97c4433..0000000 --- a/codecs/ffmpeg/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -lib_LTLIBRARIES = libmmfile_codecs.la - -libmmfile_codecs_la_DEPENDENCIES = $(top_builddir)/utils/libmmfile_utils.la - -noinst_HEADERS = include/mm_file_codec_dummy.h \ - include/mm_file_codec_private.h - - -libmmfile_codecs_la_SOURCES = mm_file_codecs.c \ - mm_file_codec_dummy.c - - -libmmfile_codecs_la_CFLAGS = -I$(srcdir)/include \ - $(MMCOMMON_CFLAGS) \ - -I$(srcdir)/../../include \ - -I$(srcdir)/../../utils/include \ - -D_LARGEFILE64_SOURCE \ - -D_FILE_OFFSET_BITS=64 - -libmmfile_codecs_la_LIBADD = $(MMCOMMON_LIBS) \ - $(top_builddir)/utils/libmmfile_utils.la - -libmmfile_codecs_la_CFLAGS += $(DLOG_CFLAGS) -libmmfile_codecs_la_LIBADD += $(DLOG_LIBS) diff --git a/codecs/ffmpeg/include/mm_file_codec_dummy.h b/codecs/ffmpeg/include/mm_file_codec_dummy.h deleted file mode 100755 index 49ed937..0000000 --- a/codecs/ffmpeg/include/mm_file_codec_dummy.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * libmm-fileinfo - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Haejeong Kim - * - * 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 __MM_CODEC_PLUGIN_DUMMY_H__ -#define __MM_CODEC_PLUGIN_DUMMY_H__ - - -#ifdef __cplusplus -extern "C" { -#endif - - - -#ifdef __cplusplus -} -#endif - -#endif /*__MM_CODEC_PLUGIN_DUMMY_H__*/ - diff --git a/codecs/ffmpeg/include/mm_file_codec_private.h b/codecs/ffmpeg/include/mm_file_codec_private.h deleted file mode 100755 index 5f31c5e..0000000 --- a/codecs/ffmpeg/include/mm_file_codec_private.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * libmm-fileinfo - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Haejeong Kim - * - * 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 _MMFILE_CODEC_PRIVATE_H_ -#define _MMFILE_CODEC_PRIVATE_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include "mm_file_codecs.h" - -/* open functions list */ -int mmfile_codec_open_dummy(MMFileCodecContext *codecContext, MMFileCodecFrame *input); - - -#ifdef __cplusplus -} -#endif - -#endif /* _MMFILE_CODEC_PRIVATE_H_ */ - diff --git a/codecs/ffmpeg/mm_file_codec_dummy.c b/codecs/ffmpeg/mm_file_codec_dummy.c deleted file mode 100755 index b724945..0000000 --- a/codecs/ffmpeg/mm_file_codec_dummy.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * libmm-fileinfo - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Haejeong Kim - * - * 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 /*memcmp*/ -#include /*malloc*/ - -#include "mm_file_error.h" -#include "mm_file_debug.h" - -#include "mm_file_codec_private.h" -#include "mm_file_codec_dummy.h" - - -/* internal functions */ - - -/* plugin manadatory API */ -int mmfile_codec_decode_dummy(MMFileCodecContext *codecContext, MMFileCodecFrame *output); -int mmfile_codec_close_dummy(MMFileCodecContext *codecContext); - - - -int mmfile_codec_open_dummy(MMFileCodecContext *codecContext, MMFileCodecFrame *input) -{ - debug_warning(DEBUG, "called mmfile_codec_open_dummy\n"); - - codecContext->Decode = mmfile_codec_decode_dummy; - codecContext->Close = mmfile_codec_close_dummy; - - return MMFILE_CODEC_SUCCESS; -} - - -int mmfile_codec_decode_dummy(MMFileCodecContext *codecContext, MMFileCodecFrame *output) -{ - debug_warning(DEBUG, "called mmfile_codec_decode_dummy\n"); - return MMFILE_CODEC_SUCCESS; -} - - -int mmfile_codec_close_dummy(MMFileCodecContext *codecContext) -{ - debug_warning(DEBUG, "called mmfile_codec_close_dummy\n"); - - codecContext->Decode = NULL; - codecContext->Close = NULL; - - return MMFILE_CODEC_SUCCESS; -} - diff --git a/codecs/ffmpeg/mm_file_codecs.c b/codecs/ffmpeg/mm_file_codecs.c deleted file mode 100644 index b6dde30..0000000 --- a/codecs/ffmpeg/mm_file_codecs.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * libmm-fileinfo - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Haejeong Kim - * - * 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 -#include - -#include "mm_file_debug.h" -#include "mm_file_utils.h" -#include "mm_file_codec_private.h" - -static int (*OpenVideoCodecFunc[MM_VIDEO_CODEC_NUM]) (MMFileCodecContext *codecContext, MMFileCodecFrame *input) = { - mmfile_codec_open_dummy, /* NONE */ - mmfile_codec_open_dummy, /* WMV */ - mmfile_codec_open_dummy, /* H261 */ - mmfile_codec_open_dummy, /* H262 */ - mmfile_codec_open_dummy, /* H263 */ - mmfile_codec_open_dummy, /* H263V2 */ - mmfile_codec_open_dummy, /* H263V3 */ - mmfile_codec_open_dummy, /* H264 */ - mmfile_codec_open_dummy, /* H26L */ - mmfile_codec_open_dummy, /* MJPEG */ - mmfile_codec_open_dummy, /* MPEG1 */ - mmfile_codec_open_dummy, /* MPEG2 */ - mmfile_codec_open_dummy, /* MPEG4 */ - mmfile_codec_open_dummy, /* MPEG4_SIMPLE */ - mmfile_codec_open_dummy, /* MPEG4_ADV_SIMPE */ - mmfile_codec_open_dummy, /* MPEG4_MAIN */ - mmfile_codec_open_dummy, /* MPEG4_CORE */ - mmfile_codec_open_dummy, /* MPEG4_ACE */ - mmfile_codec_open_dummy, /* MPEG4_ARTS */ - mmfile_codec_open_dummy, /* MPEG4_AVC */ - mmfile_codec_open_dummy, /* REAL */ - mmfile_codec_open_dummy, /* VC1 */ - mmfile_codec_open_dummy, /* AVS */ - mmfile_codec_open_dummy, /* CINEPAK */ - mmfile_codec_open_dummy, /* INDEO */ - mmfile_codec_open_dummy, /* THEORA */ - mmfile_codec_open_dummy, /* DIVX */ - mmfile_codec_open_dummy, /* XVID */ -}; - - -int mmfile_codec_open(MMFileCodecContext **codecContext, int codecType, int codecId, MMFileCodecFrame *input) -{ - MMFileCodecContext *codecObject = NULL; - int ret = 0; - - if (codecId <= MM_VIDEO_CODEC_NONE || codecId >= MM_VIDEO_CODEC_NUM || MMFILE_VIDEO_DECODE != codecType || NULL == input) { - debug_error(DEBUG, "error: invalid params\n"); - return MMFILE_CODEC_FAIL; - } - - if (NULL == OpenVideoCodecFunc[codecId]) { - debug_error(DEBUG, "error: Not implemented \n"); - return MMFILE_CODEC_FAIL; - } - - codecObject = g_new0(MMFileCodecContext, 1); - - *codecContext = codecObject; - - ret = OpenVideoCodecFunc[codecId](codecObject, input); - if (MMFILE_CODEC_FAIL == ret) { - debug_error(DEBUG, "error: init fail about video codec\n"); - ret = MMFILE_CODEC_FAIL; - goto exception; - } - - return MMFILE_CODEC_SUCCESS; - -exception: - mmfile_free(codecObject); - - return ret; -} - - -int mmfile_codec_decode(MMFileCodecContext *codecContext, MMFileCodecFrame *output) -{ - if (NULL == codecContext || NULL == codecContext->Decode) { - debug_error(DEBUG, "error: invalid params\n"); - return MMFILE_CODEC_FAIL; - } - - return codecContext->Decode(codecContext, output); -} - - -int mmfile_codec_close(MMFileCodecContext *codecContext) -{ - if (NULL == codecContext || NULL == codecContext->Close) { - debug_error(DEBUG, "error: invalid params\n"); - return MMFILE_CODEC_FAIL; - } - - codecContext->Close(codecContext); - - if (codecContext->Decode) codecContext->Decode = NULL; - if (codecContext->Close) codecContext->Close = NULL; - - mmfile_free(codecContext->privateData); - mmfile_free(codecContext); - - return MMFILE_CODEC_SUCCESS; -} - diff --git a/configure.ac b/configure.ac index ef17980..7d205dd 100644 --- a/configure.ac +++ b/configure.ac @@ -177,8 +177,6 @@ AC_MSG_RESULT(checking for USE_GTK ... $USE_GTK) AC_CONFIG_FILES([Makefile - codecs/Makefile - codecs/ffmpeg/Makefile formats/Makefile formats/ffmpeg/Makefile utils/Makefile diff --git a/formats/ffmpeg/mm_file_format_ffmpeg.c b/formats/ffmpeg/mm_file_format_ffmpeg.c index e244f51..3e92834 100644 --- a/formats/ffmpeg/mm_file_format_ffmpeg.c +++ b/formats/ffmpeg/mm_file_format_ffmpeg.c @@ -874,7 +874,6 @@ int mmfile_format_read_frame_ffmpg(MMFileFormatContext *formatContext, unsigned frame->frameWidth = width; frame->frameHeight = height; frame->configLenth = 0; - frame->bCompressed = 0; /* false */ if (pFrame) av_frame_free(&pFrame); diff --git a/include/mm_file_codecs.h b/include/mm_file_codecs.h deleted file mode 100755 index f229900..0000000 --- a/include/mm_file_codecs.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * libmm-fileinfo - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Haejeong Kim - * - * 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 _MMFILE_CODECS_H_ -#define _MMFILE_CODECS_H_ - -#ifdef __cplusplus -extern "C" { -#endif - - -#define MMFILE_CODEC_SUCCESS 1 -#define MMFILE_CODEC_FAIL 0 - -#define MMFILE_VIDEO_DECODE 0 -#define MMFILE_AUDIO_DECODE 1 - - -typedef struct _mmfileframe { - unsigned int width; - unsigned int height; - unsigned int version; - unsigned int configLen; - unsigned int frameDataSize; - unsigned char *frameData; - void *configData; -} MMFileCodecFrame; - - -typedef struct _mmfilecodecctx MMFileCodecContext; - -struct _mmfilecodecctx { - /* MMFILE_AUDIO_DECODE or MMFILE_VIDEO_DECODE */ - int codecType; - int codecId; - int version; - - /* private data */ - void *privateData; - - /* resource free */ - int (*Decode)(MMFileCodecContext *, MMFileCodecFrame *); - int (*Close)(MMFileCodecContext *); -}; - -#ifndef __MMFILE_DYN_LOADING__ -int mmfile_codec_open(MMFileCodecContext **codecContext, int codecType, int codecId, MMFileCodecFrame *input); -int mmfile_codec_decode(MMFileCodecContext *codecContext, MMFileCodecFrame *output); -int mmfile_codec_close(MMFileCodecContext *codecContext); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _MMFILE_CODECS_H_ */ - diff --git a/include/mm_file_formats.h b/include/mm_file_formats.h index 36f9634..001c5be 100755 --- a/include/mm_file_formats.h +++ b/include/mm_file_formats.h @@ -85,7 +85,6 @@ typedef struct _mmfilesteam { } MMFileFormatStream; typedef struct _mmfileformatframe { - unsigned char bCompressed; unsigned int frameSize; unsigned int frameWidth; unsigned int frameHeight; diff --git a/mm_file.c b/mm_file.c index 61b584f..684ed7d 100644 --- a/mm_file.c +++ b/mm_file.c @@ -33,7 +33,6 @@ #include "mm_file_debug.h" #include "mm_file_formats.h" #include "mm_file_format_frame.h" -#include "mm_file_codecs.h" #include "mm_file_utils.h" @@ -86,7 +85,6 @@ typedef struct { typedef struct { void *formatFuncHandle; - void *codecFuncHandle; } MMFILE_FUNC_HANDLE; @@ -178,16 +176,12 @@ static MMAttrsConstructInfo g_content_attrs[] = { #ifdef __MMFILE_DYN_LOADING__ #define MMFILE_FORMAT_SO_FILE_NAME LIBDIR"/libmmfile_formats.so" -#define MMFILE_CODEC_SO_FILE_NAME LIBDIR"/libmmfile_codecs.so" static int (*mmfile_format_open)(MMFileFormatContext **formatContext, MMFileSourceType *fileSrc); static int (*mmfile_format_read_stream)(MMFileFormatContext *formatContext); static int (*mmfile_format_read_frame)(MMFileFormatContext *formatContext, unsigned int timestamp, MMFileFormatFrame *frame); static int (*mmfile_format_read_tag)(MMFileFormatContext *formatContext); static int (*mmfile_format_close)(MMFileFormatContext *formatContext); -static int (*mmfile_codec_open)(MMFileCodecContext **codecContext, int codecType, int codecId, MMFileCodecFrame *input); -static int (*mmfile_codec_decode)(MMFileCodecContext *codecContext, MMFileCodecFrame *output); -static int (*mmfile_codec_close)(MMFileCodecContext *codecContext); static int (*mmfile_format_get_frame)(const char *path, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height); static int (*mmfile_format_get_frame_from_memory)(const void *data, unsigned int datasize, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height); #endif @@ -196,7 +190,6 @@ static int (*mmfile_format_get_frame_from_memory)(const void *data, unsigned int static int _load_dynamic_functions(MMFILE_FUNC_HANDLE *pHandle) { void *formatFuncHandle = NULL; - void *codecFuncHandle = NULL; formatFuncHandle = dlopen(MMFILE_FORMAT_SO_FILE_NAME, RTLD_LAZY); mm_file_retvm_if_fails(DEBUG, formatFuncHandle, FILEINFO_ERROR_FILE_INTERNAL); @@ -217,22 +210,6 @@ static int _load_dynamic_functions(MMFILE_FUNC_HANDLE *pHandle) goto exception; } - codecFuncHandle = dlopen(MMFILE_CODEC_SO_FILE_NAME, RTLD_LAZY | RTLD_GLOBAL); - if (!codecFuncHandle) { - debug_error(DEBUG, "error: %s\n", "libmmfile_codecs.so open error"); - goto exception; - } - - mmfile_codec_open = dlsym(codecFuncHandle, "mmfile_codec_open"); - mmfile_codec_decode = dlsym(codecFuncHandle, "mmfile_codec_decode"); - mmfile_codec_close = dlsym(codecFuncHandle, "mmfile_codec_close"); - - if (!mmfile_codec_open || !mmfile_codec_decode || !mmfile_codec_close) { - debug_error(DEBUG, "error: %s\n", "codec function load error"); - goto exception; - } - - pHandle->codecFuncHandle = codecFuncHandle; pHandle->formatFuncHandle = formatFuncHandle; return FILEINFO_ERROR_NONE; @@ -241,9 +218,6 @@ exception: if (formatFuncHandle) dlclose(formatFuncHandle); - if (codecFuncHandle) - dlclose(codecFuncHandle); - return FILEINFO_ERROR_FILE_INTERNAL; } @@ -254,9 +228,6 @@ static void _unload_dynamic_functions(MMFILE_FUNC_HANDLE *pHandle) if (pHandle->formatFuncHandle) dlclose(pHandle->formatFuncHandle); - if (pHandle->codecFuncHandle) - dlclose(pHandle->codecFuncHandle); - debug_fleave(RELEASE); } @@ -411,51 +382,11 @@ static int _info_set_attr_media(MMHandleType attrs, MMFileFormatContext *formatC return ret; } -/** - * @param frameContext [in] frame for decoding. - * @param videoStream [in] information of video codec for frameContext. - * @param decodedFrame [inout] frame after decoding frameContext. - */ -static int __decode_contents_frame(MMFileFormatFrame *frameContext, MMFileFormatStream *videoStream, MMFileCodecFrame *decodedFrame) -{ - int ret = FILEINFO_ERROR_NONE; - MMFileCodecContext *codecContext = NULL; - MMFileCodecFrame codecFrame = {0, }; - - mm_file_retvm_if_fails(DEBUG, frameContext, FILEINFO_ERROR_FILE_INTERNAL); - mm_file_retvm_if_fails(DEBUG, videoStream, FILEINFO_ERROR_FILE_INTERNAL); - mm_file_retvm_if_fails(DEBUG, decodedFrame, FILEINFO_ERROR_FILE_INTERNAL); - - codecFrame.frameDataSize = frameContext->frameSize; - codecFrame.width = frameContext->frameWidth; - codecFrame.height = frameContext->frameHeight; - codecFrame.frameData = frameContext->frameData; - codecFrame.configLen = frameContext->configLenth; - codecFrame.configData = frameContext->configData; - codecFrame.version = videoStream->version; - - if (MMFILE_FORMAT_FAIL == mmfile_codec_open(&codecContext, MMFILE_VIDEO_DECODE, videoStream->codecId, &codecFrame)) { - debug_error(DEBUG, "error: mmfile_codec_open\n"); - mmfile_codec_close(codecContext); - return FILEINFO_ERROR_FILE_INTERNAL; - } - - if (MMFILE_FORMAT_FAIL == mmfile_codec_decode(codecContext, decodedFrame)) { - debug_error(DEBUG, "error: mmfile_codec_decode\n"); - ret = FILEINFO_ERROR_FILE_INTERNAL; - } - - mmfile_codec_close(codecContext); - - return ret; -} - static int __get_contents_thumbnail(MMFileFormatContext *formatContext) { int ret = FILEINFO_ERROR_NONE; MMFileFormatFrame frameContext = {0, }; - MMFileCodecFrame decodedFrame = {0, }; MMFileFormatFrame *thumbnail = NULL; mm_file_retvm_if_fails(DEBUG, formatContext, FILEINFO_ERROR_FILE_INTERNAL); @@ -469,31 +400,12 @@ __get_contents_thumbnail(MMFileFormatContext *formatContext) /* set video thumbnail */ thumbnail = g_new0(MMFileFormatFrame, 1); - if (frameContext.bCompressed) { - ret = __decode_contents_frame(&frameContext, formatContext->streams[MMFILE_VIDEO_STREAM], &decodedFrame); - if (FILEINFO_ERROR_NONE != ret) { - debug_error(DEBUG, "error: __decode_contents_thumbnail\n"); - goto exception; - } - - /* after decoding frameContext is done, it is no needed */ - mmfile_free(frameContext.frameData); - mmfile_free(frameContext.configData); - - thumbnail->frameSize = decodedFrame.frameDataSize; - thumbnail->frameWidth = decodedFrame.width; - thumbnail->frameHeight = decodedFrame.height; - thumbnail->frameData = decodedFrame.frameData; - thumbnail->configLenth = 0; - thumbnail->configData = NULL; - } else { - thumbnail->frameSize = frameContext.frameSize; - thumbnail->frameWidth = frameContext.frameWidth; - thumbnail->frameHeight = frameContext.frameHeight; - thumbnail->frameData = frameContext.frameData; - thumbnail->configLenth = 0; - thumbnail->configData = NULL; - } + thumbnail->frameSize = frameContext.frameSize; + thumbnail->frameWidth = frameContext.frameWidth; + thumbnail->frameHeight = frameContext.frameHeight; + thumbnail->frameData = frameContext.frameData; + thumbnail->configLenth = 0; + thumbnail->configData = NULL; #ifdef __MMFILE_TEST_MODE__ mmfile_format_print_frame(thumbnail); @@ -504,11 +416,6 @@ __get_contents_thumbnail(MMFileFormatContext *formatContext) /* because #MMFILE_FORMAT_SUCCESS is different with #FILEINFO_ERROR_NONE */ return FILEINFO_ERROR_NONE; exception: - if (frameContext.bCompressed) { - mmfile_free(decodedFrame.frameData); - mmfile_free(decodedFrame.configData); - } - mmfile_free(thumbnail); mmfile_free(frameContext.frameData); mmfile_free(frameContext.configData); diff --git a/packaging/libmm-fileinfo.spec b/packaging/libmm-fileinfo.spec index 6561d3b..2870700 100644 --- a/packaging/libmm-fileinfo.spec +++ b/packaging/libmm-fileinfo.spec @@ -54,7 +54,7 @@ export CFLAGS+=" -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -fgnu89-inlin ./autogen.sh %reconfigure \ -CFLAGS="${CFLAGS} -D_MM_PROJECT_FLOATER -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " LDFLAGS="${LDFLAGS}" \ +CFLAGS="${CFLAGS} -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " LDFLAGS="${LDFLAGS}" \ ./configure --disable-testmode --disable-dump --enable-dyn --disable-iommap --prefix=/usr \ %if 0%{?gtests:1} --enable-tests \ @@ -81,11 +81,9 @@ cp -rf %{_builddir}/%{name}-%{version}/unittest/*.mp3 %{buildroot}%{_bindir}/ %files %manifest %{name}.manifest %{_libdir}/libmmffile.so.* -%{_libdir}/libmmfile_codecs.so.* %{_libdir}/libmmfile_formats.so.* %{_libdir}/libmmfile_utils.so.* %{_libdir}/libmmffile.so -%{_libdir}/libmmfile_codecs.so %{_libdir}/libmmfile_formats.so %{_libdir}/libmmfile_utils.so %{_sysconfdir}/multimedia/mm_file_config.ini diff --git a/utils/include/mm_file_utils.h b/utils/include/mm_file_utils.h index e0199de..d6eeb4a 100755 --- a/utils/include/mm_file_utils.h +++ b/utils/include/mm_file_utils.h @@ -37,7 +37,6 @@ extern "C" { #include #include "mm_file_formats.h" -#include "mm_file_codecs.h" #define MMFILE_UTIL_FAIL -1 #define MMFILE_UTIL_SUCCESS 0 @@ -167,12 +166,9 @@ int mmfile_util_get_mimetype(int formatId, char *mimeType, int buf_size); /*////////////////////////////////////////////////////////////////////// */ void mmfile_format_print_contents(MMFileFormatContext *in); void mmfile_format_print_tags(MMFileFormatContext *in); -void mmfile_codec_print(MMFileCodecContext *in); void mmfile_format_print_frame(MMFileFormatFrame *in); - - /*////////////////////////////////////////////////////////////////////// */ /* STRING API // */ /*////////////////////////////////////////////////////////////////////// */ diff --git a/utils/mm_file_util_print.c b/utils/mm_file_util_print.c index 92cb61e..eb7b2e0 100755 --- a/utils/mm_file_util_print.c +++ b/utils/mm_file_util_print.c @@ -87,7 +87,6 @@ void mmfile_format_print_tags(MMFileFormatContext *in) void mmfile_format_print_frame(MMFileFormatFrame *in) { if (in) { - debug_msg(DEBUG, "in->bCompressed = %d\n", in->bCompressed); debug_msg(DEBUG, "in->frameData = %p\n", in->frameData); debug_msg(DEBUG, "in->frameHeight = %d\n", in->frameHeight); debug_msg(DEBUG, "in->frameWidth = %d\n", in->frameWidth); @@ -96,13 +95,3 @@ void mmfile_format_print_frame(MMFileFormatFrame *in) debug_msg(DEBUG, "in->configData = %p\n", in->configData); } } - - -void mmfile_codec_print(MMFileCodecContext *in) -{ - if (in) { - debug_msg(DEBUG, "codecType = %d\n", in->codecType); - debug_msg(DEBUG, "codec id = %d\n", in->codecId); - } -} -