projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update xml_subtitle_test result now that subtitles are being compared; improve placem...
[dcpomatic.git]
/
src
/
lib
/
sndfile_decoder.h
diff --git
a/src/lib/sndfile_decoder.h
b/src/lib/sndfile_decoder.h
index e16eab6731e2f23d4bc32e9f4e6dfd1a8c2fced7..5ebe1da7b251852ee523df1e24fc9597406570f2 100644
(file)
--- a/
src/lib/sndfile_decoder.h
+++ b/
src/lib/sndfile_decoder.h
@@
-17,38
+17,32
@@
*/
*/
-#include <sndfile.h>
#include "decoder.h"
#include "audio_decoder.h"
#include "decoder.h"
#include "audio_decoder.h"
-#include "stream.h"
-
-class SndfileStream : public AudioStream
-{
-public:
- SndfileStream (int sample_rate, int64_t layout)
- : AudioStream (sample_rate, layout)
- {}
-
- std::string to_string () const;
+#include "audio_examiner.h"
+#include <sndfile.h>
- static boost::shared_ptr<SndfileStream> create ();
- static boost::shared_ptr<SndfileStream> create (std::string t, boost::optional<int> v);
+class SndfileContent;
-private:
- friend class stream_test;
-
- SndfileStream ();
- SndfileStream (std::string t, boost::optional<int> v);
-};
-
-class SndfileDecoder : public AudioDecoder
+class SndfileDecoder : public AudioDecoder, public AudioExaminer
{
public:
{
public:
- SndfileDecoder (boost::shared_ptr<Film>, DecodeOptions);
+ SndfileDecoder (boost::shared_ptr<const SndfileContent> c);
+ ~SndfileDecoder ();
- bool pass ();
+ void seek (ContentTime, bool);
+
+ int audio_channels () const;
+ ContentTime audio_length () const;
+ int audio_frame_rate () const;
private:
private:
- std::vector<SNDFILE*> open_files (sf_count_t &);
- void close_files (std::vector<SNDFILE*> const &);
+ bool pass ();
+
+ boost::shared_ptr<const SndfileContent> _sndfile_content;
+ SNDFILE* _sndfile;
+ SF_INFO _info;
+ int64_t _done;
+ int64_t _remaining;
+ float* _deinterleave_buffer;
};
};