diff options
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/cmake/CopyWinLibs.cmake | 174 | ||||
-rw-r--r-- | linden/indra/cmake/GStreamer.cmake | 62 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 12 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamervidplug.h | 2 | ||||
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 9 | ||||
-rw-r--r-- | linden/indra/newview/llfloatersnapshot.cpp | 116 | ||||
-rw-r--r-- | linden/install.xml | 55 |
7 files changed, 376 insertions, 54 deletions
diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake index 3d70c8f..fdfcb3f 100644 --- a/linden/indra/cmake/CopyWinLibs.cmake +++ b/linden/indra/cmake/CopyWinLibs.cmake | |||
@@ -6,6 +6,104 @@ | |||
6 | 6 | ||
7 | include(CMakeCopyIfDifferent) | 7 | include(CMakeCopyIfDifferent) |
8 | 8 | ||
9 | set(gst_plugin_debug_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/gstreamer-plugins") | ||
10 | set(gst_plugin_debug_files | ||
11 | libgstadder.dll | ||
12 | libgstalaw.dll | ||
13 | libgstaudioconvert.dll | ||
14 | libgstaudiorate.dll | ||
15 | libgstaudioresample.dll | ||
16 | libgstaudiotestsrc.dll | ||
17 | libgstautodetect.dll | ||
18 | libgstavi.dll | ||
19 | libgstcutter.dll | ||
20 | libgstdecodebin2.dll | ||
21 | libgstdecodebin.dll | ||
22 | libgstdirectdraw.dll | ||
23 | libgstdirectsound.dll | ||
24 | libgsteffectv.dll | ||
25 | libgstffmpeg.dll | ||
26 | libgstffmpegcolorspace.dll | ||
27 | libgstgdp.dll | ||
28 | libgstjpeg.dll | ||
29 | libgstmulaw.dll | ||
30 | libgstogg.dll | ||
31 | libgstplaybin.dll | ||
32 | libgstqtdemux.dll | ||
33 | libgstrtp.dll | ||
34 | libgstrtsp.dll | ||
35 | libgsttheora.dll | ||
36 | libgsttypefindfunctions.dll | ||
37 | libgstudp.dll | ||
38 | libgstvideobalance.dll | ||
39 | libgstvideobox.dll | ||
40 | libgstvideocrop.dll | ||
41 | libgstvideoflip.dll | ||
42 | libgstvideomixer.dll | ||
43 | libgstvideorate.dll | ||
44 | libgstvideoscale.dll | ||
45 | libgstvideotestsrc.dll | ||
46 | libgstvolume.dll | ||
47 | libgstvorbis.dll | ||
48 | ) | ||
49 | |||
50 | copy_if_different( | ||
51 | ${gst_plugin_debug_dir} | ||
52 | "${CMAKE_CURRENT_BINARY_DIR}/Debug/lib/gstreamer-plugins" | ||
53 | out_targets | ||
54 | ${gst_plugin_debug_files} | ||
55 | ) | ||
56 | set(all_targets ${all_targets} ${out_targets}) | ||
57 | |||
58 | set(gst_plugin_release_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/gstreamer-plugins") | ||
59 | set(gst_plugin_release_files | ||
60 | libgstadder.dll | ||
61 | libgstalaw.dll | ||
62 | libgstaudioconvert.dll | ||
63 | libgstaudiorate.dll | ||
64 | libgstaudioresample.dll | ||
65 | libgstaudiotestsrc.dll | ||
66 | libgstautodetect.dll | ||
67 | libgstavi.dll | ||
68 | libgstcutter.dll | ||
69 | libgstdecodebin2.dll | ||
70 | libgstdecodebin.dll | ||
71 | libgstdirectdraw.dll | ||
72 | libgstdirectsound.dll | ||
73 | libgsteffectv.dll | ||
74 | libgstffmpeg.dll | ||
75 | libgstffmpegcolorspace.dll | ||
76 | libgstgdp.dll | ||
77 | libgstjpeg.dll | ||
78 | libgstmulaw.dll | ||
79 | libgstogg.dll | ||
80 | libgstplaybin.dll | ||
81 | libgstqtdemux.dll | ||
82 | libgstrtp.dll | ||
83 | libgstrtsp.dll | ||
84 | libgsttheora.dll | ||
85 | libgsttypefindfunctions.dll | ||
86 | libgstudp.dll | ||
87 | libgstvideobalance.dll | ||
88 | libgstvideobox.dll | ||
89 | libgstvideocrop.dll | ||
90 | libgstvideoflip.dll | ||
91 | libgstvideomixer.dll | ||
92 | libgstvideorate.dll | ||
93 | libgstvideoscale.dll | ||
94 | libgstvideotestsrc.dll | ||
95 | libgstvolume.dll | ||
96 | libgstvorbis.dll | ||
97 | ) | ||
98 | |||
99 | copy_if_different( | ||
100 | ${gst_plugin_release_dir} | ||
101 | "${CMAKE_CURRENT_BINARY_DIR}/Release/lib/gstreamer-plugins" | ||
102 | out_targets | ||
103 | ${gst_plugin_release_files} | ||
104 | ) | ||
105 | set(all_targets ${all_targets} ${out_targets}) | ||
106 | |||
9 | set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") | 107 | set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32") |
10 | set(vivox_files | 108 | set(vivox_files |
11 | tntk.dll | 109 | tntk.dll |
@@ -38,6 +136,44 @@ set(debug_files | |||
38 | xpcom.dll | 136 | xpcom.dll |
39 | xul.dll | 137 | xul.dll |
40 | windbgdlg.exe | 138 | windbgdlg.exe |
139 | iconv.dll | ||
140 | libxml2.dll | ||
141 | libgio-2.0-0.dll | ||
142 | libglib-2.0-0.dll | ||
143 | libgmodule-2.0-0.dll | ||
144 | libgobject-2.0-0.dll | ||
145 | libgthread-2.0-0.dll | ||
146 | avcodec-51.dll | ||
147 | avformat-52.dll | ||
148 | avutil-49.dll | ||
149 | intl.dll | ||
150 | libgstapp-0.10.dll | ||
151 | libgstaudio-0.10.dll | ||
152 | libgstbase-0.10.dll | ||
153 | libgstcdda-0.10.dll | ||
154 | libgstcontroller-0.10.dll | ||
155 | libgstdataprotocol-0.10.dll | ||
156 | libgstdshow-0.10.dll | ||
157 | libgstfft-0.10.dll | ||
158 | libgstinterfaces-0.10.dll | ||
159 | libgstnet-0.10.dll | ||
160 | libgstnetbuffer-0.10.dll | ||
161 | libgstpbutils-0.10.dll | ||
162 | libgstreamer-0.10.dll | ||
163 | libgstriff-0.10.dll | ||
164 | libgstrtp-0.10.dll | ||
165 | libgstrtsp-0.10.dll | ||
166 | libgstsdp-0.10.dll | ||
167 | libgsttag-0.10.dll | ||
168 | libgstvideo-0.10.dll | ||
169 | libjpeg.dll | ||
170 | libmms.dll | ||
171 | liboil-0.3-0.dll | ||
172 | libpng13.dll | ||
173 | xvidcore.dll | ||
174 | zlib1.dll | ||
175 | ogg.dll | ||
176 | vorbis.dll | ||
41 | ) | 177 | ) |
42 | 178 | ||
43 | copy_if_different( | 179 | copy_if_different( |
@@ -74,6 +210,44 @@ set(release_files | |||
74 | ssl3.dll | 210 | ssl3.dll |
75 | xpcom.dll | 211 | xpcom.dll |
76 | xul.dll | 212 | xul.dll |
213 | iconv.dll | ||
214 | libxml2.dll | ||
215 | libgio-2.0-0.dll | ||
216 | libglib-2.0-0.dll | ||
217 | libgmodule-2.0-0.dll | ||
218 | libgobject-2.0-0.dll | ||
219 | libgthread-2.0-0.dll | ||
220 | avcodec-51.dll | ||
221 | avformat-52.dll | ||
222 | avutil-49.dll | ||
223 | intl.dll | ||
224 | libgstapp-0.10.dll | ||
225 | libgstaudio-0.10.dll | ||
226 | libgstbase-0.10.dll | ||
227 | libgstcdda-0.10.dll | ||
228 | libgstcontroller-0.10.dll | ||
229 | libgstdataprotocol-0.10.dll | ||
230 | libgstdshow-0.10.dll | ||
231 | libgstfft-0.10.dll | ||
232 | libgstinterfaces-0.10.dll | ||
233 | libgstnet-0.10.dll | ||
234 | libgstnetbuffer-0.10.dll | ||
235 | libgstpbutils-0.10.dll | ||
236 | libgstreamer-0.10.dll | ||
237 | libgstriff-0.10.dll | ||
238 | libgstrtp-0.10.dll | ||
239 | libgstrtsp-0.10.dll | ||
240 | libgstsdp-0.10.dll | ||
241 | libgsttag-0.10.dll | ||
242 | libgstvideo-0.10.dll | ||
243 | libjpeg.dll | ||
244 | libmms.dll | ||
245 | liboil-0.3-0.dll | ||
246 | libpng13.dll | ||
247 | xvidcore.dll | ||
248 | zlib1.dll | ||
249 | ogg.dll | ||
250 | vorbis.dll | ||
77 | ) | 251 | ) |
78 | 252 | ||
79 | copy_if_different( | 253 | copy_if_different( |
diff --git a/linden/indra/cmake/GStreamer.cmake b/linden/indra/cmake/GStreamer.cmake index 4369445..fc256a8 100644 --- a/linden/indra/cmake/GStreamer.cmake +++ b/linden/indra/cmake/GStreamer.cmake | |||
@@ -1,17 +1,61 @@ | |||
1 | # -*- cmake -*- | 1 | # -*- cmake -*- |
2 | include(Prebuilt) | 2 | include(Prebuilt) |
3 | 3 | ||
4 | if (STANDALONE) | ||
5 | include(FindPkgConfig) | ||
6 | |||
7 | pkg_check_modules(GSTREAMER REQUIRED gstreamer-0.10) | ||
8 | pkg_check_modules(GSTREAMER_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10) | ||
9 | elseif (LINUX) | ||
10 | use_prebuilt_binary(gstreamer) | ||
11 | # possible libxml should have its own .cmake file instead | 4 | # possible libxml should have its own .cmake file instead |
12 | use_prebuilt_binary(libxml) | 5 | use_prebuilt_binary(libxml) |
13 | set(GSTREAMER_FOUND ON FORCE BOOL) | 6 | set(GSTREAMER_FOUND ON FORCE BOOL) |
14 | set(GSTREAMER_PLUGINS_BASE_FOUND ON FORCE BOOL) | 7 | set(GSTREAMER_PLUGINS_BASE_FOUND ON FORCE BOOL) |
8 | use_prebuilt_binary(gstreamer) | ||
9 | |||
10 | if (WINDOWS) | ||
11 | |||
12 | use_prebuilt_binary(libxml) | ||
13 | set(GSTREAMER_FOUND ON FORCE BOOL) | ||
14 | set(GSTREAMER_INCLUDE_DIRS | ||
15 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib | ||
16 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gio | ||
17 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gobject | ||
18 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2 | ||
19 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/iconv | ||
20 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gst | ||
21 | ) | ||
22 | |||
23 | set(GSTREAMER_LIBRARIES | ||
24 | glib-2.0 | ||
25 | gio-2.0 | ||
26 | gmodule-2.0 | ||
27 | gobject-2.0 | ||
28 | gthread-2.0 | ||
29 | libgstvideo-0.10 | ||
30 | libgsttag-0.10 | ||
31 | libgstsdp-0.10 | ||
32 | libgstrtsp-0.10 | ||
33 | libgstrtp-0.10 | ||
34 | libgstriff-0.10 | ||
35 | libgstreamer-0.10 | ||
36 | libgstpbutils-0.10 | ||
37 | libgstnetbuffer-0.10 | ||
38 | libgstnet-0.10 | ||
39 | libgstinterfaces-0.10 | ||
40 | libgstdshow-0.10 | ||
41 | libgstdataprotocol-0.10 | ||
42 | libgstcontroller-0.10 | ||
43 | libgstbase-0.10 | ||
44 | libgstaudio-0.10 | ||
45 | libgstapp-0.10 | ||
46 | libxml2 | ||
47 | libxml2_a | ||
48 | libxml2_a_dll | ||
49 | iconv | ||
50 | iconv_a | ||
51 | ) | ||
52 | |||
53 | else (WINDOWS) | ||
54 | |||
55 | include(FindPkgConfig) | ||
56 | |||
57 | pkg_check_modules(GSTREAMER REQUIRED gstreamer-0.10) | ||
58 | pkg_check_modules(GSTREAMER_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10) | ||
15 | set(GSTREAMER_INCLUDE_DIRS | 59 | set(GSTREAMER_INCLUDE_DIRS |
16 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10 | 60 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10 |
17 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0 | 61 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0 |
@@ -19,6 +63,7 @@ elseif (LINUX) | |||
19 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/gobject | 63 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/gobject |
20 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2 | 64 | ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2 |
21 | ) | 65 | ) |
66 | |||
22 | # We don't need to explicitly link against gstreamer itself, because | 67 | # We don't need to explicitly link against gstreamer itself, because |
23 | # LLMediaImplGStreamer probes for the system's copy at runtime. | 68 | # LLMediaImplGStreamer probes for the system's copy at runtime. |
24 | set(GSTREAMER_LIBRARIES | 69 | set(GSTREAMER_LIBRARIES |
@@ -29,7 +74,8 @@ elseif (LINUX) | |||
29 | rt | 74 | rt |
30 | glib-2.0 | 75 | glib-2.0 |
31 | ) | 76 | ) |
32 | endif (STANDALONE) | 77 | |
78 | endif (WINDOWS) | ||
33 | 79 | ||
34 | if (GSTREAMER_FOUND AND GSTREAMER_PLUGINS_BASE_FOUND) | 80 | if (GSTREAMER_FOUND AND GSTREAMER_PLUGINS_BASE_FOUND) |
35 | set(GSTREAMER ON CACHE BOOL "Build with GStreamer streaming media support.") | 81 | set(GSTREAMER ON CACHE BOOL "Build with GStreamer streaming media support.") |
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index d889f6f..18afc45 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp | |||
@@ -248,7 +248,9 @@ static const char* get_gst_state_name(GstState state) | |||
248 | //static | 248 | //static |
249 | gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gpointer data) | 249 | gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gpointer data) |
250 | { | 250 | { |
251 | #ifdef LL_GST_REPORT_STATE_CHANGES | ||
251 | LL_DEBUGS("MediaCallback") << "Got GST message type: " << LLGST_MESSAGE_TYPE_NAME (message) << LL_ENDL; | 252 | LL_DEBUGS("MediaCallback") << "Got GST message type: " << LLGST_MESSAGE_TYPE_NAME (message) << LL_ENDL; |
253 | #endif | ||
252 | 254 | ||
253 | LLMediaImplGStreamer *impl = (LLMediaImplGStreamer*)data; | 255 | LLMediaImplGStreamer *impl = (LLMediaImplGStreamer*)data; |
254 | 256 | ||
@@ -261,7 +263,9 @@ gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gp | |||
261 | { | 263 | { |
262 | gint percent = 0; | 264 | gint percent = 0; |
263 | llgst_message_parse_buffering(message, &percent); | 265 | llgst_message_parse_buffering(message, &percent); |
266 | #ifdef LL_GST_REPORT_STATE_CHANGES | ||
264 | LL_DEBUGS("MediaBuffering") << "GST buffering: " << percent << "%%" << LL_ENDL; | 267 | LL_DEBUGS("MediaBuffering") << "GST buffering: " << percent << "%%" << LL_ENDL; |
268 | #endif | ||
265 | LLMediaEvent event( impl, percent ); | 269 | LLMediaEvent event( impl, percent ); |
266 | impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event ); | 270 | impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event ); |
267 | } | 271 | } |
@@ -286,11 +290,15 @@ gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gp | |||
286 | case GST_STATE_VOID_PENDING: | 290 | case GST_STATE_VOID_PENDING: |
287 | break; | 291 | break; |
288 | case GST_STATE_NULL: | 292 | case GST_STATE_NULL: |
293 | #ifdef LL_GST_REPORT_STATE_CHANGES | ||
289 | LL_DEBUGS("MediaImpl") << "State changed to NULL" << LL_ENDL; | 294 | LL_DEBUGS("MediaImpl") << "State changed to NULL" << LL_ENDL; |
295 | #endif | ||
290 | if (impl->getState() == GST_STATE_PLAYING) | 296 | if (impl->getState() == GST_STATE_PLAYING) |
291 | { // We got stoped by gstremer... | 297 | { // We got stoped by gstremer... |
292 | impl->play(); | 298 | impl->play(); |
299 | #ifdef LL_GST_REPORT_STATE_CHANGES | ||
293 | LL_DEBUGS("MediaImpl") << "Trying to restart." << LL_ENDL; | 300 | LL_DEBUGS("MediaImpl") << "Trying to restart." << LL_ENDL; |
301 | #endif | ||
294 | } | 302 | } |
295 | break; | 303 | break; |
296 | case GST_STATE_READY: | 304 | case GST_STATE_READY: |
@@ -476,7 +484,9 @@ bool LLMediaImplGStreamer::updateMedia() | |||
476 | #endif | 484 | #endif |
477 | || NULL == mPlaybin) | 485 | || NULL == mPlaybin) |
478 | { | 486 | { |
487 | #ifdef LL_GST_REPORT_STATE_CHANGES | ||
479 | LL_DEBUGS("MediaImpl") << "dead media..." << LL_ENDL; | 488 | LL_DEBUGS("MediaImpl") << "dead media..." << LL_ENDL; |
489 | #endif | ||
480 | return false; | 490 | return false; |
481 | } | 491 | } |
482 | 492 | ||
@@ -528,7 +538,9 @@ bool LLMediaImplGStreamer::updateMedia() | |||
528 | GST_OBJECT_LOCK(mVideoSink); | 538 | GST_OBJECT_LOCK(mVideoSink); |
529 | if (mVideoSink->retained_frame_ready) | 539 | if (mVideoSink->retained_frame_ready) |
530 | { | 540 | { |
541 | #ifdef LL_GST_REPORT_STATE_CHANGES | ||
531 | LL_DEBUGS("MediaImpl") <<"NEW FRAME " << LL_ENDL; | 542 | LL_DEBUGS("MediaImpl") <<"NEW FRAME " << LL_ENDL; |
543 | #endif | ||
532 | if (mVideoSink->retained_frame_width != getMediaWidth() || | 544 | if (mVideoSink->retained_frame_width != getMediaWidth() || |
533 | mVideoSink->retained_frame_height != getMediaHeight()) | 545 | mVideoSink->retained_frame_height != getMediaHeight()) |
534 | // *TODO: also check for change in format | 546 | // *TODO: also check for change in format |
diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.h b/linden/indra/llmedia/llmediaimplgstreamervidplug.h index 026a52d..88caf3b 100644 --- a/linden/indra/llmedia/llmediaimplgstreamervidplug.h +++ b/linden/indra/llmedia/llmediaimplgstreamervidplug.h | |||
@@ -38,7 +38,7 @@ extern "C" { | |||
38 | #include <gst/gst.h> | 38 | #include <gst/gst.h> |
39 | #include <gst/video/video.h> | 39 | #include <gst/video/video.h> |
40 | #include <gst/video/gstvideosink.h> | 40 | #include <gst/video/gstvideosink.h> |
41 | #include <gthread.h> | 41 | #include <glib/gthread.h> |
42 | } | 42 | } |
43 | 43 | ||
44 | G_BEGIN_DECLS | 44 | G_BEGIN_DECLS |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 4bb235e..15ce1a3 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -334,14 +334,11 @@ void LLAppViewer::gst_plugin_path() | |||
334 | { | 334 | { |
335 | LL_INFOS("InitInfo") << "Imprudence is installed at " << buffer << LL_ENDL; | 335 | LL_INFOS("InitInfo") << "Imprudence is installed at " << buffer << LL_ENDL; |
336 | 336 | ||
337 | char plugin_path[255]; | 337 | std::string plugin_path = "GST_PLUGIN_PATH=" + std::string(buffer) + "\\lib\\gstreamer-plugins"; |
338 | strcpy (plugin_path,"GST_PLUGIN_PATH="); | ||
339 | strcat (plugin_path,buffer); | ||
340 | strcat (plugin_path,"\\lib"); | ||
341 | 338 | ||
342 | // Place GST_PLUGIN_PATH in the environment settings for imprudence.exe | 339 | // Place GST_PLUGIN_PATH in the environment settings for imprudence.exe |
343 | putenv(plugin_path); | 340 | const char* gst_plugin_path = plugin_path.c_str(); |
344 | 341 | putenv(gst_plugin_path); | |
345 | LL_INFOS("InitInfo") << "GST_PLUGIN_PATH set to " << getenv("GST_PLUGIN_PATH") << LL_ENDL; | 342 | LL_INFOS("InitInfo") << "GST_PLUGIN_PATH set to " << getenv("GST_PLUGIN_PATH") << LL_ENDL; |
346 | } | 343 | } |
347 | #endif //LL_WINDOWS | 344 | #endif //LL_WINDOWS |
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index 6e66103..f5f6c8e 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp | |||
@@ -763,22 +763,24 @@ void LLSnapshotLivePreview::onIdle( void* snapshot_preview ) | |||
763 | previewp->getWindow()->incBusyCount(); | 763 | previewp->getWindow()->incBusyCount(); |
764 | previewp->mImageScaled[previewp->mCurImageIndex] = FALSE; | 764 | previewp->mImageScaled[previewp->mCurImageIndex] = FALSE; |
765 | 765 | ||
766 | // grab the raw image and encode it into desired format | 766 | int res = 1; |
767 | res = (gSavedSettings.getBOOL("HighResSnapshot") && previewp->getSnapshotType() == SNAPSHOT_LOCAL) ? 2 : 1; | ||
768 | |||
767 | if(gViewerWindow->rawSnapshot( | 769 | if(gViewerWindow->rawSnapshot( |
768 | previewp->mPreviewImage, | 770 | previewp->mPreviewImage, |
769 | previewp->mWidth[previewp->mCurImageIndex], | 771 | previewp->mWidth[previewp->mCurImageIndex]*res, |
770 | previewp->mHeight[previewp->mCurImageIndex], | 772 | previewp->mHeight[previewp->mCurImageIndex]*res, |
771 | previewp->mKeepAspectRatio,//gSavedSettings.getBOOL("KeepAspectForSnapshot"), | 773 | previewp->mKeepAspectRatio, |
772 | previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_TEXTURE, | 774 | previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_TEXTURE, |
773 | gSavedSettings.getBOOL("RenderUIInSnapshot"), | 775 | gSavedSettings.getBOOL("RenderUIInSnapshot"), |
774 | FALSE, | 776 | FALSE, |
775 | previewp->mSnapshotBufferType, | 777 | previewp->mSnapshotBufferType, |
776 | previewp->getMaxImageSize())) | 778 | previewp->getMaxImageSize())) |
777 | { | 779 | { |
778 | previewp->mPreviewImageEncoded->resize( | 780 | previewp->mPreviewImageEncoded->resize( |
779 | previewp->mPreviewImage->getWidth(), | 781 | previewp->mPreviewImage->getWidth(), |
780 | previewp->mPreviewImage->getHeight(), | 782 | previewp->mPreviewImage->getHeight(), |
781 | previewp->mPreviewImage->getComponents()); | 783 | previewp->mPreviewImage->getComponents()); |
782 | 784 | ||
783 | if(previewp->getSnapshotType() == SNAPSHOT_TEXTURE) | 785 | if(previewp->getSnapshotType() == SNAPSHOT_TEXTURE) |
784 | { | 786 | { |
@@ -797,14 +799,24 @@ void LLSnapshotLivePreview::onIdle( void* snapshot_preview ) | |||
797 | formatted->decode(previewp->mPreviewImageEncoded, 0); | 799 | formatted->decode(previewp->mPreviewImageEncoded, 0); |
798 | } | 800 | } |
799 | } | 801 | } |
800 | else | 802 | else if(previewp->getSnapshotType() == SNAPSHOT_POSTCARD) |
801 | { | 803 | { |
802 | // delete any existing image | ||
803 | previewp->mFormattedImage = NULL; | 804 | previewp->mFormattedImage = NULL; |
804 | // now create the new one of the appropriate format. | ||
805 | // note: postcards hardcoded to use jpeg always. | 805 | // note: postcards hardcoded to use jpeg always. |
806 | LLFloaterSnapshot::ESnapshotFormat format = previewp->getSnapshotType() == SNAPSHOT_POSTCARD | 806 | previewp->mFormattedImage = new LLImageJPEG(previewp->mSnapshotQuality); |
807 | ? LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG : previewp->getSnapshotFormat(); | 807 | |
808 | if(previewp->mFormattedImage->encode(previewp->mPreviewImage, 0)) | ||
809 | { | ||
810 | previewp->mDataSize = previewp->mFormattedImage->getDataSize(); | ||
811 | previewp->mFormattedImage->decode(previewp->mPreviewImageEncoded, 0); | ||
812 | } | ||
813 | } | ||
814 | else //SNAPSHOT_LOCAL | ||
815 | { | ||
816 | previewp->mFormattedImage = NULL; | ||
817 | // save snapshot using the appropriate format. | ||
818 | LLFloaterSnapshot::ESnapshotFormat format = previewp->getSnapshotFormat(); | ||
819 | |||
808 | switch(format) | 820 | switch(format) |
809 | { | 821 | { |
810 | case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: | 822 | case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: |
@@ -864,16 +876,16 @@ void LLSnapshotLivePreview::onIdle( void* snapshot_preview ) | |||
864 | previewp->mPosTakenGlobal = gAgent.getCameraPositionGlobal(); | 876 | previewp->mPosTakenGlobal = gAgent.getCameraPositionGlobal(); |
865 | previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame | 877 | previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame |
866 | } | 878 | } |
867 | } | 879 | previewp->getWindow()->decBusyCount(); |
868 | previewp->getWindow()->decBusyCount(); | 880 | // only show fullscreen preview when in freeze frame mode |
869 | // only show fullscreen preview when in freeze frame mode | 881 | previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame")); |
870 | previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame")); | 882 | previewp->mSnapshotDelayTimer.stop(); |
871 | previewp->mSnapshotDelayTimer.stop(); | 883 | previewp->mSnapshotActive = FALSE; |
872 | previewp->mSnapshotActive = FALSE; | ||
873 | 884 | ||
874 | if(!previewp->getThumbnailUpToDate()) | 885 | if(!previewp->getThumbnailUpToDate()) |
875 | { | 886 | { |
876 | previewp->generateThumbnailImage() ; | 887 | previewp->generateThumbnailImage() ; |
888 | } | ||
877 | } | 889 | } |
878 | } | 890 | } |
879 | 891 | ||
@@ -1106,10 +1118,6 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) | |||
1106 | { | 1118 | { |
1107 | LLSnapshotLivePreview* previewp = getPreviewView(floaterp); | 1119 | LLSnapshotLivePreview* previewp = getPreviewView(floaterp); |
1108 | 1120 | ||
1109 | LLSnapshotLivePreview::ESnapshotType shot_type = getTypeIndex(floaterp); | ||
1110 | if (shot_type != LLSnapshotLivePreview::SNAPSHOT_LOCAL) | ||
1111 | gSavedSettings.setBOOL("HighResSnapshot", FALSE); | ||
1112 | |||
1113 | S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ; | 1121 | S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ; |
1114 | 1122 | ||
1115 | LLComboBox* combo; | 1123 | LLComboBox* combo; |
@@ -1457,8 +1465,11 @@ void LLFloaterSnapshot::Impl::onClickHighResCheck(LLUICtrl *ctrl, void* data) | |||
1457 | LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; | 1465 | LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; |
1458 | if (view) | 1466 | if (view) |
1459 | { | 1467 | { |
1460 | BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot"); | 1468 | if (gSavedSettings.getBOOL("RenderUIInSnapshot")) |
1461 | if (ui_in_snapshot) gSavedSettings.setBOOL("RenderUIInSnapshot", FALSE); | 1469 | { |
1470 | gSavedSettings.setBOOL("RenderUIInSnapshot", FALSE); | ||
1471 | checkAutoSnapshot(getPreviewView(view), TRUE); | ||
1472 | } | ||
1462 | view->childSetEnabled("ui_check", !check->get()); | 1473 | view->childSetEnabled("ui_check", !check->get()); |
1463 | checkAutoSnapshot(getPreviewView(view), TRUE); | 1474 | checkAutoSnapshot(getPreviewView(view), TRUE); |
1464 | } | 1475 | } |
@@ -2031,22 +2042,53 @@ void LLFloaterSnapshot::draw() | |||
2031 | } | 2042 | } |
2032 | 2043 | ||
2033 | BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot"); | 2044 | BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot"); |
2045 | BOOL high_res_snapshot = gSavedSettings.getBOOL("HighResSnapshot"); | ||
2034 | 2046 | ||
2035 | if (previewp->getSnapshotType() != LLSnapshotLivePreview::SNAPSHOT_LOCAL) | 2047 | if(ui_in_snapshot && high_res_snapshot) |
2036 | { | 2048 | { |
2049 | llwarns << "Both RenderUIInSnapshot and HighResSnapshot enabled (prolly screwed with the debug settings). Resetting them." << llendl; | ||
2050 | gSavedSettings.setBOOL("HighResSnapshot", FALSE); | ||
2051 | gSavedSettings.setBOOL("RenderUIInSnapshot", FALSE); | ||
2037 | childSetValue("high_res_check", FALSE); | 2052 | childSetValue("high_res_check", FALSE); |
2053 | childSetEnabled("high_res_check", TRUE); | ||
2054 | childSetValue("ui_check", FALSE); | ||
2038 | childSetEnabled("ui_check", TRUE); | 2055 | childSetEnabled("ui_check", TRUE); |
2056 | ui_in_snapshot = FALSE; | ||
2057 | high_res_snapshot = FALSE; | ||
2039 | } | 2058 | } |
2040 | else | 2059 | |
2060 | if(previewp->getSnapshotType() != LLSnapshotLivePreview::SNAPSHOT_LOCAL) | ||
2041 | { | 2061 | { |
2062 | childSetEnabled("high_res_check",FALSE); | ||
2063 | childSetVisible("high_res_check",FALSE); | ||
2064 | childSetEnabled("ui_check",TRUE); | ||
2042 | if (ui_in_snapshot) | 2065 | if (ui_in_snapshot) |
2043 | { | 2066 | { |
2044 | gSavedSettings.setBOOL("HighResSnapshot", FALSE); | 2067 | gSavedSettings.setBOOL("HighResSnapshot", FALSE); |
2045 | childSetEnabled("high_res_check", FALSE); | ||
2046 | } | 2068 | } |
2047 | } | 2069 | } |
2070 | else | ||
2071 | { | ||
2072 | childSetVisible("high_res_check",TRUE); | ||
2073 | if (high_res_snapshot) | ||
2074 | { | ||
2075 | childSetEnabled("high_res_check",TRUE); | ||
2076 | childSetEnabled("ui_check",FALSE); | ||
2077 | } | ||
2078 | else if (ui_in_snapshot) | ||
2079 | { | ||
2080 | childSetEnabled("ui_check",TRUE); | ||
2081 | childSetEnabled("high_res_check",FALSE); | ||
2082 | } | ||
2083 | else | ||
2084 | { | ||
2085 | childSetEnabled("ui_check",TRUE); | ||
2086 | childSetEnabled("high_res_check",TRUE); | ||
2087 | } | ||
2088 | } | ||
2089 | childSetValue("ui_check",gSavedSettings.getBOOL("RenderUIInSnapshot")); | ||
2090 | childSetValue("high_res_check",gSavedSettings.getBOOL("HighResSnapshot")); | ||
2048 | 2091 | ||
2049 | childSetValue("ui_check", ui_in_snapshot); | ||
2050 | childSetToolTip("ui_check", std::string("If selected shows the UI in the snapshot")); | 2092 | childSetToolTip("ui_check", std::string("If selected shows the UI in the snapshot")); |
2051 | } | 2093 | } |
2052 | 2094 | ||
diff --git a/linden/install.xml b/linden/install.xml index fd8f6ff..4e66880 100644 --- a/linden/install.xml +++ b/linden/install.xml | |||
@@ -390,6 +390,13 @@ | |||
390 | <key>url</key> | 390 | <key>url</key> |
391 | <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glib-2.0-linux-20080817.tar.bz2</uri> | 391 | <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glib-2.0-linux-20080817.tar.bz2</uri> |
392 | </map> | 392 | </map> |
393 | <key>windows</key> | ||
394 | <map> | ||
395 | <key>md5sum</key> | ||
396 | <string>B6B8B7A2CEB038C31BAD0EE4A1FBDF41</string> | ||
397 | <key>url</key> | ||
398 | <uri>http://imprudence.s3.amazonaws.com/extras/glib-2.18.3.1-windows-01262009.tar.bz2</uri> | ||
399 | </map> | ||
393 | </map> | 400 | </map> |
394 | </map> | 401 | </map> |
395 | <key>google</key> | 402 | <key>google</key> |
@@ -420,6 +427,28 @@ | |||
420 | <key>url</key> | 427 | <key>url</key> |
421 | <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/gstreamer-linux-20080613.tar.bz2</uri> | 428 | <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/gstreamer-linux-20080613.tar.bz2</uri> |
422 | </map> | 429 | </map> |
430 | <key>windows</key> | ||
431 | <map> | ||
432 | <key>md5sum</key> | ||
433 | <string>F4005971943595712212C4E0B9418DB5</string> | ||
434 | <key>url</key> | ||
435 | <uri>http://imprudence.s3.amazonaws.com/extras/gstreamer-0.10.21-windows-01262009.tar.bz2</uri> | ||
436 | </map> | ||
437 | </map> | ||
438 | </map> | ||
439 | <key>gstreamer-plugins</key> | ||
440 | <map> | ||
441 | <key>license</key> | ||
442 | <string>lgpl</string> | ||
443 | <key>packages</key> | ||
444 | <map> | ||
445 | <key>windows</key> | ||
446 | <map> | ||
447 | <key>md5sum</key> | ||
448 | <string>51C077A953620D9E55AFCAB0FEAE56FC</string> | ||
449 | <key>url</key> | ||
450 | <uri>http://imprudence.s3.amazonaws.com/extras/gstreamer-plugins-windows-01262009.tar.bz2</uri> | ||
451 | </map> | ||
423 | </map> | 452 | </map> |
424 | </map> | 453 | </map> |
425 | <key>gtk-atk-pango-glib</key> | 454 | <key>gtk-atk-pango-glib</key> |
@@ -481,6 +510,21 @@ | |||
481 | </map> | 510 | </map> |
482 | </map> | 511 | </map> |
483 | </map> | 512 | </map> |
513 | <key>iconv</key> | ||
514 | <map> | ||
515 | <key>license</key> | ||
516 | <string>gpl</string> | ||
517 | <key>packages</key> | ||
518 | <map> | ||
519 | <key>windows</key> | ||
520 | <map> | ||
521 | <key>md5sum</key> | ||
522 | <string>F20BDA1058BFD3AF7AC2C23EB3FD7F12</string> | ||
523 | <key>url</key> | ||
524 | <uri>http://imprudence.s3.amazonaws.com/extras/iconv-1.9.2-windows-01262009.tar.bz2</uri> | ||
525 | </map> | ||
526 | </map> | ||
527 | </map> | ||
484 | <key>jpeglib</key> | 528 | <key>jpeglib</key> |
485 | <map> | 529 | <map> |
486 | <key>copyright</key> | 530 | <key>copyright</key> |
@@ -632,6 +676,13 @@ anguage Infrstructure (CLI) international standard</string> | |||
632 | <key>url</key> | 676 | <key>url</key> |
633 | <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/libxml-2.6.24-linux-20080613.tar.bz2</uri> | 677 | <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/libxml-2.6.24-linux-20080613.tar.bz2</uri> |
634 | </map> | 678 | </map> |
679 | <key>windows</key> | ||
680 | <map> | ||
681 | <key>md5sum</key> | ||
682 | <string>E8DACED68B2165918B82C771D3480AA2</string> | ||
683 | <key>url</key> | ||
684 | <uri>http://imprudence.s3.amazonaws.com/extras/libxml2-2.7.2-windows-01262009.tar.bz2</uri> | ||
685 | </map> | ||
635 | </map> | 686 | </map> |
636 | </map> | 687 | </map> |
637 | <key>llmozlib</key> | 688 | <key>llmozlib</key> |
@@ -804,9 +855,9 @@ anguage Infrstructure (CLI) international standard</string> | |||
804 | <key>windows</key> | 855 | <key>windows</key> |
805 | <map> | 856 | <map> |
806 | <key>md5sum</key> | 857 | <key>md5sum</key> |
807 | <string>a0757244e3e6688fde2ffeea35cc1f96</string> | 858 | <string>80C8AA77BDE113635FEABCD0E342F3C0</string> |
808 | <key>url</key> | 859 | <key>url</key> |
809 | <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openal-windows-20080924.tar.bz2</uri> | 860 | <uri>http://imprudence.s3.amazonaws.com/extras/openal-soft-1.6.372-windows-01262009.tar.bz2</uri> |
810 | </map> | 861 | </map> |
811 | </map> | 862 | </map> |
812 | </map> | 863 | </map> |