Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
d675c0c6
Unverified
Commit
d675c0c6
authored
Jan 10, 2022
by
Prabhat Roy
Committed by
GitHub
Jan 10, 2022
Browse files
[FBcode->GH] Move loading Decoder.so to a separate file to avoid building it internally (#5183)
parent
ffd0d237
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
torchvision/io/__init__.py
torchvision/io/__init__.py
+5
-1
torchvision/io/_load_gpu_decoder.py
torchvision/io/_load_gpu_decoder.py
+8
-0
torchvision/io/_video_opt.py
torchvision/io/_video_opt.py
+0
-6
No files found.
torchvision/io/__init__.py
View file @
d675c0c6
...
...
@@ -3,10 +3,14 @@ from typing import Any, Dict, Iterator
import
torch
from
..utils
import
_log_api_usage_once
try
:
from
._load_gpu_decoder
import
_HAS_VIDEO_DECODER
except
ModuleNotFoundError
:
_HAS_VIDEO_DECODER
=
False
from
._video_opt
import
(
Timebase
,
VideoMetaData
,
_HAS_VIDEO_DECODER
,
_HAS_VIDEO_OPT
,
_probe_video_from_file
,
_probe_video_from_memory
,
...
...
torchvision/io/_load_gpu_decoder.py
0 → 100644
View file @
d675c0c6
from
..extension
import
_load_library
try
:
_load_library
(
"Decoder"
)
_HAS_VIDEO_DECODER
=
True
except
(
ImportError
,
OSError
):
_HAS_VIDEO_DECODER
=
False
torchvision/io/_video_opt.py
View file @
d675c0c6
...
...
@@ -14,12 +14,6 @@ try:
except
(
ImportError
,
OSError
):
_HAS_VIDEO_OPT
=
False
try
:
_load_library
(
"Decoder"
)
_HAS_VIDEO_DECODER
=
True
except
(
ImportError
,
OSError
):
_HAS_VIDEO_DECODER
=
False
default_timebase
=
Fraction
(
0
,
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment