summaryrefslogtreecommitdiff
path: root/src/lib/decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-11-05 10:36:55 +0000
committerCarl Hetherington <cth@carlh.net>2012-11-05 10:36:55 +0000
commitca4d051ceafb77c281583c4e50b391f230544313 (patch)
treef3bb8a080dd87feae70ed90cb93d99e4bdd7e4a2 /src/lib/decoder.h
parent10a001a0c7cf33d384d9613168d80c0c5a07426c (diff)
Move trimming into the encoder; seems to be cleaner.
Diffstat (limited to 'src/lib/decoder.h')
-rw-r--r--src/lib/decoder.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/lib/decoder.h b/src/lib/decoder.h
index 2154da8bf..9f47bf425 100644
--- a/src/lib/decoder.h
+++ b/src/lib/decoder.h
@@ -52,7 +52,7 @@ class FilterGraph;
class Decoder
{
public:
- Decoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *, bool);
+ Decoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *);
virtual ~Decoder ();
/* Methods to query our input video */
@@ -80,9 +80,8 @@ public:
void process_end ();
void go ();
- /** @return the number of video frames we got from the source in the last run */
- SourceFrame video_frames_in () const {
- return _video_frames_in;
+ SourceFrame video_frame () const {
+ return _video_frame;
}
virtual std::vector<AudioStream> audio_streams () const {
@@ -101,7 +100,7 @@ public:
boost::signals2::signal<void (boost::shared_ptr<Image>, SourceFrame, boost::shared_ptr<Subtitle>)> Video;
/** Emitted when some audio data is ready */
- boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>)> Audio;
+ boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>, int64_t)> Audio;
protected:
@@ -121,21 +120,12 @@ protected:
/** associated Job, or 0 */
Job* _job;
- /** true to do the bare minimum of work; just run through the content. Useful for acquiring
- * accurate frame counts as quickly as possible. This generates no video or audio output.
- */
- bool _minimal;
-
private:
void emit_video (boost::shared_ptr<Image>, boost::shared_ptr<Subtitle>);
void emit_audio (boost::shared_ptr<AudioBuffers>);
- int64_t video_frames_to_audio_frames (SourceFrame v) const;
-
- SourceFrame _video_frames_in;
- SourceFrame _video_frames_out;
- int64_t _audio_frames_in;
- int64_t _audio_frames_out;
+ SourceFrame _video_frame;
+ int64_t _audio_frame;
std::list<boost::shared_ptr<FilterGraph> > _filter_graphs;