Skip to content

Commit 83c78e9

Browse files
committed
Rename files to make it private
1 parent 4ea0440 commit 83c78e9

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

test/test_video_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from urllib.error import URLError
2626

2727

28-
from torchvision.io.video_plus import _HAS_VIDEO_PLUS
28+
from torchvision.io._video_opt import _HAS_VIDEO_OPT
2929

3030

3131
VIDEO_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets", "videos")
@@ -268,7 +268,7 @@ def _get_video_tensor(video_dir, video_file):
268268

269269

270270
@unittest.skipIf(av is None, "PyAV unavailable")
271-
@unittest.skipIf(_HAS_VIDEO_PLUS is False, "Didn't compile with ffmpeg")
271+
@unittest.skipIf(_HAS_VIDEO_OPT is False, "Didn't compile with ffmpeg")
272272
class TestVideoReader(unittest.TestCase):
273273
def check_separate_decoding_result(self, tv_result, config):
274274
"""check the decoding results from TorchVision decoder

torchvision/io/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from .video import write_video, read_video, read_video_timestamps
2-
from .video_plus import _read_video_from_file, _read_video_timestamps_from_file
2+
from ._video_opt import _read_video_from_file, _read_video_timestamps_from_file
33

44

55
__all__ = [
66
'write_video', 'read_video', 'read_video_timestamps',
7-
'_read_video_from_file', '_read_video_timestamps_from_file',
87
]

torchvision/io/video_plus.py renamed to torchvision/io/_video_opt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
import warnings
77

88

9-
_HAS_VIDEO_PLUS = False
9+
_HAS_VIDEO_OPT = False
1010

1111
try:
1212
lib_dir = os.path.join(os.path.dirname(__file__), '..')
1313
_, path, description = imp.find_module("video_reader", [lib_dir])
1414
torch.ops.load_library(path)
15-
_HAS_VIDEO_PLUS = True
15+
_HAS_VIDEO_OPT = True
1616
except (ImportError, OSError):
1717
warnings.warn("video reader based on ffmpeg c++ ops not available")
1818

0 commit comments

Comments
 (0)