Here are two patches for qutecom. We have to adapt pixertool to use new ffmpeg functions for img resampling.
-- andreas
--
http://www.cynapses.org/ - cybernetic synapses
# HG changeset patch # User Andreas Schneider <[EMAIL PROTECTED]> # Date 1220517224 -7200 # Node ID 2f0f39877c3e5bab6526435014bcc9f379b8cde6 # Parent 9f684c432970e3afdb2df2c823d54ca28cb04fde Add a minimum requirement for CMake. diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,6 @@ include(CMakeLists-owbuild.txt) + +cmake_minimum_required(VERSION 2.4.6) project(wengophone)
# HG changeset patch
# User Andreas Schneider <[EMAIL PROTECTED]>
# Date 1220517197 -7200
# Node ID 9f684c432970e3afdb2df2c823d54ca28cb04fde
# Parent bbc6f3f6f9390f21418046ca7bc7963d310cc562
Improve the FFMPEG module.
diff --git a/owbuild/FindFFMPEG.cmake b/owbuild/FindFFMPEG.cmake
--- a/owbuild/FindFFMPEG.cmake
+++ b/owbuild/FindFFMPEG.cmake
@@ -1,12 +1,12 @@
-# - Try to find FFmpeg
+# - Try to find FFMPEG
# Once done this will define
#
-# FFMPEG_FOUND - system has FFmpeg
-# FFMPEG_INCLUDE_DIRS - the FFmpeg include directory
-# FFMPEG_LIBRARIES - Link these to use FFmpeg
-# FFMPEG_DEFINITIONS - Compiler switches required for using FFmpeg
+# FFMPEG_FOUND - system has FFMPEG
+# FFMPEG_INCLUDE_DIRS - the FFMPEG include directory
+# FFMPEG_LIBRARIES - Link these to use FFMPEG
+# FFMPEG_DEFINITIONS - Compiler switches required for using FFMPEG
#
-# Copyright (c) 2006 Andreas Schneider <[EMAIL PROTECTED]>
+# Copyright (c) 2008 Andreas Schneider <[EMAIL PROTECTED]>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
@@ -20,18 +20,21 @@
else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIRS)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
- include(UsePkgConfig)
- include(CheckFunctionExists)
-
- pkgconfig(libavcodec _FFMPEGIncDir _FFMPEGLinkDir _FFMPEGLinkFlags _FFMPEGCflags)
-
- set(FFMPEG_DEFINITIONS ${_FFMPEGCflags})
+ if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+ include(UsePkgConfig)
+ pkgconfig(libavcodec _FFMPEG_INCLUDEDIR _FFMPEG_LIBDIR _FFMPEG_LDFLAGS _FFMPEG_CFLAGS)
+ else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(_FFMPEG libavcodec)
+ endif (PKG_CONFIG_FOUND)
+ endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
find_path(FFMPEG_INCLUDE_DIR
NAMES
avcodec.h
PATHS
- ${_FFMPEGIncDir}
+ ${_FFMPEG_INCLUDEDIR}
/usr/include
/usr/local/include
/opt/local/include
@@ -39,89 +42,114 @@
PATH_SUFFIXES
ffmpeg
)
+ mark_as_advanced(FFMPEG_INCLUDE_DIR)
- find_library(AVUTIL_LIBRARY
+ find_library(AVCODEC_LIBRARY
NAMES
- avutil
+ avcodec
PATHS
- ${_FFMPEGLinkDir}
+ ${_FFMPEG_LIBDIR}
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
-
- find_library(AVCODEC_LIBRARY
+ mark_as_advanced(AVCODEC_LIBRARY)
+ find_library(AVUTIL_LIBRARY
NAMES
- avcodec
+ avutil
PATHS
- ${_FFMPEGLinkDir}
+ ${_FFMPEG_LIBDIR}
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
-
+ mark_as_advanced(AVUTIL_LIBRARY)
find_library(AVFORMAT_LIBRARY
NAMES
avformat
PATHS
- ${_FFMPEGLinkDir}
+ ${_FFMPEG_LIBDIR}
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
-
- find_library(SWSCALE_LIBRARY
+ mark_as_advanced(AVFORMAT_LIBRARY)
+ find_library(POSTPROC_LIBRARY
NAMES
- swscale
+ postproc
PATHS
- ${_FFMPEGLinkDir}
+ ${_FFMPEG_LIBDIR}
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
+ mark_as_advanced(POSTPROC_LIBRARY)
+ find_library(SWSCALE_LIBRARY
+ NAMES
+ swscale
+ PATHS
+ ${_FFMPEG_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+ mark_as_advanced(SWSCALE_LIBRARY)
+
+ if (AVCODEC_LIBRARY)
+ set(AVCODEC_FOUND TRUE)
+ endif (AVCODEC_LIBRARY)
+ if (AVUTIL_LIBRARY)
+ set(AVUTIL_FOUND TRUE)
+ endif (AVUTIL_LIBRARY)
+ if (AVFORMAT_LIBRARY)
+ set(AVFORMAT_FOUND TRUE)
+ endif (AVFORMAT_LIBRARY)
+ if (POSTPROC_LIBRARY)
+ set(POSTPROC_FOUND TRUE)
+ endif (POSTPROC_LIBRARY)
+ if (SWSCALE_LIBRARY)
+ set(SWSCALE_FOUND TRUE)
+ endif (SWSCALE_LIBRARY)
set(FFMPEG_INCLUDE_DIRS
${FFMPEG_INCLUDE_DIR}
)
- set(FFMPEG_LIBRARIES)
-
- if (AVUTIL_LIBRARY)
+ if (AVCODEC_FOUND)
+ set(FFMPEG_LIBRARIES
+ ${FFMPEG_LIBRARIES}
+ ${AVCODEC_LIBRARY}
+ )
+ endif (AVCODEC_FOUND)
+ if (AVUTIL_FOUND)
set(FFMPEG_LIBRARIES
${FFMPEG_LIBRARIES}
${AVUTIL_LIBRARY}
)
- endif (AVUTIL_LIBRARY)
-
- if (AVCODEC_LIBRARY)
- set(FFMPEG_LIBRARIES
- ${FFMPEG_LIBRARIES}
- ${AVCODEC_LIBRARY}
- )
- endif (AVCODEC_LIBRARY)
-
- if (AVFORMAT_LIBRARY)
+ endif (AVUTIL_FOUND)
+ if (AVFORMAT_FOUND)
set(FFMPEG_LIBRARIES
${FFMPEG_LIBRARIES}
${AVFORMAT_LIBRARY}
)
- endif (AVFORMAT_LIBRARY)
-
- if (SWSCALE_LIBRARY)
+ endif (AVFORMAT_FOUND)
+ if (POSTPROC_FOUND)
+ set(FFMPEG_LIBRARIES
+ ${FFMPEG_LIBRARIES}
+ ${POSTPROC_LIBRARY}
+ )
+ endif (POSTPROC_FOUND)
+ if (SWSCALE_FOUND)
set(FFMPEG_LIBRARIES
${FFMPEG_LIBRARIES}
${SWSCALE_LIBRARY}
)
- set(CMAKE_REQUIRED_INCLUDES ${FFMPEG_INCLUDE_DIR})
- set(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES})
- check_function_exists(
- sws_scale HAVE_SWSCALE
- )
- endif (SWSCALE_LIBRARY)
+ endif (SWSCALE_FOUND)
if (FFMPEG_INCLUDE_DIRS AND FFMPEG_LIBRARIES)
set(FFMPEG_FOUND TRUE)
@@ -129,11 +157,11 @@
if (FFMPEG_FOUND)
if (NOT FFMPEG_FIND_QUIETLY)
- message(STATUS "Found FFmpeg: ${FFMPEG_LIBRARIES}")
+ message(STATUS "Found FFMPEG: ${FFMPEG_LIBRARIES}")
endif (NOT FFMPEG_FIND_QUIETLY)
else (FFMPEG_FOUND)
if (FFMPEG_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find FFmpeg")
+ message(FATAL_ERROR "Could not find FFMPEG")
endif (FFMPEG_FIND_REQUIRED)
endif (FFMPEG_FOUND)
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ QuteCom-dev mailing list [email protected] http://lists.qutecom.org/mailman/listinfo/qutecom-dev
