cleaner forced end-of-track when media stream is past it's 'end' marker
This commit is contained in:
parent
3a3cba3a85
commit
34d496aadc
|
@ -689,9 +689,8 @@ void GstEngine::timerEvent(QTimerEvent* e) {
|
|||
|
||||
// when at the end, kill the track if it didn't stop yet (probably a
|
||||
// multisection media file)
|
||||
// TODO: EndOfStreamReached
|
||||
if(current_position > current_length) {
|
||||
emit TrackEnded();
|
||||
if(current_position >= current_length) {
|
||||
EndOfStreamReached(current_pipeline_->has_next_valid_url());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -422,7 +422,7 @@ bool GstEnginePipeline::EventHandoffCallback(GstPad*, GstEvent* e, gpointer self
|
|||
void GstEnginePipeline::SourceDrainedCallback(GstURIDecodeBin* bin, gpointer self) {
|
||||
GstEnginePipeline* instance = reinterpret_cast<GstEnginePipeline*>(self);
|
||||
|
||||
if (instance->next_url_.isValid()) {
|
||||
if (instance->has_next_valid_url()) {
|
||||
GstElement* old_decode_bin = instance->uridecodebin_;
|
||||
|
||||
instance->ignore_tags_ = true;
|
||||
|
|
|
@ -70,6 +70,7 @@ class GstEnginePipeline : public QObject {
|
|||
// If this is set then it will be loaded automatically when playback finishes
|
||||
// for gapless playback
|
||||
void SetNextUrl(const QUrl& url) { next_url_ = url; }
|
||||
bool has_next_valid_url() const { return next_url_.isValid(); }
|
||||
|
||||
// Get information about the music playback
|
||||
QUrl url() const { return url_; }
|
||||
|
|
Loading…
Reference in New Issue