[totem] Support for the "input.time" property from VLC JavaScript API.
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Support for the "input.time" property from VLC JavaScript API.
- Date: Tue, 18 May 2010 15:11:58 +0000 (UTC)
commit 611fee723b6ee506945cab398602904d62128c02
Author: Ivaylo Valkov <ivaylo e-valkov org>
Date: Tue May 18 16:48:05 2010 +0300
Support for the "input.time" property from VLC JavaScript API.
https://bugzilla.gnome.org/show_bug.cgi?id=618929
browser-plugin/totemConeInput.cpp | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/browser-plugin/totemConeInput.cpp b/browser-plugin/totemConeInput.cpp
index 475629c..c10d57a 100644
--- a/browser-plugin/totemConeInput.cpp
+++ b/browser-plugin/totemConeInput.cpp
@@ -84,12 +84,14 @@ totemConeInput::GetPropertyByIndex (int aIndex,
return Int32Variant (_result, state);
}
+ case eTime:
+ return DoubleVariant (_result, double (Plugin()->GetTime()));
+
case eFps:
case eHasVout:
case eLength:
case ePosition:
case eRate:
- case eTime:
TOTEM_WARN_GETTER_UNIMPLEMENTED (aIndex, _result);
return VoidVariant (_result);
}
@@ -104,10 +106,17 @@ totemConeInput::SetPropertyByIndex (int aIndex,
TOTEM_LOG_SETTER (aIndex, totemConeInput);
switch (Properties (aIndex)) {
+ case eTime:
+ int32_t time;
+ if (!GetInt32FromArguments (aValue, 1, 0, time))
+ return false;
+
+ Plugin()->SetTime(time);
+ return true;
+
case ePosition:
case eRate:
case eState:
- case eTime:
TOTEM_WARN_SETTER_UNIMPLEMENTED (aIndex, _result);
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]