/*
- Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
#include "dcp_content.h"
+#include "video_content.h"
#include "dcp_examiner.h"
#include "job.h"
#include "film.h"
DCPContent::DCPContent (shared_ptr<const Film> film, boost::filesystem::path p)
: Content (film)
- , VideoContent (film)
, SingleStreamAudioContent (film)
, SubtitleContent (film)
+ , video (new VideoContent (film))
, _has_subtitles (false)
, _encrypted (false)
, _kdm_valid (false)
, _reference_subtitle (false)
{
read_directory (p);
+ set_default_colour_conversion ();
}
DCPContent::DCPContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
- , VideoContent (film, node, version)
, SingleStreamAudioContent (film, node, version)
, SubtitleContent (film, node, version)
+ , video (new VideoContent (film, node, version))
{
_name = node->string_child ("Name");
_has_subtitles = node->bool_child ("HasSubtitles");
shared_ptr<DCPExaminer> examiner (new DCPExaminer (shared_from_this ()));
take_from_video_examiner (examiner);
+ set_default_colour_conversion ();
take_from_audio_examiner (examiner);
{
DCPContent::technical_summary () const
{
return Content::technical_summary() + " - "
- + VideoContent::technical_summary() + " - "
+ + video->technical_summary() + " - "
+ AudioContent::technical_summary() + " - ";
}
node->add_child("Type")->add_child_text ("DCP");
Content::as_xml (node);
- VideoContent::as_xml (node);
+ video->as_xml (node);
SingleStreamAudioContent::as_xml (node);
SubtitleContent::as_xml (node);
DCPContent::identifier () const
{
SafeStringStream s;
- s << VideoContent::identifier() << "_" << SubtitleContent::identifier () << " "
+ s << Content::identifier() << "_" << video->identifier() << "_" << SubtitleContent::identifier () << " "
<< (_reference_video ? "1" : "0")
<< (_reference_subtitle ? "1" : "0");
return s.str ();
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
* @brief DCPContent class.
*/
-#include "video_content.h"
#include "single_stream_audio_content.h"
#include "subtitle_content.h"
#include <libcxml/cxml.h>
/** @class DCPContent
* @brief An existing DCP used as input.
*/
-class DCPContent : public VideoContent, public SingleStreamAudioContent, public SubtitleContent
+class DCPContent : public SingleStreamAudioContent, public SubtitleContent
{
public:
DCPContent (boost::shared_ptr<const Film>, boost::filesystem::path p);
*/
#include "ffmpeg_content.h"
+#include "video_content.h"
#include "ffmpeg_examiner.h"
#include "ffmpeg_subtitle_stream.h"
#include "ffmpeg_audio_stream.h"
FFmpegContent::FFmpegContent (shared_ptr<const Film> film, boost::filesystem::path p)
: Content (film, p)
- , VideoContent (film, p)
, AudioContent (film, p)
, SubtitleContent (film, p)
+ , video (new VideoContent (film))
{
-
+ set_default_colour_conversion ();
}
FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version, list<string>& notes)
: Content (film, node)
- , VideoContent (film, node, version)
, AudioContent (film, node)
, SubtitleContent (film, node, version)
+ , video (new VideoContent (film, node, version))
{
list<cxml::NodePtr> c = node->node_children ("SubtitleStream");
for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) {
FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<boost::shared_ptr<Content> > c)
: Content (film, c)
- , VideoContent (film, c)
, AudioContent (film, c)
, SubtitleContent (film, c)
+ , video (new VideoContent (film, c))
{
shared_ptr<FFmpegContent> ref = dynamic_pointer_cast<FFmpegContent> (c[0]);
DCPOMATIC_ASSERT (ref);
{
node->add_child("Type")->add_child_text ("FFmpeg");
Content::as_xml (node);
- VideoContent::as_xml (node);
+ video->as_xml (node);
AudioContent::as_xml (node);
SubtitleContent::as_xml (node);
shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer (shared_from_this (), job));
take_from_video_examiner (examiner);
+ set_default_colour_conversion ();
{
boost::mutex::scoped_lock lm (_mutex);
string filt = Filter::ffmpeg_string (_filters);
return Content::technical_summary() + " - "
- + VideoContent::technical_summary() + " - "
+ + video->technical_summary() + " - "
+ AudioContent::technical_summary() + " - "
+ String::compose (
"ffmpeg: audio %1 subtitle %2 filters %3", as, ss, filt
{
SafeStringStream s;
- s << VideoContent::identifier() << "_"
+ s << Content::identifier() << "_"
+ << video->identifier() << "_"
<< SubtitleContent::identifier();
boost::mutex::scoped_lock lm (_mutex);
void
FFmpegContent::add_properties (list<UserProperty>& p) const
{
- VideoContent::add_properties (p);
+ Content::add_properties (p);
+ video->add_properties (p);
AudioContent::add_properties (p);
if (_bits_per_pixel) {
#ifndef DCPOMATIC_FFMPEG_CONTENT_H
#define DCPOMATIC_FFMPEG_CONTENT_H
-#include "video_content.h"
#include "audio_content.h"
#include "subtitle_content.h"
class Filter;
class FFmpegSubtitleStream;
class FFmpegAudioStream;
+class VideoContent;
struct ffmpeg_pts_offset_test;
struct audio_sampling_rate_test;
static int const FILTERS;
};
-class FFmpegContent : public VideoContent, public AudioContent, public SubtitleContent
+class FFmpegContent : public AudioContent, public SubtitleContent
{
public:
FFmpegContent (boost::shared_ptr<const Film>, boost::filesystem::path);
void signal_subtitle_stream_changed ();
+ boost::shared_ptr<VideoContent> video;
+
protected:
void add_properties (std::list<UserProperty> &) const;
*/
#include "image_content.h"
+#include "video_content.h"
#include "image_examiner.h"
#include "compose.hpp"
#include "film.h"
ImageContent::ImageContent (shared_ptr<const Film> film, boost::filesystem::path p)
: Content (film)
- , VideoContent (film)
+ , video (new VideoContent (film))
{
if (boost::filesystem::is_regular_file (p) && valid_image_file (p)) {
_paths.push_back (p);
sort (_paths.begin(), _paths.end(), ImageFilenameSorter ());
}
+
+ set_default_colour_conversion ();
}
ImageContent::ImageContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
- , VideoContent (film, node, version)
+ , video (new VideoContent (film, node, version))
{
}
ImageContent::technical_summary () const
{
string s = Content::technical_summary() + " - "
- + VideoContent::technical_summary() + " - ";
+ + video->technical_summary() + " - ";
if (still ()) {
s += _("still");
{
node->add_child("Type")->add_child_text ("Image");
Content::as_xml (node);
- VideoContent::as_xml (node);
+ video->as_xml (node);
}
void
shared_ptr<ImageExaminer> examiner (new ImageExaminer (film, shared_from_this(), job));
take_from_video_examiner (examiner);
+ set_default_colour_conversion ();
}
void
ImageContent::identifier () const
{
SafeStringStream s;
- s << VideoContent::identifier ();
+ s << Content::identifier();
+ s << "_" << video->identifier ();
s << "_" << video_length();
return s.str ();
}
/*
- Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef DCPOMATIC_IMAGE_CONTENT_H
#define DCPOMATIC_IMAGE_CONTENT_H
-#include "video_content.h"
+#include "content.h"
-class ImageContent : public VideoContent
+class ImageContent : public Content
{
public:
ImageContent (boost::shared_ptr<const Film>, boost::filesystem::path);
std::string identifier () const;
- /* VideoContent */
void set_default_colour_conversion ();
void set_video_length (Frame);
bool still () const;
+
+ boost::shared_ptr<VideoContent> video;
};
#endif