#include <libcxml/cxml.h>
#include "imagemagick_content.h"
#include "imagemagick_decoder.h"
+#include "config.h"
#include "compose.hpp"
#include "i18n.h"
: Content (f)
, VideoContent (f)
{
-
+
}
ImageMagickContent::ImageMagickContent (shared_ptr<const cxml::Node> node)
string
ImageMagickContent::summary () const
{
- return String::compose (_("Image: %1"), file().filename ());
+ return String::compose (_("Image: %1"), file().filename().string());
}
bool
{
boost::mutex::scoped_lock lm (_mutex);
- /* XXX */
- _video_length = 10 * 24;
+ /* Initial length */
+ _video_length = Config::instance()->default_still_length() * 24;
}
take_from_video_decoder (decoder);
- Changed (VideoContentProperty::VIDEO_LENGTH);
+ signal_changed (VideoContentProperty::VIDEO_LENGTH);
}
shared_ptr<Content>
{
return shared_ptr<Content> (new ImageMagickContent (*this));
}
+
+void
+ImageMagickContent::set_video_length (ContentVideoFrame len)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _video_length = len;
+ }
+
+ signal_changed (VideoContentProperty::VIDEO_LENGTH);
+}