summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-05-16 23:46:51 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commitd60b9d006fee94fab80ee86fe1149de7f2e76750 (patch)
treee7821dc323ec6e3b53bf25266350e355c4de0fc0 /src/lib/player.cc
parent3ce77bc8f0f047725f40a5f1725833fce5f8db63 (diff)
Remove Sndfile code and use FFmpeg instead.
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc32
1 files changed, 2 insertions, 30 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 801e145af..cd841d1ce 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -21,13 +21,13 @@
#include "film.h"
#include "ffmpeg_decoder.h"
#include "video_decoder.h"
+#include "audio_decoder.h"
#include "audio_buffers.h"
#include "audio_content.h"
#include "ffmpeg_content.h"
#include "image_decoder.h"
+#include "content_audio.h"
#include "image_content.h"
-#include "sndfile_decoder.h"
-#include "sndfile_content.h"
#include "subtitle_content.h"
#include "text_subtitle_decoder.h"
#include "text_subtitle_content.h"
@@ -160,34 +160,6 @@ Player::setup_pieces ()
frc = FrameRateChange (ic->active_video_frame_rate(), _film->video_frame_rate());
}
- /* SndfileContent */
- shared_ptr<const SndfileContent> sc = dynamic_pointer_cast<const SndfileContent> (i);
- if (sc) {
- decoder.reset (new SndfileDecoder (sc, _fast, _film->log()));
-
- /* Work out a FrameRateChange for the best overlap video for this content */
- DCPTime best_overlap_t;
- shared_ptr<Content> best_overlap;
- BOOST_FOREACH (shared_ptr<Content> j, _playlist->content ()) {
- if (!j->video) {
- continue;
- }
-
- DCPTime const overlap = min (j->end(), i->end()) - max (j->position(), i->position());
- if (overlap > best_overlap_t) {
- best_overlap = j;
- best_overlap_t = overlap;
- }
- }
-
- if (best_overlap) {
- frc = FrameRateChange (best_overlap->active_video_frame_rate(), _film->video_frame_rate ());
- } else {
- /* No video overlap; e.g. if the DCP is just audio */
- frc = FrameRateChange (_film->video_frame_rate(), _film->video_frame_rate ());
- }
- }
-
/* It's questionable whether subtitle content should have a video frame rate; perhaps
it should be assumed that any subtitle content has been prepared at the same rate
as simultaneous video content (like we do with audio).