diff options
Diffstat (limited to 'linden/indra/llmedia/llmediamanager.h')
-rw-r--r-- | linden/indra/llmedia/llmediamanager.h | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/linden/indra/llmedia/llmediamanager.h b/linden/indra/llmedia/llmediamanager.h deleted file mode 100644 index dc832d5..0000000 --- a/linden/indra/llmedia/llmediamanager.h +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | /** | ||
2 | * @file llmediamanager.h | ||
3 | * @brief Manages instances of media impls | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2007-2009, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at | ||
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
22 | * | ||
23 | * By copying, modifying or distributing this software, you acknowledge | ||
24 | * that you have read and understood your obligations described above, | ||
25 | * and agree to abide by those obligations. | ||
26 | * | ||
27 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
28 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
29 | * COMPLETENESS OR PERFORMANCE. | ||
30 | * $/LicenseInfo$ | ||
31 | */ | ||
32 | |||
33 | #ifndef LLMEDIAMANAGER_H | ||
34 | #define LLMEDIAMANAGER_H | ||
35 | |||
36 | #include <map> | ||
37 | #include <set> | ||
38 | |||
39 | #include "llmediaimplcommon.h" | ||
40 | |||
41 | //////////////////////////////////////////////////////////////////////////////// | ||
42 | // | ||
43 | class LLMediaManagerData | ||
44 | { | ||
45 | public: | ||
46 | LLMediaManagerData() : | ||
47 | mBrowserParentWindow( 0 ), | ||
48 | mBrowserProfileDir( "" ), | ||
49 | mBrowserProfileName ( "" ) | ||
50 | { }; | ||
51 | |||
52 | void setBrowserApplicationDir( const std::string& browser_application_dir ) { mBrowserApplicationDir = browser_application_dir; }; | ||
53 | std::string& getBrowserApplicationDir() { return mBrowserApplicationDir; }; | ||
54 | |||
55 | void setBrowserComponentDir( const std::string& browser_component_dir ) { mBrowserComponentDir = browser_component_dir; }; | ||
56 | std::string& getBrowserComponentDir() { return mBrowserComponentDir; }; | ||
57 | |||
58 | void setBrowserParentWindow( void* browser_parent_window ) { mBrowserParentWindow = browser_parent_window; }; | ||
59 | void* getBrowserParentWindow() { return mBrowserParentWindow; }; | ||
60 | |||
61 | void setBrowserProfileDir( const std::string& browser_profile_dir ) { mBrowserProfileDir = browser_profile_dir; }; | ||
62 | std::string& getBrowserProfileDir() { return mBrowserProfileDir; }; | ||
63 | |||
64 | void setBrowserProfileName( const std::string& browser_profile_name ) { mBrowserProfileName = browser_profile_name; }; | ||
65 | std::string& getBrowserProfileName() { return mBrowserProfileName; }; | ||
66 | |||
67 | private: | ||
68 | void* mBrowserParentWindow; | ||
69 | std::string mBrowserProfileDir; | ||
70 | std::string mBrowserProfileName; | ||
71 | std::string mBrowserApplicationDir; | ||
72 | std::string mBrowserComponentDir; | ||
73 | }; | ||
74 | |||
75 | //////////////////////////////////////////////////////////////////////////////// | ||
76 | // | ||
77 | class LLMediaManager | ||
78 | { | ||
79 | public: | ||
80 | virtual ~LLMediaManager(); | ||
81 | |||
82 | // Special case early init for just web browser component | ||
83 | // so we can show login screen. See .cpp file for details. JC | ||
84 | static void initBrowser( LLMediaManagerData* init_data ); | ||
85 | |||
86 | static void initClass( LLMediaManagerData* init_data ); | ||
87 | static void cleanupClass(); | ||
88 | static LLMediaManager* getInstance(); | ||
89 | |||
90 | // We append the skin name to the browser user agent string, so | ||
91 | // we need to change it while the app is running, not just at | ||
92 | // init time. | ||
93 | // Must be called after initClass() above. | ||
94 | // *HACK: Breaks encapsulation model. JC | ||
95 | static void setBrowserUserAgent(std::string user_agent); | ||
96 | |||
97 | // Calls update on all media sources | ||
98 | static void updateClass(); | ||
99 | |||
100 | // Given an URL and mime_type, construct/destroy a playback engine for | ||
101 | // it (a "media impl"). | ||
102 | LLMediaBase* createSourceFromMimeType( std::string scheme, std::string mime_type ); | ||
103 | bool destroySource( LLMediaBase* media_impl ); | ||
104 | |||
105 | // mime type to impl mapping functions | ||
106 | bool addMimeTypeImplNameMap( std::string mime_type, std::string impl_name ); | ||
107 | std::string getImplNameFromMimeType( std::string mime_type ); | ||
108 | |||
109 | // Name accessor for querying type support | ||
110 | bool supportsMediaType( const std::string& impl_name, const std::string& scheme, const std::string& mime_type ); | ||
111 | |||
112 | // convenience functions for getting suggested texture sizes to hold various size media | ||
113 | static int textureWidthFromMediaWidth( int media_width ); | ||
114 | static int textureHeightFromMediaHeight( int media_height ); | ||
115 | |||
116 | private: | ||
117 | LLMediaManager(); | ||
118 | static LLMediaManager* sInstance; | ||
119 | |||
120 | typedef std::set< LLMediaBase* > media_impl_container_t; | ||
121 | media_impl_container_t mMediaImplContainer; | ||
122 | |||
123 | typedef std::map< std::string, std::string > mime_type_impl_name_container_t; | ||
124 | mime_type_impl_name_container_t mMimeTypeImplNameContainer; | ||
125 | }; | ||
126 | |||
127 | #endif // LLMEDIAMANAGER_H | ||