From e9e4b4bcbb69c30b1b1ec2ad673b4bfa012c1ff9 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Thu, 8 Oct 2020 21:31:32 -0700 Subject: [PATCH] Made quick fixes of these to get tests working --- .idea/wavinfo.iml | 6 +++-- requirements.txt | 3 +++ setup.py | 2 +- wavinfo/dolby_parser.py | 54 +++++++++++++------------------------ wavinfo/wave_axml_reader.py | 9 +++++++ wavinfo/wave_ixml_reader.py | 1 - 6 files changed, 35 insertions(+), 40 deletions(-) create mode 100644 requirements.txt create mode 100644 wavinfo/wave_axml_reader.py diff --git a/.idea/wavinfo.iml b/.idea/wavinfo.iml index 930f09b..0e4e9fa 100644 --- a/.idea/wavinfo.iml +++ b/.idea/wavinfo.iml @@ -1,8 +1,10 @@ - - + + + + \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9af7d93 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +lxml~=4.5.2 +setuptools~=49.6.0 +ear~=2.0.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 4913c23..467f049 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ setup(name='wavinfo', "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8"], keywords='waveform metadata audio ebu smpte avi library film tv editing editorial', - install_requires=['lxml'], + install_requires=['lxml', 'ear'], entry_points={ 'console_scripts': [ 'wavinfo = wavinfo.__main__:main' diff --git a/wavinfo/dolby_parser.py b/wavinfo/dolby_parser.py index f70abeb..220c0ed 100644 --- a/wavinfo/dolby_parser.py +++ b/wavinfo/dolby_parser.py @@ -21,12 +21,15 @@ class _DPPGenericDownMixLevel(Enum): MUTE = 0b111 -class _DPPGenericInUseIndicator(Enum): +class DPPDolbySurroundEncodingMode(Enum): RESERVED = 0b11 IN_USE = 0b10 NOT_IN_USE = 0b01 NOT_INDICATED = 0b00 +# DPPLoRoDownMixCenterLevel +# DPPLtRtCenterMixLevel +# DPPLtRtSurroundMixLevel class DolbyMetadataSegmentTypes(IntEnum): END_MARKER = 0 @@ -88,13 +91,6 @@ class DPPSurroundDownMixLevel(Enum): RESERVED = 0b11 -class DPPDolbySurroundEncodingMode(_DPPGenericInUseIndicator): - """ - `dsurmod` § 4.3.3.3 - """ - pass - - class DPPLanguageCode(Enum): """ § 4.3.4.1 , 4.3.5 (always 0xFF) @@ -122,20 +118,6 @@ class DPPRoomTime(Enum): RESERVED = 0b11 -class DPPLoRoDownMixCenterLevel(_DPPGenericDownMixLevel): - """ - `lorocmixlev` § 4.3.7.1 - """ - pass - - -class DPPLoRoDownMixSurroundLevel(_DPPGenericDownMixLevel): - """ - `lorosurmixlev` 4.3.7.2 - """ - pass - - class DPPPreferredDownMixMode(Enum): """ § 4.3.8.1 @@ -146,20 +128,20 @@ class DPPPreferredDownMixMode(Enum): PRO_LOGIC_2 = 0b11 -class DPPLtRtCenterMixLevel(_DPPGenericDownMixLevel): - pass - - -class DPPLtRtSurroundMixLevel(_DPPGenericDownMixLevel): - pass - - -class DPPSurroundEXMode(_DPPGenericInUseIndicator): - pass - - -class DPPHeadphoneMode(_DPPGenericInUseIndicator): - pass +# class DPPLtRtCenterMixLevel(_DPPGenericDownMixLevel): +# pass +# +# +# class DPPLtRtSurroundMixLevel(_DPPGenericDownMixLevel): +# pass +# +# +# class DPPSurroundEXMode(_DPPGenericInUseIndicator): +# pass +# +# +# class DPPHeadphoneMode(_DPPGenericInUseIndicator): +# pass class DPPADConverterType(Enum): diff --git a/wavinfo/wave_axml_reader.py b/wavinfo/wave_axml_reader.py new file mode 100644 index 0000000..eb07289 --- /dev/null +++ b/wavinfo/wave_axml_reader.py @@ -0,0 +1,9 @@ +from lxml import etree as ET +from collections import namedtuple + +from ear.fileio.bw64 import Bw64Reader + + + + + diff --git a/wavinfo/wave_ixml_reader.py b/wavinfo/wave_ixml_reader.py index d086d50..042a17d 100644 --- a/wavinfo/wave_ixml_reader.py +++ b/wavinfo/wave_ixml_reader.py @@ -1,4 +1,3 @@ -# import xml.etree.ElementTree as ET from lxml import etree as ET import io from collections import namedtuple