summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-07 10:57:33 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-07 10:57:33 +0000
commit08d62727f7f1c813cbc7041027fe4a52518623da (patch)
tree756e38e4ad5ee2bdb51690e8a6fb149909c53712 /src/lib/ffmpeg_content.cc
parent09806bc8d6a48fc79d923ec1cdf6f90176bf8b6a (diff)
operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index bd5648ecb..e9be3cc46 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -147,7 +147,7 @@ FFmpegContent::as_xml (xmlpp::Node* node) const
}
if (_first_video) {
- node->add_child("FirstVideo")->add_child_text (lexical_cast<string> (_first_video.get ()));
+ node->add_child("FirstVideo")->add_child_text (lexical_cast<string> (_first_video.get().get()));
}
}
@@ -162,6 +162,7 @@ FFmpegContent::examine (shared_ptr<Job> job)
assert (film);
shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer (shared_from_this ()));
+ take_from_video_examiner (examiner);
ContentTime video_length = examiner->video_length ();
film->log()->log (String::compose ("Video length obtained from header as %1 frames", video_length.frames (video_frame_rate ())));
@@ -184,8 +185,6 @@ FFmpegContent::examine (shared_ptr<Job> job)
_first_video = examiner->first_video ();
}
- take_from_video_examiner (examiner);
-
signal_changed (ContentProperty::LENGTH);
signal_changed (FFmpegContentProperty::SUBTITLE_STREAMS);
signal_changed (FFmpegContentProperty::SUBTITLE_STREAM);
@@ -227,13 +226,13 @@ FFmpegContent::technical_summary () const
string
FFmpegContent::information () const
{
- if (video_length() == ContentTime (0) || video_frame_rate() == ContentTime (0)) {
+ if (video_length() == ContentTime (0) || video_frame_rate() == 0) {
return "";
}
stringstream s;
- s << String::compose (_("%1 frames; %2 frames per second"), video_length(), video_frame_rate()) << "\n";
+ s << String::compose (_("%1 frames; %2 frames per second"), video_length().frames (video_frame_rate()), video_frame_rate()) << "\n";
s << VideoContent::information ();
return s.str ();
@@ -363,7 +362,7 @@ FFmpegAudioStream::as_xml (xmlpp::Node* root) const
root->add_child("FrameRate")->add_child_text (lexical_cast<string> (frame_rate));
root->add_child("Channels")->add_child_text (lexical_cast<string> (channels));
if (first_audio) {
- root->add_child("FirstAudio")->add_child_text (lexical_cast<string> (first_audio.get ()));
+ root->add_child("FirstAudio")->add_child_text (lexical_cast<string> (first_audio.get().get()));
}
mapping.as_xml (root->add_child("Mapping"));
}