| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/ffmpeg/file_protocol.h" | 5 #include "media/ffmpeg/file_protocol.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <io.h> | 10 #include <io.h> |
| 11 #else | 11 #else |
| 12 #include <unistd.h> | 12 #include <unistd.h> |
| 13 #endif | 13 #endif |
| 14 #include <fcntl.h> | 14 #include <fcntl.h> |
| 15 | 15 |
| 16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
| 17 #include "base/eintr_wrapper.h" | 17 #include "base/eintr_wrapper.h" |
| 18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
| 19 #include "base/logging.h" | |
| 20 #include "media/ffmpeg/ffmpeg_common.h" | 19 #include "media/ffmpeg/ffmpeg_common.h" |
| 21 | 20 |
| 22 // warning C4996: 'open': The POSIX name for this item is deprecated. | 21 // warning C4996: 'open': The POSIX name for this item is deprecated. |
| 23 MSVC_PUSH_DISABLE_WARNING(4996) | 22 MSVC_PUSH_DISABLE_WARNING(4996) |
| 24 | 23 |
| 25 namespace { | 24 namespace { |
| 26 | 25 |
| 27 int GetHandle(URLContext *h) { | 26 int GetHandle(URLContext *h) { |
| 28 return static_cast<int>(reinterpret_cast<intptr_t>(h->priv_data)); | 27 return static_cast<int>(reinterpret_cast<intptr_t>(h->priv_data)); |
| 29 } | 28 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 &OpenContext, | 80 &OpenContext, |
| 82 &ReadContext, | 81 &ReadContext, |
| 83 &WriteContext, | 82 &WriteContext, |
| 84 &SeekContext, | 83 &SeekContext, |
| 85 &CloseContext, | 84 &CloseContext, |
| 86 NULL, // *next | 85 NULL, // *next |
| 87 NULL, // url_read_pause | 86 NULL, // url_read_pause |
| 88 NULL, // url_read_seek | 87 NULL, // url_read_seek |
| 89 &GetHandle | 88 &GetHandle |
| 90 }; | 89 }; |
| OLD | NEW |