Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1201)

Unified Diff: media/base/android/media_url_interceptor.h

Issue 411353002: MediaUrlInterceptor for embedders to handle custom urls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/media_source_player_unittest.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_url_interceptor.h
diff --git a/media/base/android/media_url_interceptor.h b/media/base/android/media_url_interceptor.h
new file mode 100644
index 0000000000000000000000000000000000000000..e90fd8395dd40d109751eb95fad81ba1ad467d15
--- /dev/null
+++ b/media/base/android/media_url_interceptor.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
xhwang 2014/07/29 17:08:20 nit: (c) not needed
Ignacio Solla 2014/07/30 08:45:12 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_ANDROID_MEDIA_URL_INTERCEPTOR_H_
+#define MEDIA_BASE_ANDROID_MEDIA_URL_INTERCEPTOR_H_
+
+#include <string>
+
+#include "base/android/jni_android.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+// Interceptor for content embedders to handle custom media urls
+// and translate them into files containing media.
+class MEDIA_EXPORT MediaUrlInterceptor {
+ public:
+ virtual ~MediaUrlInterceptor() {};
+
+ // Returns true if the embedder has intercepted the url and
+ // false otherwise.
+ // Output arguments (only when the url has been intercepted):
+ // - |fd|: file descriptor to the file containing the media element.
+ // - |offset|: offset in bytes from the start of the file to the
+ // media element.
+ // - |size|: size in bytes of the media element.
+ virtual bool Intercept(const std::string& url,
+ int* fd,
+ int64* offset,
+ int64* size) const = 0;
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_ANDROID_MEDIA_URL_INTERCEPTOR_H_
« no previous file with comments | « media/base/android/media_source_player_unittest.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698