#include "util.h"
#include "subrip.h"
#include "film.h"
+#include "font.h"
#include <dcp/raw_convert.h>
#include "i18n.h"
-using std::stringstream;
using std::string;
using std::cout;
using dcp::raw_convert;
}
-SubRipContent::SubRipContent (shared_ptr<const Film> film, shared_ptr<const cxml::Node> node, int version)
+SubRipContent::SubRipContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
, SubtitleContent (film, node, version)
- , _length (node->number_child<int64_t> ("Length"))
+ , _length (node->number_child<DCPTime::Type> ("Length"))
{
}
void
-SubRipContent::examine (boost::shared_ptr<Job> job)
+SubRipContent::examine (boost::shared_ptr<Job> job, bool calculate_digest)
{
- Content::examine (job);
+ Content::examine (job, calculate_digest);
SubRip s (shared_from_this ());
shared_ptr<const Film> film = _film.lock ();
boost::mutex::scoped_lock lm (_mutex);
_length = len;
+ _fonts.push_back (shared_ptr<Font> (new Font ()));
}
string
string
SubRipContent::information () const
{
-
+
}
void
*/
return _length;
}
-
-string
-SubRipContent::identifier () const
-{
- stringstream s;
- s << Content::identifier()
- << "_" << raw_convert<string> (subtitle_scale())
- << "_" << raw_convert<string> (subtitle_x_offset())
- << "_" << raw_convert<string> (subtitle_y_offset());
-
- return s.str ();
-}