#include "mm_file_formats.h"
#include "mm_file_utils.h"
#include "mm_file_format_ffmpeg.h"
-#include <sys/time.h>
#define _SHORT_MEDIA_LIMIT 2000 /* under X seconds duration*/
return ret;
}
-int64_t gettime(void)
-{
- struct timeval tv;
- gettimeofday(&tv, NULL);
- return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
-}
-
#define IS_GOOD_OLD_METHOD
#ifdef IS_GOOD_OLD_METHOD
found++;
-#ifdef __MMFILE_TEST_MODE__
- int64_t ti;
- ti = gettime();
-#endif
ret = _is_good_pgm(frame->data[0], frame->linesize[0], pCodecCtx->width, pCodecCtx->height);
-#ifdef __MMFILE_TEST_MODE__
- ti = gettime() - ti;
- debug_msg(RELEASE, "Elapsed time = %lld\n", ti);
-#endif
if (ret != 0) {
debug_msg(RELEASE, "is good frame.\n");
break;
#include "mm_file_format_frame.h"
#include "mm_file_utils.h"
-
-#include <sys/time.h>
-
-/*#define CHECK_TIME */
-
-#ifdef CHECK_TIME
-int64_t gettime(void)
-{
- struct timeval tv;
- gettimeofday(&tv, NULL);
- return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
-}
-#endif
-
-
/**
* Defines.
*/
#ifdef __MMFILE_DYN_LOADING__
MMFILE_FUNC_HANDLE func_handle;
-#ifdef CHECK_TIME
- int64_t ti;
- ti = gettime();
-#endif
-
ret = _load_dynamic_functions(&func_handle);
if (ret != FILEINFO_ERROR_NONE) {
debug_error(DEBUG, "load library error\n");
return ret;
}
-
-#ifdef CHECK_TIME
- debug_msg(DEBUG, "_load_dynamic_functions() = %lld\n", gettime() - ti);
-#endif
-
#endif
-
/*set source file infomation*/
MM_FILE_SET_MEDIA_FILE_SRC(src, filename);
END:
#ifdef __MMFILE_DYN_LOADING__
-
-#ifdef CHECK_TIME
- ti = gettime();
-#endif
-
_unload_dynamic_functions(&func_handle);
-
-#ifdef CHECK_TIME
- debug_msg(DEBUG, "_unload_dynamic_functions() = %lld\n", gettime() - ti);
-#endif
-
#endif
debug_fleave(RELEASE);