Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.io.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.io.base
Commits
0e5c4a86
Commit
0e5c4a86
authored
11 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Fix FFmpeg test in case FFmpeg was not available at compile time
parent
e7c8c376
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xbob/io/test/test_video_codec.py
+19
-15
19 additions, 15 deletions
xbob/io/test/test_video_codec.py
xbob/io/test/utils.py
+1
-0
1 addition, 0 deletions
xbob/io/test/utils.py
with
20 additions
and
15 deletions
xbob/io/test/test_video_codec.py
+
19
−
15
View file @
0e5c4a86
...
...
@@ -98,14 +98,16 @@ def test_format_codecs():
distortions
[
'
mpeg2video
'
][
'
color
'
]
=
9.0
distortions
[
'
mpeg2video
'
][
'
frameskip
'
]
=
1.4
from
.._externals
import
supported_videowriter_formats
SUPPORTED
=
supported_videowriter_formats
()
for
format
in
SUPPORTED
:
for
codec
in
SUPPORTED
[
format
][
'
supported_codecs
'
]:
for
method
in
methods
:
check_format_codec
.
description
=
"
%s.test_%s_format_%s_codec_%s
"
%
(
__name__
,
method
,
format
,
codec
)
distortion
=
distortions
.
get
(
codec
,
distortions
[
'
default
'
])[
method
]
yield
check_format_codec
,
methods
[
method
],
shape
,
framerate
,
format
,
codec
,
distortion
from
.._externals
import
versions
if
versions
[
'
FFmpeg
'
][
'
ffmpeg
'
]
!=
'
unavailable
'
:
from
.._externals
import
supported_videowriter_formats
SUPPORTED
=
supported_videowriter_formats
()
for
format
in
SUPPORTED
:
for
codec
in
SUPPORTED
[
format
][
'
supported_codecs
'
]:
for
method
in
methods
:
check_format_codec
.
description
=
"
%s.test_%s_format_%s_codec_%s
"
%
(
__name__
,
method
,
format
,
codec
)
distortion
=
distortions
.
get
(
codec
,
distortions
[
'
default
'
])[
method
]
yield
check_format_codec
,
methods
[
method
],
shape
,
framerate
,
format
,
codec
,
distortion
@testutils.ffmpeg_found
()
def
check_user_video
(
format
,
codec
,
maxdist
):
...
...
@@ -179,10 +181,12 @@ def test_user_video():
msmpeg4v2
=
2.3
,
)
from
.._externals
import
supported_videowriter_formats
SUPPORTED
=
supported_videowriter_formats
()
for
format
in
SUPPORTED
:
for
codec
in
SUPPORTED
[
format
][
'
supported_codecs
'
]:
check_user_video
.
description
=
"
%s.test_user_video_format_%s_codec_%s
"
%
(
__name__
,
format
,
codec
)
distortion
=
distortions
.
get
(
codec
,
distortions
[
'
default
'
])
yield
check_user_video
,
format
,
codec
,
distortion
from
.._externals
import
versions
if
versions
[
'
FFmpeg
'
][
'
ffmpeg
'
]
!=
'
unavailable
'
:
from
.._externals
import
supported_videowriter_formats
SUPPORTED
=
supported_videowriter_formats
()
for
format
in
SUPPORTED
:
for
codec
in
SUPPORTED
[
format
][
'
supported_codecs
'
]:
check_user_video
.
description
=
"
%s.test_user_video_format_%s_codec_%s
"
%
(
__name__
,
format
,
codec
)
distortion
=
distortions
.
get
(
codec
,
distortions
[
'
default
'
])
yield
check_user_video
,
format
,
codec
,
distortion
This diff is collapsed.
Click to expand it.
xbob/io/test/utils.py
+
1
−
0
View file @
0e5c4a86
...
...
@@ -71,6 +71,7 @@ def ffmpeg_version_lessthan(v):
indicated as a string parameter.
'''
from
.._externals
import
versions
if
versions
[
'
FFmpeg
'
][
'
ffmpeg
'
]
==
'
unavailable
'
:
return
False
avcodec_inst
=
SV
(
versions
[
'
FFmpeg
'
][
'
avcodec
'
])
avcodec_req
=
ffmpeg_versions
[
v
][
0
]
return
avcodec_inst
<
avcodec_req
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment