| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/formats/mp2t/mp2t_stream_parser.h" | 5 #include "media/formats/mp2t/mp2t_stream_parser.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 DVLOG(LOG_LEVEL_ES) | 552 DVLOG(LOG_LEVEL_ES) |
| 553 << "OnEmitVideoBuffer" | 553 << "OnEmitVideoBuffer" |
| 554 << " size=" | 554 << " size=" |
| 555 << stream_parser_buffer->data_size() | 555 << stream_parser_buffer->data_size() |
| 556 << " dts=" | 556 << " dts=" |
| 557 << stream_parser_buffer->GetDecodeTimestamp().InMilliseconds() | 557 << stream_parser_buffer->GetDecodeTimestamp().InMilliseconds() |
| 558 << " pts=" | 558 << " pts=" |
| 559 << stream_parser_buffer->timestamp().InMilliseconds() | 559 << stream_parser_buffer->timestamp().InMilliseconds() |
| 560 << " dur=" | 560 << " dur=" |
| 561 << stream_parser_buffer->duration().InMilliseconds() | 561 << stream_parser_buffer->duration().InMilliseconds() |
| 562 << " IsKeyframe=" | 562 << " is_keyframe=" |
| 563 << stream_parser_buffer->IsKeyframe(); | 563 << stream_parser_buffer->is_keyframe(); |
| 564 | 564 |
| 565 // Ignore the incoming buffer if it is not associated with any config. | 565 // Ignore the incoming buffer if it is not associated with any config. |
| 566 if (buffer_queue_chain_.empty()) { | 566 if (buffer_queue_chain_.empty()) { |
| 567 NOTREACHED() << "Cannot provide buffers before configs"; | 567 NOTREACHED() << "Cannot provide buffers before configs"; |
| 568 return; | 568 return; |
| 569 } | 569 } |
| 570 | 570 |
| 571 buffer_queue_chain_.back().video_queue.push_back(stream_parser_buffer); | 571 buffer_queue_chain_.back().video_queue.push_back(stream_parser_buffer); |
| 572 } | 572 } |
| 573 | 573 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 // so that buffers with the same config can be added later on. | 630 // so that buffers with the same config can be added later on. |
| 631 BufferQueueWithConfig queue_with_config( | 631 BufferQueueWithConfig queue_with_config( |
| 632 true, last_audio_config, last_video_config); | 632 true, last_audio_config, last_video_config); |
| 633 buffer_queue_chain_.push_back(queue_with_config); | 633 buffer_queue_chain_.push_back(queue_with_config); |
| 634 | 634 |
| 635 return true; | 635 return true; |
| 636 } | 636 } |
| 637 | 637 |
| 638 } // namespace mp2t | 638 } // namespace mp2t |
| 639 } // namespace media | 639 } // namespace media |
| OLD | NEW |