From 61a8d4f09e11be035f057f972038207d4f0925be Mon Sep 17 00:00:00 2001 From: Jacob Trimble Date: Wed, 13 Jan 2016 11:58:48 -0800 Subject: [PATCH] Add codec private data to WebM muxer. Added packager tests for WebM audio. Also now only outputs the language if it's not empty. Fixed the packager tests for that. b/26540606 Change-Id: Ica804bd710055bcaa2113f948d723dedd78ef909 --- packager/app/test/packager_test.py | 9 +++++++++ .../testdata/bear-320x240-vorbis-golden.webm | Bin 0 -> 23982 bytes .../bear-320x240-vorbis-webm-golden.mpd | 15 +++++++++++++++ .../testdata/bear-320x240-vp9-golden.webm | Bin 69476 -> 69472 bytes .../testdata/bear-320x240-vp9-webm-golden.mpd | 6 +++--- .../testdata/bear-640x360-vp8-golden.webm | Bin 114668 -> 114664 bytes .../testdata/bear-640x360-vp8-webm-golden.mpd | 6 +++--- packager/media/formats/webm/segmenter.cc | 11 +++++++++-- 8 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 packager/app/test/testdata/bear-320x240-vorbis-golden.webm create mode 100644 packager/app/test/testdata/bear-320x240-vorbis-webm-golden.mpd diff --git a/packager/app/test/packager_test.py b/packager/app/test/packager_test.py index cec5d39419..7ca99205d0 100755 --- a/packager/app/test/packager_test.py +++ b/packager/app/test/packager_test.py @@ -122,6 +122,15 @@ class PackagerAppTest(unittest.TestCase): self._DiffGold(self.output[0], 'bear-320x240-vp9-golden.webm') self._DiffGold(self.mpd_output, 'bear-320x240-vp9-webm-golden.mpd') + def testPackageVorbisWebm(self): + self.packager.Package( + self._GetStreams(['audio'], + output_format='webm', + test_files=['bear-320x240-audio-only.webm']), + self._GetFlags()) + self._DiffGold(self.output[0], 'bear-320x240-vorbis-golden.webm') + self._DiffGold(self.mpd_output, 'bear-320x240-vorbis-webm-golden.mpd') + def testPackageWithEncryption(self): self.packager.Package( self._GetStreams(['audio', 'video']), diff --git a/packager/app/test/testdata/bear-320x240-vorbis-golden.webm b/packager/app/test/testdata/bear-320x240-vorbis-golden.webm new file mode 100644 index 0000000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OacV%oW9IG2KL2DYVd22y=~HW80xVt z3#*?zm*j+dh}K6jdHD|o7NJxjszn!&V@@CY>Musc9ca-bjFTH; z;|tAxmt<=1lcV^EQa%W1GAafYU-$QEL3f=>`(XV^dB*7R%t|J@V<=R>CJ@BLG=_rV zD;*9yp$&p}skXZ(3q1A%vP1~sah+jxE4TF5y``K@ibp})`o4zfAr7z3N`H~-6{`cx zPlQ{ZCf80FU&Y}eT*yr)=vUvYb(m9+e&{fZTCjq#%`8hbKaR}kI{4&*=man-xeEbK zmxA?v6B*jvSuwEZgw~$|lAN3O&^7El@lT$%Q{eg{aZ_X>Zx6YqqD;$rVg)K%iQOlVHu0?Q6AMj9#K|>^9yJA0Jr8~UlcImva1Jygz;_L}CyxPN zf4^UD?^>UXn2G@4nunhU$?$eW5I6?xiLPj#7#NgDLcR!O$)N7y?&1|p#i+AmHw3M8 zJgGbG{m@_$_->4zqguZFf%%Wbx@kAdkk;)ZPVXJYxUsqD3H8x!aAmX1Q)Way-gxhd z0>#|`noMui)on^%ojbT1U)1|oXR-|^0^Zlrt($JKzpJ)ZUVLSpDHUo6!@fS + + + + + + + output_audio.webm + + + + + + + diff --git a/packager/app/test/testdata/bear-320x240-vp9-golden.webm b/packager/app/test/testdata/bear-320x240-vp9-golden.webm index 14e818fb6d263d510240f3b9e268c9c35f8c2a86..9e34a62ab25fadea93d9a63d523bf419d42dc313 100644 GIT binary patch delta 104 zcmV-u0GI#do&?~Y1duN$FcD3gbe~PTj8m(GA49fvQ>=mkA5FWBQ>%m=Q@d+Ztb+j$ zKkT!SVJMMs3z3O%6s4}C*MR|Z#eo5XfdPhvR$o?7IfD@aw-EsWLk~ delta 108 zcmV-y0F(dVo&@Bc1duN$G!adkbe~PTj8m(GA49fvQ>=mkBTc)FQ>%m=Q@d+Ztb+j$ zL+rDWVJMMs3z3O%7^$wO*MR|Z#eo5XfdPhvR$o?7IU=>3fP)PIw+#USLk - + output_video.webm - - + + diff --git a/packager/app/test/testdata/bear-640x360-vp8-golden.webm b/packager/app/test/testdata/bear-640x360-vp8-golden.webm index 6acb9f52edee7cfbf0be6c101ae9a632b5c87248..330354f7024e9425d65e1adcd63dc865eadd6f16 100644 GIT binary patch delta 105 zcmV-v0G9vk{|4y)29Pf&xDid8be~PTj8m(GA49fvQ>=mkAx*oDQ>%m=Q@d+Ztb+l+ z#_Y3^VJMMs3z3O%6sNAG*MR|Z#eo5XfdPhvR$o?7ID-)Zw-EsW%DxftyNCbe~PTj8m(GA49fvQ>=mkB~81HQ>%m=Q@d+Ztb+l+ z%Ivd|VJMMs3z3O%7^|+S*MR|Z#eo5XfdPhvR$o?7I3l&2fP)PIw+#US%DxfxyN?O diff --git a/packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd b/packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd index b6a0dc49e9..3a427670ff 100644 --- a/packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd +++ b/packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd @@ -3,10 +3,10 @@ - + output_video.webm - - + + diff --git a/packager/media/formats/webm/segmenter.cc b/packager/media/formats/webm/segmenter.cc index bed96e0f45..764e1bc6df 100644 --- a/packager/media/formats/webm/segmenter.cc +++ b/packager/media/formats/webm/segmenter.cc @@ -249,13 +249,14 @@ Status Segmenter::CreateVideoTrack(VideoStreamInfo* info) { } track->set_uid(info->track_id()); + if (!info->language().empty()) + track->set_language(info->language().c_str()); track->set_type(mkvmuxer::Tracks::kVideo); track->set_width(info->width()); track->set_height(info->height()); track->set_display_height(info->height()); track->set_display_width(info->width() * info->pixel_width() / info->pixel_height()); - track->set_language(info->language().c_str()); tracks_.AddTrack(track, info->track_id()); track_id_ = track->number(); @@ -278,9 +279,15 @@ Status Segmenter::CreateAudioTrack(AudioStreamInfo* info) { return Status(error::UNIMPLEMENTED, "Only Vorbis and Opus audio codecs are supported."); } + if (!track->SetCodecPrivate(info->extra_data().data(), + info->extra_data().size())) { + return Status(error::INTERNAL_ERROR, + "Private codec data required for audio streams"); + } track->set_uid(info->track_id()); - track->set_language(info->language().c_str()); + if (!info->language().empty()) + track->set_language(info->language().c_str()); track->set_type(mkvmuxer::Tracks::kAudio); track->set_sample_rate(info->sampling_frequency()); track->set_channels(info->num_channels());