VIDEO: Add method to VideoDecoder to erase a track
This commit is contained in:
parent
1b03df5313
commit
a897ad9e72
2 changed files with 22 additions and 0 deletions
|
@ -910,4 +910,21 @@ bool VideoDecoder::hasAudio() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VideoDecoder::eraseTrack(Track *track) {
|
||||||
|
for (uint idx = 0; idx < _externalTracks.size(); ++idx) {
|
||||||
|
if (_externalTracks[idx] == track)
|
||||||
|
_externalTracks.remove_at(idx);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint idx = 0; idx < _internalTracks.size(); ++idx) {
|
||||||
|
if (_internalTracks[idx] == track)
|
||||||
|
_internalTracks.remove_at(idx);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint idx = 0; idx < _tracks.size(); ++idx) {
|
||||||
|
if (_tracks[idx] == track)
|
||||||
|
_tracks.remove_at(idx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // End of namespace Video
|
} // End of namespace Video
|
||||||
|
|
|
@ -885,6 +885,11 @@ protected:
|
||||||
*/
|
*/
|
||||||
TrackListIterator getTrackListEnd() { return _internalTracks.end(); }
|
TrackListIterator getTrackListEnd() { return _internalTracks.end(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a specified track
|
||||||
|
*/
|
||||||
|
void eraseTrack(Track *track);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The internal seek function that does the actual seeking.
|
* The internal seek function that does the actual seeking.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue