diff options
for testing purposes only:
added void osSetParcelMediaTime(double time) command to script engines.
which sets the position of the media that is playing. Time is in seconds.
Doesn't do any security checking (should be checking that the object/script is owned by the parcel owner). So could be abused, if it is then we should remove it, or add the security.
Only tested in dotnet scripting engine, but should work in XEngine too.
Diffstat (limited to '')
7 files changed, 46 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 375756d..6a63491 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -757,7 +757,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
757 | UpdateEvents(); | 757 | UpdateEvents(); |
758 | 758 | ||
759 | if (m_frame % m_update_backup == 0) | 759 | if (m_frame % m_update_backup == 0) |
760 | { | ||
760 | UpdateStorageBackup(); | 761 | UpdateStorageBackup(); |
762 | |||
763 | } | ||
761 | 764 | ||
762 | if (m_frame % m_update_terrain == 0) | 765 | if (m_frame % m_update_terrain == 0) |
763 | UpdateTerrain(); | 766 | UpdateTerrain(); |
@@ -3661,7 +3664,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
3661 | 3664 | ||
3662 | #endregion | 3665 | #endregion |
3663 | 3666 | ||
3664 | 3667 | ||
3668 | |||
3669 | public void ParcelMediaSetTime(float time) | ||
3670 | { | ||
3671 | //should be doing this by parcel, but as its only for testing | ||
3672 | ForEachClient(delegate(IClientAPI client) | ||
3673 | { | ||
3674 | client.SendParcelMediaCommand((uint)(2), ParcelMediaCommandEnum.Pause, 0); | ||
3675 | Thread.Sleep(10); | ||
3676 | client.SendParcelMediaCommand((uint)(64), ParcelMediaCommandEnum.Time, time); | ||
3677 | Thread.Sleep(200); | ||
3678 | client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); | ||
3679 | }); | ||
3680 | } | ||
3665 | } | 3681 | } |
3666 | } | 3682 | } |
3667 | 3683 | ||
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index 2d9fd09..9dd7e01 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs | |||
@@ -2034,6 +2034,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2034 | return m_LSL_Functions.llList2Float(src, index); | 2034 | return m_LSL_Functions.llList2Float(src, index); |
2035 | } | 2035 | } |
2036 | 2036 | ||
2037 | |||
2038 | //for testing purposes only | ||
2039 | public void osSetParcelMediaTime(double time) | ||
2040 | { | ||
2041 | m_LSL_Functions.osSetParcelMediaTime(time); | ||
2042 | } | ||
2043 | |||
2037 | // LSL CONSTANTS | 2044 | // LSL CONSTANTS |
2038 | public const int TRUE = 1; | 2045 | public const int TRUE = 1; |
2039 | public const int FALSE = 0; | 2046 | public const int FALSE = 0; |
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index fc62b02..ca12a42 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | |||
@@ -569,5 +569,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
569 | return String.Empty; | 569 | return String.Empty; |
570 | } | 570 | } |
571 | } | 571 | } |
572 | |||
573 | //for testing purposes only | ||
574 | public void osSetParcelMediaTime(double time) | ||
575 | { | ||
576 | World.ParcelMediaSetTime((float)time); | ||
577 | } | ||
572 | } | 578 | } |
573 | } | 579 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs index 4f7b56e..bbc6d2d 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs | |||
@@ -65,6 +65,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
65 | void osOpenRemoteDataChannel(string channel); | 65 | void osOpenRemoteDataChannel(string channel); |
66 | 66 | ||
67 | string osGetScriptEngineName(); | 67 | string osGetScriptEngineName(); |
68 | void osSetParcelMediaTime(double time); | ||
68 | 69 | ||
69 | } | 70 | } |
70 | } | 71 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 3e1c930..b7ff9b6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -581,5 +581,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
581 | return String.Empty; | 581 | return String.Empty; |
582 | } | 582 | } |
583 | } | 583 | } |
584 | |||
585 | |||
586 | //for testing purposes only | ||
587 | public void osSetParcelMediaTime(double time) | ||
588 | { | ||
589 | World.ParcelMediaSetTime((float)time); | ||
590 | } | ||
584 | } | 591 | } |
585 | } | 592 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index d55491c..87b3ef4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -66,5 +66,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
66 | void osSetRegionWaterHeight(double height); | 66 | void osSetRegionWaterHeight(double height); |
67 | 67 | ||
68 | string osGetScriptEngineName(); | 68 | string osGetScriptEngineName(); |
69 | void osSetParcelMediaTime(double time); | ||
69 | } | 70 | } |
70 | } | 71 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 90c4419..9d0c337 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -200,5 +200,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
200 | { | 200 | { |
201 | return m_OSSL_Functions.osGetScriptEngineName(); | 201 | return m_OSSL_Functions.osGetScriptEngineName(); |
202 | } | 202 | } |
203 | |||
204 | |||
205 | //for testing purposes only | ||
206 | public void osSetParcelMediaTime(double time) | ||
207 | { | ||
208 | m_OSSL_Functions.osSetParcelMediaTime(time); | ||
209 | } | ||
203 | } | 210 | } |
204 | } | 211 | } |