| 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/ffmpeg_demuxer.h" | 5 #include "media/filters/ffmpeg_demuxer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 DCHECK(task_runner_->BelongsToCurrentThread()); | 1642 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 1643 CHECK(!pending_seek_cb_.is_null()); | 1643 CHECK(!pending_seek_cb_.is_null()); |
| 1644 | 1644 |
| 1645 if (stopped_) { | 1645 if (stopped_) { |
| 1646 MEDIA_LOG(ERROR, media_log_) << GetDisplayName() << ": bad state"; | 1646 MEDIA_LOG(ERROR, media_log_) << GetDisplayName() << ": bad state"; |
| 1647 base::ResetAndReturn(&pending_seek_cb_).Run(PIPELINE_ERROR_ABORT); | 1647 base::ResetAndReturn(&pending_seek_cb_).Run(PIPELINE_ERROR_ABORT); |
| 1648 return; | 1648 return; |
| 1649 } | 1649 } |
| 1650 | 1650 |
| 1651 if (result < 0) { | 1651 if (result < 0) { |
| 1652 // Use VLOG(1) instead of NOTIMPLEMENTED() to prevent the message being | 1652 MEDIA_LOG(ERROR, media_log_) |
| 1653 // captured from stdout and contaminates testing. | 1653 << GetDisplayName() << ": seek failed: " << AVErrorToString(result); |
| 1654 // TODO(scherkus): Implement this properly and signal error (BUG=23447). | 1654 base::ResetAndReturn(&pending_seek_cb_).Run(PIPELINE_ERROR_ABORT); |
| 1655 VLOG(1) << "Not implemented"; | 1655 return; |
| 1656 } | 1656 } |
| 1657 | 1657 |
| 1658 // Tell streams to flush buffers due to seeking. | 1658 // Tell streams to flush buffers due to seeking. |
| 1659 for (const auto& stream : streams_) { | 1659 for (const auto& stream : streams_) { |
| 1660 if (stream) | 1660 if (stream) |
| 1661 stream->FlushBuffers(); | 1661 stream->FlushBuffers(); |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 // Resume reading until capacity. | 1664 // Resume reading until capacity. |
| 1665 ReadFrameIfNeeded(); | 1665 ReadFrameIfNeeded(); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1881 | 1881 |
| 1882 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { | 1882 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { |
| 1883 DCHECK(task_runner_->BelongsToCurrentThread()); | 1883 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 1884 for (const auto& stream : streams_) { | 1884 for (const auto& stream : streams_) { |
| 1885 if (stream) | 1885 if (stream) |
| 1886 stream->SetLiveness(liveness); | 1886 stream->SetLiveness(liveness); |
| 1887 } | 1887 } |
| 1888 } | 1888 } |
| 1889 | 1889 |
| 1890 } // namespace media | 1890 } // namespace media |
| OLD | NEW |