Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: media/filters/chunk_demuxer.h

Issue 2371783002: Remove stl_util's deletion functions from media/. (Closed)
Patch Set: wolenetz Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/cdm/aes_decryptor.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_ 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // MediaLog for reporting messages and properties to debug content and engine. 406 // MediaLog for reporting messages and properties to debug content and engine.
407 scoped_refptr<MediaLog> media_log_; 407 scoped_refptr<MediaLog> media_log_;
408 408
409 PipelineStatusCB init_cb_; 409 PipelineStatusCB init_cb_;
410 // Callback to execute upon seek completion. 410 // Callback to execute upon seek completion.
411 // TODO(wolenetz/acolwell): Protect against possible double-locking by first 411 // TODO(wolenetz/acolwell): Protect against possible double-locking by first
412 // releasing |lock_| before executing this callback. See 412 // releasing |lock_| before executing this callback. See
413 // http://crbug.com/308226 413 // http://crbug.com/308226
414 PipelineStatusCB seek_cb_; 414 PipelineStatusCB seek_cb_;
415 415
416 std::vector<std::unique_ptr<ChunkDemuxerStream>> audio_streams_; 416 using OwnedChunkDemuxerStreamVector =
417 std::vector<std::unique_ptr<ChunkDemuxerStream>> video_streams_; 417 std::vector<std::unique_ptr<ChunkDemuxerStream>>;
418 OwnedChunkDemuxerStreamVector audio_streams_;
419 OwnedChunkDemuxerStreamVector video_streams_;
420 OwnedChunkDemuxerStreamVector text_streams_;
418 421
419 // Keep track of which ids still remain uninitialized so that we transition 422 // Keep track of which ids still remain uninitialized so that we transition
420 // into the INITIALIZED only after all ids/SourceBuffers got init segment. 423 // into the INITIALIZED only after all ids/SourceBuffers got init segment.
421 std::set<std::string> pending_source_init_ids_; 424 std::set<std::string> pending_source_init_ids_;
422 425
423 base::TimeDelta duration_; 426 base::TimeDelta duration_;
424 427
425 // The duration passed to the last SetDuration(). If 428 // The duration passed to the last SetDuration(). If
426 // SetDuration() is never called or an AppendData() call or 429 // SetDuration() is never called or an AppendData() call or
427 // a EndOfStream() call changes |duration_|, then this 430 // a EndOfStream() call changes |duration_|, then this
428 // variable is set to < 0 to indicate that the |duration_| represents 431 // variable is set to < 0 to indicate that the |duration_| represents
429 // the actual duration instead of a user specified value. 432 // the actual duration instead of a user specified value.
430 double user_specified_duration_; 433 double user_specified_duration_;
431 434
432 base::Time timeline_offset_; 435 base::Time timeline_offset_;
433 DemuxerStream::Liveness liveness_; 436 DemuxerStream::Liveness liveness_;
434 437
435 typedef std::map<std::string, MediaSourceState*> MediaSourceStateMap; 438 std::map<std::string, std::unique_ptr<MediaSourceState>> source_state_map_;
436 MediaSourceStateMap source_state_map_;
437 439
438 std::map<std::string, std::vector<ChunkDemuxerStream*>> id_to_streams_map_; 440 std::map<std::string, std::vector<ChunkDemuxerStream*>> id_to_streams_map_;
439 // Used to hold alive the demuxer streams that were created for removed / 441 // Used to hold alive the demuxer streams that were created for removed /
440 // released MediaSourceState objects. Demuxer clients might still have 442 // released MediaSourceState objects. Demuxer clients might still have
441 // references to these streams, so we need to keep them alive. But they'll be 443 // references to these streams, so we need to keep them alive. But they'll be
442 // in a shut down state, so reading from them will return EOS. 444 // in a shut down state, so reading from them will return EOS.
443 std::vector<std::unique_ptr<ChunkDemuxerStream>> removed_streams_; 445 std::vector<std::unique_ptr<ChunkDemuxerStream>> removed_streams_;
444 446
445 // Indicates that splice frame generation is enabled. 447 // Indicates that splice frame generation is enabled.
446 const bool splice_frames_enabled_; 448 const bool splice_frames_enabled_;
447 449
448 // Accumulate, by type, detected track counts across the SourceBuffers. 450 // Accumulate, by type, detected track counts across the SourceBuffers.
449 int detected_audio_track_count_; 451 int detected_audio_track_count_;
450 int detected_video_track_count_; 452 int detected_video_track_count_;
451 int detected_text_track_count_; 453 int detected_text_track_count_;
452 454
453 std::map<MediaTrack::Id, DemuxerStream*> track_id_to_demux_stream_map_; 455 std::map<MediaTrack::Id, DemuxerStream*> track_id_to_demux_stream_map_;
454 456
455 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 457 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
456 }; 458 };
457 459
458 } // namespace media 460 } // namespace media
459 461
460 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 462 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698