Commit Graph

193 Commits (8f892d0f36fda170a5cecf0aea89887d6d0e45ef)

Author SHA1 Message Date
Monroe Linden d6af2d0985 Fix for EXT-7414 (Jumping to a specific time in a video stream does not work in Viewer 2.)
This was a race condition.  In the repro case, LLViewerMediaImpl::seek() was getting called before the media source got a chance to be loaded (since the load is now delayed at least 1 frame due to the priority calculations), so the seek command was being dropped.

The fix is to save the seek time in mPreviousMediaTime in this case, and rearrange the code in LLViewerMediaImpl::loadURI() so that it gets used whenever it's non-zero.  I've also added similar code in LLViewerMediaImpl::pause() and LLViewerMediaImpl::start() to set mPreviousMediaState.  (If there are any cases where content wants parcel media to start out paused, they would have had a similar issue.)

Reviewed by Callum and Richard at http://codereview.lindenlab.com/2478002 .
2010-06-15 10:53:02 -07:00
Richard Linden 68ca9dc957 VI-49 FIX "_external" links should work in shared media
monroe already did most of this, just moved dialog for confirming opening external browser to common code that calls out to external browser
so no way to skip notification unless the user opts out
2010-05-27 18:26:06 -07:00
Richard Linden 1040c7039b merge 2010-05-25 10:15:09 -07:00
Monroe Linden 79f697ad51 Fix for EXT-5667 (support window.open() in shared media so google docs will work).
Moved the processing of clicks on _external and _blank targeted links from LLMediaCtrl to LLViewerMediaImpl.

Removed LLMediaCtrl::setOpenInExternalBrowser() since that functionality is available through the use of the _external target attribute in web content.

Removed LLMediaCtrl:: setOpenInInternalBrowser() since it was unimplemented and not used.

Made the webkit media plugin set llqtwebkit's window open behavior to WOB_SIMULATE_BLANK_HREF_CLICK.  This is #ifdefed out on Linux until we get a new Linux build of llqtwebkit.
2010-05-21 15:36:12 -07:00
Richard Linden e98a52a211 tweaked media attenuation to better match object sound attenuation 2010-05-20 14:00:56 -07:00
Richard Linden 889fa5e55d converted media volume falloff to proper 1/x^2 function
reviewed by leyla
2010-05-11 13:59:55 -07:00
Xiaohong Bao 1b82707771 Automated merge with ssh://hg.lindenlab.com/q/viewer-trunk 2010-04-30 22:52:40 -06:00
Leyla Farazha 7eaae1fe81 Merge 2010-04-30 16:01:36 -07:00
Leyla Farazha 07c207346f updated media attenuation function
reviewed by Richard
2010-04-30 15:59:59 -07:00
Leyla Farazha e2e31b1b6b Added min and max for media sound attenuation
reviewed by Richard
2010-04-30 13:26:25 -07:00
Xiaohong Bao 34e29fe712 add debug code for EXT-7011: crash at LLPluginClassMedia::idle [secondlife-bin llpluginclassmedia.cpp:158] 2010-04-29 12:24:46 -06:00
Monroe Linden 77b13dc2df Incorporate suggestions from Richard's review of the LLPlugin changes.
Use LLMutexLock (stack-based locker/unlocker) for the straightforward cases instead of explicit lock()/unlock().

There are still a couple of cases (one overlapping lock lifetime and two loops that unlock the mutex to call another function inside the loop) where I'm leaving explicit lock/unlock calls.

Rename LLPluginProcessParent::sPollThread to sReadThread, for consistency.

Made the LLPluginProcessParent destructor hold mIncomingQueueMutex while removing the instance from the global list -- this should prevent a possible race condition in LLPluginProcessParent::poll().

Removed a redundant check when calling LLPluginProcessParent::setUseReadThread().
2010-04-29 17:33:37 -07:00
Leyla Farazha b6ba0da7f5 Media sound attentuation first pass
reviewed by Richard
2010-04-28 17:48:05 -07:00
Monroe Linden dacc5afbf0 Architectural changes to LLPlugin message processing.
LLPluginProcessParent can now optionally use a separate thread for reading messages from plugin sockets.  If this is enabled, it will spawn a single thread and use apr_pollset_poll to wake up the thread when incoming data arrives instead of polling all the descriptors round-robin every frame.  This should be somewhat more efficient, and should also allow blocking requests from plugins to be serviced much more quickly (once we start using them).  This is currently disabled by default, until it's had a bit more focused testing on multiple platforms.

Hooked up the switch to use the message read thread to the PluginUseReadThread debug setting and an item in the Advanced menu in the viewer, and to a checkbox in the UI in llmediaplugintest.

Updated some debug logging in the plugin system to have appropriate tags and not log dire-looking warnings during normal operation.

LLPluginProcessParent now once again explicitly kills plugin processes (instead of just closing their sockets and waiting for them to exit).  The problem we were attempting to solve by not doing the kill (letting the webkit plugin write its cookie file on exit) has been solved another way.

LLPluginProcessParent::sendMessage() now attempts to write the outgoing message to the socket immediately instead of waiting for the next frame.  This should reduce the latency of sending plugin messages.

Added a separate fast timer for LLViewerMedia::updateMedia().
2010-04-27 17:25:01 -07:00
Dmitry Zaporozhan 1ce1e7f9a1 Fixed EXT-6542(normal) - [HARD CODED] - Land-Info, Medien: none/none needs to be localized
Added "DefaultMimeType" string to strings.xml to make "none/none" mime type localizable.
Replaced all occurrences of "none/none" string with call to static method.

Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/265/

--HG--
branch : product-engine
2010-04-20 11:11:33 +03:00
Monroe Linden 594612c5a2 Fix for incorrect handling of an OpenID url containing a port number
The code was using the "authority" part of the URL returned by LLURL when constructing the cookie's domain, which incorrectly included the port number.  This change makes sure any port number and username/password that might be in the authority are stripped from the string before handing it to the cookie code.

Reviewed by Gino at http://codereview.lindenlab.com/1297006
2010-04-14 17:01:53 -07:00
Tofu Linden 8dd6286309 merge from viewer-hotfix 2010-04-14 09:47:58 +01:00
Monroe Linden 8fa23739a1 Fix for EXT-6750 (disabled attachment media still plays).
LLViewerMediaImpl::shouldShowBasedOnClass() was always returning true for focused media.  This was incorrect, since it made click-focusing on media override the class-based disable preferences.

Reviewed by Callum at http://codereview.lindenlab.com/1178023
2010-04-13 13:18:54 -07:00
Xiaohong Bao 36987904d4 Automated merge with ssh://hg.lindenlab.com/q/viewer-trunk 2010-04-02 10:40:48 -06:00
Xiaohong Bao 8cd95bd12a add some debug code for EXT-5394: Crash in LLViewerMediaImpl::calculateInterest() 2010-04-02 10:33:20 -06:00
Richard Linden dcc5e0a4fa EXT-3531 - Ctrl-p doesn't work reliably on login
moved gEditMenuHandler handling to LLEditMenuHandler destructor
2010-04-01 15:48:56 -07:00
Tofu Linden ab79bf7aae Checker: CHECKED_RETURN
Function: LLViewerMediaImpl::createMediaSource()
File: /indra/newview/llviewermedia.cpp
2010-04-01 17:34:26 +01:00
Monroe Linden 5c19099622 Enable OpenID auth in the embedded webkit browser.
Extract openid_url and openid_token tokens from the login response in process_login_success_response() and send them to LLViewerMedia if they're present.

Added LLViewerMedia::openIDSetup() to receive openid_url and openid_token, and added code to LLViewerMedia to do a POST with LLHTTPClient, retrieve the resulting cookie, and push it into the central cookie store.  Also made sure the OpenID cookie gets re-added when the cookie store is cleared.

Added LLPluginCookieStore::setCookiesFromHost() to properly add a cookie that may not have a domain set.  Made LLPluginCookieStore::Cookie::parse() add missing domain and path fields to cookies as necessary.

Fixed an issue where carriage returns in the string passed to LLPluginCookieStore::setCookies() or LLPluginCookieStore::setCookiesFromHost() would cause a parse failure.

Reviewed by gino and callum at http://codereview.lindenlab.com/1254001
2010-03-31 13:53:40 -07:00
Loren Shih b6e7850c0a Merge 2010-03-29 12:30:09 -04:00
Loren Shih 58d76a9ecf EXT-6536 : Make LLVOAvatarSelf a singleton
Superficial cleanup to replace all instances of "gAgentAvatar" with "gAgentAvatarp".
2010-03-29 12:11:51 -04:00
Loren Shih 94e6e10739 EXT-6536 : Make LLVOAvatarSelf a singleton
Superficial cleanup to replace all instances of "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject" with "gAgentAvatar".
2010-03-29 12:00:26 -04:00
Monroe Linden cb7ea3f354 Fix "clear cookies" not clearing cookies in some cases
LLViewerMedia::clearAllCookies was sending "clear cookies" messages to all plugins and deleting cookie files, but it wasn't clearing the cookies in the central store.  It now does all of the above.
2010-03-26 18:21:10 -07:00
Monroe Linden 28e3190296 Fix a couple of minor issues with the central cookie storage code.
Made LLViewerMedia::clearAllCookies() delete the new per-user cookie file (userdir/plugin_cookies.txt) as well as the old one.

Made LLViewerMedia::loadCookieFile() send the clear_cookies message to all loaded plugins.
2010-03-26 16:19:34 -07:00
Monroe Linden 4e7838fb00 Implemented central storage mechanism for media plugin cookies.
Added LLPluginCookieStore, which manages the central list of cookies.

New Mac and Windows versions of llqtwebkit, built from the tip of the cookie-api branch on http://bitbucket.org/lindenlab/llqtwebkit/ (currently revision f35a5eab8c2f).

Added "set_cookies" and "cookie_set" messages to the media_browser message class in the plugin API, and made the webkit plugin use them appropriately.

Added methods to LLViewerMedia to read/write the cookie file and add/remove individual cookies.

Added hooks to read/write the cookie file (plugin_cookies.txt) in the same places as  the location history (idle_startup() in llstartup.cpp and LLAppViewer::cleanup(), respectively).

Reviewed by Richard at http://codereview.lindenlab.com/1006003
2010-03-26 15:39:21 -07:00
Xiaohong Bao 7bd603544e add some debug code for EXT-5394: Crash in LLViewerMediaImpl::calculateInterest() 2010-04-02 10:33:20 -06:00
Callum Prentice 40e04fdb3b Merge with tip 2010-03-19 09:46:24 -07:00
Monroe Linden 0c1ff8e876 Fix for EXT-6304: Shared media cookies cannot be deleted via Preferences
Added static member functions to LLViewerMedia: clearAllCookies(), clearAllCaches(), setCookiesEnabled(), and setProxyConfig().  These iterate through all loaded instances and send appropriate messages.

Also added a hack to clearAllCookies() to delete cookie files for all accounts, which should serve until we centralize cookie storage.

Made LLViewerMedia set the proxy config properly when creating new instances.  Callum is adding code to do something similar with the cookies enabled flag in a separate commit.

Removed get_web_media from llfloaterpreference.cpp and reworked everything that used it to use the new LLViewerMedia functions instead.

Reviewed by Callum at http://codereview.lindenlab.com/838003.
2010-03-18 17:59:14 -07:00
Callum Prentice cb7fbc8a20 EXT-6466 "Move "Enable Cookies" checkbox...", EXT-6402 "Add feature to disable Web plugins via prefs" and EXT-6401 "Add feature to disable Javascript via prefs"
Apologies for the multiple commit of Jiras - these changes are closely related and impossible to commit deparately
Reviewed by Monroe
2010-03-18 16:53:27 -07:00
Monroe Linden ce242821dc Added an "init" message in LLPLUGIN_MESSAGE_CLASS_MEDIA, and made LLPluginClassMedia queue it up before initializing its LLPluginProcessParent.
Made all existing plugins send their texture_params message from this init message instead of the LLPLUGIN_MESSAGE_CLASS_BASE "init" message.  (This ensures that they won't start to receive 'size_change' messages until after the init has happened.)
Added "set_user_data_path" and "set_language_code" messages to LLPluginClassMedia.
Made webkit plugin deal with the new messages, when they're sent before it receives the media "init".
Removed the user_data_path and language_code arguments from the init function calls throughout the hierarchy.
Made LLViewerMediaImpl queue up the language code and user data path messages before initializing the media.

Reviewed by Callum at http://codereview.lindenlab.com/687006 .
2010-03-16 16:42:31 -07:00
Callum Prentice d5e685306c (for B5) Fix for EXT-5823 "Include language in user-agent string" (implemented via JavaScript - not in ua string)
(for B5) Fix for EXT-5314 "Inworld Browser blanks out at credit card entry"
Note: also includes an update to install.xml that points to a new version of LLQtWebKit that is required for these fixes
2010-03-12 14:34:25 -08:00
skolb 78abe4f5ff Local merge 2010-03-08 14:54:54 -08:00
skolb f39a87ef83 https://jira.secondlife.com/browse/EXT-5884
Added code to support SLAPPS for Media on a Prim
Reviewed by Monroe and Callum via Code Collab (Review 143).
2010-03-08 14:54:19 -08:00
Callum Prentice 88cf648176 Merge with tip 2010-03-04 14:33:25 -08:00
Callum Prentice 2ce7807c9e Fix for EXT-5960 (Store media cookies per user rather than per viewer)
Reviewed by RN and MW
2010-03-04 14:31:10 -08:00
Monroe Linden 3614dc0073 Potential fix for EXT-5850 (Crash in LLPluginClassMedia::idle)
We don't actually have a repro for this bug, just a number of crash reports.

This potential fix makes an iterator loop safer in the face of the iterator changing during the loop.  See the jira for further details.

Reviewed by Richard at http://codereview.lindenlab.com/331008
2010-03-03 17:13:14 -08:00
skolb 2a58e320cb https://jira.secondlife.com/browse/EXT-5884
Added code to support SLAPPS for Media on a Prim
Reviewed by Monroe and Callum via Code Collab (Review 143).
2010-03-01 18:08:00 -08:00
angela 5fbf81d17e EXT-5410 Streaming audio does ignores preference setting. 2010-02-25 01:00:50 +08:00
angela e98d6a910a merg and resolve conflicts 2010-02-23 11:44:56 +08:00
angela 0eea585ef1 revert some changed from EXT-5410 but keep the changes for disabling streaming audio when music or media is disabled. reviewed by rick 2010-02-23 11:30:12 +08:00
Rick Pasetto 37291bea8d Follow-up from previous change based on code review #137 2010-02-22 19:25:51 -08:00
Rick Pasetto 50a99d5419 FIX (unposted bug): "hasMedia" and "hasAudio" no longer checks preferences: it's now up to callers to decide to do that
Review #137
2010-02-22 19:04:27 -08:00
Rick Pasetto dcfcf50d40 Fix (unposted bug): media "affordance" was not properly being disabled when media was disabled 2010-02-22 17:46:34 -08:00
angela 98a0c11da9 EXT-5410 Streaming audio does ignores preference setting. 2010-02-22 17:34:28 +08:00
Callum Prentice 77009a366f EXT-5363 webkit does not strip spaces off a typed-in URL
Reviewed by CB
2010-02-18 11:21:36 -08:00
Rick Pasetto 4dfed6e353 Automated merge with ssh://rick@hg.lindenlab.com/viewer/viewer-2-0 2010-02-16 15:43:11 -08:00