X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fffmpeg_audio_test.cc;h=ec5752b9d994e5f0d08d4faf4eeb7e8251db2ac6;hb=e952a7b0681d1ad2fc6ebcd0cd7231bf59bbe043;hp=ae3a65a679f01eb417917d29244c7acc3fe2f902;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/test/ffmpeg_audio_test.cc b/test/ffmpeg_audio_test.cc index ae3a65a67..ec5752b9d 100644 --- a/test/ffmpeg_audio_test.cc +++ b/test/ffmpeg_audio_test.cc @@ -19,16 +19,10 @@ */ /** @file test/ffmpeg_audio_test.cc - * @brief A simple test of reading audio from an FFmpeg file. + * @brief Test reading audio from an FFmpeg file. + * @ingroup specific */ -#include -#include -#include -#include -#include -#include -#include #include "lib/ffmpeg_content.h" #include "lib/film.h" #include "lib/dcp_content_type.h" @@ -36,6 +30,14 @@ #include "lib/ratio.h" #include "lib/ffmpeg_content.h" #include "test.h" +#include +#include +#include +#include +#include +#include +#include +#include using std::string; using boost::shared_ptr; @@ -53,7 +55,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test) film->set_container (Ratio::from_id ("185")); film->set_audio_channels (6); - film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); + film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST")); film->make_dcp (); film->write_metadata (); @@ -75,7 +77,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test) int frame = 0; while (n < sound_asset->asset()->intrinsic_duration()) { - shared_ptr sound_frame = sound_asset->asset()->get_frame (frame++); + shared_ptr sound_frame = sound_asset->asset()->start_read()->get_frame (frame++); uint8_t const * d = sound_frame->data (); for (int i = 0; i < sound_frame->size(); i += (3 * sound_asset->asset()->channels())) {