summaryrefslogtreecommitdiffstats
path: root/media/ffmpeg
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-07 15:26:05 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-07 15:26:05 +0000
commit2770c95a50db703c322d65d286aa5771e58ac25a (patch)
tree595b2adf92be75f65eccbbb0760e3969d2d840c3 /media/ffmpeg
parenteac3ba4f0f315bb2c68289062cb9f4f5ec632f90 (diff)
downloadchromium_src-2770c95a50db703c322d65d286aa5771e58ac25a.zip
chromium_src-2770c95a50db703c322d65d286aa5771e58ac25a.tar.gz
chromium_src-2770c95a50db703c322d65d286aa5771e58ac25a.tar.bz2
Cleaning up src/media to be consistent with static versus anonymous namespaces.
We were using a mix of both (and sometimes even static functions *inside* anonymous namespaces!) so we decided to stick to using static. Also moved static/test code into media namespace and removed media:: prefixes. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6628020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77135 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg')
-rw-r--r--media/ffmpeg/file_protocol.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/media/ffmpeg/file_protocol.cc b/media/ffmpeg/file_protocol.cc
index f778319..af2c847 100644
--- a/media/ffmpeg/file_protocol.cc
+++ b/media/ffmpeg/file_protocol.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,14 +21,12 @@
// warning C4996: 'open': The POSIX name for this item is deprecated.
MSVC_PUSH_DISABLE_WARNING(4996)
-namespace {
-
-int GetHandle(URLContext *h) {
+static int GetHandle(URLContext *h) {
return static_cast<int>(reinterpret_cast<intptr_t>(h->priv_data));
}
// FFmpeg protocol interface.
-int OpenContext(URLContext* h, const char* filename, int flags) {
+static int OpenContext(URLContext* h, const char* filename, int flags) {
int access = O_RDONLY;
if (flags & URL_RDWR) {
access = O_CREAT | O_TRUNC | O_RDWR;
@@ -46,19 +44,19 @@ int OpenContext(URLContext* h, const char* filename, int flags) {
return 0;
}
-int ReadContext(URLContext* h, unsigned char* buf, int size) {
+static int ReadContext(URLContext* h, unsigned char* buf, int size) {
return HANDLE_EINTR(read(GetHandle(h), buf, size));
}
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 68, 0)
-int WriteContext(URLContext* h, const unsigned char* buf, int size) {
+static int WriteContext(URLContext* h, const unsigned char* buf, int size) {
#else
-int WriteContext(URLContext* h, unsigned char* buf, int size) {
+static int WriteContext(URLContext* h, unsigned char* buf, int size) {
#endif
return HANDLE_EINTR(write(GetHandle(h), buf, size));
}
-int64 SeekContext(URLContext* h, int64 offset, int whence) {
+static int64 SeekContext(URLContext* h, int64 offset, int whence) {
#if defined(OS_WIN)
return _lseeki64(GetHandle(h), static_cast<__int64>(offset), whence);
#else
@@ -67,12 +65,10 @@ int64 SeekContext(URLContext* h, int64 offset, int whence) {
#endif
}
-int CloseContext(URLContext* h) {
+static int CloseContext(URLContext* h) {
return HANDLE_EINTR(close(GetHandle(h)));
}
-} // namespace
-
MSVC_POP_WARNING()
URLProtocol kFFmpegFileProtocol = {