void
AtmosDecoder::emit (shared_ptr<const Film> film, shared_ptr<const dcp::AtmosFrame> data, Frame frame, AtmosMetadata metadata)
{
- Data (ContentAtmos(data, frame, metadata));
+ Data (data, frame, metadata);
/* There's no fiddling with frame rates when we are using Atmos; the DCP rate must be the same as the Atmos one */
_position = dcpomatic::ContentTime::from_frames (frame, film->video_frame_rate());
}
#include "atmos_metadata.h"
-#include "content_atmos.h"
#include "decoder_part.h"
+#include "piece_atmos.h"
#include <boost/signals2.hpp>
void emit (std::shared_ptr<const Film> film, std::shared_ptr<const dcp::AtmosFrame> data, Frame frame, AtmosMetadata metadata);
- boost::signals2::signal<void (ContentAtmos)> Data;
+ boost::signals2::signal<void (std::shared_ptr<const dcp::AtmosFrame>, Frame, AtmosMetadata)> Data;
private:
std::shared_ptr<const Content> _content;
+++ /dev/null
-/*
- Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
-
- This file is part of DCP-o-matic.
-
- DCP-o-matic is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- DCP-o-matic is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#ifndef DCPOMATIC_CONTENT_ATMOS_H
-#define DCPOMATIC_CONTENT_ATMOS_H
-
-#include "atmos_metadata.h"
-#include "types.h"
-#include <dcp/atmos_asset_reader.h>
-
-/** @class ContentAtmos
- * @brief Some Atmos data that has come out of a decoder.
- */
-class ContentAtmos
-{
-public:
- ContentAtmos (std::shared_ptr<const dcp::AtmosFrame> data_, Frame frame_, AtmosMetadata metadata_)
- : data (data_)
- , frame (frame_)
- , metadata (metadata_)
- {}
-
- std::shared_ptr<const dcp::AtmosFrame> data;
- Frame frame;
- AtmosMetadata metadata;
-};
-
-#endif
*/
+#include "atmos_decoder.h"
+#include "atmos_metadata.h"
#include "audio_content.h"
#include "audio_decoder.h"
#include "content.h"
i->Stop.connect (boost::bind(&Piece::stop, this, content, i->content(), _1));
}
+ if (_decoder->atmos) {
+ _decoder->atmos->Data.connect (boost::bind(&Piece::atmos, this, _1, _2, _3));
+ }
+
_decoder->Flush.connect (boost::bind(&Piece::flush, this));
}
}
+void
+Piece::atmos (shared_ptr<const dcp::AtmosFrame> data, Frame frame, AtmosMetadata metadata)
+{
+ Atmos (PieceAtmos(data, frame, metadata));
+}
+
+
void
Piece::update_pull_to (DCPTime& pull_to) const
{
#include "dcpomatic_time.h"
#include "font_data.h"
#include "frame_rate_change.h"
+#include "piece_atmos.h"
#include "piece_audio.h"
#include "piece_text.h"
#include "piece_video.h"
boost::signals2::signal<void (PieceBitmapTextStart)> BitmapTextStart;
boost::signals2::signal<void (PieceStringTextStart)> StringTextStart;
boost::signals2::signal<void (PieceTextStop)> TextStop;
+ boost::signals2::signal<void (PieceAtmos)> Atmos;
private:
friend struct overlap_video_test1;
void bitmap_start (std::weak_ptr<const Content> content, std::weak_ptr<const TextContent> text, dcpomatic::ContentTime time, std::shared_ptr<Image> image, dcpomatic::Rect<double> area);
void string_start (std::weak_ptr<const Content> content, std::weak_ptr<const TextContent> text, dcpomatic::ContentTime time, std::list<dcp::SubtitleString> subs);
void stop (std::weak_ptr<const Content> content, std::weak_ptr<const TextContent> text, dcpomatic::ContentTime time);
+ void atmos (std::shared_ptr<const dcp::AtmosFrame> data, Frame frame, AtmosMetadata metadata);
void flush ();
--- /dev/null
+/*
+ Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#ifndef DCPOMATIC_PIECE_ATMOS_H
+#define DCPOMATIC_PIECE_ATMOS_H
+
+
+#include "atmos_metadata.h"
+#include "types.h"
+#include <dcp/atmos_asset_reader.h>
+
+
+/** @class PieceAtmos
+ * @brief Some Atmos data that has come out of a decoder.
+ */
+class PieceAtmos
+{
+public:
+ PieceAtmos (std::shared_ptr<const dcp::AtmosFrame> data_, Frame frame_, AtmosMetadata metadata_)
+ : data (data_)
+ , frame (frame_)
+ , metadata (metadata_)
+ {}
+
+ std::shared_ptr<const dcp::AtmosFrame> data;
+ Frame frame;
+ AtmosMetadata metadata;
+};
+
+
+#endif
piece->Audio.connect (bind(&Player::audio, this, weak_ptr<Piece>(piece), _1));
}
- piece->BitmapTextStart.connect (bind(&Player::bitmap_text_start, this, weak_ptr<Piece>(piece), _1));
- piece->StringTextStart.connect (bind(&Player::string_text_start, this, weak_ptr<Piece>(piece), _1));
- piece->TextStop.connect (bind(&Player::subtitle_stop, this, weak_ptr<Piece>(piece), _1));
-
- if (decoder->atmos) {
- decoder->atmos->Data.connect (bind(&Player::atmos, this, weak_ptr<Piece>(piece), _1));
- }
+ piece->BitmapTextStart.connect (bind(&Player::bitmap_text_start, this, piece, _1));
+ piece->StringTextStart.connect (bind(&Player::string_text_start, this, piece, _1));
+ piece->TextStop.connect (bind(&Player::subtitle_stop, this, piece, _1));
+ piece->Atmos.connect (bind(&Player::atmos, this, piece, _1));
}
for (auto i = _pieces.begin(); i != _pieces.end(); ++i) {
void
-Player::atmos (weak_ptr<Piece>, ContentAtmos data)
+Player::atmos (weak_ptr<Piece>, PieceAtmos data)
{
Atmos (data.data, DCPTime::from_frames(data.frame, _film->video_frame_rate()), data.metadata);
}
/*
- Copyright (C) 2013-2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "audio_merger.h"
#include "audio_stream.h"
#include "content.h"
-#include "content_atmos.h"
#include "empty.h"
#include "film.h"
#include "piece.h"
+#include "piece_atmos.h"
#include "piece_audio.h"
#include "piece_text.h"
#include "piece_video.h"
void bitmap_text_start (std::weak_ptr<Piece>, PieceBitmapTextStart);
void string_text_start (std::weak_ptr<Piece>, PieceStringTextStart);
void subtitle_stop (std::weak_ptr<Piece>, PieceTextStop);
- void atmos (std::weak_ptr<Piece>, ContentAtmos);
+ void atmos (std::weak_ptr<Piece>, PieceAtmos);
dcpomatic::DCPTime one_video_frame () const;
void fill_audio (dcpomatic::DCPTimePeriod period);
std::vector<std::vector<std::shared_ptr<Content>>> collect (std::shared_ptr<const Film> film, ContentList content);
+
#endif