From 2d0bb47014040ff7f363cb03b65eb38e2bb5965b Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Thu, 19 Oct 2023 18:18:15 -0700 Subject: [PATCH] A couple more unit tests for matroska in codecs and update changelog for release. --- CHANGELOG.md | 9 +++++++++ tests/codecs.spec.js | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b70f9f..2611939 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. +## [1.1.4] - 2023-10-19 + +### Changed + +- codecs: Add support for DTS audio codec and AV1 video codec. +- codecs: Update how Matroska video/audio files are detected (video/x-matroska). + [Issue #43](https://github.com/codedread/bitjs/issues/43) +- untar: Fix long path/filenames in 'ustar' format. [Issue #42](https://github.com/codedread/bitjs/issues/43) + ## [1.1.3] - 2023-10-15 ### Changed diff --git a/tests/codecs.spec.js b/tests/codecs.spec.js index 0c04aab..8cd3b56 100644 --- a/tests/codecs.spec.js +++ b/tests/codecs.spec.js @@ -115,9 +115,21 @@ describe('codecs test suite', () => { format: { format_name: 'matroska,webm' }, streams: [ { codec_type: 'video', codec_name: 'vp8' } ], })).equals('video/webm'); + expect(getShortMIMEString({ + format: { format_name: 'matroska,webm' }, + streams: [ { codec_type: 'video', codec_name: 'vp9' } ], + })).equals('video/webm'); + expect(getShortMIMEString({ + format: { format_name: 'matroska,webm' }, + streams: [ { codec_type: 'video', codec_name: 'av1' } ], + })).equals('video/webm'); }); it('detects WEBM audio', () => { + expect(getShortMIMEString({ + format: { format_name: 'matroska,webm' }, + streams: [ { codec_type: 'audio', codec_name: 'opus' } ], + })).equals('audio/webm'); expect(getShortMIMEString({ format: { format_name: 'matroska,webm' }, streams: [ { codec_type: 'audio', codec_name: 'vorbis' } ], @@ -129,9 +141,29 @@ describe('codecs test suite', () => { format: { format_name: 'matroska,webm' }, streams: [ { codec_type: 'video', codec_name: 'h264' } ], })).equals('video/x-matroska'); + + expect(getShortMIMEString({ + format: { format_name: 'matroska,webm' }, + streams: [ + { codec_type: 'audio', codec_name: 'aac' }, + { codec_type: 'video', codec_name: 'vp9' }, + ], + })).equals('video/x-matroska'); + + expect(getShortMIMEString({ + format: { format_name: 'matroska,webm' }, + streams: [ + { codec_type: 'audio', codec_name: 'vorbis' }, + { codec_type: 'video', codec_name: 'h264' }, + ], + })).equals('video/x-matroska'); }); it('detects Matroska audio', () => { + expect(getShortMIMEString({ + format: { format_name: 'matroska,webm' }, + streams: [ { codec_type: 'audio', codec_name: 'aac' } ], + })).equals('audio/x-matroska'); expect(getShortMIMEString({ format: { format_name: 'matroska,webm' }, streams: [ { codec_type: 'audio', codec_name: 'dts' } ],