projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some comments.
[dcpomatic.git]
/
src
/
lib
/
audio_decoder.cc
diff --git
a/src/lib/audio_decoder.cc
b/src/lib/audio_decoder.cc
index 95b3a130db0287819cfe623656adbc7eb08a8a8c..a5e86f22b8e352d529fa39e69149ad10cca9fec4 100644
(file)
--- a/
src/lib/audio_decoder.cc
+++ b/
src/lib/audio_decoder.cc
@@
-21,6
+21,7
@@
#include "audio_decoder.h"
#include "audio_buffers.h"
#include "audio_content.h"
#include "audio_decoder.h"
#include "audio_buffers.h"
#include "audio_content.h"
+#include "dcpomatic_log.h"
#include "log.h"
#include "resampler.h"
#include "compose.hpp"
#include "log.h"
#include "resampler.h"
#include "compose.hpp"
@@
-29,13
+30,12
@@
#include "i18n.h"
#include "i18n.h"
-#define LOG_GENERAL(...) dcpomatic_log->log (String::compose(__VA_ARGS__), LogEntry::TYPE_GENERAL);
-
using std::cout;
using std::map;
using std::pair;
using boost::shared_ptr;
using boost::optional;
using std::cout;
using std::map;
using std::pair;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, bool fast)
: DecoderPart (parent)
AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, bool fast)
: DecoderPart (parent)
@@
-111,7
+111,7
@@
AudioDecoder::stream_position (shared_ptr<const Film> film, AudioStreamPtr strea
return ContentTime::from_frames (i->second, _content->resampled_frame_rate(film));
}
return ContentTime::from_frames (i->second, _content->resampled_frame_rate(film));
}
-ContentTime
+boost::optional<ContentTime>
AudioDecoder::position (shared_ptr<const Film> film) const
{
optional<ContentTime> p;
AudioDecoder::position (shared_ptr<const Film> film) const
{
optional<ContentTime> p;
@@
-122,7
+122,7
@@
AudioDecoder::position (shared_ptr<const Film> film) const
}
}
}
}
- return p
.get_value_or(ContentTime())
;
+ return p;
}
void
}
void