#include "audio_content.h"
#include "content.h"
+#include "dcp_content.h"
#include "dcpomatic_log.h"
#include "decoder.h"
#include "film.h"
#include "video_content.h"
-using std::shared_ptr;
+using std::dynamic_pointer_cast;
using std::make_shared;
+using std::shared_ptr;
using namespace dcpomatic;
done = decoder->pass();
}
+
+bool
+Piece::reference_dcp_audio () const
+{
+ auto dcp = dynamic_pointer_cast<DCPContent>(content);
+ return dcp && dcp->reference_audio();
+}
int resampled_audio_frame_rate (std::shared_ptr<const Film> film) const;
double audio_gain () const;
+ bool reference_dcp_audio () const;
std::shared_ptr<Decoder> decoder_for (std::shared_ptr<Content> content) const;
case CONTENT:
{
earliest_content->pass();
- auto dcp = dynamic_pointer_cast<DCPContent>(earliest_content->content);
- if (dcp && !_play_referenced && dcp->reference_audio()) {
+ if (!_play_referenced && earliest_content->reference_dcp_audio()) {
/* We are skipping some referenced DCP audio content, so we need to update _last_audio_time
to `hide' the fact that no audio was emitted during the referenced DCP (though
we need to behave as though it was).
*/
- _last_audio_time = dcp->end (_film);
+ _last_audio_time = earliest_content->end (_film);
}
break;
}