Unverified Commit d675c0c6 authored by Prabhat Roy's avatar Prabhat Roy Committed by GitHub
Browse files

[FBcode->GH] Move loading Decoder.so to a separate file to avoid building it internally (#5183)

parent ffd0d237
......@@ -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,
......
from ..extension import _load_library
try:
_load_library("Decoder")
_HAS_VIDEO_DECODER = True
except (ImportError, OSError):
_HAS_VIDEO_DECODER = False
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment