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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "media/base/audio_decoder_config.h" | 10 #include "media/base/audio_decoder_config.h" |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 DVLOG(1) << "OnNewConfigs() : success " << success; | 860 DVLOG(1) << "OnNewConfigs() : success " << success; |
861 return success; | 861 return success; |
862 } | 862 } |
863 | 863 |
864 bool ChunkDemuxer::OnAudioBuffers(const StreamParser::BufferQueue& buffers) { | 864 bool ChunkDemuxer::OnAudioBuffers(const StreamParser::BufferQueue& buffers) { |
865 DCHECK_NE(state_, SHUTDOWN); | 865 DCHECK_NE(state_, SHUTDOWN); |
866 | 866 |
867 if (!audio_) | 867 if (!audio_) |
868 return false; | 868 return false; |
869 | 869 |
870 // TODO(annacc): return Append's result after http://crbug.com/125072 is fixed | 870 return audio_->Append(buffers); |
871 audio_->Append(buffers); | |
872 | |
873 return true; | |
874 } | 871 } |
875 | 872 |
876 bool ChunkDemuxer::OnVideoBuffers(const StreamParser::BufferQueue& buffers) { | 873 bool ChunkDemuxer::OnVideoBuffers(const StreamParser::BufferQueue& buffers) { |
877 DCHECK_NE(state_, SHUTDOWN); | 874 DCHECK_NE(state_, SHUTDOWN); |
878 | 875 |
879 if (!video_) | 876 if (!video_) |
880 return false; | 877 return false; |
881 | 878 |
882 // TODO(annacc): return Append's result after http://crbug.com/125072 is fixed | 879 return video_->Append(buffers); |
883 video_->Append(buffers); | |
884 | |
885 return true; | |
886 } | 880 } |
887 | 881 |
888 bool ChunkDemuxer::OnKeyNeeded(scoped_array<uint8> init_data, | 882 bool ChunkDemuxer::OnKeyNeeded(scoped_array<uint8> init_data, |
889 int init_data_size) { | 883 int init_data_size) { |
890 client_->KeyNeeded(init_data.Pass(), init_data_size); | 884 client_->KeyNeeded(init_data.Pass(), init_data_size); |
891 return true; | 885 return true; |
892 } | 886 } |
893 | 887 |
894 } // namespace media | 888 } // namespace media |
OLD | NEW |