ffmpeg: win32 wrapper update

This commit is contained in:
Alexander Alekhin 2019-06-16 14:41:04 +00:00
parent 7b099e0fe2
commit 26dfa5e77c
5 changed files with 21 additions and 17 deletions

View File

@ -1,6 +1,6 @@
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_ffmpeg_64.dll"
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_videoio_ffmpeg_64.dll"
$expected_md5 = "@FFMPEG_FILE_HASH_BIN64@"
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_ffmpeg@OPENCV_DLLVERSION@_64.dll"
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_videoio_ffmpeg@OPENCV_DLLVERSION@_64.dll"
Write-Output ("=" * 120)
try {

View File

@ -1,16 +1,16 @@
# Binaries branch name: ffmpeg/master_20181106
# Binaries were created for OpenCV: 2c6f1ab57d4250ee46e32d1b51c056431965b470
ocv_update(FFMPEG_BINARIES_COMMIT "759a23e24ab787a0979f8a93103dcc3105ec10c1")
ocv_update(FFMPEG_FILE_HASH_BIN32 "849286ccc527c99e5a218b67f13c6e8c")
ocv_update(FFMPEG_FILE_HASH_BIN64 "96444a4645753aaafa296479665c9185")
# Binaries branch name: ffmpeg/master_20190616
# Binaries were created for OpenCV: 7b099e0fe2d929e55d6705b6ad510c2c9081606b
ocv_update(FFMPEG_BINARIES_COMMIT "998718df34e35ea0fa429724875fc3900faa266f")
ocv_update(FFMPEG_FILE_HASH_BIN32 "f03b47fb809edd2e06b6db135cbd3e49")
ocv_update(FFMPEG_FILE_HASH_BIN64 "5c4571459570c288d874704244c428b5")
ocv_update(FFMPEG_FILE_HASH_CMAKE "f710891525a04586d565d0e700e62a9c")
function(download_win_ffmpeg script_var)
set(${script_var} "" PARENT_SCOPE)
set(ids BIN32 BIN64 CMAKE)
set(name_BIN32 "opencv_ffmpeg.dll")
set(name_BIN64 "opencv_ffmpeg_64.dll")
set(name_BIN32 "opencv_videoio_ffmpeg.dll")
set(name_BIN64 "opencv_videoio_ffmpeg_64.dll")
set(name_CMAKE "ffmpeg_version.cmake")
set(FFMPEG_DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/3rdparty/ffmpeg")

View File

@ -13,10 +13,10 @@
* On Windows OpenCV uses pre-built ffmpeg binaries, built with proper flags (without GPL components) and
wrapped with simple, stable OpenCV-compatible API.
The binaries are opencv_ffmpeg.dll (version for 32-bit Windows) and
opencv_ffmpeg_64.dll (version for 64-bit Windows).
The binaries are opencv_videoio_ffmpeg.dll (version for 32-bit Windows) and
opencv_videoio_ffmpeg_64.dll (version for 64-bit Windows).
The pre-built opencv_ffmpeg*.dll is:
The pre-built opencv_videoio_ffmpeg*.dll is:
* LGPL library, not BSD libraries.
* Loaded at runtime by opencv_videoio module.
If it succeeds, ffmpeg can be used to decode/encode videos;
@ -30,7 +30,7 @@
Or you can specify location of binary file via OPENH264_LIBRARY environment variable.
If LGPL/GPL software can not be supplied with your OpenCV-based product, simply exclude
opencv_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
opencv_videoio_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
decode/encode videos using FFMPEG (though, it may still be able to do that using other API,
such as Video for Windows, Windows Media Foundation or our self-contained motion jpeg codec).

View File

@ -207,8 +207,8 @@ if(WIN32 AND HAVE_FFMPEG_WRAPPER)
set(FFMPEG_SUFFIX "_64")
endif()
set(ffmpeg_dir "${OpenCV_BINARY_DIR}/3rdparty/ffmpeg")
set(ffmpeg_bare_name "opencv_ffmpeg${FFMPEG_SUFFIX}.dll")
set(ffmpeg_bare_name_ver "opencv_ffmpeg${OPENCV_DLLVERSION}${FFMPEG_SUFFIX}.dll")
set(ffmpeg_bare_name "opencv_videoio_ffmpeg${FFMPEG_SUFFIX}.dll")
set(ffmpeg_bare_name_ver "opencv_videoio_ffmpeg${OPENCV_DLLVERSION}${FFMPEG_SUFFIX}.dll")
set(ffmpeg_path "${ffmpeg_dir}/${ffmpeg_bare_name}")
if(MSVC_IDE)
execute_process(
@ -221,7 +221,7 @@ if(WIN32 AND HAVE_FFMPEG_WRAPPER)
endif()
install(FILES "${ffmpeg_path}" DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs RENAME "${ffmpeg_bare_name_ver}")
if(INSTALL_CREATE_DISTRIB)
install(FILES "${ffmpeg_dir}/opencv_ffmpeg.dll" DESTINATION "bin/" COMPONENT libs RENAME "opencv_ffmpeg${OPENCV_DLLVERSION}.dll")
install(FILES "${ffmpeg_dir}/opencv_ffmpeg_64.dll" DESTINATION "bin/" COMPONENT libs RENAME "opencv_ffmpeg${OPENCV_DLLVERSION}_64.dll")
install(FILES "${ffmpeg_dir}/opencv_videoio_ffmpeg.dll" DESTINATION "bin/" COMPONENT libs RENAME "opencv_videoio_ffmpeg${OPENCV_DLLVERSION}.dll")
install(FILES "${ffmpeg_dir}/opencv_videoio_ffmpeg_64.dll" DESTINATION "bin/" COMPONENT libs RENAME "opencv_videoio_ffmpeg${OPENCV_DLLVERSION}_64.dll")
endif()
endif()

View File

@ -61,6 +61,10 @@ function(ocv_create_videoio_plugin default_name target target_desc videoio_src_f
target_link_libraries(${OPENCV_PLUGIN_NAME} PRIVATE ${OpenCV_LIBS})
endif()
if(NOT OpenCV_FOUND) # build against sources (Linux)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/opencv2/opencv_modules.hpp" "#pragma once")
endif()
if(OPENCV_PLUGIN_DESTINATION)
set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${OPENCV_PLUGIN_DESTINATION}")
message(STATUS "Output destination: ${OPENCV_PLUGIN_DESTINATION}")