| OLD | NEW |
| 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 #include "media/filters/chunk_demuxer.h" | 5 #include "media/filters/chunk_demuxer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 new_media_segment_ = false; | 766 new_media_segment_ = false; |
| 767 } | 767 } |
| 768 | 768 |
| 769 bool SourceState::OnNewBuffers( | 769 bool SourceState::OnNewBuffers( |
| 770 const StreamParser::BufferQueue& audio_buffers, | 770 const StreamParser::BufferQueue& audio_buffers, |
| 771 const StreamParser::BufferQueue& video_buffers, | 771 const StreamParser::BufferQueue& video_buffers, |
| 772 const StreamParser::TextBufferQueueMap& text_map) { | 772 const StreamParser::TextBufferQueueMap& text_map) { |
| 773 DCHECK(!audio_buffers.empty() || !video_buffers.empty() || | 773 DCHECK(!audio_buffers.empty() || !video_buffers.empty() || |
| 774 !text_map.empty()); | 774 !text_map.empty()); |
| 775 | 775 |
| 776 // TODO(wolenetz): DCHECK + return false if any of these buffers have UNKNOWN |
| 777 // type() in upcoming coded frame processing compliant implementation. See |
| 778 // http://crbug.com/249422. |
| 779 |
| 776 AdjustBufferTimestamps(audio_buffers); | 780 AdjustBufferTimestamps(audio_buffers); |
| 777 AdjustBufferTimestamps(video_buffers); | 781 AdjustBufferTimestamps(video_buffers); |
| 778 | 782 |
| 779 StreamParser::BufferQueue filtered_audio; | 783 StreamParser::BufferQueue filtered_audio; |
| 780 StreamParser::BufferQueue filtered_video; | 784 StreamParser::BufferQueue filtered_video; |
| 781 | 785 |
| 782 FilterWithAppendWindow(audio_buffers, &audio_needs_keyframe_, | 786 FilterWithAppendWindow(audio_buffers, &audio_needs_keyframe_, |
| 783 &filtered_audio); | 787 &filtered_audio); |
| 784 | 788 |
| 785 FilterWithAppendWindow(video_buffers, &video_needs_keyframe_, | 789 FilterWithAppendWindow(video_buffers, &video_needs_keyframe_, |
| (...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1861 } | 1865 } |
| 1862 | 1866 |
| 1863 void ChunkDemuxer::ShutdownAllStreams() { | 1867 void ChunkDemuxer::ShutdownAllStreams() { |
| 1864 for (SourceStateMap::iterator itr = source_state_map_.begin(); | 1868 for (SourceStateMap::iterator itr = source_state_map_.begin(); |
| 1865 itr != source_state_map_.end(); ++itr) { | 1869 itr != source_state_map_.end(); ++itr) { |
| 1866 itr->second->Shutdown(); | 1870 itr->second->Shutdown(); |
| 1867 } | 1871 } |
| 1868 } | 1872 } |
| 1869 | 1873 |
| 1870 } // namespace media | 1874 } // namespace media |
| OLD | NEW |