diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/video_decoder.cpp | 11 | ||||
-rw-r--r-- | video/video_decoder.h | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 97f8eec7bb..1461f5dc3d 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -521,6 +521,17 @@ void AdvancedVideoDecoder::addTrack(Track *track) { track->start(); } +bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) { + StreamFileAudioTrack *track = new StreamFileAudioTrack(); + + bool result = track->loadFromFile(baseName); + + if (result) + addTrack(track); + + return result; +} + AdvancedVideoDecoder::Track *AdvancedVideoDecoder::getTrack(uint track) { if (track > _tracks.size()) return 0; diff --git a/video/video_decoder.h b/video/video_decoder.h index efc8f7a37d..616d6c4f96 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -365,6 +365,11 @@ public: */ virtual Audio::Timestamp getDuration() const; + /** + * Add an audio track from a stream file. + */ + bool addStreamFileTrack(const Common::String &baseName); + // Future API //void setRate(const Common::Rational &rate); //Common::Rational getRate() const; |