projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I think Butler should just clear itself out when the player changes.
[dcpomatic.git]
/
test
/
ffmpeg_audio_test.cc
diff --git
a/test/ffmpeg_audio_test.cc
b/test/ffmpeg_audio_test.cc
index ae3a65a679f01eb417917d29244c7acc3fe2f902..ec5752b9d994e5f0d08d4faf4eeb7e8251db2ac6 100644
(file)
--- a/
test/ffmpeg_audio_test.cc
+++ b/
test/ffmpeg_audio_test.cc
@@
-19,16
+19,10
@@
*/
/** @file test/ffmpeg_audio_test.cc
*/
/** @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 <boost/test/unit_test.hpp>
-#include <dcp/cpl.h>
-#include <dcp/dcp.h>
-#include <dcp/sound_asset.h>
-#include <dcp/sound_frame.h>
-#include <dcp/reel_sound_asset.h>
-#include <dcp/reel.h>
#include "lib/ffmpeg_content.h"
#include "lib/film.h"
#include "lib/dcp_content_type.h"
#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 "lib/ratio.h"
#include "lib/ffmpeg_content.h"
#include "test.h"
+#include <dcp/cpl.h>
+#include <dcp/dcp.h>
+#include <dcp/sound_asset.h>
+#include <dcp/sound_frame.h>
+#include <dcp/reel_sound_asset.h>
+#include <dcp/sound_asset_reader.h>
+#include <dcp/reel.h>
+#include <boost/test/unit_test.hpp>
using std::string;
using boost::shared_ptr;
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_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 ();
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()) {
int frame = 0;
while (n < sound_asset->asset()->intrinsic_duration()) {
- shared_ptr<const dcp::SoundFrame> sound_frame = sound_asset->asset()->get_frame (frame++);
+ shared_ptr<const dcp::SoundFrame> 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())) {
uint8_t const * d = sound_frame->data ();
for (int i = 0; i < sound_frame->size(); i += (3 * sound_asset->asset()->channels())) {