diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-01-28 03:04:39 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-01-28 05:48:18 +0700 |
commit | 65220c3bd6bfcb9023af904634ce1e76592cfe3e (patch) | |
tree | d41c43c81d631e0d0e5275b39ac38874ada5e333 /youtube_dl/downloader | |
parent | c989bdbef8fdcfd38d51b987a4c745479d02e2f2 (diff) |
Add support for IronPython
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r-- | youtube_dl/downloader/ism.py | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/youtube_dl/downloader/ism.py b/youtube_dl/downloader/ism.py index 138564267..063fcf444 100644 --- a/youtube_dl/downloader/ism.py +++ b/youtube_dl/downloader/ism.py @@ -1,25 +1,27 @@ from __future__ import unicode_literals import time -import struct import binascii import io from .fragment import FragmentFD -from ..compat import compat_urllib_error - - -u8 = struct.Struct(b'>B') -u88 = struct.Struct(b'>Bx') -u16 = struct.Struct(b'>H') -u1616 = struct.Struct(b'>Hxx') -u32 = struct.Struct(b'>I') -u64 = struct.Struct(b'>Q') - -s88 = struct.Struct(b'>bx') -s16 = struct.Struct(b'>h') -s1616 = struct.Struct(b'>hxx') -s32 = struct.Struct(b'>i') +from ..compat import ( + compat_Struct, + compat_urllib_error, +) + + +u8 = compat_Struct('>B') +u88 = compat_Struct('>Bx') +u16 = compat_Struct('>H') +u1616 = compat_Struct('>Hxx') +u32 = compat_Struct('>I') +u64 = compat_Struct('>Q') + +s88 = compat_Struct('>bx') +s16 = compat_Struct('>h') +s1616 = compat_Struct('>hxx') +s32 = compat_Struct('>i') unity_matrix = (s32.pack(0x10000) + s32.pack(0) * 3) * 2 + s32.pack(0x40000000) |