diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/media_plugins/quicktime/media_plugin_quicktime.cpp | 16 | ||||
-rw-r--r-- | indra/media_plugins/webkit/media_plugin_webkit.cpp | 15 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 15 | ||||
-rw-r--r-- | indra/newview/lldebugview.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfolderview.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llmediactrl.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llmediactrl.h | 1 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 62 | ||||
-rw-r--r-- | indra/newview/llviewermedia.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llvlcomposition.cpp | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_login.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_general.xml | 36 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 4 | ||||
-rw-r--r-- | indra/test_apps/llplugintest/llmediaplugintest.cpp | 18 |
17 files changed, 132 insertions, 94 deletions
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp index dac0509531..182fab69d0 100644 --- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp +++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp @@ -552,7 +552,7 @@ private: processState(); // see if title arrived and if so, update member variable with contents - checkTitle(); + //checkTitle(); // QT call to see if we are at the end - can't do with controller if ( IsMovieDone( mMovieHandle ) ) @@ -718,18 +718,24 @@ private: // find the size of the title ByteCount size; result = QTMetaDataGetItemValue( media_data_ref, item, NULL, 0, &size ); - if ( noErr != result || size <= 0 ) + if ( noErr != result || size <= 0 /*|| size > 1024 /* FIXME: arbitrary limit */ ) return false; // allocate some space and grab it - UInt8* item_data = new UInt8( size ); - memset( item_data, 0, size * sizeof( UInt8* ) ); + UInt8* item_data = new UInt8( size + 1 ); + memset( item_data, 0, ( size + 1 ) * sizeof( UInt8* ) ); result = QTMetaDataGetItemValue( media_data_ref, item, item_data, size, NULL ); if ( noErr != result ) + { + delete [] item_data; return false; + }; // save it - mMovieTitle = std::string( (char* )item_data ); + if ( strlen( (char*)item_data ) ) + mMovieTitle = std::string( (char* )item_data ); + else + mMovieTitle = ""; // clean up delete [] item_data; diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 1e79720f43..09348782a4 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -296,7 +296,7 @@ private: // virtual void onNavigateBegin(const EventType& event) { - if(mInitState > INIT_STATE_NAVIGATE_COMPLETE) + if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin"); message.setValue("uri", event.getEventUri()); @@ -304,7 +304,8 @@ private: setStatus(STATUS_LOADING); } - else if(mInitState == INIT_STATE_NAVIGATE_COMPLETE) + + if(mInitState == INIT_STATE_NAVIGATE_COMPLETE) { mInitState = INIT_STATE_WAIT_REDRAW; } @@ -315,7 +316,7 @@ private: // virtual void onNavigateComplete(const EventType& event) { - if(mInitState > INIT_STATE_NAVIGATE_COMPLETE) + if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete"); message.setValue("uri", event.getEventUri()); @@ -338,7 +339,7 @@ private: // virtual void onUpdateProgress(const EventType& event) { - if(mInitState > INIT_STATE_NAVIGATE_COMPLETE) + if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "progress"); message.setValueS32("percent", event.getIntValue()); @@ -350,7 +351,7 @@ private: // virtual void onStatusTextChange(const EventType& event) { - if(mInitState > INIT_STATE_NAVIGATE_COMPLETE) + if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "status_text"); message.setValue("status", event.getStringValue()); @@ -362,7 +363,7 @@ private: // virtual void onTitleChange(const EventType& event) { - if(mInitState > INIT_STATE_NAVIGATE_COMPLETE) + if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text"); message.setValue("name", event.getStringValue()); @@ -374,7 +375,7 @@ private: // virtual void onLocationChange(const EventType& event) { - if(mInitState > INIT_STATE_NAVIGATE_COMPLETE) + if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "location_changed"); message.setValue("uri", event.getEventUri()); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 48ba71f446..94a2ca16f4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4545,6 +4545,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>MediaPerformanceManagerDebug</key> + <map> + <key>Comment</key> + <string>Whether to show debug data for the media performance manager in the nearby media list.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>MemoryLogFrequency</key> <map> <key>Comment</key> @@ -6304,7 +6315,7 @@ <real>1.0</real> </map> - <key>RenderHighlightEnable</key> + <key>RenderHoverGlowEnable</key> <map> <key>Comment</key> <string>Show glow effect when hovering on interactive objects.</string> @@ -6313,7 +6324,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>RenderHighlightFadeTime</key> diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index 20dc4440c2..169a963d0d 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -79,7 +79,7 @@ void LLDebugView::init() r.set(150 - 25, rect.getHeight() - 50, rect.getWidth()/2 - 25, rect.getHeight() - 450); - r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f), + r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f), (S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f)); mFastTimerView = new LLFastTimerView(r); mFastTimerView->setFollowsTop(); @@ -87,7 +87,7 @@ void LLDebugView::init() mFastTimerView->setVisible(FALSE); // start invisible addChild(mFastTimerView); - r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f), + r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f), (S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f)); LLMemoryView::Params mp; mp.name("memory"); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 21458f83cd..4192c6a586 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -909,11 +909,7 @@ void LLFolderView::finishRenamingItem( void ) mRenameItem->rename( mRenamer->getText() ); } - mRenamer->setCommitOnFocusLost( FALSE ); - mRenamer->setFocus( FALSE ); - mRenamer->setVisible( FALSE ); - mRenamer->setCommitOnFocusLost( TRUE ); - gFocusMgr.setTopCtrl( NULL ); + gFocusMgr.setTopCtrl( NULL ); if( mRenameItem ) { diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 8f29f908e5..90c009887d 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -92,6 +92,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mStretchToFill( true ), mMaintainAspectRatio ( true ), mHideLoading (false), + mHidingInitialLoad (false), mDecoupleTextureSize ( false ), mTextureWidth ( 1024 ), mTextureHeight ( 1024 ) @@ -616,6 +617,11 @@ bool LLMediaCtrl::ensureMediaSourceExists() mMediaSource->setHomeURL(mHomePageUrl); mMediaSource->setVisible( getVisible() ); mMediaSource->addObserver( this ); + + if(mHideLoading) + { + mHidingInitialLoad = true; + } } else { @@ -685,7 +691,13 @@ void LLMediaCtrl::draw() { setFrequentUpdates( false ); }; - + + if(mHidingInitialLoad) + { + // If we're hiding loading, don't draw at all. + return; + } + // alpha off for this LLGLSUIDefault gls_ui; LLGLDisable gls_alphaTest( GL_ALPHA_TEST ); @@ -865,19 +877,15 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_NAVIGATE_BEGIN: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_BEGIN, url is " << self->getNavigateURI() << LL_ENDL; - if(mMediaSource && mHideLoading) - { - mMediaSource->suspendUpdates(true); - } }; break; case MEDIA_EVENT_NAVIGATE_COMPLETE: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL; - if(mMediaSource && mHideLoading) + if(mHidingInitialLoad) { - mMediaSource->suspendUpdates(false); + mHidingInitialLoad = false; } }; break; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 76ddc61ebf..f07513a3fd 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -188,6 +188,7 @@ public: bool mStretchToFill; bool mMaintainAspectRatio; bool mHideLoading; + bool mHidingInitialLoad; bool mDecoupleTextureSize; S32 mTextureWidth; S32 mTextureHeight; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index d49ea5109d..9c8fca3552 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -526,7 +526,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) } static LLCachedControl<bool> enable_highlight( - gSavedSettings, "RenderHighlightEnable", false); + gSavedSettings, "RenderHoverGlowEnable", false); LLDrawable* drawable = NULL; if (enable_highlight && show_highlight && object) { diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 70490d3a6e..3a7c54479b 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -32,6 +32,7 @@ #include "llviewerprecompiledheaders.h" +#include "llagent.h" #include "llviewermedia.h" #include "llviewermediafocus.h" #include "llmimetypes.h" @@ -571,6 +572,11 @@ bool LLViewerMedia::priorityComparitor(const LLViewerMediaImpl* i1, const LLView // Playable items sort above ones that wouldn't play even if they got high enough priority return false; } + else if(i1->getInterest() == i2->getInterest()) + { + // Generally this will mean both objects have zero interest. In this case, sort on distance. + return (i1->getProximityDistance() < i2->getProximityDistance()); + } else { // The object with the larger interest value should be earlier in the list, so we reverse the sense of the comparison here. @@ -578,6 +584,11 @@ bool LLViewerMedia::priorityComparitor(const LLViewerMediaImpl* i1, const LLView } } +static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2) +{ + return (i1->getProximityDistance() < i2->getProximityDistance()); +} + ////////////////////////////////////////////////////////////////////////////////////////// // static void LLViewerMedia::updateMedia() @@ -603,12 +614,9 @@ void LLViewerMedia::updateMedia() int impl_count_total = 0; int impl_count_interest_low = 0; int impl_count_interest_normal = 0; - int i = 0; - -#if 0 - LL_DEBUGS("PluginPriority") << "Sorted impls:" << llendl; -#endif - + + std::vector<LLViewerMediaImpl*> proximity_order; + U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal"); U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal"); U32 max_low = gSavedSettings.getU32("PluginInstancesLow"); @@ -714,23 +722,27 @@ void LLViewerMedia::updateMedia() } else { - // Other impls just get the same ordering as the priority list (for now). - pimpl->mProximity = i; + proximity_order.push_back(pimpl); } -#if 0 - LL_DEBUGS("PluginPriority") << " " << pimpl - << ", setting priority to " << new_priority - << (pimpl->hasFocus()?", HAS FOCUS":"") - << (pimpl->getUsedInUI()?", is UI":"") - << ", cpu " << pimpl->getCPUUsage() - << ", interest " << pimpl->getInterest() - << ", media url " << pimpl->getMediaURL() << llendl; -#endif - total_cpu += pimpl->getCPUUsage(); - - i++; + } + + if(gSavedSettings.getBOOL("MediaPerformanceManagerDebug")) + { + // Give impls the same ordering as the priority list + // they're already in the right order for this. + } + else + { + // Use a distance-based sort for proximity values. + std::stable_sort(proximity_order.begin(), proximity_order.end(), proximity_comparitor); + } + + // Transfer the proximity order to the proximity fields in the objects. + for(int i = 0; i < (int)proximity_order.size(); i++) + { + proximity_order[i]->mProximity = i; } LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << llendl; @@ -782,6 +794,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mIsDisabled(false), mIsParcelMedia(false), mProximity(-1), + mProximityDistance(0.0f), mMimeTypeProbe(NULL), mIsUpdated(false) { @@ -2109,6 +2122,15 @@ void LLViewerMediaImpl::calculateInterest() mInterest = 0.0f; } + // Calculate distance from the avatar, for use in the proximity calculation. + mProximityDistance = 0.0f; + if(!mObjectList.empty()) + { + // Just use the first object in the list. We could go through the list and find the closest object, but this should work well enough. + LLVector3d global_delta = gAgent.getPositionGlobal() - (*mObjectList.begin())->getPositionGlobal(); + mProximityDistance = global_delta.magVecSquared(); // use distance-squared because it's cheaper and sorts the same. + } + if(mNeedsMuteCheck) { // Check all objects this instance is associated with, and those objects' owners, against the mute list diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index a06079786e..f4afce6c4c 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -270,6 +270,7 @@ public: F64 getInterest() const { return mInterest; }; F64 getApproximateTextureInterest(); S32 getProximity() const { return mProximity; }; + F64 getProximityDistance() const { return mProximityDistance; }; // Mark this object as being used in a UI panel instead of on a prim // This will be used as part of the interest sorting algorithm. @@ -339,6 +340,7 @@ public: bool mIsDisabled; bool mIsParcelMedia; S32 mProximity; + F64 mProximityDistance; LLMimeDiscoveryResponder *mMimeTypeProbe; private: diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 85bc26c9c0..0d29efaedf 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2121,10 +2121,11 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level) llassert_always(mGLTexturep.notNull()) ; llassert_always(discard_level >= 0); llassert_always(mComponents > 0); + if (mRawImage.notNull()) { - llerrs << "called with existing mRawImage" << llendl; - mRawImage = NULL; + //mRawImage is in use by somebody else, do not delete it. + return NULL ; } if(mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= discard_level) diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index 999701ece1..6340189c93 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -287,17 +287,22 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, min_dim /= 2; } - mDetailTextures[i]->reloadRawImage(ddiscard) ; + BOOL delete_raw = (mDetailTextures[i]->reloadRawImage(ddiscard) != NULL) ; if(mDetailTextures[i]->getRawImageLevel() != ddiscard)//raw iamge is not ready, will enter here again later. { - mDetailTextures[i]->destroyRawImage() ; + if(delete_raw) + { + mDetailTextures[i]->destroyRawImage() ; + } lldebugs << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << llendl; return FALSE; } mRawImages[i] = mDetailTextures[i]->getRawImage() ; - mDetailTextures[i]->destroyRawImage() ; - + if(delete_raw) + { + mDetailTextures[i]->destroyRawImage() ; + } if (mDetailTextures[i]->getWidth(ddiscard) != BASE_SIZE || mDetailTextures[i]->getHeight(ddiscard) != BASE_SIZE || mDetailTextures[i]->getComponents() != 3) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index e98a6d57bb..181994a1bd 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2572,10 +2572,10 @@ name="Hover Glow Objects">
<menu_item_check.on_check
function="CheckControl"
- parameter="RenderHighlightEnable" />
+ parameter="RenderHoverGlowEnable" />
<menu_item_check.on_click
function="ToggleControl"
- parameter="RenderHighlightEnable" />
+ parameter="RenderHoverGlowEnable" />
</menu_item_check>
</menu>
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index cb5ec15387..a9a02e8fc7 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -27,6 +27,7 @@ border_visible="false" bottom="600" follows="all" + hide_loading="true" left="0" name="login_html" start_url="" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index a6ca73d4b7..6bb937e3c6 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -66,11 +66,7 @@ label="Italiano (Italian) - Beta" name="Italian" value="it" /> - <combo_box.item - enabled="true" - label="Magyar (Hungarian) - Beta" - name="Hungarian" - value="hu" /> + <combo_box.item enabled="true" label="Nederlands (Dutch) - Beta" @@ -86,36 +82,16 @@ label="Portugués (Portuguese) - Beta" name="Portugese" value="pt" /> - <combo_box.item - enabled="true" - label="Русский (Russian) - Beta" - name="Russian" - value="ru" /> - <combo_box.item - enabled="true" - label="Türkçe (Turkish) - Beta" - name="Turkish" - value="tr" /> - <combo_box.item - enabled="true" - label="Українська (Ukrainian) - Beta" - name="Ukrainian" - value="uk" /> - <combo_box.item - enabled="true" - label="中文 (简体) (Chinese) - Beta" - name="Chinese" - value="zh" /> + + + + <combo_box.item enabled="true" label="日本語 (Japanese) - Beta" name="(Japanese)" value="ja" /> - <combo_box.item - enabled="true" - label="한국어 (Korean) - Beta" - name="(Korean)" - value="ko" /> + <combo_box.item enabled="true" label="Test Language" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7e5c30a978..64cfdf2704 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -221,10 +221,12 @@ class WindowsManifest(ViewerManifest): def construct(self): super(WindowsManifest, self).construct() + + self.enable_crt_manifest_check() + # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) - self.enable_crt_manifest_check() # Plugin host application self.path(os.path.join(os.pardir, diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index d987915bb8..ee27ad77df 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -223,13 +223,16 @@ LLMediaPluginTest::LLMediaPluginTest( int app_window, int window_width, int wind resetView(); // initial media panel + //const int num_initial_panels = 1; + //for( int i = 0; i < num_initial_panels; ++i ) + //{ + // //addMediaPanel( mBookmarks[ rand() % ( mBookmarks.size() - 1 ) + 1 ].second ); + // addMediaPanel( mHomeWebUrl ); + //}; + +addMediaPanel( "http://chemicaljump.com/wp-content/uploads/2009/10/lth34/Proxy-8000.mp3" ); +addMediaPanel( "http://movies.apple.com/movies/sony_pictures/zombieland/zombieland-inttlr_h.320.mov" ); - const int num_initial_panels = 1; - for( int i = 0; i < num_initial_panels; ++i ) - { - //addMediaPanel( mBookmarks[ rand() % ( mBookmarks.size() - 1 ) + 1 ].second ); - addMediaPanel( mHomeWebUrl ); - }; } //////////////////////////////////////////////////////////////////////////////// @@ -1460,6 +1463,9 @@ std::string LLMediaPluginTest::mimeTypeFromUrl( std::string& url ) if ( url.find( ".txt" ) != std::string::npos ) // Apple Text descriptors mime_type = "video/quicktime"; else + if ( url.find( ".mp3" ) != std::string::npos ) // Apple Text descriptors + mime_type = "video/quicktime"; + else if ( url.find( "example://" ) != std::string::npos ) // Example plugin mime_type = "example/example"; |