summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/plugins/ANPVideo_npapi.h
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-09-08 12:49:37 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-08 12:49:37 -0700
commit0ae24ff51fd869435c30e14d192c4416cc089498 (patch)
treef1d15d09b58a9886f6b87be4efd243ac52478c2f /Source/WebKit/android/plugins/ANPVideo_npapi.h
parentfae7f9baba4266dfe9ef89b86c12dd054273c93b (diff)
parent86772c601f6ccc0e1d0e0eca429cc2a73c6c3207 (diff)
downloadexternal_webkit-0ae24ff51fd869435c30e14d192c4416cc089498.zip
external_webkit-0ae24ff51fd869435c30e14d192c4416cc089498.tar.gz
external_webkit-0ae24ff51fd869435c30e14d192c4416cc089498.tar.bz2
Merge "Add Plugin API for a video framerate callback."
Diffstat (limited to 'Source/WebKit/android/plugins/ANPVideo_npapi.h')
-rw-r--r--Source/WebKit/android/plugins/ANPVideo_npapi.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/WebKit/android/plugins/ANPVideo_npapi.h b/Source/WebKit/android/plugins/ANPVideo_npapi.h
index 3d234f2..02e8392 100644
--- a/Source/WebKit/android/plugins/ANPVideo_npapi.h
+++ b/Source/WebKit/android/plugins/ANPVideo_npapi.h
@@ -58,4 +58,19 @@ struct ANPVideoInterfaceV0 : ANPInterface {
void (*releaseNativeWindow)(NPP instance, ANativeWindow* window);
};
+/** Called to notify the plugin that a video frame has been composited by the
+ * browser for display. This will be called in a separate thread and as such
+ * you cannot call releaseNativeWindow from the callback.
+ *
+ * The timestamp is in nanoseconds, and is monotonically increasing.
+ */
+typedef void (*ANPVideoFrameCallbackProc)(ANativeWindow* window, int64_t timestamp);
+
+struct ANPVideoInterfaceV1 : ANPVideoInterfaceV0 {
+ /** Set a callback to be notified when an ANativeWindow is composited by
+ * the browser.
+ */
+ void (*setFramerateCallback)(NPP instance, const ANativeWindow* window, ANPVideoFrameCallbackProc);
+};
+
#endif // ANPVideo_npapi_h