Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
c198a353
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c198a353
编写于
6月 09, 2018
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #11733 from alalek:opencv_ffmpeg_download_ps1
上级
c0feea50
390f0a5d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
70 addition
and
0 deletion
+70
-0
.gitattributes
.gitattributes
+2
-0
3rdparty/ffmpeg/ffmpeg-download.ps1.in
3rdparty/ffmpeg/ffmpeg-download.ps1.in
+63
-0
3rdparty/ffmpeg/ffmpeg.cmake
3rdparty/ffmpeg/ffmpeg.cmake
+5
-0
未找到文件。
.gitattributes
浏览文件 @
c198a353
...
...
@@ -81,6 +81,8 @@ org.eclipse.jdt.core.prefs -text whitespace=cr-at-eol merge=union
*.cmd text eol=crlf
*.cmd.tmpl text eol=crlf
*.dsp text eol=crlf -whitespace
*.ps1 text eol=crlf
*.ps1.in text eol=crlf
*.sln text eol=crlf -whitespace
*.vcproj text eol=crlf -whitespace merge=union
*.vcxproj text eol=crlf -whitespace merge=union
...
...
3rdparty/ffmpeg/ffmpeg-download.ps1.in
0 → 100644
浏览文件 @
c198a353
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_ffmpeg_64.dll"
$expected_md5 = "@FFMPEG_FILE_HASH_BIN64@"
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_ffmpeg@OPENCV_DLLVERSION@_64.dll"
Write-Output ("=" * 120)
try {
Get-content -Path "$PSScriptRoot\etc\licenses\ffmpeg-readme.txt" -ErrorAction 'Stop'
} catch {
Write-Output "Refer to OpenCV FFmpeg wrapper readme notes about library usage / licensing details."
}
Write-Output ("=" * 120)
Write-Output ""
if(![System.IO.File]::Exists($output)) {
try {
Write-Output ("Downloading: " + $output)
Import-Module BitsTransfer
$start_time = Get-Date
Start-BitsTransfer -Source $url -Destination $output -ErrorAction 'Stop'
Write-Output "Downloaded in $((Get-Date).Subtract($start_time).Seconds) seconds"
} catch {
$_ # Dump error
try {
Write-Output ("Downloading (second attempt): " + $output)
$start_time = Get-Date
Invoke-WebRequest -Uri $url -OutFile $output
Write-Output "Downloaded in $((Get-Date).Subtract($start_time).Seconds) seconds"
} catch {
Write-Output ("Can't download file: " + $output)
Write-Output ("URL: " + $url)
Write-Output "You need to download this file manually. Stop"
Pause
Exit
}
}
} else {
Write-Output ("File exists: " + $output)
Write-Output ("Downloading is skipped. Remove this file and re-run this script to force downloading.")
}
if(![System.IO.File]::Exists($output)) {
Write-Output ("Destination file not found: " + $output)
Write-Output "Stop"
Pause
Exit
}
try {
$hash = Get-FileHash $output -Algorithm MD5 -ErrorAction 'Stop'
if($hash.Hash -eq $expected_md5) {
Write-Output "MD5 check passed"
} else {
Write-Output ("MD5 : " + $hash.Hash.toLower())
Write-Output ("Expected: " + $expected_md5)
Write-Output "MD5 hash mismatch"
}
} catch {
$_ # Dump error
Write-Output "Can't check MD5 hash (requires PowerShell 4+)"
}
Pause
Write-Output "Exit"
3rdparty/ffmpeg/ffmpeg.cmake
浏览文件 @
c198a353
...
...
@@ -35,3 +35,8 @@ function(download_win_ffmpeg script_var)
set
(
${
script_var
}
"
${
FFMPEG_DOWNLOAD_DIR
}
/ffmpeg_version.cmake"
PARENT_SCOPE
)
endif
()
endfunction
()
if
(
OPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT
)
configure_file
(
"
${
CMAKE_CURRENT_LIST_DIR
}
/ffmpeg-download.ps1.in"
"
${
CMAKE_BINARY_DIR
}
/win-install/ffmpeg-download.ps1"
@ONLY
)
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/win-install/ffmpeg-download.ps1"
DESTINATION
"."
COMPONENT libs
)
endif
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录