| Index: media/filters/frame_processor.h
|
| diff --git a/media/filters/frame_processor.h b/media/filters/frame_processor.h
|
| index 69a313efaff36dc144cf03f4b11eb5623fdc8163..dd28bad83d0d4a5cc156154e7a6f146132a56175 100644
|
| --- a/media/filters/frame_processor.h
|
| +++ b/media/filters/frame_processor.h
|
| @@ -58,12 +58,15 @@ class MEDIA_EXPORT FrameProcessor {
|
| // frames for the track |id| to |stream|.
|
| bool AddTrack(StreamParser::TrackId id, ChunkDemuxerStream* stream);
|
|
|
| - // Updates the internal mapping of TrackId to track buffer for the track
|
| - // buffer formerly associated with |old_id| to be associated with |new_id|.
|
| - // Returns false to indicate failure due to either no existing track buffer
|
| - // for |old_id| or collision with previous track buffer already mapped to
|
| - // |new_id|. Otherwise returns true.
|
| - bool UpdateTrack(StreamParser::TrackId old_id, StreamParser::TrackId new_id);
|
| + // A map that describes how track ids changed between init segment. Maps the
|
| + // old track id for a new track id for the same track.
|
| + using TrackIdChanges = std::map<StreamParser::TrackId, StreamParser::TrackId>;
|
| +
|
| + // Updates the internal mapping of TrackIds to track buffers. The input
|
| + // parameter |track_id_changes| maps old track ids to new ones. The track ids
|
| + // not present in the map must be assumed unchanged. Returns false if
|
| + // remapping failed.
|
| + bool UpdateTrackIds(const TrackIdChanges& track_id_changes);
|
|
|
| // Sets the need random access point flag on all track buffers to true.
|
| void SetAllTrackBuffersNeedRandomAccessPoint();
|
| @@ -123,8 +126,9 @@ class MEDIA_EXPORT FrameProcessor {
|
| base::TimeDelta* timestamp_offset);
|
|
|
| // TrackId-indexed map of each track's stream.
|
| - std::map<StreamParser::TrackId, std::unique_ptr<MseTrackBuffer>>
|
| - track_buffers_;
|
| + using TrackBuffersMap =
|
| + std::map<StreamParser::TrackId, std::unique_ptr<MseTrackBuffer>>;
|
| + TrackBuffersMap track_buffers_;
|
|
|
| // The last audio buffer seen by the frame processor that was removed because
|
| // it was entirely before the start of the append window.
|
|
|