projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pot/merge.
[dcpomatic.git]
/
test
/
silence_padding_test.cc
diff --git
a/test/silence_padding_test.cc
b/test/silence_padding_test.cc
index 328f9bef74bc4bdce99d40428abb1ae25b1909af..dd02d200d7e220b6504612d2c23fc998ca0fcd07 100644
(file)
--- a/
test/silence_padding_test.cc
+++ b/
test/silence_padding_test.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2013-20
14
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-20
21
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,11
+18,14
@@
*/
*/
+
/** @file test/silence_padding_test.cc
* @brief Test the padding (with silence) of a mono source to a 6-channel DCP.
* @ingroup feature
*/
/** @file test/silence_padding_test.cc
* @brief Test the padding (with silence) of a mono source to a 6-channel DCP.
* @ingroup feature
*/
+
+#include "lib/constants.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"
@@
-37,11
+40,12
@@
#include <dcp/sound_asset_reader.h>
#include <boost/test/unit_test.hpp>
#include <dcp/sound_asset_reader.h>
#include <boost/test/unit_test.hpp>
+
using std::make_shared;
using std::string;
using std::make_shared;
using std::string;
-using std::shared_ptr;
using boost::lexical_cast;
using boost::lexical_cast;
+
static void
test_silence_padding (int channels)
{
static void
test_silence_padding (int channels)
{
@@
-120,6
+124,7
@@
test_silence_padding (int channels)
}
}
+
BOOST_AUTO_TEST_CASE (silence_padding_test)
{
for (int i = 1; i < MAX_DCP_AUDIO_CHANNELS; ++i) {
BOOST_AUTO_TEST_CASE (silence_padding_test)
{
for (int i = 1; i < MAX_DCP_AUDIO_CHANNELS; ++i) {
@@
-127,6
+132,7
@@
BOOST_AUTO_TEST_CASE (silence_padding_test)
}
}
}
}
+
/** Test a situation that used to crash because of a sub-sample rounding confusion
* caused by a trim.
*/
/** Test a situation that used to crash because of a sub-sample rounding confusion
* caused by a trim.
*/
@@
-139,7
+145,7
@@
BOOST_AUTO_TEST_CASE (silence_padding_test2)
auto film = new_test_film2 ("silence_padding_test2", { content }, &cl);
film->set_video_frame_rate (24);
auto film = new_test_film2 ("silence_padding_test2", { content }, &cl);
film->set_video_frame_rate (24);
- content->set_trim_start
(
dcpomatic::ContentTime(4003));
+ content->set_trim_start
(film,
dcpomatic::ContentTime(4003));
make_and_verify_dcp (film);
make_and_verify_dcp (film);