Overview
sview.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Wed Oct 21 17:46:52 UTC 2015 - avvissu@yandex.ru
4
+
5
+- Update to 15.10:
6
+ * adds support of cubemaps in format 3:2 (two rows per 3 quad
7
+ sides)
8
+ * adds button to activate 360 panorama view on toolbar
9
+ * adds Czech translation files
10
+ * adds option to automatically workaround aspect ratio of
11
+ anamorphic 1080p and 720p videos
12
+
13
+-------------------------------------------------------------------
14
Sat May 19 00:00:00 UTC 2015 - avvissu@yandex.ru
15
16
- Initial package
17
sview.spec
Changed
62
1
2
#
3
4
5
-%define src_ver 15_08
6
+%define src_ver 15_10
7
+%define src_name sView
8
Name: sview
9
-Version: 15.08
10
+Version: 15.10
11
Release: 0
12
Summary: Stereoscopic media player
13
License: GPL-3.0+ and LGPL-3.0+
14
15
%build
16
sed -i '/^CXXFLAGS/s/$/\ %{optflags}/' Makefile
17
# Remove %%_smp_mflags to avoid compilation errors
18
-make V=1 -j1 EXTRA_LDFLAGS="-Wl,-rpath,%{_libdir}/sView"
19
+make V=1 -j1 EXTRA_LDFLAGS="-Wl,-rpath,%{_libdir}/%{src_name}"
20
21
%install
22
%make_install USR_LIB=%{_lib}
23
24
# It's not necessary
25
rm -rf %{buildroot}%{_datadir}/icons/hicolor/*/apps/%{name}.png
26
# Use the installation in pixmaps
27
-rm -rf %{buildroot}%{_datadir}/sView/icons/menu.xpm
28
-install -Dm 0644 share/sView/icons/menu.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
29
+rm -rf %{buildroot}%{_datadir}/%{src_name}/icons/menu.xpm
30
+install -Dm 0644 share/%{src_name}/icons/menu.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
31
# Libraries used by the app must be placed into subdirectory
32
-mv %{buildroot}%{_libdir}/*.so %{buildroot}%{_libdir}/sView
33
+mv %{buildroot}%{_libdir}/*.so %{buildroot}%{_libdir}/%{src_name}
34
35
%fdupes -s %{buildroot}%{_datadir}
36
37
-%suse_update_desktop_file -r sViewIV Graphics Viewer
38
-%suse_update_desktop_file -r sViewMP AudioVideo Video Player
39
+%suse_update_desktop_file -r %{src_name}IV Graphics Viewer
40
+%suse_update_desktop_file -r %{src_name}MP AudioVideo Video Player
41
42
%post
43
%icon_theme_cache_post
44
45
%files
46
%defattr(-,root,root)
47
%doc LICENSE license-gpl* license-lgpl*
48
-%{_bindir}/sView
49
-%{_libdir}/sView/
50
-%{_datadir}/applications/sViewIV.desktop
51
-%{_datadir}/applications/sViewMP.desktop
52
+%{_bindir}/%{src_name}
53
+%{_libdir}/%{src_name}/
54
+%{_datadir}/applications/%{src_name}IV.desktop
55
+%{_datadir}/applications/%{src_name}MP.desktop
56
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
57
%{_datadir}/pixmaps/%{name}.xpm
58
-%{_datadir}/sView/
59
+%{_datadir}/%{src_name}/
60
61
%changelog
62
sview-15_08.tar.gz/StGLWidgets/StGLImageFlatProgram.cpp
Deleted
79
1
2
-/**
3
- * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
4
- *
5
- * Distributed under the Boost Software License, Version 1.0.
6
- * See accompanying file license-boost.txt or copy at
7
- * http://www.boost.org/LICENSE_1_0.txt
8
- */
9
-
10
-#include <StGLWidgets/StGLImageFlatProgram.h>
11
-#include <StGL/StGLResources.h>
12
-#include <StFile/StRawFile.h>
13
-
14
-StGLImageFlatProgram::StGLImageFlatProgram()
15
-: StGLImageProgram("StGLImageFlatProgram") {
16
- const char V_SHADER_FLAT[] =
17
- "uniform mat4 uProjMat;\n"
18
- "uniform mat4 uModelMat;\n"
19
- "uniform vec4 uTexData;\n"
20
- "uniform vec4 uTexUVData;\n"
21
-
22
- "attribute vec4 vVertex;\n"
23
- "attribute vec2 vTexCoord;\n"
24
-
25
- "varying vec3 fTexCoord;\n"
26
- "varying vec3 fTexUVCoord;\n"
27
-
28
- "void main(void) {\n"
29
- " fTexCoord = vec3(uTexData.xy + vTexCoord * uTexData.zw, 0.0);\n"
30
- " fTexUVCoord = vec3(uTexUVData.xy + vTexCoord * uTexUVData.zw, 0.0);\n"
31
- " gl_Position = uProjMat * uModelMat * vVertex;\n"
32
- "}\n";
33
-
34
- const char V_SHADER_CUBEMAP[] =
35
- "uniform mat4 uProjMat;\n"
36
- "uniform mat4 uModelMat;\n"
37
- "uniform vec4 uTexData;\n"
38
- "uniform vec4 uTexUVData;\n"
39
-
40
- "attribute vec4 vVertex;\n"
41
- "attribute vec2 vTexCoord;\n"
42
-
43
- "varying vec3 fTexCoord;\n"
44
- "varying vec3 fTexUVCoord;\n"
45
-
46
- "void main(void) {\n"
47
- " gl_Position = vec4(vVertex.x, vVertex.y, 0.0, 1.0);\n"
48
- " fTexCoord = (uProjMat * gl_Position).xyz;"
49
- " fTexUVCoord = (uProjMat * gl_Position).xyz;"
50
- "}\n";
51
-
52
- const char F_SHADER_FLAT[] =
53
- "varying vec3 fTexCoord;\n"
54
- "varying vec3 fTexUVCoord;\n"
55
- // we split these functions for two reasons:
56
- // - to change function code (like color conversion);
57
- // - to optimize rendering on old hardware not supported conditions (GeForce FX for example).
58
- "vec4 getColor(in vec3 texCoord);\n"
59
- "void convertToRGB(inout vec4 theColor, in vec3 theTexUVCoord);\n"
60
- "void applyCorrection(inout vec4 theColor);\n"
61
- "void applyGamma(inout vec4 theColor);\n"
62
-
63
- "void main(void) {\n"
64
- // extract color from main texture
65
- " vec4 aColor = getColor(fTexCoord);\n"
66
- // convert from alien color model (like YUV) to RGB
67
- " convertToRGB(aColor, fTexUVCoord);\n"
68
- // color processing (saturation, brightness, etc)
69
- " applyCorrection(aColor);\n"
70
- // gamma correction
71
- " applyGamma(aColor);\n"
72
- " gl_FragColor = aColor;\n"
73
- "}";
74
-
75
- registerVertexShaderPart (0, VertMain_Normal, V_SHADER_FLAT);
76
- registerVertexShaderPart (0, VertMain_Cubemap, V_SHADER_CUBEMAP);
77
- registerFragmentShaderPart(FragSection_Main, 0, F_SHADER_FLAT);
78
-}
79
sview-15_08.tar.gz/StGLWidgets/StGLImageSphereProgram.cpp
Deleted
94
1
2
-/**
3
- * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
4
- *
5
- * Distributed under the Boost Software License, Version 1.0.
6
- * See accompanying file license-boost.txt or copy at
7
- * http://www.boost.org/LICENSE_1_0.txt
8
- */
9
-
10
-#include <StGLWidgets/StGLImageSphereProgram.h>
11
-
12
-#include <StGL/StGLResources.h>
13
-#include <StGLCore/StGLCore20.h>
14
-#include <StFile/StRawFile.h>
15
-
16
-#if defined(GL_ES_VERSION_2_0)
17
- #define THE_UTEXT_DATA "uniform mediump vec4 uTexData;\n"
18
-#else
19
- #define THE_UTEXT_DATA "uniform vec4 uTexData;\n"
20
-#endif
21
-
22
-StGLImageSphereProgram::StGLImageSphereProgram()
23
-: StGLImageProgram("StGLImageSphereProgram") {
24
- const char V_SHADER[] =
25
- "uniform mat4 uProjMat;\n"
26
- "uniform mat4 uModelMat;\n"
27
- "uniform vec4 uTexUVData;\n"
28
- THE_UTEXT_DATA
29
-
30
- "attribute vec4 vVertex;\n"
31
- "attribute vec2 vTexCoord;\n"
32
-
33
- "varying vec3 fTexCoord;\n"
34
- "varying vec3 fTexUVCoord;\n"
35
-
36
- "void main(void) {\n"
37
- " fTexCoord = vec3(uTexData.xy + vTexCoord * uTexData.zw, 0.0);\n"
38
- " fTexUVCoord = vec3(uTexUVData.xy + vTexCoord * uTexUVData.zw, 0.0);\n"
39
- " gl_Position = uProjMat * uModelMat * vVertex;\n"
40
- "}\n";
41
-
42
- const char F_SHADER[] =
43
- "varying vec3 fTexCoord;\n"
44
- "varying vec3 fTexUVCoord;\n"
45
-
46
- "vec4 getColor(in vec3 texCoord);\n"
47
- "void convertToRGB(inout vec4 color, in vec3 texUVCoord);\n"
48
- "void applyGamma(inout vec4 color);\n"
49
-
50
- "void main(void) {\n"
51
- " vec4 color = getColor(fTexCoord);\n"
52
- " convertToRGB(color, fTexUVCoord);\n"
53
- " applyGamma(color);\n"
54
- " gl_FragColor = color;\n"
55
- "}\n\n";
56
-
57
- const char F_SHADER_COLOR[] =
58
- "uniform sampler2D uTexture;\n"
59
- "uniform vec2 uTexSizePx;\n"
60
- "uniform vec2 uTexelSize;\n"
61
- THE_UTEXT_DATA
62
-
63
- "vec4 getColor(in vec3 texCoord) {\n"
64
- " vec2 txCoord_CC = floor(uTexSizePx * texCoord.xy) / uTexSizePx;\n"
65
- " vec2 aDiff = (texCoord.xy - txCoord_CC) * uTexSizePx;\n"
66
- " if(txCoord_CC.y >= (uTexData.w - uTexelSize.y)) {\n"
67
- " aDiff.y = 0.0;\n"
68
- " }\n"
69
- " vec2 diffSign = sign(aDiff);\n"
70
- " vec2 diffAbs = abs(aDiff);\n"
71
- " vec2 txCoord_R = txCoord_CC + diffSign * vec2(uTexelSize.x, 0.0);\n"
72
- " if(txCoord_R.x > (uTexData.z - uTexelSize.x)) {\n"
73
- " txCoord_R.x = uTexelSize.x;\n"
74
- " } else if(txCoord_R.x < uTexelSize.x) {\n"
75
- " txCoord_R.x = uTexData.z - uTexelSize.x;\n"
76
- " }\n"
77
- " vec4 color_CC = texture2D(uTexture, txCoord_CC);\n"
78
- " vec4 colorXX1 = mix(color_CC,\n"
79
- " texture2D(uTexture,\n"
80
- " txCoord_R),\n"
81
- " diffAbs.x);\n"
82
- " vec4 colorXX2 = mix(texture2D(uTexture,\n"
83
- " txCoord_CC + diffSign * vec2(0.0, uTexelSize.y)),\n"
84
- " texture2D(uTexture,\n"
85
- " txCoord_R + diffSign * vec2(0.0, uTexelSize.y)),\n"
86
- " diffAbs.x);\n"
87
- " return mix(colorXX1, colorXX2, diffAbs.y);\n"
88
- "}\n\n";
89
-
90
- registerVertexShaderPart (0, VertMain_Normal, V_SHADER);
91
- registerFragmentShaderPart(FragSection_Main, 0, F_SHADER);
92
- registerFragmentShaderPart(FragSection_GetColor, FragGetColor_Blend, F_SHADER_COLOR);
93
-}
94
sview-15_08.tar.gz/include/StGLWidgets/StGLImageFlatProgram.h
Deleted
24
1
2
-/**
3
- * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
4
- *
5
- * Distributed under the Boost Software License, Version 1.0.
6
- * See accompanying file license-boost.txt or copy at
7
- * http://www.boost.org/LICENSE_1_0.txt
8
- */
9
-
10
-#ifndef __StGLImageFlatProgram_h_
11
-#define __StGLImageFlatProgram_h_
12
-
13
-#include "StGLImageProgram.h"
14
-
15
-class StGLImageFlatProgram : public StGLImageProgram {
16
-
17
- public:
18
-
19
- ST_CPPEXPORT StGLImageFlatProgram();
20
-
21
-};
22
-
23
-#endif //__StGLImageFlatProgram_h_
24
sview-15_08.tar.gz/include/StGLWidgets/StGLImageSphereProgram.h
Deleted
24
1
2
-/**
3
- * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
4
- *
5
- * Distributed under the Boost Software License, Version 1.0.
6
- * See accompanying file license-boost.txt or copy at
7
- * http://www.boost.org/LICENSE_1_0.txt
8
- */
9
-
10
-#ifndef __StGLImageSphereProgram_h_
11
-#define __StGLImageSphereProgram_h_
12
-
13
-#include "StGLImageProgram.h"
14
-
15
-class StGLImageSphereProgram : public StGLImageProgram {
16
-
17
- public:
18
-
19
- ST_CPPEXPORT StGLImageSphereProgram();
20
-
21
-};
22
-
23
-#endif //__StGLImageSphereProgram_h_
24
sview-15_08.tar.gz/3rdparty/include/mongoose.c -> sview-15_10.tar.gz/3rdparty/include/mongoose.c
Changed
828
1
2
3
#if defined(__SYMBIAN32__)
4
#define NO_SSL // SSL is not supported
5
-#define NO_CGI // CGI is not supported
6
#define PATH_MAX FILENAME_MAX
7
#endif // __SYMBIAN32__
8
9
10
#include <direct.h>
11
#include <io.h>
12
#else // _WIN32_WCE
13
-#define NO_CGI // WinCE has no pipes
14
15
typedef long off_t;
16
17
18
19
#ifndef HAS_POLL
20
struct pollfd {
21
- int fd;
22
+ intptr_t fd;
23
short events;
24
short revents;
25
};
26
27
28
#include "mongoose.h"
29
30
-#ifdef USE_LUA
31
-#include <lua.h>
32
-#include <lauxlib.h>
33
-#endif
34
-
35
#define MONGOOSE_VERSION "3.7"
36
#define PASSWORDS_FILE_NAME ".htpasswd"
37
-#define CGI_ENVIRONMENT_SIZE 4096
38
-#define MAX_CGI_ENVIR_VARS 64
39
#define MG_BUF_LEN 8192
40
#define MAX_REQUEST_SIZE 16384
41
#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
42
43
return list;
44
}
45
46
-static int match_prefix(const char *pattern, int pattern_len, const char *str) {
47
+static int match_prefix(const char *pattern, size_t pattern_len, const char *str) {
48
const char *or_str;
49
- int i, j, len, res;
50
+ int j, len, res;
51
+ size_t i;
52
53
if ((or_str = (const char *) memchr(pattern, '|', pattern_len)) != NULL) {
54
res = match_prefix(pattern, or_str - pattern, str);
55
56
match_prefix(or_str + 1, (pattern + pattern_len) - (or_str + 1), str);
57
}
58
59
- i = j = 0;
60
+ j = 0;
61
+ i = 0;
62
res = -1;
63
for (; i < pattern_len; i++, j++) {
64
if (pattern[i] == '?' && str[j] != '\0') {
65
66
return LoadLibraryW(wbuf);
67
}
68
69
-#if !defined(NO_CGI)
70
-#define SIGKILL 0
71
-static int kill(pid_t pid, int sig_num) {
72
- (void) TerminateProcess(pid, sig_num);
73
- (void) CloseHandle(pid);
74
- return 0;
75
-}
76
-
77
-static void trim_trailing_whitespaces(char *s) {
78
- char *e = s + strlen(s) - 1;
79
- while (e > s && isspace(* (unsigned char *) e)) {
80
- *e-- = '\0';
81
- }
82
-}
83
-
84
-static pid_t spawn_process(struct mg_connection *conn, const char *prog,
85
- char *envblk, char *envp[], int fd_stdin,
86
- int fd_stdout, const char *dir) {
87
- HANDLE me;
88
- char *p, *interp, full_interp[PATH_MAX], full_dir[PATH_MAX],
89
- cmdline[PATH_MAX], buf[PATH_MAX];
90
- struct file file = STRUCT_FILE_INITIALIZER;
91
- STARTUPINFOA si = { sizeof(si) };
92
- PROCESS_INFORMATION pi = { 0 };
93
-
94
- envp = NULL; // Unused
95
-
96
- // TODO(lsm): redirect CGI errors to the error log file
97
- si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
98
- si.wShowWindow = SW_HIDE;
99
-
100
- me = GetCurrentProcess();
101
- DuplicateHandle(me, (HANDLE) _get_osfhandle(fd_stdin), me,
102
- &si.hStdInput, 0, TRUE, DUPLICATE_SAME_ACCESS);
103
- DuplicateHandle(me, (HANDLE) _get_osfhandle(fd_stdout), me,
104
- &si.hStdOutput, 0, TRUE, DUPLICATE_SAME_ACCESS);
105
-
106
- // If CGI file is a script, try to read the interpreter line
107
- interp = conn->ctx->config[CGI_INTERPRETER];
108
- if (interp == NULL) {
109
- buf[0] = buf[1] = '\0';
110
-
111
- // Read the first line of the script into the buffer
112
- snprintf(cmdline, sizeof(cmdline), "%s%c%s", dir, '/', prog);
113
- if (mg_fopen(conn, cmdline, "r", &file)) {
114
- p = (char *) file.membuf;
115
- mg_fgets(buf, sizeof(buf), &file, &p);
116
- mg_fclose(&file);
117
- buf[sizeof(buf) - 1] = '\0';
118
- }
119
-
120
- if (buf[0] == '#' && buf[1] == '!') {
121
- trim_trailing_whitespaces(buf + 2);
122
- } else {
123
- buf[2] = '\0';
124
- }
125
- interp = buf + 2;
126
- }
127
-
128
- if (interp[0] != '\0') {
129
- GetFullPathNameA(interp, sizeof(full_interp), full_interp, NULL);
130
- interp = full_interp;
131
- }
132
- GetFullPathNameA(dir, sizeof(full_dir), full_dir, NULL);
133
-
134
- mg_snprintf(conn, cmdline, sizeof(cmdline), "%s%s%s\\%s",
135
- interp, interp[0] == '\0' ? "" : " ", full_dir, prog);
136
-
137
- DEBUG_TRACE(("Running [%s]", cmdline));
138
- if (CreateProcessA(NULL, cmdline, NULL, NULL, TRUE,
139
- CREATE_NEW_PROCESS_GROUP, envblk, NULL, &si, &pi) == 0) {
140
- cry(conn, "%s: CreateProcess(%s): %d",
141
- __func__, cmdline, ERRNO);
142
- pi.hProcess = (pid_t) -1;
143
- }
144
-
145
- // Always close these to prevent handle leakage.
146
- (void) close(fd_stdin);
147
- (void) close(fd_stdout);
148
-
149
- (void) CloseHandle(si.hStdOutput);
150
- (void) CloseHandle(si.hStdInput);
151
- (void) CloseHandle(pi.hThread);
152
-
153
- return (pid_t) pi.hProcess;
154
-}
155
-#endif // !NO_CGI
156
-
157
static int set_non_blocking_mode(SOCKET sock) {
158
unsigned long on = 1;
159
return ioctlsocket(sock, FIONBIO, &on);
160
161
return pthread_create(&thread_id, &attr, func, param);
162
}
163
164
-#ifndef NO_CGI
165
-static pid_t spawn_process(struct mg_connection *conn, const char *prog,
166
- char *envblk, char *envp[], int fd_stdin,
167
- int fd_stdout, const char *dir) {
168
- pid_t pid;
169
- const char *interp;
170
-
171
- (void) envblk;
172
-
173
- if ((pid = fork()) == -1) {
174
- // Parent
175
- send_http_error(conn, 500, http_500_error, "fork(): %s", strerror(ERRNO));
176
- } else if (pid == 0) {
177
- // Child
178
- if (chdir(dir) != 0) {
179
- cry(conn, "%s: chdir(%s): %s", __func__, dir, strerror(ERRNO));
180
- } else if (dup2(fd_stdin, 0) == -1) {
181
- cry(conn, "%s: dup2(%d, 0): %s", __func__, fd_stdin, strerror(ERRNO));
182
- } else if (dup2(fd_stdout, 1) == -1) {
183
- cry(conn, "%s: dup2(%d, 1): %s", __func__, fd_stdout, strerror(ERRNO));
184
- } else {
185
- (void) dup2(fd_stdout, 2);
186
- (void) close(fd_stdin);
187
- (void) close(fd_stdout);
188
-
189
- // After exec, all signal handlers are restored to their default values,
190
- // with one exception of SIGCHLD. According to POSIX.1-2001 and Linux's
191
- // implementation, SIGCHLD's handler will leave unchanged after exec
192
- // if it was set to be ignored. Restore it to default action.
193
- signal(SIGCHLD, SIG_DFL);
194
-
195
- interp = conn->ctx->config[CGI_INTERPRETER];
196
- if (interp == NULL) {
197
- (void) execle(prog, prog, NULL, envp);
198
- cry(conn, "%s: execle(%s): %s", __func__, prog, strerror(ERRNO));
199
- } else {
200
- (void) execle(interp, interp, prog, NULL, envp);
201
- cry(conn, "%s: execle(%s %s): %s", __func__, interp, prog,
202
- strerror(ERRNO));
203
- }
204
- }
205
- exit(EXIT_FAILURE);
206
- }
207
-
208
- // Parent. Close stdio descriptors
209
- (void) close(fd_stdin);
210
- (void) close(fd_stdout);
211
-
212
- return pid;
213
-}
214
-#endif // !NO_CGI
215
-
216
static int set_non_blocking_mode(SOCKET sock) {
217
int flags;
218
219
220
return conn->ctx->stop_flag ? -1 : nread;
221
}
222
223
-int mg_read(struct mg_connection *conn, void *buf, size_t len) {
224
- int n, buffered_len, nread;
225
- const char *body;
226
-
227
- nread = 0;
228
- if (conn->consumed_content < conn->content_len) {
229
- // Adjust number of bytes to read.
230
- int64_t to_read = conn->content_len - conn->consumed_content;
231
- if (to_read < (int64_t) len) {
232
- len = (size_t) to_read;
233
- }
234
-
235
- // Return buffered data
236
- body = conn->buf + conn->request_len + conn->consumed_content;
237
- buffered_len = &conn->buf[conn->data_len] - body;
238
- if (buffered_len > 0) {
239
- if (len < (size_t) buffered_len) {
240
- buffered_len = (int) len;
241
- }
242
- memcpy(buf, body, (size_t) buffered_len);
243
- len -= buffered_len;
244
- conn->consumed_content += buffered_len;
245
- nread += buffered_len;
246
- buf = (char *) buf + buffered_len;
247
- }
248
-
249
- // We have returned all buffered data. Read new data from the remote socket.
250
- while (len > 0) {
251
- n = pull(NULL, conn, (char *) buf, (int) len);
252
- if (n < 0) {
253
- nread = n; // Propagate the error
254
- break;
255
- } else if (n == 0) {
256
- break; // No more data to read
257
- } else {
258
- buf = (char *) buf + n;
259
- conn->consumed_content += n;
260
- nread += n;
261
- len -= n;
262
- }
263
- }
264
- }
265
- return nread;
266
-}
267
-
268
int mg_write(struct mg_connection *conn, const void *buf, size_t len) {
269
time_t now;
270
int64_t n, total, allowed;
271
272
assert(s >= p);
273
274
// Decode variable into destination buffer
275
- len = url_decode(p, (size_t)(s - p), dst, dst_len, 1);
276
+ len = url_decode(p, (int )(s - p), dst, (int )dst_len, 1);
277
278
// Redirect error code from -1 to -2 (destination buffer too small).
279
if (len == -1) {
280
281
p--;
282
}
283
if ((size_t) (p - s) < dst_size) {
284
- len = p - s;
285
+ len = (int )(p - s);
286
mg_strlcpy(dst, s, (size_t) len + 1);
287
} else {
288
len = -2;
289
290
*p = eof;
291
return eof;
292
} else if (filep->fp != NULL) {
293
- return fgets(buf, size, filep->fp);
294
+ return fgets(buf, (int )size, filep->fp);
295
} else {
296
return NULL;
297
}
298
299
}
300
301
// Read from file, exit the loop on error
302
- if ((num_read = fread(buf, 1, (size_t) to_read, filep->fp)) <= 0) {
303
+ if ((num_read = (int )fread(buf, 1, (size_t) to_read, filep->fp)) <= 0) {
304
break;
305
}
306
307
308
}
309
310
body = conn->buf + conn->request_len + conn->consumed_content;
311
- buffered_len = &conn->buf[conn->data_len] - body;
312
+ buffered_len = (int )(&conn->buf[conn->data_len] - body);
313
assert(buffered_len >= 0);
314
assert(conn->consumed_content == 0);
315
316
317
return success;
318
}
319
320
-#if !defined(NO_CGI)
321
-// This structure helps to create an environment for the spawned CGI program.
322
-// Environment is an array of "VARIABLE=VALUE\0" ASCIIZ strings,
323
-// last element must be NULL.
324
-// However, on Windows there is a requirement that all these VARIABLE=VALUE\0
325
-// strings must reside in a contiguous buffer. The end of the buffer is
326
-// marked by two '\0' characters.
327
-// We satisfy both worlds: we create an envp array (which is vars), all
328
-// entries are actually pointers inside buf.
329
-struct cgi_env_block {
330
- struct mg_connection *conn;
331
- char buf[CGI_ENVIRONMENT_SIZE]; // Environment buffer
332
- int len; // Space taken
333
- char *vars[MAX_CGI_ENVIR_VARS]; // char **envp
334
- int nvars; // Number of variables
335
-};
336
-
337
-static char *addenv(struct cgi_env_block *block,
338
- PRINTF_FORMAT_STRING(const char *fmt), ...)
339
- PRINTF_ARGS(2, 3);
340
-
341
-// Append VARIABLE=VALUE\0 string to the buffer, and add a respective
342
-// pointer into the vars array.
343
-static char *addenv(struct cgi_env_block *block, const char *fmt, ...) {
344
- int n, space;
345
- char *added;
346
- va_list ap;
347
-
348
- // Calculate how much space is left in the buffer
349
- space = sizeof(block->buf) - block->len - 2;
350
- assert(space >= 0);
351
-
352
- // Make a pointer to the free space int the buffer
353
- added = block->buf + block->len;
354
-
355
- // Copy VARIABLE=VALUE\0 string into the free space
356
- va_start(ap, fmt);
357
- n = mg_vsnprintf(block->conn, added, (size_t) space, fmt, ap);
358
- va_end(ap);
359
-
360
- // Make sure we do not overflow buffer and the envp array
361
- if (n > 0 && n + 1 < space &&
362
- block->nvars < (int) ARRAY_SIZE(block->vars) - 2) {
363
- // Append a pointer to the added string into the envp array
364
- block->vars[block->nvars++] = added;
365
- // Bump up used length counter. Include \0 terminator
366
- block->len += n + 1;
367
- } else {
368
- cry(block->conn, "%s: CGI env buffer truncated for [%s]", __func__, fmt);
369
- }
370
-
371
- return added;
372
-}
373
-
374
-static void prepare_cgi_environment(struct mg_connection *conn,
375
- const char *prog,
376
- struct cgi_env_block *blk) {
377
- const char *s, *slash;
378
- struct vec var_vec;
379
- char *p, src_addr[20];
380
- int i;
381
-
382
- blk->len = blk->nvars = 0;
383
- blk->conn = conn;
384
- sockaddr_to_string(src_addr, sizeof(src_addr), &conn->client.rsa);
385
-
386
- addenv(blk, "SERVER_NAME=%s", conn->ctx->config[AUTHENTICATION_DOMAIN]);
387
- addenv(blk, "SERVER_ROOT=%s", conn->ctx->config[DOCUMENT_ROOT]);
388
- addenv(blk, "DOCUMENT_ROOT=%s", conn->ctx->config[DOCUMENT_ROOT]);
389
-
390
- // Prepare the environment block
391
- addenv(blk, "%s", "GATEWAY_INTERFACE=CGI/1.1");
392
- addenv(blk, "%s", "SERVER_PROTOCOL=HTTP/1.1");
393
- addenv(blk, "%s", "REDIRECT_STATUS=200"); // For PHP
394
-
395
- // TODO(lsm): fix this for IPv6 case
396
- addenv(blk, "SERVER_PORT=%d", ntohs(conn->client.lsa.sin.sin_port));
397
-
398
- addenv(blk, "REQUEST_METHOD=%s", conn->request_info.request_method);
399
- addenv(blk, "REMOTE_ADDR=%s", src_addr);
400
- addenv(blk, "REMOTE_PORT=%d", conn->request_info.remote_port);
401
- addenv(blk, "REQUEST_URI=%s", conn->request_info.uri);
402
-
403
- // SCRIPT_NAME
404
- assert(conn->request_info.uri[0] == '/');
405
- slash = strrchr(conn->request_info.uri, '/');
406
- if ((s = strrchr(prog, '/')) == NULL)
407
- s = prog;
408
- addenv(blk, "SCRIPT_NAME=%.*s%s", (int) (slash - conn->request_info.uri),
409
- conn->request_info.uri, s);
410
-
411
- addenv(blk, "SCRIPT_FILENAME=%s", prog);
412
- addenv(blk, "PATH_TRANSLATED=%s", prog);
413
- addenv(blk, "HTTPS=%s", conn->ssl == NULL ? "off" : "on");
414
-
415
- if ((s = mg_get_header(conn, "Content-Type")) != NULL)
416
- addenv(blk, "CONTENT_TYPE=%s", s);
417
-
418
- if (conn->request_info.query_string != NULL)
419
- addenv(blk, "QUERY_STRING=%s", conn->request_info.query_string);
420
-
421
- if ((s = mg_get_header(conn, "Content-Length")) != NULL)
422
- addenv(blk, "CONTENT_LENGTH=%s", s);
423
-
424
- if ((s = getenv("PATH")) != NULL)
425
- addenv(blk, "PATH=%s", s);
426
-
427
- if (conn->path_info != NULL) {
428
- addenv(blk, "PATH_INFO=%s", conn->path_info);
429
- }
430
-
431
-#if defined(_WIN32)
432
- if ((s = getenv("COMSPEC")) != NULL) {
433
- addenv(blk, "COMSPEC=%s", s);
434
- }
435
- if ((s = getenv("SYSTEMROOT")) != NULL) {
436
- addenv(blk, "SYSTEMROOT=%s", s);
437
- }
438
- if ((s = getenv("SystemDrive")) != NULL) {
439
- addenv(blk, "SystemDrive=%s", s);
440
- }
441
-#else
442
- if ((s = getenv("LD_LIBRARY_PATH")) != NULL)
443
- addenv(blk, "LD_LIBRARY_PATH=%s", s);
444
-#endif // _WIN32
445
-
446
- if ((s = getenv("PERLLIB")) != NULL)
447
- addenv(blk, "PERLLIB=%s", s);
448
-
449
- if (conn->request_info.remote_user != NULL) {
450
- addenv(blk, "REMOTE_USER=%s", conn->request_info.remote_user);
451
- addenv(blk, "%s", "AUTH_TYPE=Digest");
452
- }
453
-
454
- // Add all headers as HTTP_* variables
455
- for (i = 0; i < conn->request_info.num_headers; i++) {
456
- p = addenv(blk, "HTTP_%s=%s",
457
- conn->request_info.http_headers[i].name,
458
- conn->request_info.http_headers[i].value);
459
-
460
- // Convert variable name into uppercase, and change - to _
461
- for (; *p != '=' && *p != '\0'; p++) {
462
- if (*p == '-')
463
- *p = '_';
464
- *p = (char) toupper(* (unsigned char *) p);
465
- }
466
- }
467
-
468
- // Add user-specified variables
469
- s = conn->ctx->config[CGI_ENVIRONMENT];
470
- while ((s = next_option(s, &var_vec, NULL)) != NULL) {
471
- addenv(blk, "%.*s", (int) var_vec.len, var_vec.ptr);
472
- }
473
-
474
- blk->vars[blk->nvars++] = NULL;
475
- blk->buf[blk->len++] = '\0';
476
-
477
- assert(blk->nvars < (int) ARRAY_SIZE(blk->vars));
478
- assert(blk->len > 0);
479
- assert(blk->len < (int) sizeof(blk->buf));
480
-}
481
-
482
-static void handle_cgi_request(struct mg_connection *conn, const char *prog) {
483
- int headers_len, data_len, i, fd_stdin[2], fd_stdout[2];
484
- const char *status, *status_text;
485
- char buf[16384], *pbuf, dir[PATH_MAX], *p;
486
- struct mg_request_info ri;
487
- struct cgi_env_block blk;
488
- FILE *in, *out;
489
- struct file fout = STRUCT_FILE_INITIALIZER;
490
- pid_t pid;
491
-
492
- prepare_cgi_environment(conn, prog, &blk);
493
-
494
- // CGI must be executed in its own directory. 'dir' must point to the
495
- // directory containing executable program, 'p' must point to the
496
- // executable program name relative to 'dir'.
497
- (void) mg_snprintf(conn, dir, sizeof(dir), "%s", prog);
498
- if ((p = strrchr(dir, '/')) != NULL) {
499
- *p++ = '\0';
500
- } else {
501
- dir[0] = '.', dir[1] = '\0';
502
- p = (char *) prog;
503
- }
504
-
505
- pid = (pid_t) -1;
506
- fd_stdin[0] = fd_stdin[1] = fd_stdout[0] = fd_stdout[1] = -1;
507
- in = out = NULL;
508
-
509
- if (pipe(fd_stdin) != 0 || pipe(fd_stdout) != 0) {
510
- send_http_error(conn, 500, http_500_error,
511
- "Cannot create CGI pipe: %s", strerror(ERRNO));
512
- goto done;
513
- }
514
-
515
- pid = spawn_process(conn, p, blk.buf, blk.vars, fd_stdin[0], fd_stdout[1],
516
- dir);
517
- // spawn_process() must close those!
518
- // If we don't mark them as closed, close() attempt before
519
- // return from this function throws an exception on Windows.
520
- // Windows does not like when closed descriptor is closed again.
521
- fd_stdin[0] = fd_stdout[1] = -1;
522
-
523
- if (pid == (pid_t) -1) {
524
- send_http_error(conn, 500, http_500_error,
525
- "Cannot spawn CGI process [%s]: %s", prog, strerror(ERRNO));
526
- goto done;
527
- }
528
-
529
- if ((in = fdopen(fd_stdin[1], "wb")) == NULL ||
530
- (out = fdopen(fd_stdout[0], "rb")) == NULL) {
531
- send_http_error(conn, 500, http_500_error,
532
- "fopen: %s", strerror(ERRNO));
533
- goto done;
534
- }
535
-
536
- setbuf(in, NULL);
537
- setbuf(out, NULL);
538
- fout.fp = out;
539
-
540
- // Send POST data to the CGI process if needed
541
- if (!strcmp(conn->request_info.request_method, "POST") &&
542
- !forward_body_data(conn, in, INVALID_SOCKET, NULL)) {
543
- goto done;
544
- }
545
-
546
- // Close so child gets an EOF.
547
- fclose(in);
548
- in = NULL;
549
- fd_stdin[1] = -1;
550
-
551
- // Now read CGI reply into a buffer. We need to set correct
552
- // status code, thus we need to see all HTTP headers first.
553
- // Do not send anything back to client, until we buffer in all
554
- // HTTP headers.
555
- data_len = 0;
556
- headers_len = read_request(out, conn, buf, sizeof(buf), &data_len);
557
- if (headers_len <= 0) {
558
- send_http_error(conn, 500, http_500_error,
559
- "CGI program sent malformed or too big (>%u bytes) "
560
- "HTTP headers: [%.*s]",
561
- (unsigned) sizeof(buf), data_len, buf);
562
- goto done;
563
- }
564
- pbuf = buf;
565
- buf[headers_len - 1] = '\0';
566
- parse_http_headers(&pbuf, &ri);
567
-
568
- // Make up and send the status line
569
- status_text = "OK";
570
- if ((status = get_header(&ri, "Status")) != NULL) {
571
- conn->status_code = atoi(status);
572
- status_text = status;
573
- while (isdigit(* (unsigned char *) status_text) || *status_text == ' ') {
574
- status_text++;
575
- }
576
- } else if (get_header(&ri, "Location") != NULL) {
577
- conn->status_code = 302;
578
- } else {
579
- conn->status_code = 200;
580
- }
581
- if (get_header(&ri, "Connection") != NULL &&
582
- !mg_strcasecmp(get_header(&ri, "Connection"), "keep-alive")) {
583
- conn->must_close = 1;
584
- }
585
- (void) mg_printf(conn, "HTTP/1.1 %d %s\r\n", conn->status_code,
586
- status_text);
587
-
588
- // Send headers
589
- for (i = 0; i < ri.num_headers; i++) {
590
- mg_printf(conn, "%s: %s\r\n",
591
- ri.http_headers[i].name, ri.http_headers[i].value);
592
- }
593
- mg_write(conn, "\r\n", 2);
594
-
595
- // Send chunk of data that may have been read after the headers
596
- conn->num_bytes_sent += mg_write(conn, buf + headers_len,
597
- (size_t)(data_len - headers_len));
598
-
599
- // Read the rest of CGI output and send to the client
600
- send_file_data(conn, &fout, 0, INT64_MAX);
601
-
602
-done:
603
- if (pid != (pid_t) -1) {
604
- kill(pid, SIGKILL);
605
- }
606
- if (fd_stdin[0] != -1) {
607
- close(fd_stdin[0]);
608
- }
609
- if (fd_stdout[1] != -1) {
610
- close(fd_stdout[1]);
611
- }
612
-
613
- if (in != NULL) {
614
- fclose(in);
615
- } else if (fd_stdin[1] != -1) {
616
- close(fd_stdin[1]);
617
- }
618
-
619
- if (out != NULL) {
620
- fclose(out);
621
- } else if (fd_stdout[0] != -1) {
622
- close(fd_stdout[0]);
623
- }
624
-}
625
-#endif // !NO_CGI
626
-
627
// For a given PUT path, create all intermediate subdirectories
628
// for given path. Return 0 if the path itself is a directory,
629
// or -1 on error, 1 if OK.
630
static int put_dir(struct mg_connection *conn, const char *path) {
631
char buf[PATH_MAX];
632
const char *s, *p;
633
+ size_t len;
634
struct file file = STRUCT_FILE_INITIALIZER;
635
- int len, res = 1;
636
+ int res = 1;
637
638
for (s = p = path + 2; (p = strchr(s, '/')) != NULL; s = ++p) {
639
len = p - path;
640
- if (len >= (int) sizeof(buf)) {
641
+ if (len >= sizeof(buf)) {
642
res = -1;
643
break;
644
}
645
646
return ntohl(* (uint32_t *) &conn->client.rsa.sin.sin_addr);
647
}
648
649
-#ifdef USE_LUA
650
-
651
-#ifdef _WIN32
652
-static void *mmap(void *addr, int64_t len, int prot, int flags, int fd,
653
- int offset) {
654
- HANDLE fh = (HANDLE) _get_osfhandle(fd);
655
- HANDLE mh = CreateFileMapping(fh, 0, PAGE_READONLY, 0, 0, 0);
656
- void *p = MapViewOfFile(mh, FILE_MAP_READ, 0, 0, (size_t) len);
657
- CloseHandle(fh);
658
- CloseHandle(mh);
659
- return p;
660
-}
661
-#define munmap(x, y) UnmapViewOfFile(x)
662
-#define MAP_FAILED NULL
663
-#define MAP_PRIVATE 0
664
-#define PROT_READ 0
665
-#else
666
-#include <sys/mman.h>
667
-#endif
668
-
669
-static void lsp(struct mg_connection *conn, const char *p, int64_t len,
670
- lua_State *L) {
671
- int i, j, pos = 0;
672
-
673
- for (i = 0; i < len; i++) {
674
- if (p[i] == '<' && p[i + 1] == '?') {
675
- for (j = i + 1; j < len ; j++) {
676
- if (p[j] == '?' && p[j + 1] == '>') {
677
- mg_write(conn, p + pos, i - pos);
678
- if (luaL_loadbuffer(L, p + (i + 2), j - (i + 2), "") == LUA_OK) {
679
- lua_pcall(L, 0, LUA_MULTRET, 0);
680
- }
681
- pos = j + 2;
682
- i = pos - 1;
683
- break;
684
- }
685
- }
686
- }
687
- }
688
-
689
- if (i > pos) {
690
- mg_write(conn, p + pos, i - pos);
691
- }
692
-}
693
-
694
-static int lsp_mg_print(lua_State *L) {
695
- int i, num_args;
696
- const char *str;
697
- size_t size;
698
- struct mg_connection *conn = lua_touserdata(L, lua_upvalueindex(1));
699
-
700
- num_args = lua_gettop(L);
701
- for (i = 1; i <= num_args; i++) {
702
- if (lua_isstring(L, i)) {
703
- str = lua_tolstring(L, i, &size);
704
- mg_write(conn, str, size);
705
- }
706
- }
707
-
708
- return 0;
709
-}
710
-
711
-static int lsp_mg_read(lua_State *L) {
712
- struct mg_connection *conn = lua_touserdata(L, lua_upvalueindex(1));
713
- char buf[1024];
714
- int len = mg_read(conn, buf, sizeof(buf));
715
-
716
- lua_settop(L, 0);
717
- lua_pushlstring(L, buf, len);
718
-
719
- return 1;
720
-}
721
-
722
-static void reg_string(struct lua_State *L, const char *name, const char *val) {
723
- lua_pushstring(L, name);
724
- lua_pushstring(L, val);
725
- lua_rawset(L, -3);
726
-}
727
-
728
-static void reg_int(struct lua_State *L, const char *name, int val) {
729
- lua_pushstring(L, name);
730
- lua_pushinteger(L, val);
731
- lua_rawset(L, -3);
732
-}
733
-
734
-static void prepare_lua_environment(struct mg_connection *conn, lua_State *L) {
735
- const struct mg_request_info *ri = mg_get_request_info(conn);
736
- extern void luaL_openlibs(lua_State *);
737
- int i;
738
-
739
- luaL_openlibs(L);
740
-#ifdef USE_LUA_SQLITE3
741
- { extern int luaopen_lsqlite3(lua_State *); luaopen_lsqlite3(L); }
742
-#endif
743
-
744
- // Register "print" function which calls mg_write()
745
- lua_pushlightuserdata(L, conn);
746
- lua_pushcclosure(L, lsp_mg_print, 1);
747
- lua_setglobal(L, "print");
748
-
749
- // Register mg_read()
750
- lua_pushlightuserdata(L, conn);
751
- lua_pushcclosure(L, lsp_mg_read, 1);
752
- lua_setglobal(L, "read");
753
-
754
- // Export request_info
755
- lua_newtable(L);
756
- reg_string(L, "request_method", ri->request_method);
757
- reg_string(L, "uri", ri->uri);
758
- reg_string(L, "http_version", ri->http_version);
759
- reg_string(L, "query_string", ri->query_string);
760
- reg_int(L, "remote_ip", ri->remote_ip);
761
- reg_int(L, "remote_port", ri->remote_port);
762
- reg_int(L, "num_headers", ri->num_headers);
763
- lua_pushstring(L, "http_headers");
764
- lua_newtable(L);
765
- for (i = 0; i < ri->num_headers; i++) {
766
- reg_string(L, ri->http_headers[i].name, ri->http_headers[i].value);
767
- }
768
- lua_rawset(L, -3);
769
- lua_setglobal(L, "request_info");
770
-}
771
-
772
-static void handle_lsp_request(struct mg_connection *conn, const char *path,
773
- struct file *filep) {
774
- void *p = NULL;
775
- lua_State *L = NULL;
776
-
777
- if (!mg_stat(conn, path, filep) || !mg_fopen(conn, path, "r", filep)) {
778
- send_http_error(conn, 404, "Not Found", "%s", "File not found");
779
- } else if (filep->membuf == NULL &&
780
- (p = mmap(NULL, (size_t) filep->size, PROT_READ, MAP_PRIVATE,
781
- fileno(filep->fp), 0)) == MAP_FAILED) {
782
- send_http_error(conn, 500, http_500_error, "mmap(%s, %zu, %d): %s", path,
783
- (size_t) filep->size, fileno(filep->fp), strerror(errno));
784
- } else if ((L = luaL_newstate()) == NULL) {
785
- send_http_error(conn, 500, http_500_error, "%s", "luaL_newstate failed");
786
- } else {
787
- // We're not sending HTTP headers here, Lua page must do it.
788
- prepare_lua_environment(conn, L);
789
- if (conn->ctx->callbacks.init_lua != NULL) {
790
- conn->ctx->callbacks.init_lua(conn, L);
791
- }
792
- lsp(conn, filep->membuf == NULL ? p : filep->membuf, filep->size, L);
793
- }
794
-
795
- if (L) lua_close(L);
796
- if (p) munmap(p, filep->size);
797
- mg_fclose(filep);
798
-}
799
-#endif // USE_LUA
800
-
801
static int is_put_or_delete_request(const struct mg_connection *conn) {
802
const char *s = conn->request_info.request_method;
803
return s != NULL && (!strcmp(s, "PUT") || !strcmp(s, "DELETE"));
804
805
send_http_error(conn, 403, "Directory Listing Denied",
806
"Directory listing denied");
807
}
808
-#ifdef USE_LUA
809
- } else if (match_prefix("**.lp$", 6, path) > 0) {
810
- handle_lsp_request(conn, path, &file);
811
-#endif
812
-#if !defined(NO_CGI)
813
- } else if (match_prefix(conn->ctx->config[CGI_EXTENSIONS],
814
- strlen(conn->ctx->config[CGI_EXTENSIONS]),
815
- path) > 0) {
816
- if (strcmp(ri->request_method, "POST") &&
817
- strcmp(ri->request_method, "HEAD") &&
818
- strcmp(ri->request_method, "GET")) {
819
- send_http_error(conn, 501, "Not Implemented",
820
- "Method %s is not implemented", ri->request_method);
821
- } else {
822
- handle_cgi_request(conn, path);
823
- }
824
-#endif // !NO_CGI
825
} else if (match_prefix(conn->ctx->config[SSI_EXTENSIONS],
826
strlen(conn->ctx->config[SSI_EXTENSIONS]),
827
path) > 0) {
828
sview-15_08.tar.gz/3rdparty/include/mongoose.h -> sview-15_10.tar.gz/3rdparty/include/mongoose.h
Changed
22
1
2
int (*websocket_data)(struct mg_connection *);
3
const char * (*open_file)(const struct mg_connection *,
4
const char *path, size_t *data_len);
5
- void (*init_lua)(struct mg_connection *, void *lua_context);
6
- void (*upload)(struct mg_connection *, const char *file_name);
7
};
8
9
// Start web server.
10
11
// Send contents of the entire file together with HTTP headers.
12
void mg_send_file(struct mg_connection *conn, const char *path);
13
14
-
15
-// Read data from the remote end, return number of bytes read.
16
-int mg_read(struct mg_connection *, void *buf, size_t len);
17
-
18
-
19
// Get the value of particular HTTP header.
20
//
21
// This is a helper function. It traverses request_info->http_headers array,
22
sview-15_08.tar.gz/Makefile -> sview-15_10.tar.gz/Makefile
Changed
241
1
2
clean: clean_StShared clean_StGLWidgets clean_StCore clean_sView clean_StOutAnaglyph clean_StOutDual clean_StOutInterlace clean_StOutPageFlip clean_StOutIZ3D clean_StOutDistorted clean_StImageViewer clean_StMoviePlayer clean_StDiagnostics clean_StCADViewer clean_sViewAndroid
3
distclean: clean
4
5
+ifdef ANDROID_NDK
6
+outputs_all: $(aStOutAnaglyph) $(aStOutInterlace) $(aStOutDistorted)
7
+else
8
+outputs_all: $(aStOutAnaglyph) $(aStOutDual) $(aStOutInterlace) $(aStOutPageFlip) $(aStOutIZ3D) $(aStOutDistorted)
9
+endif
10
+
11
install:
12
mkdir -p $(DESTDIR)/usr/bin
13
mkdir -p $(DESTDIR)/usr/$(USR_LIB)/sView
14
15
mkdir -p sview/assets/lang/French
16
mkdir -p sview/assets/lang/English
17
mkdir -p sview/assets/lang/Russian
18
+ mkdir -p sview/assets/lang/Czech
19
mkdir -p sview/assets/shaders
20
mkdir -p sview/assets/textures
21
ln --force --symbolic ../../../$(BUILD_ROOT)/$(aStShared) sview/libs/armeabi-v7a/$(aStShared)
22
23
cp -f -r $(BUILD_ROOT)/lang/français/* sview/assets/lang/French/
24
cp -f -r $(BUILD_ROOT)/lang/English/* sview/assets/lang/English/
25
cp -f -r $(BUILD_ROOT)/lang/русский/* sview/assets/lang/Russian/
26
+ cp -f -r $(BUILD_ROOT)/lang/Czech/* sview/assets/lang/Czech/
27
cp -f -r $(BUILD_ROOT)/shaders/* sview/assets/shaders/
28
cp -f -r $(BUILD_ROOT)/textures/* sview/assets/textures/
29
cp -f license-gpl-3.0.txt sview/assets/info/license.txt
30
31
mkdir -p $(BUILD_ROOT)/lang/русский
32
mkdir -p $(BUILD_ROOT)/lang/français
33
mkdir -p $(BUILD_ROOT)/lang/Deutsch
34
+ mkdir -p $(BUILD_ROOT)/lang/Czech
35
mkdir -p $(BUILD_ROOT)/textures
36
mkdir -p $(BUILD_ROOT)/web
37
mkdir -p sview/libs/armeabi-v7a
38
39
aStGLWidgets_SRCS := $(wildcard StGLWidgets/*.cpp)
40
aStGLWidgets_OBJS := ${aStGLWidgets_SRCS:.cpp=.o}
41
aStGLWidgets_LIB := $(LIB) -lStShared $(LIB_GLX)
42
-$(aStGLWidgets) : pre_StGLWidgets $(aStGLWidgets_OBJS)
43
+$(aStGLWidgets) : pre_StGLWidgets $(aStShared) $(aStGLWidgets_OBJS)
44
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStGLWidgets_OBJS) $(aStGLWidgets_LIB) -o $(BUILD_ROOT)/$(aStGLWidgets)
45
pre_StGLWidgets:
46
-
47
+
48
clean_StGLWidgets:
49
rm -f $(BUILD_ROOT)/$(aStGLWidgets)
50
rm -rf StGLWidgets/*.o
51
52
aStCore_SRCS := $(wildcard StCore/*.cpp)
53
aStCore_OBJS := ${aStCore_SRCS:.cpp=.o}
54
aStCore_LIB := $(LIB) -lStShared $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD) $(LIB_XLIB) $(LIB_ANDROID)
55
-$(aStCore) : $(aStCore_OBJS)
56
+$(aStCore) : $(aStShared) $(aStCore_OBJS)
57
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStCore_OBJS) $(aStCore_LIB) -o $(BUILD_ROOT)/$(aStCore)
58
clean_StCore:
59
rm -f $(BUILD_ROOT)/$(aStCore)
60
61
aStOutAnaglyph_SRCS := $(wildcard StOutAnaglyph/*.cpp)
62
aStOutAnaglyph_OBJS := ${aStOutAnaglyph_SRCS:.cpp=.o}
63
aStOutAnaglyph_LIB := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
64
-$(aStOutAnaglyph) : pre_StOutAnaglyph $(aStOutAnaglyph_OBJS)
65
+$(aStOutAnaglyph) : pre_StOutAnaglyph $(aStCore) $(aStOutAnaglyph_OBJS)
66
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutAnaglyph_OBJS) $(aStOutAnaglyph_LIB) -o $(BUILD_ROOT)/$(aStOutAnaglyph)
67
pre_StOutAnaglyph:
68
mkdir -p $(BUILD_ROOT)/shaders/StOutAnaglyph/
69
70
cp -f -r StOutAnaglyph/lang/russian/* $(BUILD_ROOT)/lang/русский/
71
cp -f -r StOutAnaglyph/lang/french/* $(BUILD_ROOT)/lang/français/
72
cp -f -r StOutAnaglyph/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
73
+ cp -f -r StOutAnaglyph/lang/czech/* $(BUILD_ROOT)/lang/Czech/
74
clean_StOutAnaglyph:
75
rm -f $(BUILD_ROOT)/$(aStOutAnaglyph)
76
rm -rf StOutAnaglyph/*.o
77
78
aStOutDual_SRCS := $(wildcard StOutDual/*.cpp)
79
aStOutDual_OBJS := ${aStOutDual_SRCS:.cpp=.o}
80
aStOutDual_LIB := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
81
-$(aStOutDual) : pre_StOutDual $(aStOutDual_OBJS)
82
+$(aStOutDual) : pre_StOutDual $(aStCore) $(aStOutDual_OBJS)
83
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutDual_OBJS) $(aStOutDual_LIB) -o $(BUILD_ROOT)/$(aStOutDual)
84
pre_StOutDual:
85
cp -f -r StOutDual/lang/english/* $(BUILD_ROOT)/lang/English/
86
cp -f -r StOutDual/lang/russian/* $(BUILD_ROOT)/lang/русский/
87
cp -f -r StOutDual/lang/french/* $(BUILD_ROOT)/lang/français/
88
cp -f -r StOutDual/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
89
+ cp -f -r StOutDual/lang/czech/* $(BUILD_ROOT)/lang/Czech/
90
clean_StOutDual:
91
rm -f $(BUILD_ROOT)/$(aStOutDual)
92
rm -rf StOutDual/*.o
93
94
aStOutIZ3D_SRCS := $(wildcard StOutIZ3D/*.cpp)
95
aStOutIZ3D_OBJS := ${aStOutIZ3D_SRCS:.cpp=.o}
96
aStOutIZ3D_LIB := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
97
-$(aStOutIZ3D) : pre_StOutIZ3D $(aStOutIZ3D_OBJS)
98
+$(aStOutIZ3D) : pre_StOutIZ3D $(aStCore) $(aStOutIZ3D_OBJS)
99
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutIZ3D_OBJS) $(aStOutIZ3D_LIB) -o $(BUILD_ROOT)/$(aStOutIZ3D)
100
pre_StOutIZ3D:
101
mkdir -p $(BUILD_ROOT)/shaders/StOutIZ3D/
102
103
cp -f -r StOutIZ3D/lang/russian/* $(BUILD_ROOT)/lang/русский/
104
cp -f -r StOutIZ3D/lang/french/* $(BUILD_ROOT)/lang/français/
105
cp -f -r StOutIZ3D/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
106
+ cp -f -r StOutIZ3D/lang/czech/* $(BUILD_ROOT)/lang/Czech/
107
clean_StOutIZ3D:
108
rm -f $(BUILD_ROOT)/$(aStOutIZ3D)
109
rm -rf StOutIZ3D/*.o
110
111
aStOutInterlace_SRCS := $(wildcard StOutInterlace/*.cpp)
112
aStOutInterlace_OBJS := ${aStOutInterlace_SRCS:.cpp=.o}
113
aStOutInterlace_LIB := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
114
-$(aStOutInterlace) : pre_StOutInterlace $(aStOutInterlace_OBJS)
115
+$(aStOutInterlace) : pre_StOutInterlace $(aStCore) $(aStOutInterlace_OBJS)
116
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutInterlace_OBJS) $(aStOutInterlace_LIB) -o $(BUILD_ROOT)/$(aStOutInterlace)
117
pre_StOutInterlace:
118
mkdir -p $(BUILD_ROOT)/shaders/StOutInterlace/
119
120
cp -f -r StOutInterlace/lang/russian/* $(BUILD_ROOT)/lang/русский/
121
cp -f -r StOutInterlace/lang/french/* $(BUILD_ROOT)/lang/français/
122
cp -f -r StOutInterlace/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
123
+ cp -f -r StOutInterlace/lang/czech/* $(BUILD_ROOT)/lang/Czech/
124
clean_StOutInterlace:
125
rm -f $(BUILD_ROOT)/$(aStOutInterlace)
126
rm -rf StOutInterlace/*.o
127
128
aStOutPageFlip_SRCS := $(wildcard StOutPageFlip/*.cpp)
129
aStOutPageFlip_OBJS := ${aStOutPageFlip_SRCS:.cpp=.o}
130
aStOutPageFlip_LIB := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
131
-$(aStOutPageFlip) : pre_StOutPageFlip $(aStOutPageFlip_OBJS)
132
+$(aStOutPageFlip) : pre_StOutPageFlip $(aStCore) $(aStOutPageFlip_OBJS)
133
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutPageFlip_OBJS) $(aStOutPageFlip_LIB) -o $(BUILD_ROOT)/$(aStOutPageFlip)
134
pre_StOutPageFlip:
135
cp -f -r StOutPageFlip/lang/english/* $(BUILD_ROOT)/lang/English/
136
cp -f -r StOutPageFlip/lang/russian/* $(BUILD_ROOT)/lang/русский/
137
cp -f -r StOutPageFlip/lang/french/* $(BUILD_ROOT)/lang/français/
138
cp -f -r StOutPageFlip/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
139
+ cp -f -r StOutPageFlip/lang/czech/* $(BUILD_ROOT)/lang/Czech/
140
clean_StOutPageFlip:
141
rm -f $(BUILD_ROOT)/$(aStOutPageFlip)
142
rm -rf StOutPageFlip/*.o
143
144
aStOutDistorted_SRCS := $(wildcard StOutDistorted/*.cpp)
145
aStOutDistorted_OBJS := ${aStOutDistorted_SRCS:.cpp=.o}
146
aStOutDistorted_LIB := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
147
-$(aStOutDistorted) : pre_StOutDistorted $(aStOutDistorted_OBJS)
148
+$(aStOutDistorted) : pre_StOutDistorted $(aStCore) $(aStOutDistorted_OBJS)
149
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutDistorted_OBJS) $(aStOutDistorted_LIB) -o $(BUILD_ROOT)/$(aStOutDistorted)
150
pre_StOutDistorted:
151
cp -f -r StOutDistorted/lang/english/* $(BUILD_ROOT)/lang/English/
152
cp -f -r StOutDistorted/lang/russian/* $(BUILD_ROOT)/lang/русский/
153
cp -f -r StOutDistorted/lang/french/* $(BUILD_ROOT)/lang/français/
154
cp -f -r StOutDistorted/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
155
+ cp -f -r StOutDistorted/lang/czech/* $(BUILD_ROOT)/lang/Czech/
156
clean_StOutDistorted:
157
rm -f $(BUILD_ROOT)/$(aStOutDistorted)
158
rm -rf StOutDistorted/*.o
159
160
aStImageViewer_SRCS := $(wildcard StImageViewer/*.cpp)
161
aStImageViewer_OBJS := ${aStImageViewer_SRCS:.cpp=.o}
162
aStImageViewer_LIB := $(LIB) -lStGLWidgets -lStShared -lStCore $(LIB_OUTPUTS) $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
163
-$(aStImageViewer) : pre_StImageViewer $(aStImageViewer_OBJS)
164
+$(aStImageViewer) : pre_StImageViewer $(aStGLWidgets) outputs_all $(aStImageViewer_OBJS)
165
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStImageViewer_OBJS) $(aStImageViewer_LIB) -o $(BUILD_ROOT)/$(aStImageViewer)
166
pre_StImageViewer:
167
cp -f -r StImageViewer/lang/english/* $(BUILD_ROOT)/lang/English/
168
cp -f -r StImageViewer/lang/russian/* $(BUILD_ROOT)/lang/русский/
169
cp -f -r StImageViewer/lang/french/* $(BUILD_ROOT)/lang/français/
170
cp -f -r StImageViewer/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
171
+ cp -f -r StImageViewer/lang/czech/* $(BUILD_ROOT)/lang/Czech/
172
clean_StImageViewer:
173
rm -f $(BUILD_ROOT)/$(aStImageViewer)
174
rm -rf StImageViewer/*.o
175
176
aStMoviePlayer_SRCS3 := $(wildcard StMoviePlayer/*.c)
177
aStMoviePlayer_OBJS3 := ${aStMoviePlayer_SRCS3:.c=.o}
178
aStMoviePlayer_LIB := $(LIB) -lStGLWidgets -lStShared -lStCore $(LIB_OUTPUTS) $(LIB_GLX) $(LIB_GTK) -lavutil -lavformat -lavcodec -lswscale -lopenal $(LIB_PTHREAD)
179
-$(aStMoviePlayer) : pre_StMoviePlayer $(aStMoviePlayer_OBJS1) $(aStMoviePlayer_OBJS2) $(aStMoviePlayer_OBJS3)
180
+$(aStMoviePlayer) : pre_StMoviePlayer $(aStGLWidgets) outputs_all $(aStMoviePlayer_OBJS1) $(aStMoviePlayer_OBJS2) $(aStMoviePlayer_OBJS3)
181
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStMoviePlayer_OBJS1) $(aStMoviePlayer_OBJS2) $(aStMoviePlayer_OBJS3) $(aStMoviePlayer_LIB) -o $(BUILD_ROOT)/$(aStMoviePlayer)
182
pre_StMoviePlayer:
183
cp -f -r StMoviePlayer/lang/english/* $(BUILD_ROOT)/lang/English/
184
cp -f -r StMoviePlayer/lang/russian/* $(BUILD_ROOT)/lang/русский/
185
cp -f -r StMoviePlayer/lang/french/* $(BUILD_ROOT)/lang/français/
186
cp -f -r StMoviePlayer/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
187
+ cp -f -r StMoviePlayer/lang/czech/* $(BUILD_ROOT)/lang/Czech/
188
cp -f -r StMoviePlayer/web/* $(BUILD_ROOT)/web/
189
clean_StMoviePlayer:
190
rm -f $(BUILD_ROOT)/$(aStMoviePlayer)
191
192
aStDiagnostics_SRCS := $(wildcard StDiagnostics/*.cpp)
193
aStDiagnostics_OBJS := ${aStDiagnostics_SRCS:.cpp=.o}
194
aStDiagnostics_LIB := $(LIB) -lStGLWidgets -lStShared -lStCore $(LIB_OUTPUTS) $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
195
-$(aStDiagnostics) : pre_StDiagnostics $(aStDiagnostics_OBJS)
196
+$(aStDiagnostics) : pre_StDiagnostics $(aStGLWidgets) outputs_all $(aStDiagnostics_OBJS)
197
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStDiagnostics_OBJS) $(aStDiagnostics_LIB) -o $(BUILD_ROOT)/$(aStDiagnostics)
198
pre_StDiagnostics:
199
cp -f -r StDiagnostics/lang/english/* $(BUILD_ROOT)/lang/English/
200
cp -f -r StDiagnostics/lang/russian/* $(BUILD_ROOT)/lang/русский/
201
cp -f -r StDiagnostics/lang/french/* $(BUILD_ROOT)/lang/français/
202
cp -f -r StDiagnostics/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
203
+ cp -f -r StDiagnostics/lang/czech/* $(BUILD_ROOT)/lang/Czech/
204
clean_StDiagnostics:
205
rm -f $(BUILD_ROOT)/$(aStDiagnostics)
206
rm -rf StDiagnostics/*.o
207
208
ifdef WITH_OCCT
209
aStCADViewer_LIB += $(LIB_OCCT)
210
endif
211
-$(aStCADViewer) : pre_StCADViewer $(aStCADViewer_OBJS)
212
+$(aStCADViewer) : pre_StCADViewer $(aStGLWidgets) outputs_all $(aStCADViewer_OBJS)
213
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStCADViewer_OBJS) $(aStCADViewer_LIB) -o $(BUILD_ROOT)/$(aStCADViewer)
214
pre_StCADViewer:
215
cp -f -r StCADViewer/lang/english/* $(BUILD_ROOT)/lang/English/
216
cp -f -r StCADViewer/lang/russian/* $(BUILD_ROOT)/lang/русский/
217
cp -f -r StCADViewer/lang/french/* $(BUILD_ROOT)/lang/français/
218
cp -f -r StCADViewer/lang/german/* $(BUILD_ROOT)/lang/Deutsch/
219
+ cp -f -r StCADViewer/lang/czech/* $(BUILD_ROOT)/lang/Czech/
220
clean_StCADViewer:
221
rm -f $(BUILD_ROOT)/$(aStCADViewer)
222
rm -rf StCADViewer/*.o
223
224
sViewAndroid_SRCS := $(wildcard sview/jni/*.cpp)
225
sViewAndroid_OBJS := ${sViewAndroid_SRCS:.cpp=.o}
226
sViewAndroid_LIB := $(LIB) -lStShared -lStCore -lStImageViewer -lStMoviePlayer -llog -landroid -lEGL -lGLESv2 -lc
227
-$(sViewAndroid) : $(sViewAndroid_OBJS)
228
+$(sViewAndroid) : $(aStImageViewer) $(aStMoviePlayer) $(sViewAndroid_OBJS)
229
$(LD) -shared $(LDFLAGS) $(LIBDIR) $(sViewAndroid_OBJS) $(sViewAndroid_LIB) -o $(BUILD_ROOT)/$(sViewAndroid)
230
clean_sViewAndroid:
231
rm -f $(BUILD_ROOT)/$(sViewAndroid)
232
233
ifdef WITH_OCCT
234
sView_LIB += $(LIB_OCCT)
235
endif
236
-$(sView) : $(sView_OBJS)
237
+$(sView) : $(aStImageViewer) $(aStMoviePlayer) $(aStDiagnostics) $(sView_OBJS)
238
$(LD) $(LDFLAGS) $(LIBDIR) $(sView_OBJS) $(sView_LIB) -o $(BUILD_ROOT)/$(sView)
239
clean_sView:
240
rm -f $(BUILD_ROOT)/$(sView)
241
sview-15_08.tar.gz/StCADViewer/StCADViewer.cpp -> sview-15_10.tar.gz/StCADViewer/StCADViewer.cpp
Changed
34
1
2
return open();
3
}
4
5
-void StCADViewer::releaseDevice() {
6
+void StCADViewer::saveAllParams() {
7
if(!myGUI.isNull()) {
8
mySettings->saveParam(ST_PARAM_NORMALS, params.toShowNormals);
9
mySettings->saveParam(ST_PARAM_TRIHEDRON, params.toShowTrihedron);
10
11
mySettings->saveInt32(ST_SETTING_FPSTARGET, params.TargetFps);
12
mySettings->saveParam(ST_SETTING_SHOW_FPS, params.ToShowFps);
13
}
14
+ mySettings->flush();
15
+}
16
17
+void StCADViewer::releaseDevice() {
18
+ saveAllParams();
19
if(!myContext.isNull()) {
20
if(myNormalsMesh != NULL) {
21
myNormalsMesh->release(*myContext);
22
23
return true;
24
}
25
26
+void StCADViewer::doPause(const StPauseEvent& theEvent) {
27
+ StApplication::doPause(theEvent);
28
+ saveAllParams();
29
+}
30
+
31
void StCADViewer::doResize(const StSizeEvent& ) {
32
if(myGUI.isNull()) {
33
return;
34
sview-15_08.tar.gz/StCADViewer/StCADViewer.h -> sview-15_10.tar.gz/StCADViewer/StCADViewer.h
Changed
17
1
2
3
private: //! @name window events slots
4
5
+ ST_LOCAL virtual void doPause (const StPauseEvent& theEvent);
6
ST_LOCAL virtual void doResize (const StSizeEvent& theEvent);
7
ST_LOCAL virtual void doKeyDown (const StKeyEvent& theEvent);
8
ST_LOCAL virtual void doKeyHold (const StKeyEvent& theEvent);
9
10
* Release GL resources.
11
*/
12
ST_LOCAL void releaseDevice();
13
+ ST_LOCAL void saveAllParams();
14
15
private: //!< private callback Slots
16
17
sview-15_08.tar.gz/StCADViewer/StCADViewerGUI.cpp -> sview-15_10.tar.gz/StCADViewer/StCADViewerGUI.cpp
Changed
11
1
2
if((theView == ST_DRAW_LEFT || theView == ST_DRAW_MONO)
3
&& myFpsWidget != NULL) {
4
myFpsWidget->update(myPlugin->getMainWindow()->isStereoOutput(),
5
- myPlugin->getMainWindow()->getTargetFps());
6
+ myPlugin->getMainWindow()->getTargetFps(),
7
+ myPlugin->getMainWindow()->getStatistics());
8
}
9
StGLRootWidget::stglDraw(theView);
10
}
11
sview-15_10.tar.gz/StCADViewer/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StCADViewer/lang/czech/StCADViewer.lng
Added
28
1
2
+# Czech translation file for StCADViewer
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1200=Zobrazení
7
+1201=Typ projekce
8
+1202=Celá obrazovka
9
+1203=Zobrazit normálně
10
+1204=Zobrazit trihedron (průsečík xyz)
11
+1205=Dvě světla
12
+1206=Projekce
13
+1207=Režim výplň
14
+1208=Přidat soubor
15
+1240=Ortogonální
16
+1241=Perspektivní
17
+1242=Stereo
18
+1250=Síť
19
+1251=Stínování
20
+1252=Stínování + Síť
21
+1500=Pomoc
22
+1501=O aplikaci...
23
+1503=Licence
24
+1504=Language
25
+3000=sView - Aplikace pro zobrazení CAD modelů
26
+3001=Verze
27
+3002=Aplikace podporuje CAD soubory ve formátu IGES, STEP, BREP s využitím OpenCASCADE Technology.\n © 2011-2014 Гаврилов Кирилл (kirill@sview.ru).\nOficiální stránky: www.sview.ru
28
sview-15_10.tar.gz/StCADViewer/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StCore/StAndroidGlue.cpp -> sview-15_10.tar.gz/StCore/StAndroidGlue.cpp
Changed
183
1
2
/**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* StCore library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
9
#include <StThreads/StThread.h>
10
#include <StStrings/StLogger.h>
11
12
+#include <jni.h>
13
+#define jexp extern "C" JNIEXPORT
14
+
15
StCString StAndroidGlue::getCommandIdName(StAndroidGlue::CommandId theCmd) {
16
switch(theCmd) {
17
case StAndroidGlue::CommandId_InputChanged: return stCString("InputChanged");
18
19
case StAndroidGlue::CommandId_Pause: return stCString("Pause");
20
case StAndroidGlue::CommandId_Stop: return stCString("Stop");
21
case StAndroidGlue::CommandId_Destroy: return stCString("Destroy");
22
+ case StAndroidGlue::CommandId_BackPressed: return stCString("BackPressed");
23
}
24
return stCString("UNKNOWN");
25
}
26
27
myThJniEnv(NULL),
28
myMsgRead(0),
29
myMsgWrite(0),
30
+ myHasOrientSensor(false),
31
+ myIsPoorOrient(false),
32
+ myToTrackOrient(false),
33
myIsRunning(false),
34
myIsStateSaved(false),
35
myToDestroy(false) {
36
37
jclass aJClassIntent = aJniEnv->GetObjectClass(aJIntent);
38
jmethodID aJMet_getDataString = aJniEnv->GetMethodID(aJClassIntent, "getDataString", "()Ljava/lang/String;");
39
jmethodID aJMet_getType = aJniEnv->GetMethodID(aJClassIntent, "getType", "()Ljava/lang/String;");
40
+ jmethodID aJMet_getFlags = aJniEnv->GetMethodID(aJClassIntent, "getFlags", "()I");
41
42
// retrieve data path
43
jstring aJString = (jstring )aJniEnv->CallObjectMethod(aJIntent, aJMet_getDataString);
44
45
aJniEnv->ReleaseStringUTFChars(aJString, aJStringStr);
46
47
// retrieve data type
48
+ int aFlags = aJniEnv->CallIntMethod(aJIntent, aJMet_getFlags);
49
aJString = (jstring )aJniEnv->CallObjectMethod(aJIntent, aJMet_getType);
50
aJStringStr = aJniEnv->GetStringUTFChars(aJString, 0);
51
const StString aDataType = aJStringStr;
52
aJniEnv->ReleaseStringUTFChars(aJString, aJStringStr);
53
54
// reset intent in Activity
55
- aJniEnv->CallObjectMethod(myActivity->clazz, aJMet_setIntent, NULL);
56
+ aJniEnv->CallVoidMethod(myActivity->clazz, aJMet_setIntent, NULL);
57
58
const StString ST_FILE_PROTOCOL("file://");
59
if(aDataPath.isStartsWith(ST_FILE_PROTOCOL)) {
60
61
aDataPath.fromUrl(aPath);
62
}
63
64
- StMutexAuto aLock(myDndLock);
65
- myDndPath = aDataPath;
66
+ StMutexAuto aLock(myFetchLock);
67
+ if(myCreatePath.isEmpty()) {
68
+ myCreatePath = aDataPath;
69
+ }
70
+ // FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
71
+ // ignore outdated intent from history list - use C++ recent list instead
72
+ if((aFlags & 0x00100000) == 0) {
73
+ myDndPath = aDataPath;
74
+ }
75
}
76
77
-bool StAndroidGlue::popOpenNewFile(StString& theNewFile) {
78
- StMutexAuto aLock(myDndLock);
79
- if(myDndPath.isEmpty()) {
80
- return false;
81
+void StAndroidGlue::fetchState(StString& theNewFile,
82
+ StQuaternion<double>& theQuaternion) {
83
+ StMutexAuto aLock(myFetchLock);
84
+ theQuaternion = myQuaternion;
85
+ if(!myDndPath.isEmpty()) {
86
+ theNewFile = myDndPath;
87
+ myDndPath.clear();
88
}
89
-
90
- theNewFile = myDndPath;
91
- myDndPath.clear();
92
- return true;
93
}
94
95
void StAndroidGlue::start() {
96
+ // workaround NativeActivity design issues - notify Java StActivity class about C++ pointer to StAndroidGlue instance
97
+ JNIEnv* aJniEnv = myActivity->env;
98
+ jclass aJClassActivity = aJniEnv->GetObjectClass(myActivity->clazz);
99
+ jmethodID aJMet_setInstance = aJniEnv->GetMethodID(aJClassActivity, "setCppInstance", "(J)V");
100
+ aJniEnv->CallVoidMethod(myActivity->clazz, aJMet_setInstance, (jlong )this);
101
+
102
myThread = new StThread(threadEntryWrapper, this, "StAndroidGlue");
103
104
// Wait for thread to start
105
106
}
107
108
StAndroidGlue::~StAndroidGlue() {
109
+ // workaround NativeActivity design issues - notify Java StActivity class about C++ pointer to StAndroidGlue instance
110
+ if(myActivity != NULL
111
+ && myActivity->env != NULL) {
112
+ JNIEnv* aJniEnv = myActivity->env;
113
+ jclass aJClassActivity = aJniEnv->GetObjectClass(myActivity->clazz);
114
+ jmethodID aJMet_setInstance = aJniEnv->GetMethodID(aJClassActivity, "setCppInstance", "(J)V");
115
+ aJniEnv->CallVoidMethod(myActivity->clazz, aJMet_setInstance, (jlong )0);
116
+ }
117
+
118
pthread_mutex_lock(&myMutex);
119
writeCommand(CommandId_Destroy);
120
pthread_mutex_unlock(&myMutex);
121
122
return aSavedState;
123
}
124
125
+void StAndroidGlue::setTrackOrientation(const bool theToTrack) {
126
+ if(myToTrackOrient == theToTrack
127
+ || myActivity == NULL
128
+ || myThJniEnv == NULL) {
129
+ return;
130
+ }
131
+
132
+ jclass aJClassActivity = myThJniEnv->GetObjectClass(myActivity->clazz);
133
+ jmethodID aJMet = myThJniEnv->GetMethodID(aJClassActivity, "setTrackOrientation", "(Z)V");
134
+ myThJniEnv->CallVoidMethod(myActivity->clazz, aJMet, (jboolean )(theToTrack ? JNI_TRUE : JNI_FALSE));
135
+ myToTrackOrient = theToTrack;
136
+}
137
+
138
+void StAndroidGlue::setQuaternion(const StQuaternion<float>& theQ, const float theScreenRotDeg) {
139
+ // do the magic - convert quaternion from Android coordinate system to sView coordinate system
140
+ const StQuaternion<double> anOriPitch = StQuaternion<double>(StVec3<double>::DX(), stToRadians(90.0));
141
+ const StQuaternion<double> anOriRoll = StQuaternion<double>(StVec3<double>::DZ(), stToRadians(-270.0 + (double )theScreenRotDeg));
142
+ const StQuaternion<double> anOriAnd((double )theQ.y(), (double )theQ.z(), (double )theQ.x(), (double )theQ.w());
143
+ StQuaternion<double> anOri = StQuaternion<double>::multiply(anOriAnd, anOriPitch);
144
+ anOri = StQuaternion<double>::multiply(anOriRoll, anOri);
145
+
146
+ StMutexAuto aLock(myFetchLock);
147
+ myQuaternion = anOri;
148
+}
149
+
150
+void StAndroidGlue::setOrientation(float theAzimuthDeg, float thePitchDeg, float theRollDeg, float theScreenRotDeg) {
151
+ const StQuaternion<double> anOriYaw = StQuaternion<double>(StVec3<double>::DY(), stToRadians((double )theAzimuthDeg));
152
+ const StQuaternion<double> anOriPitch = StQuaternion<double>(StVec3<double>::DX(), stToRadians(90.0 + (double )thePitchDeg));
153
+ const StQuaternion<double> anOriRoll = StQuaternion<double>(StVec3<double>::DZ(), stToRadians((double )-theRollDeg + (double )theScreenRotDeg));
154
+ StQuaternion<double> anOri = StQuaternion<double>::multiply(anOriPitch, anOriYaw);
155
+ anOri = StQuaternion<double>::multiply(anOriRoll, anOri);
156
+
157
+ StMutexAuto aLock(myFetchLock);
158
+ myQuaternion = anOri;
159
+}
160
+
161
+jexp void JNICALL Java_com_sview_StActivity_cppOnBackPressed(JNIEnv* theEnv, jobject theObj, jlong theCppPtr) {
162
+ ((StAndroidGlue* )theCppPtr)->writeCommand(StAndroidGlue::CommandId_BackPressed);
163
+}
164
+
165
+jexp void JNICALL Java_com_sview_StActivity_cppDefineOrientationSensor(JNIEnv* theEnv, jobject theObj, jlong theCppPtr,
166
+ jboolean theHasOri, jboolean theIsPoorOri) {
167
+ ((StAndroidGlue* )theCppPtr)->defineOrientationSensor(theHasOri == JNI_TRUE, theIsPoorOri == JNI_TRUE);
168
+}
169
+
170
+jexp void JNICALL Java_com_sview_StActivity_cppSetQuaternion(JNIEnv* theEnv, jobject theObj, jlong theCppPtr,
171
+ jfloat theX, jfloat theY, jfloat theZ, jfloat theW,
172
+ jfloat theScreenRotDeg) {
173
+ ((StAndroidGlue* )theCppPtr)->setQuaternion(StQuaternion<float>(theX, theY, theZ, theW), theScreenRotDeg);
174
+}
175
+
176
+jexp void JNICALL Java_com_sview_StActivity_cppSetOrientation(JNIEnv* theEnv, jobject theObj, jlong theCppPtr,
177
+ jfloat theAzimuthDeg, jfloat thePitchDeg, jfloat theRollDeg,
178
+ jfloat theScreenRotDeg) {
179
+ ((StAndroidGlue* )theCppPtr)->setOrientation(theAzimuthDeg, thePitchDeg, theRollDeg, theScreenRotDeg);
180
+}
181
+
182
#endif // __ANDROID__
183
sview-15_08.tar.gz/StCore/StApplication.cpp -> sview-15_10.tar.gz/StCore/StApplication.cpp
Changed
40
1
2
// connect slots
3
myWindow->signals.onRedraw = stSlot(this, &StApplication::doDrawProxy);
4
myWindow->signals.onClose = stSlot(this, &StApplication::doClose);
5
+ myWindow->signals.onPause = stSlot(this, &StApplication::doPause);
6
myWindow->signals.onResize = stSlot(this, &StApplication::doResize);
7
myWindow->signals.onAction = stSlot(this, &StApplication::doAction);
8
myWindow->signals.onKeyDown = stSlot(this, &StApplication::doKeyDown);
9
10
exit(0);
11
}
12
13
+void StApplication::doPause(const StPauseEvent& ) {
14
+ if(!myWindow.isNull()) {
15
+ myWindow->beforeClose();
16
+ }
17
+}
18
+
19
const StHandle<StAction>& StApplication::getAction(const int theActionId) {
20
return myActions[theActionId];
21
//return myActions.at(theActionId);
22
23
anIter != myActions.end(); ++anIter) {
24
const StHandle<StAction>& anAction = anIter->second;
25
if(anAction->getHotKey1() != 0) {
26
+ StHandle<StAction> anOldAction = getActionForKey(anAction->getHotKey1());
27
+ if(!anOldAction.isNull()) {
28
+ anOldAction->setHotKey1(0);
29
+ }
30
myKeyActions[anAction->getHotKey1()] = anAction;
31
}
32
if(anAction->getHotKey2() != 0) {
33
+ StHandle<StAction> anOldAction = getActionForKey(anAction->getHotKey2());
34
+ if(!anOldAction.isNull()) {
35
+ anOldAction->setHotKey2(0);
36
+ }
37
myKeyActions[anAction->getHotKey2()] = anAction;
38
}
39
}
40
sview-15_08.tar.gz/StCore/StCocoaView.h -> sview-15_10.tar.gz/StCore/StCocoaView.h
Changed
21
1
2
/**
3
- * Copyright © 2011-2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2011-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* StCore library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
9
*/
10
- (void ) goToWindowed: (id ) theSender;
11
12
+ /**
13
+ * Update window caption.
14
+ * This method should be called from main thread!
15
+ */
16
+ - (void ) updateTitle: (id ) theSender;
17
+
18
@end
19
#else
20
class StCocoaView;
21
sview-15_08.tar.gz/StCore/StCocoaView.mm -> sview-15_10.tar.gz/StCore/StCocoaView.mm
Changed
30
1
2
#include <StStrings/StLogger.h>
3
#include <StTemplates/StRect.h>
4
5
+#include <StCocoa/StCocoaString.h>
6
+
7
#if !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)
8
@interface NSOpenGLView (LionAPI)
9
- (void )setWantsBestResolutionOpenGLSurface: (BOOL )theFlag;
10
11
[aWin setLevel: NSNormalWindowLevel];
12
[aWin setFrame: myRectWindowed display: YES];
13
[aWin makeFirstResponder: self];
14
+
15
+ StCocoaString aTitle(myStWin->getTitle());
16
+ [aWin setTitle: aTitle.toStringNs()];
17
+ }
18
+
19
+ - (void ) updateTitle: (id ) theSender {
20
+ NSWindow* aWin = [self window];
21
+ if(aWin == NULL) {
22
+ return;
23
+ }
24
+
25
+ StCocoaString aTitle(myStWin->getTitle());
26
+ [aWin setTitle: aTitle.toStringNs()];
27
}
28
29
- (NSDragOperation ) draggingEntered: (id <NSDraggingInfo> ) theSender {
30
sview-15_08.tar.gz/StCore/StWindow.cpp -> sview-15_10.tar.gz/StCore/StWindow.cpp
Changed
65
1
2
params.VSyncMode->changeValues().add("Mixed");
3
4
myWin->signals.onClose = &signals.onClose;
5
+ myWin->signals.onPause = &signals.onPause;
6
myWin->signals.onResize = &signals.onResize;
7
myWin->signals.onAnotherMonitor = &signals.onAnotherMonitor;
8
myWin->signals.onKeyUp = &signals.onKeyUp;
9
10
return myWin->isActive();
11
}
12
13
+bool StWindow::isPaused() const {
14
+ return myWin->myIsPaused;
15
+}
16
+
17
bool StWindow::isLostDevice() const {
18
return myWin->myToResetDevice;
19
}
20
21
return myWin->getPlacement();
22
}
23
24
+StRectI_t StWindow::getWindowedPlacement() const {
25
+ return myWin->myRectNorm;
26
+}
27
+
28
bool StWindow::isMovable() const {
29
return myWin->myParentWin == NULL;
30
}
31
32
return NULL;
33
#endif
34
}
35
+
36
+const StString& StWindow::getStatistics() const {
37
+ return myWin->myStatistics;
38
+}
39
+
40
+bool StWindow::hasOrientationSensor() const {
41
+ return myWin->myHasOrientSensor;
42
+}
43
+
44
+bool StWindow::isPoorOrientationSensor() const {
45
+ return myWin->myIsPoorOrient;
46
+}
47
+
48
+bool StWindow::toTrackOrientation() const {
49
+ return myWin->myToTrackOrient;
50
+}
51
+
52
+void StWindow::setTrackOrientation(const bool theToTrack) {
53
+ if(myWin->myHasOrientSensor) {
54
+ myWin->myToTrackOrient = theToTrack;
55
+ }
56
+}
57
+
58
+StQuaternion<double> StWindow::getDeviceOrientation() const {
59
+ if(myWin->myToTrackOrient
60
+ && myWin->myHasOrientSensor) {
61
+ return myWin->myQuaternion;
62
+ }
63
+ return StQuaternion<double>();
64
+}
65
sview-15_08.tar.gz/StCore/StWindowImpl.cpp -> sview-15_10.tar.gz/StCore/StWindowImpl.cpp
Changed
53
1
2
myParentWin(theParentWindow),
3
myWindowTitle(WINDOW_TITLE_DEFAULT),
4
myInitState(STWIN_INITNOTSTART),
5
+ myHasOrientSensor(false),
6
+ myIsPoorOrient(false),
7
+ myToTrackOrient(false),
8
myMousePt(0.5, 0.5),
9
myRectNorm(128, 512, 128, 512),
10
myRectFull(128, 512, 128, 512),
11
12
myToResetDevice(false),
13
myIsUpdated(false),
14
myIsActive(false),
15
+ myIsPaused(false),
16
myBlockSleep(BlockSleep_OFF),
17
+ myIsSystemLocked(false),
18
myIsDispChanged(false),
19
myLastEventsTime(0.0),
20
myEventsThreaded(false),
21
22
#ifndef ES_AWAYMODE_REQUIRED // for old MinGW
23
#define ES_AWAYMODE_REQUIRED ((DWORD)0x00000040)
24
#endif
25
- if(attribs.ToBlockSleepDisplay) {
26
+ if(attribs.ToBlockSleepDisplay
27
+ && !myIsSystemLocked) {
28
// prevent display sleep - call this periodically
29
EXECUTION_STATE aState = ES_CONTINUOUS | ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED;
30
if(myIsVistaPlus) {
31
32
/*#if defined(__ANDROID__)
33
myIsActive = (myMaster.eglSurface != EGL_NO_SURFACE);
34
#else*/
35
- if(attribs.IsFullScreen) {
36
+ if(myIsSystemLocked) {
37
+ myIsActive = false;
38
+ return;
39
+ } else if(attribs.IsFullScreen) {
40
myIsActive = true;
41
return;
42
}
43
44
case stEvent_Close:
45
signals.onClose->emit(anEvent.Close);
46
break;
47
+ case stEvent_Pause:
48
+ signals.onPause->emit(anEvent.Pause);
49
+ break;
50
case stEvent_Size:
51
signals.onResize->emit(anEvent.Size);
52
break;
53
sview-15_08.tar.gz/StCore/StWindowImpl.h -> sview-15_10.tar.gz/StCore/StWindowImpl.h
Changed
46
1
2
/**
3
- * Copyright © 2007-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2007-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* StCore library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
9
const StNativeWin_t theParentWindow);
10
ST_LOCAL ~StWindowImpl();
11
ST_LOCAL void close();
12
+ ST_LOCAL const StString& getTitle() const { return myWindowTitle; }
13
ST_LOCAL void setTitle(const StString& theTitle);
14
ST_LOCAL bool hasDepthBuffer() const { return attribs.GlDepthSize != 0; }
15
ST_LOCAL void getAttributes(StWinAttr* theAttributes) const;
16
17
18
StString myWindowTitle; //!< window caption
19
int myInitState; //!< initialization error code
20
+ StString myStatistics; //!< extra statistics
21
+ StQuaternion<double> myQuaternion; //!< device orientation
22
+ bool myHasOrientSensor; //!< flag indicating that device has orientation sensors
23
+ bool myIsPoorOrient; //!< flag indicating that available orientation sensor provides imprecise values
24
+ bool myToTrackOrient; //!< track device orientation
25
26
StPointD_t myMousePt; //!< mouse coordinates to track activity
27
StRectI_t myRectNorm; //!< master window coordinates in normal state
28
29
bool myToResetDevice; //!< indicate device lost state
30
bool myIsUpdated; //!< helper flag on window movements updates
31
bool myIsActive; //!< window visible state
32
+ bool myIsPaused; //!< window is in background
33
BlockSleep myBlockSleep; //!< indicates that display sleep was blocked or not
34
+ bool myIsSystemLocked; //!< flag indicating that user session is in locked state
35
volatile bool myIsDispChanged; //!< monitors reconfiguration event
36
37
/**
38
39
40
struct {
41
StSignal<void (const StCloseEvent& )>* onClose;
42
+ StSignal<void (const StPauseEvent& )>* onPause;
43
StSignal<void (const StSizeEvent& )>* onResize;
44
StSignal<void (const StSizeEvent& )>* onAnotherMonitor;
45
StSignal<void (const StKeyEvent& )>* onKeyUp;
46
sview-15_08.tar.gz/StCore/StWindowImplAnd.cpp -> sview-15_10.tar.gz/StCore/StWindowImplAnd.cpp
Changed
115
1
2
/**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* StCore library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
9
return false;
10
}
11
12
+ // retrieve fixed information
13
+ myHasOrientSensor = myParentWin->hasOrientationSensor();
14
+ myIsPoorOrient = myParentWin->isPoorOrientationSensor();
15
+
16
myParentWin->signals.onInputEvent += stSlot(this, &StWindowImpl::onAndroidInput);
17
myParentWin->signals.onAppCmd += stSlot(this, &StWindowImpl::onAndroidCommand);
18
19
- // Prepare to monitor accelerometer
20
- //mySensorManager = ASensorManager_getInstance();
21
- //myAccelerometerSensor = ASensorManager_getDefaultSensor(mySensorManager, ASENSOR_TYPE_ACCELEROMETER);
22
- //mySensorEventQueue = ASensorManager_createEventQueue(mySensorManager, myParentWin->getLooper(), LooperId_USER, NULL, NULL);
23
-
24
/*if(myParentWin->getSavedState() != NULL) {
25
// we are starting with a previous saved state; restore from it
26
myState = *(StSavedState* )myParentWin->getSavedState();
27
28
if(aSource != NULL) {
29
aSource->process(myParentWin, aSource);
30
}
31
+
32
if(myToResetDevice || myParentWin->ToDestroy()) {
33
//myToResetDevice = true;
34
myStEvent.Type = stEvent_Close;
35
36
}
37
38
bool StWindowImpl::onAndroidInitWindow() {
39
+ myIsPaused = false;
40
if(myParentWin->getWindow() == NULL) {
41
return false;
42
}
43
44
onAndroidInitWindow();
45
return;
46
}
47
+ case StAndroidGlue::CommandId_BackPressed: {
48
+ myStEvent.Key.Time = getEventTime();
49
+ myStEvent.Key.VKey = ST_VK_ESCAPE;
50
+ myStEvent.Key.Char = 0;
51
+ postKeyDown(myStEvent);
52
+ postKeyUp (myStEvent);
53
+ return;
54
+ }
55
+ case StAndroidGlue::CommandId_Resume: {
56
+ myIsPaused = false;
57
+ return;
58
+ }
59
+ case StAndroidGlue::CommandId_Pause: {
60
+ myIsPaused = true;
61
+ myStEvent.Type = stEvent_Pause;
62
+ myStEvent.Pause.Time = getEventTime();
63
+ signals.onPause->emit(myStEvent.Pause);
64
+ return;
65
+ }
66
case StAndroidGlue::CommandId_Stop: {
67
if(myParentWin->getMemoryClass() < 50) {
68
myStEvent.Type = stEvent_Close;
69
70
return;
71
}
72
case StAndroidGlue::CommandId_FocusGained: {
73
- /*if(myAccelerometerSensor != NULL) {
74
- ASensorEventQueue_enableSensor(mySensorEventQueue, myAccelerometerSensor);
75
- ASensorEventQueue_setEventRate(mySensorEventQueue, myAccelerometerSensor, (1000L / 60) * 1000);
76
- }*/
77
+ //
78
return;
79
}
80
case StAndroidGlue::CommandId_FocusLost: {
81
- /*if(myAccelerometerSensor != NULL) {
82
- ASensorEventQueue_disableSensor(mySensorEventQueue, myAccelerometerSensor);
83
- }*/
84
+ //
85
return;
86
}
87
case StAndroidGlue::CommandId_ConfigChanged: {
88
89
90
// check onNewIntent event
91
StString aDndFile;
92
- if(myParentWin->popOpenNewFile(aDndFile)) {
93
+ myParentWin->setTrackOrientation(myToTrackOrient);
94
+ myParentWin->fetchState(aDndFile, myQuaternion);
95
+ if(!aDndFile.isEmpty()) {
96
myStEvent.Type = stEvent_FileDrop;
97
myStEvent.DNDrop.Time = getEventTime();
98
myStEvent.DNDrop.File = aDndFile.toCString();
99
100
break;
101
}
102
103
- /*if(aPollRes == LooperId_USER) {
104
- if(anEngine.accelerometerSensor != NULL) {
105
- ASensorEvent anEvent;
106
- while(ASensorEventQueue_getEvents(anEngine.sensorEventQueue, &anEvent, 1) > 0) {
107
- anEvent.acceleration.x, anEvent.acceleration.y, anEvent.acceleration.z);
108
- }
109
- }
110
- }*/
111
-
112
// check if we are exiting
113
if(myParentWin->ToDestroy()) {
114
break;
115
sview-15_08.tar.gz/StCore/StWindowImplMac.mm -> sview-15_10.tar.gz/StCore/StWindowImplMac.mm
Changed
34
1
2
3
void StWindowImpl::setTitle(const StString& theTitle) {
4
myWindowTitle = theTitle;
5
- if(myMaster.hWindow != NULL) {
6
- StCocoaLocalPool aLocalPool;
7
- StCocoaString aTitle(myWindowTitle);
8
- [myMaster.hWindow setTitle: aTitle.toStringNs()];
9
+ if(myMaster.hViewGl == NULL) {
10
+ return;
11
+ }
12
+
13
+ if([NSThread isMainThread]) {
14
+ [myMaster.hViewGl updateTitle: NULL];
15
+ } else {
16
+ [myMaster.hViewGl performSelectorOnMainThread: @selector(updateTitle:)
17
+ withObject: NULL
18
+ waitUntilDone: YES];
19
}
20
}
21
22
23
waitUntilDone: YES];
24
}
25
}
26
- if(myMaster.hWindow != NULL) {
27
- StCocoaLocalPool aLocalPool;
28
- StCocoaString aTitle(myWindowTitle);
29
- [myMaster.hWindow setTitle: aTitle.toStringNs()];
30
- }
31
}
32
}
33
34
sview-15_08.tar.gz/StCore/StWindowImplWin.cpp -> sview-15_10.tar.gz/StCore/StWindowImplWin.cpp
Changed
64
1
2
/**
3
- * Copyright © 2007-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2007-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* StCore library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
9
10
#include <StStrings/StLogger.h>
11
#include <StThreads/StThread.h>
12
+#include <StLibrary.h>
13
#include <StGL/StGLContext.h>
14
15
#include <cmath>
16
17
SWP_SHOWWINDOW);
18
}
19
20
+ // register handler to track session lock state (WM_WTSSESSION_CHANGE)
21
+ myIsSystemLocked = false;
22
+ typedef BOOL (WINAPI *WTSRegisterSessionNotification_t )(HWND hWnd, DWORD dwFlags);
23
+ typedef BOOL (WINAPI *WTSUnRegisterSessionNotification_t)(HWND hWnd);
24
+ WTSRegisterSessionNotification_t aSessNotifSetProc = NULL;
25
+ WTSUnRegisterSessionNotification_t aSessNotifUnsetProc = NULL;
26
+ StLibrary aWtsLib;
27
+ if(aWtsLib.loadSimple("Wtsapi32.dll")
28
+ && aWtsLib.find("WTSRegisterSessionNotification", aSessNotifSetProc)
29
+ && aWtsLib.find("WTSUnRegisterSessionNotification", aSessNotifUnsetProc)) {
30
+ #define NOTIFY_FOR_ALL_SESSIONS 1
31
+ #define NOTIFY_FOR_THIS_SESSION 0
32
+ aSessNotifSetProc(myMaster.hWindowGl, NOTIFY_FOR_THIS_SESSION);
33
+ }
34
+
35
// always wait for message thread exit before quit
36
myMaster.EventMsgThread.reset();
37
38
39
UnregisterHotKey(myMaster.hWindowGl, myMaster.myMKeyPrev);
40
UnregisterHotKey(myMaster.hWindowGl, myMaster.myMKeyNext);
41
}
42
+ if(aSessNotifUnsetProc != NULL) {
43
+ aSessNotifUnsetProc(myMaster.hWindowGl);
44
+ }
45
46
mySlave.close(); // close window handles
47
myMaster.close();
48
49
}
50
break;
51
}
52
-
53
+ case WM_WTSSESSION_CHANGE: {
54
+ if(wParam == WTS_SESSION_LOCK) {
55
+ myIsSystemLocked = true;
56
+ } else if(wParam == WTS_SESSION_UNLOCK) {
57
+ myIsSystemLocked = false;
58
+ }
59
+ break;
60
+ }
61
case WM_CLOSE: {
62
myStEvent.Type = stEvent_Close;
63
myStEvent.Close.Time = getEventTime(myEvent.time);
64
sview-15_08.tar.gz/StDiagnostics/StDiagnosticsGUI.cpp -> sview-15_10.tar.gz/StDiagnostics/StDiagnosticsGUI.cpp
Changed
11
1
2
3
void StDiagnosticsGUI::setVisibility(const StPointD_t& , bool ) {
4
myFpsWidget->update(myPlugin->getMainWindow()->isStereoOutput(),
5
- myPlugin->getMainWindow()->getTargetFps());
6
+ myPlugin->getMainWindow()->getTargetFps(),
7
+ myPlugin->getMainWindow()->getStatistics());
8
9
char aBuffer[128];
10
stsprintf(aBuffer, 128, "%04u", myFrameCounter++);
11
sview-15_10.tar.gz/StDiagnostics/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StDiagnostics/lang/czech/StDiagnostics.lng
Added
6
1
2
+Czech translation file for StDiagnostics plugin
3
+@author Kirill Gavrilov
4
+
5
+--------
6
sview-15_10.tar.gz/StDiagnostics/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StGLWidgets/StGLCombobox.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLCombobox.cpp
Changed
42
1
2
aTop = int(aRoot->getCursorZo().y() * aRoot->getRectPx().height());
3
}
4
5
- myMenu = new StGLMenu(aMenuParent, aLeft, aTop, StGLMenu::MENU_VERTICAL, true);
6
+ myMenu = new StGLMenu(aMenuParent, aLeft, aTop, StGLMenu::MENU_VERTICAL, false);
7
+ myMenu->setOpacity(1.0f, false);
8
if(myBack != NULL) {
9
myMenu->setCorner(StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_CENTER));
10
}
11
12
myBack->stglInit();
13
} else {
14
StGLRootWidget* aRoot = myMenu->getRoot();
15
- myMenu->stglInit();
16
+ myMenu->stglUpdateSubmenuLayout();
17
StRectI_t aRect = myMenu->getRectPxAbsolute();
18
const int aRootX = aRoot->getRectPx().width();
19
const int aRootY = aRoot->getRectPx().height();
20
21
} else if(aRect.bottom() > aRootY) {
22
myMenu->changeRectPx().moveBottomTo(aRootY);
23
}
24
+
25
+ for(StGLWidget* aChild = myMenu->getChildren()->getStart(); aChild != NULL; aChild = aChild->getNext()) {
26
+ StGLMenuItem* anItem = (StGLMenuItem* )aChild;
27
+ if(anItem->getSubMenu() == NULL) {
28
+ continue;
29
+ }
30
+
31
+ const StRectI_t aSubRect = anItem->getSubMenu()->getRectPxAbsolute();
32
+ StRectI_t& aSubRectNew = anItem->getSubMenu()->changeRectPx();
33
+ if(aSubRect.width() >= aRootX) {
34
+ aSubRectNew.moveLeftTo(0);
35
+ } else if(aSubRect.right() > aRootX) {
36
+ aSubRectNew.moveRightTo(myMenu->getRectPxAbsolute().left() + aRoot->scale(10));
37
+ }
38
+ }
39
}
40
}
41
42
sview-15_08.tar.gz/StGLWidgets/StGLFpsLabel.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLFpsLabel.cpp
Changed
56
1
2
/**
3
- * Copyright © 2013 Kirill Gavrilov <kirill@sview.ru
4
+ * Copyright © 2013-2015 Kirill Gavrilov <kirill@sview.ru
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
signals.onBtnClick(getUserData());
10
}
11
12
-void StGLFpsLabel::update(const bool theIsStereo,
13
- const double theTargetFps) {
14
+void StGLFpsLabel::update(const bool theIsStereo,
15
+ const double theTargetFps,
16
+ const StString& theExtraInfo) {
17
char aBuffer[128];
18
const double aTime = myTimer.getElapsedTimeInSec();
19
- if(aTime >= 1.0) {
20
- myTimer.restart();
21
- const double aFpsCurrent = double(myCounter) / aTime;
22
- if(myPlayFps <= 0.0) {
23
- stsprintf(aBuffer, 128, "%c %4.1f (%4.1f)",
24
- theIsStereo ? 'S' : 'M', aFpsCurrent, theTargetFps);
25
- } else {
26
- stsprintf(aBuffer, 128, "%c %4.1f (%4.1f)\n%d / %d [%4.1f]",
27
- theIsStereo ? 'S' : 'M', aFpsCurrent, theTargetFps,
28
- myPlayQueued, myPlayQueueLen, myPlayFps);
29
- }
30
- setText(aBuffer);
31
- myCounter = 0;
32
+ if(aTime < 1.0) {
33
+ ++myCounter;
34
+ return;
35
}
36
- ++myCounter;
37
+
38
+ myTimer.restart();
39
+ const double aFpsCurrent = double(myCounter) / aTime;
40
+ if(myPlayFps <= 0.0) {
41
+ stsprintf(aBuffer, 128, "%c %4.1f (%4.1f)",
42
+ theIsStereo ? 'S' : 'M', aFpsCurrent, theTargetFps);
43
+ } else {
44
+ stsprintf(aBuffer, 128, "%c %4.1f (%4.1f)\n%d / %d [%4.1f]",
45
+ theIsStereo ? 'S' : 'M', aFpsCurrent, theTargetFps,
46
+ myPlayQueued, myPlayQueueLen, myPlayFps);
47
+ }
48
+ StString aText(aBuffer);
49
+ if(!theExtraInfo.isEmpty()) {
50
+ aText += "\n";
51
+ aText += theExtraInfo;
52
+ }
53
+ setText(aText);
54
+ myCounter = 1;
55
}
56
sview-15_08.tar.gz/StGLWidgets/StGLImageProgram.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLImageProgram.cpp
Changed
101
1
2
StString(F_DEF_CUBEMAP) + theText);
3
}
4
5
-StGLImageProgram::StGLImageProgram(const StString& theTitle)
6
+StGLImageProgram::StGLImageProgram()
7
: myColorScale(1.0f, 1.0f, 1.0f) {
8
- myTitle = theTitle;
9
+ myTitle = "StGLImageProgram";
10
11
const char F_SHADER_GET_COLOR_BLEND[] =
12
"uniform sampler2D uTexture;\n"
13
14
+ F_SHADER_YUV2RGB_MPEG);
15
16
params.gamma = new StFloat32Param( 1.0f, // initial value
17
- 0.05f, 100.0f, // min, max values
18
+ 0.05f, 99.0f, // min, max values
19
1.0f, // default value
20
0.05f, // incremental step
21
0.0001f); // equality tolerance
22
params.brightness = new StFloat32Param( 1.0f, // initial value
23
- 0.0f, 100.0f, // min, max values
24
+ 0.0f, 99.0f, // min, max values
25
1.0f, // default value
26
0.05f, // incremental step
27
0.0001f); // equality tolerance
28
params.saturation = new StFloat32Param( 1.0f, // initial value
29
- -10.0f, 100.0f, // min, max values
30
+ -10.0f, 99.0f, // min, max values
31
1.0f, // default value
32
0.05f, // incremental step
33
0.0001f); // equality tolerance
34
+
35
+ // main shader parts
36
+ const char V_SHADER_FLAT[] =
37
+ "uniform mat4 uProjMat;\n"
38
+ "uniform mat4 uModelMat;\n"
39
+ "uniform vec4 uTexData;\n"
40
+ "uniform vec4 uTexUVData;\n"
41
+
42
+ "attribute vec4 vVertex;\n"
43
+ "attribute vec2 vTexCoord;\n"
44
+
45
+ "varying vec3 fTexCoord;\n"
46
+ "varying vec3 fTexUVCoord;\n"
47
+
48
+ "void main(void) {\n"
49
+ " fTexCoord = vec3(uTexData.xy + vTexCoord * uTexData.zw, 0.0);\n"
50
+ " fTexUVCoord = vec3(uTexUVData.xy + vTexCoord * uTexUVData.zw, 0.0);\n"
51
+ " gl_Position = uProjMat * uModelMat * vVertex;\n"
52
+ "}\n";
53
+
54
+ const char V_SHADER_CUBEMAP[] =
55
+ "uniform mat4 uProjMat;\n"
56
+ "uniform mat4 uModelMat;\n"
57
+ "uniform vec4 uTexData;\n"
58
+ "uniform vec4 uTexUVData;\n"
59
+
60
+ "attribute vec4 vVertex;\n"
61
+ "attribute vec2 vTexCoord;\n"
62
+
63
+ "varying vec3 fTexCoord;\n"
64
+ "varying vec3 fTexUVCoord;\n"
65
+
66
+ "void main(void) {\n"
67
+ " gl_Position = vec4(vVertex.x, vVertex.y, 0.0, 1.0);\n"
68
+ " fTexCoord = (uProjMat * gl_Position).xyz;"
69
+ " fTexUVCoord = (uProjMat * gl_Position).xyz;"
70
+ "}\n";
71
+
72
+ const char F_SHADER_FLAT[] =
73
+ "varying vec3 fTexCoord;\n"
74
+ "varying vec3 fTexUVCoord;\n"
75
+ // we split these functions for two reasons:
76
+ // - to change function code (like color conversion);
77
+ // - to optimize rendering on old hardware not supported conditions (GeForce FX for example).
78
+ "vec4 getColor(in vec3 texCoord);\n"
79
+ "void convertToRGB(inout vec4 theColor, in vec3 theTexUVCoord);\n"
80
+ "void applyCorrection(inout vec4 theColor);\n"
81
+ "void applyGamma(inout vec4 theColor);\n"
82
+
83
+ "void main(void) {\n"
84
+ // extract color from main texture
85
+ " vec4 aColor = getColor(fTexCoord);\n"
86
+ // convert from alien color model (like YUV) to RGB
87
+ " convertToRGB(aColor, fTexUVCoord);\n"
88
+ // color processing (saturation, brightness, etc)
89
+ " applyCorrection(aColor);\n"
90
+ // gamma correction
91
+ " applyGamma(aColor);\n"
92
+ " gl_FragColor = aColor;\n"
93
+ "}";
94
+
95
+ registerVertexShaderPart (0, VertMain_Normal, V_SHADER_FLAT);
96
+ registerVertexShaderPart (0, VertMain_Cubemap, V_SHADER_CUBEMAP);
97
+ registerFragmentShaderPart(FragSection_Main, 0, F_SHADER_FLAT);
98
}
99
100
StGLImageProgram::~StGLImageProgram() {
101
sview-15_08.tar.gz/StGLWidgets/StGLImageRegion.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLImageRegion.cpp
Changed
582
1
2
3
namespace {
4
5
- class ST_LOCAL StTrackedFloatParam : public StFloat32Param {
6
-
7
- private:
8
-
9
- StHandle<StFloat32Param> myTracked1;
10
- StHandle<StFloat32Param> myTracked2;
11
-
12
- public:
13
-
14
- StTrackedFloatParam(const StHandle<StFloat32Param>& theTracked1,
15
- const StHandle<StFloat32Param>& theTracked2)
16
- : StFloat32Param(theTracked1->getValue(),
17
- theTracked1->getMinValue(),
18
- theTracked1->getMaxValue(),
19
- theTracked1->getDefValue(),
20
- theTracked1->getStep(),
21
- theTracked1->getTolerance()),
22
- myTracked1(theTracked1),
23
- myTracked2(theTracked2) {}
24
-
25
- virtual float getValue() const {
26
- return myTracked1->getValue();
27
- }
28
-
29
- virtual bool setValue(const float theValue) {
30
- if(myTracked1->setValue(theValue)
31
- || myTracked2->setValue(theValue)) {
32
- signals.onChanged(theValue);
33
- return true;
34
- }
35
- return false;
36
- }
37
-
38
- };
39
-
40
class ST_LOCAL StSwapLRParam : public StBoolParam {
41
42
public:
43
44
: StGLWidget(theParent, 0, 0, StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT)),
45
myQuad(),
46
myUVSphere(StGLVec3(0.0f, 0.0f, 0.0f), 1.0f, 64),
47
- myProgramFlat(),
48
- myProgramSphere(),
49
myTextureQueue(theTextureQueue),
50
myClickPntZo(0.0, 0.0),
51
myKeyFlags(ST_VF_NONE),
52
53
params.displayMode->changeValues().add("Cross-eyed"); // MODE_CROSSYED
54
55
params.displayRatio = new StInt32Param(RATIO_AUTO);
56
+ params.ToHealAnamorphicRatio = new StBoolParam(false);
57
params.textureFilter = new StInt32Param(StGLImageProgram::FILTER_LINEAR);
58
- params.gamma = new StTrackedFloatParam(myProgramFlat.params.gamma,
59
- myProgramSphere.params.gamma);
60
- params.brightness = new StTrackedFloatParam(myProgramFlat.params.brightness,
61
- myProgramSphere.params.brightness);
62
- params.saturation = new StTrackedFloatParam(myProgramFlat.params.saturation,
63
- myProgramSphere.params.saturation);
64
+ params.gamma = myProgram.params.gamma;
65
+ params.brightness = myProgram.params.brightness;
66
+ params.saturation = myProgram.params.saturation;
67
params.swapLR = new StSwapLRParam();
68
params.ViewMode = new StViewModeParam();
69
70
71
myActions.add(anAction);
72
73
anAction = new StActionIntSlot(stCString("DoParamsModeNext"), stSlot(this, &StGLImageRegion::doParamsModeNext), 0);
74
- anAction->setDefaultHotKey1(ST_VK_P);
75
myActions.add(anAction);
76
77
anAction = new StActionHoldSlot(stCString("DoParamsPanLeft"), stSlot(this, &StGLImageRegion::doParamsPanLeft));
78
79
myTextureQueue->getQTexture().release(aCtx);
80
myQuad.release(aCtx);
81
myUVSphere.release(aCtx);
82
- myProgramFlat.release(aCtx);
83
- myProgramSphere.release(aCtx);
84
+ myProgram.release(aCtx);
85
}
86
87
StHandle<StStereoParams> StGLImageRegion::getSource() {
88
89
}
90
91
StGLContext& aCtx = getContext();
92
- if(!myProgramFlat.init(aCtx, StImage::ImgColor_RGB, StImage::ImgScale_Full, StGLImageProgram::FragGetColor_Normal)) {
93
- return false;
94
- } else if(!myProgramSphere.init(aCtx, StImage::ImgColor_RGB, StImage::ImgScale_Full, StGLImageProgram::FragGetColor_Normal)) {
95
+ if(!myProgram.init(aCtx, StImage::ImgColor_RGB, StImage::ImgScale_Full, StGLImageProgram::FragGetColor_Normal)) {
96
return false;
97
} else if(!myQuad.initScreen(aCtx)) {
98
ST_DEBUG_LOG("Fail to init StGLQuad");
99
100
101
StGLVec2 StGLImageRegion::getMouseMoveSphere(const StPointD_t& theCursorZoFrom,
102
const StPointD_t& theCursorZoTo) {
103
- /// TODO (Kirill Gavrilov#5) these computations are invalid
104
- StGLVec2 stVec = getMouseMoveFlat(theCursorZoFrom, theCursorZoTo);
105
+ StGLVec2 aVec = getMouseMoveFlat(theCursorZoFrom, theCursorZoTo);
106
GLfloat aSphereScale = SPHERE_RADIUS * PANORAMA_DEF_ZOOM * getSource()->ScaleFactor;
107
- StRectD_t zParams;
108
- getCamera()->getZParams(getCamera()->getZNear(), zParams);
109
- stVec.x() *= -90.0f * GLfloat(zParams.right() - zParams.left()) / aSphereScale;
110
- stVec.y() *= 90.0f * GLfloat(zParams.bottom() - zParams.top()) / aSphereScale;
111
- return stVec;
112
+ StRectD_t aZParams;
113
+ getCamera()->getZParams(getCamera()->getZNear(), aZParams);
114
+ aVec.x() *= -90.0f * GLfloat(aZParams.right() - aZParams.left()) / aSphereScale;
115
+ aVec.y() *= 90.0f * GLfloat(aZParams.bottom() - aZParams.top()) / aSphereScale;
116
+ return aVec;
117
}
118
119
StGLVec2 StGLImageRegion::getMouseMoveSphere() {
120
- return isClicked(ST_MOUSE_LEFT) ? getMouseMoveSphere(myClickPntZo, getRoot()->getCursorZo()) : StGLVec2();
121
+ return isClicked(ST_MOUSE_LEFT)
122
+ ? getMouseMoveSphere(myClickPntZo, getRoot()->getCursorZo())
123
+ : StGLVec2();
124
}
125
126
void StGLImageRegion::stglDraw(unsigned int theView) {
127
128
}
129
130
void StGLImageRegion::stglDrawView(unsigned int theView) {
131
-
132
- StGLQuadTexture::LeftOrRight leftOrRight = StGLQuadTexture::LEFT_TEXTURE;
133
+ StGLQuadTexture::LeftOrRight aLeftOrRight = StGLQuadTexture::LEFT_TEXTURE;
134
StHandle<StStereoParams> aParams = getSource();
135
if(!myIsInitialized || aParams.isNull()) {
136
return;
137
}
138
139
StGLContext& aCtx = getContext();
140
- bool toShowRight = ( aParams->ToSwapLR && (theView == ST_DRAW_LEFT )) ||
141
- (!aParams->ToSwapLR && (theView == ST_DRAW_RIGHT));
142
+ bool toShowRight = ( aParams->ToSwapLR && (theView == ST_DRAW_LEFT ))
143
+ || (!aParams->ToSwapLR && (theView == ST_DRAW_RIGHT));
144
if(aParams->isMono()) {
145
- leftOrRight = StGLQuadTexture::LEFT_TEXTURE;
146
+ aLeftOrRight = StGLQuadTexture::LEFT_TEXTURE;
147
} else if(myTextureQueue->getQTexture().getFront(StGLQuadTexture::RIGHT_TEXTURE).isValid()) {
148
if(toShowRight) {
149
- leftOrRight = StGLQuadTexture::RIGHT_TEXTURE;
150
+ aLeftOrRight = StGLQuadTexture::RIGHT_TEXTURE;
151
}
152
}
153
154
155
156
aCtx.core20fwd->glDisable(GL_BLEND);
157
158
- StGLFrameTextures& stFrameTexture = myTextureQueue->getQTexture().getFront(leftOrRight);
159
- stFrameTexture.bind(aCtx);
160
-
161
- // our model matrix (identity)
162
- StGLMatrix stModelMat;
163
-
164
- StGLVec2 textureSizeVec(GLfloat(stFrameTexture.getPlane(0).getSizeX()),
165
- GLfloat(stFrameTexture.getPlane(0).getSizeY()));
166
- StGLVec2 textureUVSizeVec(GLfloat(stFrameTexture.getPlane(1).getSizeX()),
167
- GLfloat(stFrameTexture.getPlane(1).getSizeY()));
168
+ StGLFrameTextures& aTextures = myTextureQueue->getQTexture().getFront(aLeftOrRight);
169
+ aTextures.bind(aCtx);
170
171
+ StGLVec2 aTextureSize (GLfloat(aTextures.getPlane(0).getSizeX()),
172
+ GLfloat(aTextures.getPlane(0).getSizeY()));
173
+ StGLVec2 aTextureUVSize(GLfloat(aTextures.getPlane(1).getSizeX()),
174
+ GLfloat(aTextures.getPlane(1).getSizeY()));
175
+ StGLMatrix aModelMat;
176
// data rectangle in the texture
177
- StGLVec4 dataClampVec;
178
- StGLVec4 dataUVClampVec;
179
- if(params.textureFilter->getValue() == StGLImageProgram::FILTER_NEAREST
180
- || aParams->ViewingMode == StStereoParams::PANORAMA_SPHERE) {
181
+ StGLVec4 aClampVec, aClampUV;
182
+ if(params.textureFilter->getValue() == StGLImageProgram::FILTER_NEAREST) {
183
myTextureQueue->getQTexture().setMinMagFilter(aCtx, GL_NEAREST);
184
//
185
- dataClampVec.x() = 0.0f;
186
- dataClampVec.y() = 0.0f;
187
- dataClampVec.z() = stFrameTexture.getPlane(0).getDataSize().x();
188
- dataClampVec.w() = stFrameTexture.getPlane(0).getDataSize().y();
189
+ aClampVec.x() = 0.0f;
190
+ aClampVec.y() = 0.0f;
191
+ aClampVec.z() = aTextures.getPlane(0).getDataSize().x();
192
+ aClampVec.w() = aTextures.getPlane(0).getDataSize().y();
193
// UV
194
- dataUVClampVec.x() = 0.0f;
195
- dataUVClampVec.y() = 0.0f;
196
- dataUVClampVec.z() = stFrameTexture.getPlane(1).getDataSize().x();
197
- dataUVClampVec.w() = stFrameTexture.getPlane(1).getDataSize().y();
198
+ aClampUV.x() = 0.0f;
199
+ aClampUV.y() = 0.0f;
200
+ aClampUV.z() = aTextures.getPlane(1).getDataSize().x();
201
+ aClampUV.w() = aTextures.getPlane(1).getDataSize().y();
202
} else {
203
myTextureQueue->getQTexture().setMinMagFilter(aCtx, GL_LINEAR);
204
//
205
- dataClampVec.x() = 0.5f / textureSizeVec.x();
206
- dataClampVec.y() = 0.5f / textureSizeVec.y();
207
- dataClampVec.z() = stFrameTexture.getPlane(0).getDataSize().x() - 2.0f * dataClampVec.x();
208
- dataClampVec.w() = stFrameTexture.getPlane(0).getDataSize().y() - 2.0f * dataClampVec.y();
209
+ aClampVec.x() = 0.5f / aTextureSize.x();
210
+ aClampVec.y() = 0.5f / aTextureSize.y();
211
+ aClampVec.z() = aTextures.getPlane(0).getDataSize().x() - 2.0f * aClampVec.x();
212
+ aClampVec.w() = aTextures.getPlane(0).getDataSize().y() - 2.0f * aClampVec.y();
213
// UV
214
- if(textureUVSizeVec.x() > 0.0f && textureUVSizeVec.y() > 0.0f) {
215
- dataUVClampVec.x() = 0.5f / textureUVSizeVec.x();
216
- dataUVClampVec.y() = 0.5f / textureUVSizeVec.y(),
217
- dataUVClampVec.z() = stFrameTexture.getPlane(1).getDataSize().x() - 2.0f * dataUVClampVec.x();
218
- dataUVClampVec.w() = stFrameTexture.getPlane(1).getDataSize().y() - 2.0f * dataUVClampVec.y();
219
+ if(aTextureUVSize.x() > 0.0f
220
+ && aTextureUVSize.y() > 0.0f) {
221
+ aClampUV.x() = 0.5f / aTextureUVSize.x();
222
+ aClampUV.y() = 0.5f / aTextureUVSize.y(),
223
+ aClampUV.z() = aTextures.getPlane(1).getDataSize().x() - 2.0f * aClampUV.x();
224
+ aClampUV.w() = aTextures.getPlane(1).getDataSize().y() - 2.0f * aClampUV.y();
225
}
226
}
227
228
229
const StGLVec2 aPanBack = aParams->PanCenter;
230
231
StStereoParams::ViewMode aViewMode = aParams->ViewingMode;
232
- if(stFrameTexture.getPlane(0).getTarget() == GL_TEXTURE_CUBE_MAP) {
233
+ if(aTextures.getPlane(0).getTarget() == GL_TEXTURE_CUBE_MAP) {
234
aViewMode = StStereoParams::PANORAMA_CUBEMAP;
235
} else if(aViewMode == StStereoParams::PANORAMA_CUBEMAP) {
236
aViewMode = StStereoParams::FLAT_IMAGE;
237
}
238
+
239
+ myProgram.setColorScale(aColorScale); // apply de-anaglyph color filter
240
+ StGLImageProgram::FragGetColor aColorGetter = params.textureFilter->getValue() == StGLImageProgram::FILTER_BLEND
241
+ ? StGLImageProgram::FragGetColor_Blend
242
+ : StGLImageProgram::FragGetColor_Normal;
243
switch(aViewMode) {
244
default:
245
case StStereoParams::FLAT_IMAGE: {
246
- myProgramFlat.setColorScale(aColorScale); // apply de-anaglyph color filter
247
- StGLImageProgram::FragGetColor aColorGetter = params.textureFilter->getValue() == StGLImageProgram::FILTER_BLEND
248
- ? StGLImageProgram::FragGetColor_Blend
249
- : StGLImageProgram::FragGetColor_Normal;
250
- if(!myProgramFlat.init(aCtx, stFrameTexture.getColorModel(), stFrameTexture.getColorScale(), aColorGetter)) {
251
+ if(!myProgram.init(aCtx, aTextures.getColorModel(), aTextures.getColorScale(), aColorGetter)) {
252
break;
253
}
254
255
- myProgramFlat.getActiveProgram()->use(aCtx);
256
+ myProgram.getActiveProgram()->use(aCtx);
257
258
// setup data rectangle in the texture
259
- myProgramFlat.setTextureSizePx (aCtx, textureSizeVec);
260
- myProgramFlat.setTextureMainDataSize(aCtx, dataClampVec);
261
- myProgramFlat.setTextureUVDataSize (aCtx, dataUVClampVec);
262
+ myProgram.setTextureSizePx (aCtx, aTextureSize);
263
+ myProgram.setTextureMainDataSize(aCtx, aClampVec);
264
+ myProgram.setTextureUVDataSize (aCtx, aClampUV);
265
266
// lenses center correction
267
const GLfloat aLestDisp = getRoot()->getLensDist() * GLfloat(getRoot()->getRectPx().ratio());
268
if(theView == ST_DRAW_LEFT) {
269
- stModelMat.translate(StGLVec3( aLestDisp, 0.0f, 0.0f));
270
+ aModelMat.translate(StGLVec3( aLestDisp, 0.0f, 0.0f));
271
} else {
272
- stModelMat.translate(StGLVec3(-aLestDisp, 0.0f, 0.0f));
273
+ aModelMat.translate(StGLVec3(-aLestDisp, 0.0f, 0.0f));
274
}
275
276
// handle dragging timer
277
278
const StPointD_t aCurr = getRoot()->getCursorZo();
279
const int aDx = int((aCurr.x() - myClickPntZo.x()) * double(getRectPx().width()));
280
const int aDy = int((aCurr.y() - myClickPntZo.y()) * double(getRectPx().height()));
281
- if(std::abs(aDx) > 1
282
- || std::abs(aDy) > 1) {
283
+ if(std::abs(aDx) > myRoot->getClickThreshold()
284
+ || std::abs(aDy) > myRoot->getClickThreshold()) {
285
myIsClickAborted = true;
286
myClickTimer.stop();
287
}
288
289
}
290
291
// apply scale
292
- stModelMat.scale(aParams->ScaleFactor, aParams->ScaleFactor, 1.0f);
293
+ aModelMat.scale(aParams->ScaleFactor, aParams->ScaleFactor, 1.0f);
294
295
// apply position
296
- stModelMat.translate(StGLVec3(aParams->PanCenter));
297
+ aModelMat.translate(StGLVec3(aParams->PanCenter));
298
299
// apply rotations
300
if(theView == ST_DRAW_LEFT) {
301
- stModelMat.rotate(aParams->getZRotate() - aParams->getSepRotation(), StGLVec3::DZ());
302
+ aModelMat.rotate(aParams->getZRotate() - aParams->getSepRotation(), StGLVec3::DZ());
303
} else if(theView == ST_DRAW_RIGHT) {
304
- stModelMat.rotate(aParams->getZRotate() + aParams->getSepRotation(), StGLVec3::DZ());
305
+ aModelMat.rotate(aParams->getZRotate() + aParams->getSepRotation(), StGLVec3::DZ());
306
} else {
307
- stModelMat.rotate(aParams->getZRotate(), StGLVec3::DZ());
308
+ aModelMat.rotate(aParams->getZRotate(), StGLVec3::DZ());
309
}
310
- stModelMat.rotate(anXRotate, StGLVec3::DX());
311
- stModelMat.rotate(anYRotate, StGLVec3::DY());
312
-
313
- /// TODO (Kirill Gavrilov#8) implement fit all for rotated image
314
+ aModelMat.rotate(anXRotate, StGLVec3::DX());
315
+ aModelMat.rotate(anYRotate, StGLVec3::DY());
316
317
// check window ratio to fill whole image in normal zoom
318
- GLfloat dispRatio = 1.0f;
319
+ GLfloat aDispRatio = 1.0f;
320
switch(params.displayRatio->getValue()) {
321
- case RATIO_1_1: dispRatio = 1.0f; break;
322
- case RATIO_4_3: dispRatio = 1.3333333333f; break;
323
- case RATIO_16_9: dispRatio = 1.7777777778f; break;
324
- case RATIO_16_10: dispRatio = 1.6f; break;
325
- case RATIO_221_1: dispRatio = 2.21f; break;
326
- case RATIO_5_4: dispRatio = 1.25f; break;
327
+ case RATIO_1_1: aDispRatio = 1.0f; break;
328
+ case RATIO_4_3: aDispRatio = 1.3333333333f; break;
329
+ case RATIO_16_9: aDispRatio = 1.7777777778f; break;
330
+ case RATIO_16_10: aDispRatio = 1.6f; break;
331
+ case RATIO_221_1: aDispRatio = 2.21f; break;
332
+ case RATIO_5_4: aDispRatio = 1.25f; break;
333
case RATIO_AUTO:
334
- default: dispRatio = stFrameTexture.getPlane().getDisplayRatio(); break;
335
+ default: {
336
+ aDispRatio = aTextures.getPlane().getDisplayRatio();
337
+ if(params.ToHealAnamorphicRatio->getValue()
338
+ && aParams->Src2SizeX == 0 && aParams->Src2SizeY == 0
339
+ && ((aParams->Src1SizeX == 1920 && aParams->Src1SizeY >= 800 && aParams->Src1SizeY <= 1088)
340
+ || (aParams->Src1SizeX == 1280 && aParams->Src1SizeY >= 530 && aParams->Src1SizeY <= 720))) {
341
+ switch(aParams->StereoFormat) {
342
+ case StFormat_SideBySide_LR:
343
+ case StFormat_SideBySide_RL: {
344
+ if(aDispRatio >= 0.85 && aDispRatio <= 1.18) {
345
+ aDispRatio *= 2.0;
346
+ }
347
+ break;
348
+ }
349
+ case StFormat_TopBottom_LR:
350
+ case StFormat_TopBottom_RL: {
351
+ if(aDispRatio >= 3.5 && aDispRatio <= 4.8) {
352
+ aDispRatio *= 0.5;
353
+ }
354
+ break;
355
+ }
356
+ default: break;
357
+ }
358
+ }
359
+ break;
360
+ }
361
}
362
363
- GLfloat rectRatio = GLfloat(aFrameRectPx.ratio());
364
- StGLVec2 ratioScale = aParams->getRatioScale(rectRatio, dispRatio);
365
- stModelMat.scale(ratioScale.x(), ratioScale.y(), 1.0f);
366
+ GLfloat aRectRatio = GLfloat(aFrameRectPx.ratio());
367
+ StGLVec2 aRatioScale = aParams->getRatioScale(aRectRatio, aDispRatio);
368
+ aModelMat.scale(aRatioScale.x(), aRatioScale.y(), 1.0f);
369
370
// apply separation
371
- GLfloat aSepDeltaX = (2.0f * aParams->getSeparationDx()) / (stFrameTexture.getPlane().getDataSize().x() * stFrameTexture.getPlane().getSizeX());
372
- GLfloat aSepDeltaY = (2.0f * aParams->getSeparationDy()) / (stFrameTexture.getPlane().getDataSize().y() * stFrameTexture.getPlane().getSizeY());
373
+ GLfloat aSepDeltaX = (2.0f * aParams->getSeparationDx()) / (aTextures.getPlane().getDataSize().x() * aTextures.getPlane().getSizeX());
374
+ GLfloat aSepDeltaY = (2.0f * aParams->getSeparationDy()) / (aTextures.getPlane().getDataSize().y() * aTextures.getPlane().getSizeY());
375
if(theView == ST_DRAW_LEFT) {
376
- stModelMat.translate(StGLVec3(-aSepDeltaX * 0.5f, -aSepDeltaY * 0.5f, 0.0f));
377
+ aModelMat.translate(StGLVec3(-aSepDeltaX * 0.5f, -aSepDeltaY * 0.5f, 0.0f));
378
} else if(theView == ST_DRAW_RIGHT) {
379
- stModelMat.translate(StGLVec3( aSepDeltaX * 0.5f, aSepDeltaY * 0.5f, 0.0f));
380
+ aModelMat.translate(StGLVec3( aSepDeltaX * 0.5f, aSepDeltaY * 0.5f, 0.0f));
381
}
382
383
- StGLMatrix stOrthoMat;
384
- stOrthoMat.initOrtho(StGLVolume(-rectRatio * aFrustrumL, rectRatio * aFrustrumR,
385
- -1.0f * aFrustrumB, 1.0f * aFrustrumT,
386
+ StGLMatrix anOrthoMat;
387
+ anOrthoMat.initOrtho(StGLVolume(-aRectRatio * aFrustrumL, aRectRatio * aFrustrumR,
388
+ -1.0f * aFrustrumB, 1.0f * aFrustrumT,
389
-1.0f, 1.0f));
390
- myProgramFlat.getActiveProgram()->setProjMat (aCtx, stOrthoMat);
391
- myProgramFlat.getActiveProgram()->setModelMat(aCtx, stModelMat);
392
+ myProgram.getActiveProgram()->setProjMat (aCtx, anOrthoMat);
393
+ myProgram.getActiveProgram()->setModelMat(aCtx, aModelMat);
394
395
- myQuad.draw(aCtx, *myProgramFlat.getActiveProgram());
396
+ myQuad.draw(aCtx, *myProgram.getActiveProgram());
397
398
- myProgramFlat.getActiveProgram()->unuse(aCtx);
399
+ myProgram.getActiveProgram()->unuse(aCtx);
400
401
// restore changed parameters
402
aParams->ScaleFactor = aScaleBack;
403
404
break;
405
}
406
case StStereoParams::PANORAMA_CUBEMAP: {
407
- myProgramFlat.setColorScale(aColorScale); // apply de-anaglyph color filter
408
- StGLImageProgram::FragGetColor aColorGetter = StGLImageProgram::FragGetColor_Cubemap;
409
- if(!myProgramFlat.init(aCtx, stFrameTexture.getColorModel(), stFrameTexture.getColorScale(), aColorGetter)) {
410
+ if(!myProgram.init(aCtx, aTextures.getColorModel(), aTextures.getColorScale(), StGLImageProgram::FragGetColor_Cubemap)) {
411
break;
412
}
413
414
- myProgramFlat.getActiveProgram()->use(aCtx);
415
+ myProgram.getActiveProgram()->use(aCtx);
416
417
// setup data rectangle in the texture
418
- myProgramFlat.setTextureSizePx (aCtx, textureSizeVec);
419
- myProgramFlat.setTextureMainDataSize(aCtx, dataClampVec);
420
- myProgramFlat.setTextureUVDataSize (aCtx, dataUVClampVec);
421
+ myProgram.setTextureSizePx (aCtx, aTextureSize);
422
+ myProgram.setTextureMainDataSize(aCtx, aClampVec);
423
+ myProgram.setTextureUVDataSize (aCtx, aClampUV);
424
425
const GLfloat aScale = aParams->ScaleFactor * PANORAMA_DEF_ZOOM;
426
- stModelMat.scale(aScale, aScale, 1.0f);
427
+ aModelMat.scale(aScale, aScale, 1.0f);
428
429
- StGLVec2 mouseMove = getMouseMoveSphere();
430
- stModelMat.rotate( aParams->PanTheta + mouseMove.y(), StGLVec3::DX());
431
- stModelMat.rotate(90.0f - (aParams->PanPhi + mouseMove.x()), StGLVec3::DY());
432
+ // compute orientation
433
+ StGLVec2 aMouseMove = getMouseMoveSphere();
434
+ float aYaw = -stToRadians(aParams->PanPhi + aMouseMove.x()) + stToRadians(90.0f);
435
+ float aPitch = stToRadians(StStereoParams::clipPitch(aParams->PanTheta + aMouseMove.y()));
436
+ float aRoll = stToRadians(aParams->getZRotate());
437
438
- GLfloat aSepDeltaX = GLfloat(-aParams->getSeparationDx()) * 0.05f;
439
- GLfloat aSepDeltaY = GLfloat(-aParams->getSeparationDy()) * 0.05f;
440
+ // apply separation
441
+ const float aSepDeltaX = GLfloat(aParams->getSeparationDx()) * 0.05f;
442
+ const float aSepDeltaY = GLfloat(aParams->getSeparationDy()) * 0.05f;
443
if(theView == ST_DRAW_LEFT) {
444
- stModelMat.rotate( aSepDeltaX, StGLVec3::DY());
445
- stModelMat.rotate(-aSepDeltaY, StGLVec3::DZ());
446
- stModelMat.rotate(-aParams->getZRotate() + aParams->getSepRotation(), StGLVec3::DX());
447
+ aYaw += stToRadians(aSepDeltaX);
448
+ aPitch += -stToRadians(aSepDeltaY);
449
+ aRoll += -stToRadians(aParams->getSepRotation());
450
} else if(theView == ST_DRAW_RIGHT) {
451
- stModelMat.rotate(-aSepDeltaX, StGLVec3::DY());
452
- stModelMat.rotate( aSepDeltaY, StGLVec3::DZ());
453
- stModelMat.rotate(-aParams->getZRotate() - aParams->getSepRotation(), StGLVec3::DX());
454
- } else {
455
- stModelMat.rotate(-aParams->getZRotate(), StGLVec3::DX());
456
+ aYaw += -stToRadians(aSepDeltaX);
457
+ aPitch += stToRadians(aSepDeltaY);
458
+ aRoll += stToRadians(aParams->getSepRotation());
459
}
460
461
+ const StGLQuaternion anOriYaw = StGLQuaternion(StGLVec3::DY(), aYaw);
462
+ const StGLQuaternion anOriPitch = StGLQuaternion(StGLVec3::DX(), aPitch);
463
+ const StGLQuaternion anOriRoll = StGLQuaternion(StGLVec3::DZ(), aRoll);
464
+ StGLQuaternion anOri = StGLQuaternion::multiply(anOriPitch, anOriYaw);
465
+ anOri = StGLQuaternion::multiply(anOriRoll, anOri);
466
+ anOri = StGLQuaternion::multiply(myDeviceQuat, anOri);
467
+
468
+ aModelMat = StGLMatrix::multiply(aModelMat, StGLMatrix(anOri));
469
+
470
StGLMatrix aMatModelInv, aMatProjInv;
471
- stModelMat.inverted(aMatModelInv);
472
+ aModelMat.inverted(aMatModelInv);
473
getCamera()->getProjMatrixMono().inverted(aMatProjInv);
474
- myProgramFlat.getActiveProgram()->setProjMat (aCtx, StGLMatrix::multiply(aMatModelInv, aMatProjInv));
475
- myProgramFlat.getActiveProgram()->setModelMat(aCtx, stModelMat);
476
+ myProgram.getActiveProgram()->setProjMat (aCtx, StGLMatrix::multiply(aMatModelInv, aMatProjInv));
477
+ myProgram.getActiveProgram()->setModelMat(aCtx, aModelMat);
478
479
///glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
480
481
- myQuad.draw(aCtx, *myProgramFlat.getActiveProgram());
482
+ myQuad.draw(aCtx, *myProgram.getActiveProgram());
483
484
- myProgramFlat.getActiveProgram()->unuse(aCtx);
485
+ myProgram.getActiveProgram()->unuse(aCtx);
486
487
// restore changed parameters
488
aParams->ScaleFactor = aScaleBack;
489
490
break;
491
}
492
case StStereoParams::PANORAMA_SPHERE: {
493
- myProgramSphere.setColorScale(aColorScale); // apply de-anaglyph color filter
494
- StGLImageProgram::FragGetColor aColorGetter = params.textureFilter->getValue() != StGLImageProgram::FILTER_NEAREST
495
- ? StGLImageProgram::FragGetColor_Blend
496
- : StGLImageProgram::FragGetColor_Normal;
497
- if(!myProgramSphere.init(aCtx, stFrameTexture.getColorModel(), stFrameTexture.getColorScale(), aColorGetter)) {
498
+ if(!myProgram.init(aCtx, aTextures.getColorModel(), aTextures.getColorScale(), aColorGetter)) {
499
break;
500
}
501
502
// perform scaling
503
const GLfloat aScale = SPHERE_RADIUS * PANORAMA_DEF_ZOOM * aParams->ScaleFactor;
504
- stModelMat.scale(aScale, aScale, SPHERE_RADIUS);
505
+ aModelMat.scale(aScale, aScale, SPHERE_RADIUS);
506
507
- // apply movements
508
- StGLVec2 mouseMove = getMouseMoveSphere();
509
- stModelMat.rotate( aParams->PanTheta + mouseMove.y(), StGLVec3::DX());
510
- stModelMat.rotate(90.0f - (aParams->PanPhi + mouseMove.x()), StGLVec3::DY());
511
+ // compute orientation
512
+ StGLVec2 aMouseMove = getMouseMoveSphere();
513
+ float aYaw = -stToRadians(aParams->PanPhi + aMouseMove.x()) + stToRadians(90.0f);
514
+ float aPitch = stToRadians(StStereoParams::clipPitch(aParams->PanTheta + aMouseMove.y()));
515
+ float aRoll = stToRadians(aParams->getZRotate());
516
517
- GLfloat aSepDeltaX = GLfloat(-aParams->getSeparationDx()) * 0.05f;
518
- //GLfloat aSepDeltaY = GLfloat(-aParams->getSeparationDy()) * 0.05f;
519
-
520
- // apply rotations
521
+ // apply separation
522
+ const float aSepDeltaX = GLfloat(aParams->getSeparationDx()) * 0.05f;
523
+ const float aSepDeltaY = GLfloat(aParams->getSeparationDy()) * 0.05f;
524
if(theView == ST_DRAW_LEFT) {
525
- stModelMat.rotate( aSepDeltaX, StGLVec3::DY());
526
- //stModelMat.rotate(-aSepDeltaY, StGLVec3::DZ());
527
- //stModelMat.rotate(aParams->getZRotate() - aParams->getSepRotation(), StGLVec3::DX());
528
+ aYaw += stToRadians(aSepDeltaX);
529
+ aPitch += -stToRadians(aSepDeltaY);
530
+ aRoll += -stToRadians(aParams->getSepRotation());
531
} else if(theView == ST_DRAW_RIGHT) {
532
- stModelMat.rotate(-aSepDeltaX, StGLVec3::DY());
533
- //stModelMat.rotate( aSepDeltaY, StGLVec3::DZ());
534
- //stModelMat.rotate(aParams->getZRotate() + aParams->getSepRotation(), StGLVec3::DX());
535
- } else {
536
- //stModelMat.rotate(aParams->getZRotate(), StGLVec3::DX());
537
+ aYaw += -stToRadians(aSepDeltaX);
538
+ aPitch += stToRadians(aSepDeltaY);
539
+ aRoll += stToRadians(aParams->getSepRotation());
540
}
541
542
+ const StGLQuaternion anOriYaw = StGLQuaternion(StGLVec3::DY(), aYaw);
543
+ const StGLQuaternion anOriPitch = StGLQuaternion(StGLVec3::DX(), aPitch);
544
+ const StGLQuaternion anOriRoll = StGLQuaternion(StGLVec3::DZ(), aRoll);
545
+ StGLQuaternion anOri = StGLQuaternion::multiply(anOriPitch, anOriYaw);
546
+ anOri = StGLQuaternion::multiply(anOriRoll, anOri);
547
+ anOri = StGLQuaternion::multiply(myDeviceQuat, anOri);
548
+
549
+ aModelMat = StGLMatrix::multiply(aModelMat, StGLMatrix(anOri));
550
+
551
// perform drawing
552
- myProgramSphere.getActiveProgram()->use(aCtx);
553
+ myProgram.getActiveProgram()->use(aCtx);
554
555
// setup data rectangle in the texture
556
- myProgramSphere.setTextureSizePx (aCtx, textureSizeVec);
557
- myProgramSphere.setTextureMainDataSize(aCtx, dataClampVec);
558
- myProgramSphere.setTextureUVDataSize (aCtx, dataUVClampVec);
559
+ myProgram.setTextureSizePx (aCtx, aTextureSize);
560
+ myProgram.setTextureMainDataSize(aCtx, aClampVec);
561
+ myProgram.setTextureUVDataSize (aCtx, aClampUV);
562
563
- myProgramSphere.getActiveProgram()->setProjMat (aCtx, getCamera()->getProjMatrixMono());
564
- myProgramSphere.getActiveProgram()->setModelMat(aCtx, stModelMat);
565
+ myProgram.getActiveProgram()->setProjMat (aCtx, getCamera()->getProjMatrixMono());
566
+ myProgram.getActiveProgram()->setModelMat(aCtx, aModelMat);
567
568
- myUVSphere.draw(aCtx, *myProgramSphere.getActiveProgram());
569
+ myUVSphere.draw(aCtx, *myProgram.getActiveProgram());
570
571
- myProgramSphere.getActiveProgram()->unuse(aCtx);
572
+ myProgram.getActiveProgram()->unuse(aCtx);
573
break;
574
}
575
}
576
577
- stFrameTexture.unbind(aCtx);
578
+ aTextures.unbind(aCtx);
579
580
aCtx.stglResetScissorRect();
581
}
582
sview-15_08.tar.gz/StGLWidgets/StGLMenu.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLMenu.cpp
Changed
29
1
2
myColorVec(getRoot()->getColorForElement(StGLRootWidget::Color_Menu)),
3
myOrient(theOrient),
4
myItemHeight(theParent->getRoot()->scale(theParent->getRoot()->isMobile() ? 40 : 32)),
5
+ myWidthMin(0),
6
myWidth(0),
7
myIsRootMenu(theIsRootMenu),
8
myIsContextual(false),
9
10
changeRectPx().right() = getRectPx().left() + aChildLast->getRectPx().right();
11
changeRectPx().bottom() = getRectPx().top() + aChildLast->getRectPx().bottom();
12
}
13
+ int aWidth = stMax(myWidthMin, myWidth);
14
if(myOrient == MENU_VERTICAL
15
|| myOrient == MENU_VERTICAL_COMPACT) {
16
- changeRectPx().right() = getRectPx().left() + myWidth;
17
+ changeRectPx().right() = getRectPx().left() + aWidth;
18
int anItemCount = 0;
19
for(StGLWidget* aChild = getChildren()->getStart(); aChild != NULL; aChild = aChild->getNext(), ++anItemCount) {
20
StGLMenuItem* anItem = (StGLMenuItem* )aChild;
21
anItem->changeRectPx().moveTopTo(anItemCount * myItemHeight);
22
- anItem->changeRectPx().right() = anItem->getRectPx().left() + myWidth;
23
- anItem->setTextWidth(myWidth);
24
+ anItem->changeRectPx().right() = anItem->getRectPx().left() + aWidth;
25
+ anItem->setTextWidth(aWidth);
26
if(anItem->getSubMenu() != NULL) {
27
anItem->getSubMenu()->changeRectPx().moveTopLeftTo(getRectPxAbsolute().right() - myRoot->scale(10),
28
anItem->getRectPxAbsolute().top());
29
sview-15_08.tar.gz/StGLWidgets/StGLMenuItem.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLMenuItem.cpp
Changed
15
1
2
return this;
3
}
4
5
+void StGLMenuItem::setIcon(StGLIcon* theIcon) {
6
+ if(myIcon != NULL) {
7
+ delete myIcon;
8
+ }
9
+ myIcon = theIcon;
10
+}
11
+
12
void StGLMenuItem::setHilightText() {
13
myToHilightText = true;
14
}
15
sview-15_08.tar.gz/StGLWidgets/StGLMessageBox.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLMessageBox.cpp
Changed
25
1
2
static const int OFFSET_PIXELS = 32;
3
}
4
5
+StGLMessageBox::StGLMessageBox(StGLWidget* theParent)
6
+: StGLWidget(theParent, 0, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_CENTER), 32, 32),
7
+ myContent(NULL),
8
+ myTitle(NULL),
9
+ myBtnPanel(NULL),
10
+ myDefaultBtn(NULL),
11
+ myButtonsNb(0),
12
+ myMarginLeft(0),
13
+ myMarginRight(0),
14
+ myMarginTop(0),
15
+ myMarginBottom(0),
16
+ myMinSizeY(0),
17
+ myToAdjustY(true),
18
+ myIsContextual(false) {
19
+ //
20
+}
21
+
22
StGLMessageBox::StGLMessageBox(StGLWidget* theParent,
23
const StString& theTitle,
24
const StString& theText,
25
sview-15_10.tar.gz/StGLWidgets/StGLOpenFile.cpp
Added
214
1
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#include <StGLWidgets/StGLOpenFile.h>
11
+
12
+#include <StGLWidgets/StGLMenu.h>
13
+#include <StGLWidgets/StGLMenuItem.h>
14
+#include <StGLWidgets/StGLScrollArea.h>
15
+#include <StGLWidgets/StGLTextureButton.h>
16
+
17
+StGLOpenFile::StGLOpenFile(StGLWidget* theParent,
18
+ const StString& theTitle,
19
+ const StString& theCloseText)
20
+: StGLMessageBox(theParent, theTitle, "",
21
+ theParent->getRoot()->scale(512), theParent->getRoot()->scale(400)),
22
+ myCurrentPath(NULL),
23
+ myHotList(NULL),
24
+ myList(NULL),
25
+ myHighlightColor(0.5f, 0.5f, 0.5f, 1.0f),
26
+ myItemColor (1.0f, 1.0f, 1.0f, 1.0f),
27
+ myFileColor (0.7f, 0.7f, 0.7f, 1.0f),
28
+ myHotColor (1.0f, 1.0f, 1.0f, 1.0f),
29
+ myHotSizeX (theParent->getRoot()->scale(10)),
30
+ myMarginX (theParent->getRoot()->scale(8)),
31
+ myIconSizeX(theParent->getRoot()->scale(16)) {
32
+ myToAdjustY = false;
33
+
34
+ int aMarginTop = myMarginTop + myRoot->scale(30);
35
+ myCurrentPath = new StGLTextArea(this, myMarginLeft, myMarginTop, StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT),
36
+ myContent->getRectPx().width(), myContent->getRectPx().height());
37
+ myCurrentPath->setupAlignment(StGLTextFormatter::ST_ALIGN_X_LEFT,
38
+ StGLTextFormatter::ST_ALIGN_Y_TOP);
39
+ myCurrentPath->setTextColor(myRoot->getColorForElement(StGLRootWidget::Color_MessageText));
40
+
41
+ myHotList = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL_COMPACT);
42
+ myHotList->setOpacity(1.0f, true);
43
+ myHotList->setItemWidth(myHotSizeX);
44
+ myHotList->setColor(StGLVec4(0.0f, 0.0f, 0.0f, 0.0f));
45
+ myHotList->changeRectPx().top() = aMarginTop;
46
+ myHotList->changeRectPx().left() = myMarginLeft;
47
+ myHotList->changeRectPx().right() = myMarginLeft + myHotSizeX;
48
+ myContent->changeRectPx().top() = aMarginTop;
49
+ myContent->changeRectPx().left() = myMarginLeft + myHotSizeX;
50
+
51
+ myList = new StGLMenu(myContent, 0, 0, StGLMenu::MENU_VERTICAL_COMPACT);
52
+ myList->setOpacity(1.0f, true);
53
+ myList->setColor(StGLVec4(0.0f, 0.0f, 0.0f, 0.0f));
54
+ myList->setItemWidthMin(myContent->getRectPx().width());
55
+
56
+ if(!myRoot->isMobile()) {
57
+ addButton(theCloseText);
58
+ }
59
+}
60
+
61
+StGLOpenFile::~StGLOpenFile() {
62
+ StGLContext& aCtx = getContext();
63
+ if(!myTextureFolder.isNull()) {
64
+ for(size_t aTexIter = 0; aTexIter < myTextureFolder->size(); ++aTexIter) {
65
+ myTextureFolder->changeValue(aTexIter).release(aCtx);
66
+ }
67
+ myTextureFolder.nullify();
68
+ }
69
+ if(!myTextureFile.isNull()) {
70
+ for(size_t aTexIter = 0; aTexIter < myTextureFile->size(); ++aTexIter) {
71
+ myTextureFile->changeValue(aTexIter).release(aCtx);
72
+ }
73
+ myTextureFile.nullify();
74
+ }
75
+}
76
+
77
+void StGLOpenFile::setMimeList(const StMIMEList& theFilter) {
78
+ myFilter = theFilter;
79
+ myExtensions = theFilter.getExtensionsList();
80
+}
81
+
82
+void StGLOpenFile::doHotItemClick(const size_t theItemId) {
83
+ myItemToLoad = myHotPaths[theItemId];
84
+}
85
+
86
+void StGLOpenFile::doFileItemClick(const size_t theItemId) {
87
+ const StFileNode* aNode = myFolder->getValue(theItemId);
88
+ myItemToLoad = aNode->getPath();
89
+}
90
+
91
+void StGLOpenFile::doFolderUpClick(const size_t ) {
92
+ StString aPath = myFolder->getPath();
93
+ StString aPathUp = StFileNode::getFolderUp(aPath);
94
+ if(!aPathUp.isEmpty()) {
95
+ myItemToLoad = aPathUp;
96
+ }
97
+}
98
+
99
+bool StGLOpenFile::tryUnClick(const StPointD_t& theCursorZo,
100
+ const int& theMouseBtn,
101
+ bool& isItemUnclicked) {
102
+ bool aRes = StGLMessageBox::tryUnClick(theCursorZo, theMouseBtn, isItemUnclicked);
103
+ if(!myItemToLoad.isEmpty()) {
104
+ StString aPath = myItemToLoad;
105
+ myItemToLoad.clear();
106
+ if(StFolder::isFolder(aPath)) {
107
+ openFolder(aPath);
108
+ } else {
109
+ StHandle<StString> aPathHandle = new StString(aPath);
110
+ signals.onFileSelected.emit(aPathHandle);
111
+ myRoot->destroyWithDelay(this);
112
+ }
113
+ }
114
+ return aRes;
115
+}
116
+
117
+void StGLOpenFile::addHotItem(const StString& theTarget,
118
+ const StString& theName) {
119
+ StString aName = theName;
120
+ if(aName.isEmpty()) {
121
+ StString aFoler;
122
+ StFileNode::getFolderAndFile(theTarget, aFoler, aName);
123
+ }
124
+ if(aName.isEmpty()) {
125
+ aName = theTarget;
126
+ }
127
+ if(aName.isEmpty()
128
+ || theTarget.isEmpty()) {
129
+ return;
130
+ }
131
+ myHotPaths.add(theTarget);
132
+
133
+ StGLMenuItem* anItem = new StGLPassiveMenuItem(myHotList);
134
+ setItemIcon(anItem, myHotColor, true);
135
+ anItem->setText(aName);
136
+ anItem->setTextColor(myHotColor);
137
+ anItem->setHilightColor(myHighlightColor);
138
+ anItem->setUserData(myHotPaths.size() - 1);
139
+ anItem->signals.onItemClick = stSlot(this, &StGLOpenFile::doHotItemClick);
140
+
141
+ int aSizeX = anItem->getMargins().left + anItem->computeTextWidth() + anItem->getMargins().right;
142
+ myHotSizeX = stMax(myHotSizeX, aSizeX);
143
+
144
+ myContent->changeRectPx().left() = myMarginLeft + myHotSizeX;
145
+ myList->setItemWidthMin(myContent->getRectPx().width());
146
+}
147
+
148
+void StGLOpenFile::setItemIcon(StGLMenuItem* theItem,
149
+ const StGLVec4& theColor,
150
+ const bool theisFolder) {
151
+ if(theItem == NULL) {
152
+ return;
153
+ }
154
+
155
+ theItem->changeMargins().left = myMarginX + myIconSizeX + myMarginX;
156
+ if(myTextureFolder.isNull()) {
157
+ const StString& anIcon0 = myRoot->getIcon(StGLRootWidget::IconImage_Folder);
158
+ const StString& anIcon1 = myRoot->getIcon(StGLRootWidget::IconImage_File);
159
+ if(!anIcon0.isEmpty()
160
+ && !anIcon1.isEmpty()) {
161
+ myTextureFolder = new StGLTextureArray(1);
162
+ myTextureFile = new StGLTextureArray(1);
163
+ myTextureFolder->changeValue(0).setName(anIcon0);
164
+ myTextureFile ->changeValue(0).setName(anIcon1);
165
+ } else {
166
+ return;
167
+ }
168
+ }
169
+
170
+ StGLIcon* anIcon = new StGLIcon(theItem, myMarginX, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_LEFT), 0);
171
+ anIcon->setColor(theColor);
172
+ if(theisFolder) {
173
+ anIcon->setExternalTextures(myTextureFolder);
174
+ } else {
175
+ anIcon->setExternalTextures(myTextureFile);
176
+ }
177
+ theItem->setIcon(anIcon);
178
+}
179
+
180
+void StGLOpenFile::openFolder(const StString& theFolder) {
181
+ myItemToLoad.clear();
182
+ myList->destroyChildren();
183
+
184
+ myFolder = new StFolder(theFolder);
185
+ myFolder->init(myExtensions, 1, true);
186
+ myCurrentPath->setText(StString("<b>Location:*</b>") + myFolder->getPath() + ST_FILE_SPLITTER);
187
+
188
+ StString aPath = myFolder->getPath() + "";
189
+ StString aPathUp = StFileNode::getFolderUp(aPath);
190
+ if(!aPathUp.isEmpty()) {
191
+ StGLMenuItem* anUpItem = new StGLPassiveMenuItem(myList);
192
+ anUpItem->setText("..");
193
+ anUpItem->setTextColor(myItemColor);
194
+ anUpItem->setHilightColor(myHighlightColor);
195
+ anUpItem->changeMargins().left = myMarginX + myIconSizeX + myMarginX;
196
+ anUpItem->signals.onItemClick = stSlot(this, &StGLOpenFile::doFolderUpClick);
197
+ }
198
+
199
+ const size_t aNbItems = myFolder->size();
200
+ for(size_t anItemIter = 0; anItemIter < aNbItems; ++anItemIter) {
201
+ const StFileNode* aNode = myFolder->getValue(anItemIter);
202
+ StString aName = aNode->getSubPath();
203
+ StGLMenuItem* anItem = new StGLPassiveMenuItem(myList);
204
+ setItemIcon(anItem, aNode->isFolder() ? myItemColor : myFileColor, aNode->isFolder());
205
+ anItem->setText(aName);
206
+ anItem->setTextColor(myItemColor);
207
+ anItem->setHilightColor(myHighlightColor);
208
+ anItem->setUserData(anItemIter);
209
+ anItem->signals.onItemClick = stSlot(this, &StGLOpenFile::doFileItemClick);
210
+ }
211
+ myList->stglInit();
212
+ stglInit();
213
+}
214
sview-15_08.tar.gz/StGLWidgets/StGLRangeFieldFloat32.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLRangeFieldFloat32.cpp
Changed
18
1
2
}
3
4
myValueText = new StGLTextArea(this, 0, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_LEFT), -myRoot->scale(1), myRoot->scale(10));
5
- onValueChange(0.0f);
6
+ float aLongVal = 0.0f;
7
+ if(myTrackValue->hasMaxValue()) {
8
+ aLongVal = myTrackValue->getMaxValue();
9
+ }
10
+ if(myTrackValue->hasMinValue()
11
+ && std::abs(myTrackValue->getMinValue()) >= aLongVal) {
12
+ aLongVal = myTrackValue->getMinValue();
13
+ }
14
+ onValueChange(aLongVal);
15
myValueText->setTextColor(StGLVec3(1.0f, 1.0f, 1.0f));
16
if(!myValueText->stglInitAutoHeightWidth()) {
17
delete myValueText; myValueText = NULL;
18
sview-15_08.tar.gz/StGLWidgets/StGLRootWidget.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLRootWidget.cpp
Changed
40
1
2
cursorZo(0.0, 0.0),
3
myFocusWidget(NULL),
4
myIsMenuPressed(false),
5
- myMenuIconSize(IconSize_16) {
6
+ myMenuIconSize(IconSize_16),
7
+ myClickThreshold(3) {
8
// unify access
9
StGLWidget::myRoot = this;
10
myViewport[0] = 0;
11
12
}
13
14
void StGLRootWidget::setupTextures() {
15
- const IconSize aCheckboxSize = scaleIcon(16);
16
- myIcons[IconImage_CheckboxOff] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "checkboxOff", aCheckboxSize);
17
- myIcons[IconImage_CheckboxOn] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "checkboxOn", aCheckboxSize);
18
- myIcons[IconImage_RadioButtonOff] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "radioButtonOff", aCheckboxSize);
19
- myIcons[IconImage_RadioButtonOn] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "radioButtonOn", aCheckboxSize);
20
+ const IconSize anIconSize = scaleIcon(16);
21
+ myIcons[IconImage_CheckboxOff] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "checkboxOff", anIconSize);
22
+ myIcons[IconImage_CheckboxOn] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "checkboxOn", anIconSize);
23
+ myIcons[IconImage_RadioButtonOff] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "radioButtonOff", anIconSize);
24
+ myIcons[IconImage_RadioButtonOn] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "radioButtonOn", anIconSize);
25
+ myIcons[IconImage_Folder] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "actionOpen", anIconSize);
26
+ myIcons[IconImage_File] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "actionFile", anIconSize);
27
}
28
29
StMarginsI StGLRootWidget::iconMargins(StGLRootWidget::IconSize theStdSize,
30
31
myScaleGUI = aScale;
32
myResolution = (unsigned int )(72.0f * aScale + 0.1f);
33
myGlFontMgr->setResolution(myResolution);
34
- myMenuIconSize = scaleIcon(16);
35
+ myMenuIconSize = scaleIcon(16);
36
+ myClickThreshold = scale(3);
37
setupTextures();
38
}
39
40
sview-15_08.tar.gz/StGLWidgets/StGLScrollArea.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLScrollArea.cpp
Changed
123
1
2
const int theWidth, const int theHeight)
3
: StGLWidget(theParent, theLeft, theTop, theCorner, theWidth, theHeight),
4
myBarColor(getRoot()->getColorForElement(StGLRootWidget::Color_ScrollBar)),
5
+ myIsLeftClick(false),
6
+ myHasDragged(false),
7
myDragYDelta(0.0),
8
+ myDragYCumul(0),
9
myFlingAccel((double )myRoot->scale(200)),
10
myFlingYSpeed(0.0),
11
myFlingYDone(0) {
12
13
|| (theVal1 <= T1(0) && theVal2 < T2(0));
14
}
15
16
+inline void setClickedWithChildren(StGLWidgetList& theList, const int theMouseBtn, bool isClicked) {
17
+ for(StGLWidget* aChild = theList.getStart(); aChild != NULL; aChild = aChild->getNext()) {
18
+ aChild->setClicked(theMouseBtn, isClicked);
19
+ setClickedWithChildren(*aChild->getChildren(), theMouseBtn, isClicked);
20
+ }
21
+}
22
+
23
void StGLScrollArea::stglUpdate(const StPointD_t& theCursorZo) {
24
if(!isVisible()) {
25
StGLWidget::stglUpdate(theCursorZo);
26
return;
27
}
28
29
- if(isClicked(ST_MOUSE_LEFT)
30
+ if(myIsLeftClick
31
&& isScrollable()) {
32
StPointD_t aDelta = myRoot->getCursorZo() - myClickPntZo;
33
double aDeltaY = aDelta.y() * myRoot->getRectPx().height();
34
35
const int aTopNew = stMax(stMin(aMinLim, aTopOld + theDelta), aMaxLim);
36
const int aDelta = aTopNew - aTopOld;
37
if(aDelta == 0) {
38
+ if(theIsFling) {
39
+ myFlingTimer.stop();
40
+ }
41
return false;
42
}
43
44
aContent->changeRectPx().top() += aDelta;
45
aContent->changeRectPx().bottom() += aDelta;
46
+
47
+ if(myIsLeftClick) {
48
+ if(!theIsFling) {
49
+ myDragYCumul += aDelta;
50
+ if(std::abs(myDragYCumul) > myRoot->getClickThreshold()
51
+ && !myHasDragged) {
52
+ setClickedWithChildren(myChildren, ST_MOUSE_LEFT, false);
53
+ myHasDragged = true;
54
+ }
55
+ } else {
56
+ myDragYCumul = 0;
57
+ }
58
+ }
59
+
60
myIsResized = true;
61
return true;
62
}
63
64
if(!isVisible() || !isPointIn(theCursorZo)) {
65
return false;
66
}
67
- if(StGLWidget::tryClick(theCursorZo, theMouseBtn, isItemClicked)) {
68
- if(theMouseBtn == ST_MOUSE_LEFT) {
69
- myClickPntZo = theCursorZo;
70
+ if( theMouseBtn == ST_MOUSE_LEFT
71
+ && !isItemClicked
72
+ && isScrollable()) {
73
+ myIsLeftClick = true;
74
+ myHasDragged = false;
75
+ myClickPntZo = theCursorZo;
76
+ myDragYCumul = 0;
77
+
78
+ // abort flinging
79
+ if(myFlingTimer.isOn()) {
80
+ const double aTime = myFlingTimer.getElapsedTime();
81
+ const double anA = (myFlingYSpeed > 0.0 ? -1.0 : 1.0) * myFlingAccel;
82
+ const double aSpeed = myFlingYSpeed + anA * aTime;
83
+ if(std::abs(aSpeed) > myRoot->scale(300)) {
84
+ setClickedWithChildren(myChildren, ST_MOUSE_LEFT, false);
85
+ isItemClicked = true;
86
+ return true;
87
+ }
88
}
89
+ } else {
90
+ myIsLeftClick = false;
91
+ myHasDragged = false;
92
+ }
93
+
94
+ if(StGLWidget::tryClick(theCursorZo, theMouseBtn, isItemClicked)) {
95
isItemClicked = true;
96
return true;
97
}
98
99
bool StGLScrollArea::tryUnClick(const StPointD_t& theCursorZo,
100
const int& theMouseBtn,
101
bool& isItemUnclicked) {
102
- if(isClicked(ST_MOUSE_LEFT)
103
+ if(myIsLeftClick
104
&& theMouseBtn == ST_MOUSE_LEFT) {
105
- isItemUnclicked = true;
106
- setClicked(ST_MOUSE_LEFT, false);
107
+ myIsLeftClick = false;
108
+ myHasDragged = false;
109
if(myDragTimer.isOn()) {
110
myDragYDelta = 0.0;
111
+ myDragYCumul = 0;
112
myDragTimer.stop();
113
myFlingYDone = 0;
114
if(std::abs(myFlingYSpeed) > 0.00001) {
115
116
myFlingTimer.stop();
117
}
118
}
119
- return true;
120
}
121
if(StGLWidget::tryUnClick(theCursorZo, theMouseBtn, isItemUnclicked)) {
122
switch(theMouseBtn) {
123
sview-15_08.tar.gz/StGLWidgets/StGLSubtitles.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLSubtitles.cpp
Changed
81
1
2
/**
3
- * Copyright © 2010-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
StArrayList<StHandle <StSubItem> >::add(theItem);
10
}
11
12
+inline StGLVCorner parseCorner(int theVal) {
13
+ return (StGLVCorner )theVal;
14
+}
15
+
16
StGLSubtitles::StGLSubtitles(StGLWidget* theParent,
17
const StHandle<StSubQueue>& theSubQueue,
18
+ const StHandle<StInt32Param>& thePlace,
19
+ const StHandle<StFloat32Param>& theTopDY,
20
+ const StHandle<StFloat32Param>& theBottomDY,
21
const StHandle<StFloat32Param>& theFontSize,
22
const StHandle<StFloat32Param>& theParallax,
23
const StHandle<StEnumParam>& theParser)
24
: StGLTextArea(theParent,
25
- 0, -theParent->getRoot()->scale(100),
26
- StGLCorner(ST_VCORNER_BOTTOM, ST_HCORNER_CENTER),
27
+ 0, 0,
28
+ StGLCorner(parseCorner(thePlace->getValue()), ST_HCORNER_CENTER),
29
theParent->getRoot()->scale(800), theParent->getRoot()->scale(160)),
30
+ myPlace(thePlace),
31
+ myTopDY(theTopDY),
32
+ myBottomDY(theBottomDY),
33
myFontSize(theFontSize),
34
myParallax(theParallax),
35
myParser(theParser),
36
37
myShowItems.add(aNewSubItem);
38
}
39
40
+ const StGLVCorner aCorner = parseCorner(myPlace->getValue());
41
+ bool toResize = myCorner.v != aCorner;
42
+ myCorner.v = aCorner;
43
+ switch(myCorner.v) {
44
+ case ST_VCORNER_TOP: {
45
+ const int aDisp = myRoot->scale((int )myTopDY->getValue());
46
+ if(getRectPx().top() != aDisp) {
47
+ toResize = true;
48
+ changeRectPx().moveTopTo(aDisp);
49
+ }
50
+ myFormatter.setupAlignment(StGLTextFormatter::ST_ALIGN_X_CENTER,
51
+ StGLTextFormatter::ST_ALIGN_Y_TOP);
52
+ break;
53
+ }
54
+ case ST_VCORNER_CENTER: {
55
+ if(getRectPx().top() != 0) {
56
+ toResize = true;
57
+ changeRectPx().moveTopTo(0);
58
+ }
59
+ myFormatter.setupAlignment(StGLTextFormatter::ST_ALIGN_X_CENTER,
60
+ StGLTextFormatter::ST_ALIGN_Y_CENTER);
61
+ break;
62
+ }
63
+ case ST_VCORNER_BOTTOM: {
64
+ const int aDisp = -myRoot->scale((int )myBottomDY->getValue());
65
+ if(getRectPx().top() != aDisp) {
66
+ toResize = true;
67
+ changeRectPx().moveTopTo(aDisp);
68
+ }
69
+ myFormatter.setupAlignment(StGLTextFormatter::ST_ALIGN_X_CENTER,
70
+ StGLTextFormatter::ST_ALIGN_Y_BOTTOM);
71
+ break;
72
+ }
73
+ }
74
+ if(toResize) {
75
+ stglResize();
76
+ }
77
+
78
StGLContext& aCtx = getContext();
79
if(isChanged) {
80
setText(myShowItems.Text);
81
sview-15_08.tar.gz/StGLWidgets/StGLTable.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLTable.cpp
Changed
22
1
2
}
3
4
// fill table
5
- int aRowIter = 0;
6
int aCol2Width = 0;
7
int aCol1MaxWidth = theMaxWidth / 2 - myItemMargins.left - myItemMargins.right;
8
const StGLCorner aCorner(ST_VCORNER_CENTER, ST_HCORNER_LEFT);
9
+ size_t aRowIter = 0;
10
for(std::map< int, StHandle<StAction> >::const_iterator anActionIter = theActions.begin();
11
anActionIter != theActions.end(); ++anActionIter, ++aRowIter) {
12
const StHandle<StAction>& anAction = anActionIter->second;
13
14
15
// adjust width of all elements
16
const size_t aRowLast = theActions.size();
17
- for(size_t aRowIter = 0; aRowIter < aRowLast; ++aRowIter) {
18
+ for(aRowIter = 0; aRowIter < aRowLast; ++aRowIter) {
19
StGLTableItem& anItemLab = changeElement(theRowId + (int )aRowIter, theColId);
20
anItemLab.getItem()->changeRectPx().right() = anItemLab.getItem()->getRectPx().left() + aCol1MaxWidth;
21
22
sview-15_08.tar.gz/StGLWidgets/StGLTextArea.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLTextArea.cpp
Changed
33
1
2
return myText;
3
}
4
5
-void StGLTextArea::setText(const StString& theText) {
6
+bool StGLTextArea::setText(const StString& theText) {
7
if(myText != theText) {
8
myText = theText;
9
myToRecompute = true;
10
+ return true;
11
}
12
+ return false;
13
}
14
15
void StGLTextArea::setTextWidth(const int theWidth) {
16
17
}
18
19
bool StGLTextArea::stglInit() {
20
+ StGLContext& aCtx = getContext();
21
if(myIsInitialized) {
22
+ if(isVisible()) {
23
+ formatText(aCtx);
24
+ }
25
return true;
26
}
27
28
// initialize GL resources for the font
29
- StGLContext& aCtx = getContext();
30
if(!myFont->wasInitialized()) {
31
if( myFont->changeFont().isNull()
32
|| myFont->changeFont()->getFont().isNull()
33
sview-15_08.tar.gz/StGLWidgets/StGLTextureButton.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLTextureButton.cpp
Changed
20
1
2
const int theTop,
3
const StGLCorner theCorner,
4
const size_t theFacesCount)
5
-: StGLTextureButton(theParent, theLeft, theTop, theCorner, theFacesCount) {
6
+: StGLTextureButton(theParent, theLeft, theTop, theCorner, theFacesCount),
7
+ myIsExternalTexture(false) {
8
myAnim = Anim_None;
9
}
10
11
+StGLIcon::~StGLIcon() {
12
+ if(myIsExternalTexture) {
13
+ myTextures.nullify();
14
+ }
15
+}
16
+
17
bool StGLIcon::tryClick(const StPointD_t& , const int& , bool& ) {
18
return false;
19
}
20
sview-15_08.tar.gz/StGLWidgets/StGLWidgets.cbp -> sview-15_10.tar.gz/StGLWidgets/StGLWidgets.cbp
Changed
39
1
2
<Unit filename="StGLCombobox.cpp" />
3
<Unit filename="StGLDescription.cpp" />
4
<Unit filename="StGLFpsLabel.cpp" />
5
- <Unit filename="StGLImageFlatProgram.cpp" />
6
<Unit filename="StGLImageProgram.cpp" />
7
<Unit filename="StGLImageRegion.cpp" />
8
- <Unit filename="StGLImageSphereProgram.cpp" />
9
<Unit filename="StGLMenu.cpp" />
10
<Unit filename="StGLMenuCheckbox.cpp" />
11
<Unit filename="StGLMenuItem.cpp" />
12
13
<Unit filename="StGLMenuRadioButton.cpp" />
14
<Unit filename="StGLMessageBox.cpp" />
15
<Unit filename="StGLMsgStack.cpp" />
16
+ <Unit filename="StGLOpenFile.cpp" />
17
<Unit filename="StGLPlayList.cpp" />
18
<Unit filename="StGLRadioButton.cpp" />
19
<Unit filename="StGLRadioButtonFloat32.cpp" />
20
21
<Unit filename="../include/StGLWidgets/StGLCorner.h" />
22
<Unit filename="../include/StGLWidgets/StGLDescription.h" />
23
<Unit filename="../include/StGLWidgets/StGLFpsLabel.h" />
24
- <Unit filename="../include/StGLWidgets/StGLImageFlatProgram.h" />
25
<Unit filename="../include/StGLWidgets/StGLImageProgram.h" />
26
<Unit filename="../include/StGLWidgets/StGLImageRegion.h" />
27
- <Unit filename="../include/StGLWidgets/StGLImageSphereProgram.h" />
28
<Unit filename="../include/StGLWidgets/StGLMenu.h" />
29
<Unit filename="../include/StGLWidgets/StGLMenuCheckbox.h" />
30
<Unit filename="../include/StGLWidgets/StGLMenuItem.h" />
31
32
<Unit filename="../include/StGLWidgets/StGLMenuRadioButton.h" />
33
<Unit filename="../include/StGLWidgets/StGLMessageBox.h" />
34
<Unit filename="../include/StGLWidgets/StGLMsgStack.h" />
35
+ <Unit filename="../include/StGLWidgets/StGLOpenFile.h" />
36
<Unit filename="../include/StGLWidgets/StGLPlayList.h" />
37
<Unit filename="../include/StGLWidgets/StGLRadioButton.h" />
38
<Unit filename="../include/StGLWidgets/StGLRadioButtonFloat32.h" />
39
sview-15_08.tar.gz/StGLWidgets/StGLWidgets.vcxproj -> sview-15_10.tar.gz/StGLWidgets/StGLWidgets.vcxproj
Changed
20
1
2
<ClCompile Include="StGLCombobox.cpp" />
3
<ClCompile Include="StGLDescription.cpp" />
4
<ClCompile Include="StGLFpsLabel.cpp" />
5
- <ClCompile Include="StGLImageFlatProgram.cpp" />
6
<ClCompile Include="StGLImageProgram.cpp" />
7
<ClCompile Include="StGLImageRegion.cpp" />
8
- <ClCompile Include="StGLImageSphereProgram.cpp" />
9
<ClCompile Include="StGLMenu.cpp" />
10
<ClCompile Include="StGLMenuCheckbox.cpp" />
11
<ClCompile Include="StGLMenuItem.cpp" />
12
13
<ClCompile Include="StGLMenuRadioButton.cpp" />
14
<ClCompile Include="StGLMessageBox.cpp" />
15
<ClCompile Include="StGLMsgStack.cpp" />
16
+ <ClCompile Include="StGLOpenFile.cpp" />
17
<ClCompile Include="StGLPlayList.cpp" />
18
<ClCompile Include="StGLRadioButton.cpp" />
19
<ClCompile Include="StGLRadioButtonFloat32.cpp" />
20
sview-15_08.tar.gz/StGLWidgets/StGLWidgets.vcxproj.filters -> sview-15_10.tar.gz/StGLWidgets/StGLWidgets.vcxproj.filters
Changed
20
1
2
<ClCompile Include="StGLFpsLabel.cpp">
3
<Filter>Source files</Filter>
4
</ClCompile>
5
- <ClCompile Include="StGLImageFlatProgram.cpp">
6
- <Filter>Source files</Filter>
7
- </ClCompile>
8
<ClCompile Include="StGLImageProgram.cpp">
9
<Filter>Source files</Filter>
10
</ClCompile>
11
<ClCompile Include="StGLImageRegion.cpp">
12
<Filter>Source files</Filter>
13
</ClCompile>
14
- <ClCompile Include="StGLImageSphereProgram.cpp">
15
- <Filter>Source files</Filter>
16
- </ClCompile>
17
<ClCompile Include="StGLMenu.cpp">
18
<Filter>Source files</Filter>
19
</ClCompile>
20
sview-15_08.tar.gz/StGLWidgets/StSubQueue.cpp -> sview-15_10.tar.gz/StGLWidgets/StSubQueue.cpp
Changed
9
1
2
StHandle<StSubItem> StSubQueue::pop(const double thePTS) {
3
myMutex.lock();
4
for(QueueItem* anItem = myFront; anItem != NULL;) {
5
- StHandle<StSubItem> aSubItem = anItem->myItem;
6
if(anItem->myItem->TimeEnd < thePTS) {
7
// remove outdated items
8
myFront = myFront->myNext;
9
sview-15_08.tar.gz/StImageViewer/StImageLoader.cpp -> sview-15_10.tar.gz/StImageViewer/StImageLoader.cpp
Changed
160
1
2
const size_t theMaxSizeX,
3
const size_t theMaxSizeY,
4
StCubemap theCubemap,
5
+ const size_t* theCubeCoeffs,
6
StPairRatio thePairRatio) {
7
if(theRef->isNull()) {
8
return theRef;
9
10
size_t aMulY = (thePairRatio == StPairRatio_HalfHeight) ? 2 : 1;
11
for(size_t aPlaneId = 0; aPlaneId < 4; ++aPlaneId) {
12
const StImagePlane& aPlane = theRef->getPlane(aPlaneId);
13
- aSizesY[aPlaneId] = stMin(aPlane.getSizeX() / (6 * aMulX), theMaxSizeY);
14
- if(aSizesY[aPlaneId] != aPlane.getSizeY() * aMulY) {
15
- const size_t aSizeAlt = stMin(aPlane.getSizeY(), theMaxSizeY) * aMulY;
16
+ aSizesY[aPlaneId] = stMin(aPlane.getSizeX() / (theCubeCoeffs[0] * aMulX), theMaxSizeY);
17
+ if(aSizesY[aPlaneId] * theCubeCoeffs[1] != aPlane.getSizeY() * aMulY) {
18
+ const size_t aSizeAlt = stMin(aPlane.getSizeY() / theCubeCoeffs[1], theMaxSizeY) * aMulY;
19
aSizesY[aPlaneId] = stMax(aSizesY[aPlaneId], aSizeAlt);
20
toResize = true;
21
}
22
23
anImage->setColorModel(theRef->getColorModel());
24
anImage->setColorScale(theRef->getColorScale());
25
26
- double aRatioX = double(aSizesY[0] * 6 * aMulX) / double(theRef->getSizeX());
27
- double aRatioY = double(aSizesY[0] * aMulY) / double(theRef->getSizeY());
28
+ double aRatioX = double(aSizesY[0] * theCubeCoeffs[0] * aMulX) / double(theRef->getSizeX());
29
+ double aRatioY = double(aSizesY[0] * theCubeCoeffs[1] * aMulY) / double(theRef->getSizeY());
30
anImage->setPixelRatio(float(double(theRef->getPixelRatio()) * aRatioY / aRatioX));
31
for(size_t aPlaneId = 0; aPlaneId < 4; ++aPlaneId) {
32
const StImagePlane& aFromPlane = theRef->getPlane(aPlaneId);
33
34
}
35
36
if(!anImage->changePlane(aPlaneId).initTrash(aFromPlane.getFormat(),
37
- aSizesY[aPlaneId] * 6 * aMulX,
38
- aSizesY[aPlaneId] * aMulY)) {
39
+ aSizesY[aPlaneId] * theCubeCoeffs[0] * aMulX,
40
+ aSizesY[aPlaneId] * theCubeCoeffs[1] * aMulY)) {
41
ST_ERROR_LOG("Scale failed!");
42
return theRef;
43
}
44
45
return anImage;
46
}
47
48
+/**
49
+ * Auxiliary method to format image dimensions.
50
+ */
51
+inline StString formatSize(size_t theSizeX,
52
+ size_t theSizeY,
53
+ size_t theSrcSizeX,
54
+ size_t theSrcSizeY) {
55
+ StString aText = StString() + theSizeX + " x " + theSizeY;
56
+ if(theSizeX != theSrcSizeX
57
+ || theSizeY != theSrcSizeY) {
58
+ aText += StString() + " [" + theSrcSizeX + " x " + theSrcSizeY + "]";
59
+ }
60
+ return aText;
61
+}
62
+
63
bool StImageLoader::loadImage(const StHandle<StFileNode>& theSource,
64
StHandle<StStereoParams>& theParams) {
65
const StString aFilePath = theSource->getPath();
66
67
// scale down image if it does not fit texture limits
68
size_t aSizeXLim = size_t(myMaxTexDim);
69
size_t aSizeYLim = size_t(myMaxTexDim);
70
- size_t aSizeX1 = 0;
71
- size_t aSizeY1 = 0;
72
- size_t aSizeX2 = 0;
73
- size_t aSizeY2 = 0;
74
- if(!anImageFileL->isNull()) {
75
- aSizeX1 = anImageFileL->getSizeX();
76
- aSizeY1 = anImageFileL->getSizeY();
77
- }
78
- if(!anImageFileR->isNull()) {
79
- aSizeX2 = anImageFileR->getSizeX();
80
- aSizeY2 = anImageFileR->getSizeY();
81
- }
82
+ size_t aSizeX1 = anImageFileL->getSizeX();
83
+ size_t aSizeY1 = anImageFileL->getSizeY();
84
+ size_t aSizeX2 = anImageFileR->getSizeX();
85
+ size_t aSizeY2 = anImageFileR->getSizeY();
86
+ theParams->Src1SizeX = aSizeX1;
87
+ theParams->Src1SizeY = aSizeY1;
88
+ theParams->Src2SizeX = aSizeX2;
89
+ theParams->Src2SizeY = aSizeY2;
90
StPairRatio aPairRatio = StPairRatio_1;
91
if(anImageFileR->isNull()) {
92
aPairRatio = st::formatToPairRatio(aSrcFormatCurr);
93
94
aSizeY1 /= 2;
95
}
96
}
97
+ size_t aCubeCoeffs[2] = {0, 0};
98
if(aSrcCubemap == StCubemap_Packed) {
99
- bool isOk = aSizeX1 / 6 == aSizeY1;
100
+ if(aSizeX1 / 6 == aSizeY1) {
101
+ aCubeCoeffs[0] = 6;
102
+ aCubeCoeffs[1] = 1;
103
+ } else if(aSizeX1 / 3 == aSizeY1 / 2) {
104
+ aCubeCoeffs[0] = 3;
105
+ aCubeCoeffs[1] = 2;
106
+ }
107
if(!anImageFileR->isNull()
108
&& (aSizeX1 != aSizeX2 || aSizeY1 != aSizeY2)) {
109
- isOk = false;
110
+ aCubeCoeffs[0] = 0;
111
}
112
- if(!isOk) {
113
+ if(aCubeCoeffs[0] == 0) {
114
myMsgQueue->pushError(StString("Image(s) has unexpected dimensions: {0}x{1} ({2}x{3})\n"
115
- "Cubemap should has 6 horizontally stacked squared images.")
116
+ "Cubemap should has 6 squared images in configuration 6:1 (single row) or 3:2 (two rows).")
117
.format(aSizeX1, aSizeY1, anImageFileL->getSizeX(), anImageFileL->getSizeY()));
118
aSrcCubemap = StCubemap_OFF;
119
} else {
120
- aSizeXLim *= 6;
121
+ aSizeXLim *= aCubeCoeffs[0];
122
+ aSizeYLim *= aCubeCoeffs[1];
123
}
124
}
125
126
- StHandle<StImage> anImageL = scaledImage(anImageFileL, aSizeXLim, aSizeYLim, aSrcCubemap, aPairRatio);
127
- StHandle<StImage> anImageR = scaledImage(anImageFileR, aSizeXLim, aSizeYLim, aSrcCubemap, aPairRatio);
128
+ StHandle<StImage> anImageL = scaledImage(anImageFileL, aSizeXLim, aSizeYLim, aSrcCubemap, aCubeCoeffs, aPairRatio);
129
+ StHandle<StImage> anImageR = scaledImage(anImageFileR, aSizeXLim, aSizeYLim, aSrcCubemap, aCubeCoeffs, aPairRatio);
130
#ifdef ST_DEBUG
131
const double aScaleTimeMSec = aLoadTimer.getElapsedTimeInMilliSec() - aLoadTimeMSec;
132
if(anImageL != anImageFileL) {
133
134
}
135
const StString aModelL = anImageFileL->formatImgColorModel();
136
if(!anImageFileR->isNull()) {
137
- anImgInfo->Info.add(StArgument(tr(INFO_DIMENSIONS), StString()
138
- + anImageFileL->getSizeX() + " x " + anImageFileL->getSizeY() + " " + tr(INFO_LEFT) + "\n"
139
- + anImageFileR->getSizeX() + " x " + anImageFileR->getSizeY() + " " + tr(INFO_RIGHT)));
140
+ anImgInfo->Info.add(StArgument(tr(INFO_DIMENSIONS),
141
+ formatSize(anImageL->getSizeX(), anImageL->getSizeY(),
142
+ theParams->Src1SizeX, theParams->Src1SizeY) + " " + tr(INFO_LEFT) + "\n"
143
+ + formatSize(anImageR->getSizeX(), anImageR->getSizeY(),
144
+ theParams->Src2SizeX, theParams->Src2SizeY) + " " + tr(INFO_RIGHT)));
145
const StString aModelR = anImageFileR->formatImgColorModel();
146
if(aModelL == aModelR) {
147
anImgInfo->Info.add(StArgument(tr(INFO_COLOR_MODEL), aModelL));
148
149
+ aModelR + " " + tr(INFO_RIGHT)));
150
}
151
} else {
152
- anImgInfo->Info.add(StArgument(tr(INFO_DIMENSIONS), StString()
153
- + anImageFileL->getSizeX() + " x " + anImageFileL->getSizeY()));
154
+ anImgInfo->Info.add(StArgument(tr(INFO_DIMENSIONS),
155
+ formatSize(anImageL->getSizeX(), anImageL->getSizeY(),
156
+ theParams->Src1SizeX, theParams->Src1SizeY)));
157
anImgInfo->Info.add(StArgument(tr(INFO_COLOR_MODEL),
158
aModelL));
159
}
160
sview-15_08.tar.gz/StImageViewer/StImagePluginInfo.h -> sview-15_10.tar.gz/StImageViewer/StImagePluginInfo.h
Changed
30
1
2
3
/**
4
*.jpg, *.jpeg, *.jpe - Joint Photographic Experts Group image file, lossy
5
- *.jp2 - JPEG 2000 image, lossy
6
+ *.jp2, *.j2k - JPEG 2000 image, lossy
7
*/
8
#define ST_JPG_MIME "image/jpg"
9
#define ST_JPG_EXT "jpg"
10
11
#define ST_JPEG_EXT "jpeg"
12
#define ST_JP2_MIME "image/x-jp2"
13
#define ST_JP2_EXT "jp2"
14
-#define ST_JP2_DESC "JP2 - JPEG 2000 image, lossy"
15
+#define ST_JP2_DESC "J2K - JPEG 2000 image, lossy"
16
+#define ST_J2K_MIME "image/x-j2k"
17
+#define ST_J2K_EXT "j2k"
18
+#define ST_J2K_DESC "J2K - JPEG 2000 image, lossy"
19
20
/**
21
*.png - Portable Network Graphics image file, lossless
22
23
ST_JPE_MIME ":" ST_JPE_EXT ":" ST_JPEG_DESC ";" \
24
ST_JPEG_MIME ":" ST_JPEG_EXT ":" ST_JPEG_DESC ";" \
25
ST_JP2_MIME ":" ST_JP2_EXT ":" ST_JP2_DESC ";" \
26
+ST_J2K_MIME ":" ST_J2K_EXT ":" ST_J2K_DESC ";" \
27
ST_PNG_MIME ":" ST_PNG_EXT ":" ST_PNG_DESC ";" \
28
ST_BMP_MIME ":" ST_BMP_EXT ":" ST_BMP_DESC ";" \
29
ST_GIF_MIME ":" ST_GIF_EXT ":" ST_GIF_DESC ";" \
30
sview-15_08.tar.gz/StImageViewer/StImageViewer.cpp -> sview-15_10.tar.gz/StImageViewer/StImageViewer.cpp
Changed
306
1
2
static const char ST_SETTING_FPSTARGET[] = "fpsTarget";
3
static const char ST_SETTING_SRCFORMAT[] = "srcFormat";
4
static const char ST_SETTING_LAST_FOLDER[] = "lastFolder";
5
+ static const char ST_SETTING_RECENT_L[] = "recentL";
6
+ static const char ST_SETTING_RECENT_R[] = "recentR";
7
+ static const char ST_SETTING_SAVE_RECENT[] = "toSaveRecent";
8
static const char ST_SETTING_COMPRESS[] = "toCompress";
9
static const char ST_SETTING_ESCAPENOQUIT[]= "escNoQuit";
10
static const char ST_SETTING_FULLSCREENUI[]= "fullScreenUI";
11
12
static const char ST_SETTING_SCALE_FORCE2X[] = "scale2X";
13
static const char ST_SETTING_FULLSCREEN[] = "fullscreen";
14
static const char ST_SETTING_SLIDESHOW[] = "slideshow";
15
+ static const char ST_SETTING_TRACK_HEAD[] = "toTrackHead";
16
static const char ST_SETTING_SHOW_FPS[] = "toShowFps";
17
static const char ST_SETTING_MOBILE_UI[] = "isMobileUI";
18
static const char ST_SETTING_VSYNC[] = "vsync";
19
20
static const char ST_SETTING_TEXFILTER[] = "viewTexFilter";
21
static const char ST_SETTING_GAMMA[] = "viewGamma";
22
static const char ST_SETTING_RATIO[] = "ratio";
23
+ static const char ST_SETTING_HEAL_ANAMORPHIC[] = "toHealAnamorphic";
24
static const char ST_SETTING_UPDATES_LAST_CHECK[] = "updatesLastCheck";
25
static const char ST_SETTING_UPDATES_INTERVAL[] = "updatesInterval";
26
static const char ST_SETTING_IMAGELIB[] = "imageLib";
27
28
static const char ST_ARGUMENT_FILE_LEFT[] = "left";
29
static const char ST_ARGUMENT_FILE_RIGHT[] = "right";
30
+ static const char ST_ARGUMENT_FILE_LAST[] = "last";
31
32
}
33
34
35
ST_LOCAL const StString& getPathLeft() const { return myPathLeft; }
36
37
/**
38
+ * Set paths to open.
39
+ */
40
+ ST_LOCAL void setPaths(const StString& thePathLeft,
41
+ const StString& thePathRight) {
42
+ StMutexAuto aLock(myMutex);
43
+ if(myState != StOpenImage::Dialog_Inactive) {
44
+ return;
45
+ }
46
+
47
+ myPathLeft = thePathLeft;
48
+ myPathRight = thePathRight;
49
+ if(!myPathLeft.isEmpty()) {
50
+ myState = StOpenImage::Dialog_HasFiles;
51
+ }
52
+ }
53
+
54
+ /**
55
* Return path to the right file.
56
* Should NOT be called within Active state.
57
*/
58
59
const StHandle<StOpenInfo>& theOpenInfo,
60
const StString& theAppName)
61
: StApplication(theResMgr, theParentWin, theOpenInfo),
62
- myAppName(theAppName),
63
+ myAppName(!theAppName.isEmpty() ? theAppName : ST_DRAWER_PLUGIN_NAME),
64
myEventLoaded(false),
65
//
66
mySlideShowTimer(false),
67
68
myToRecreateMenu(false),
69
myToSaveSrcFormat(false),
70
myEscNoQuit(false),
71
- myToHideUIFullScr(false) {
72
- const StString& anAppName = !theAppName.isEmpty() ? theAppName : ST_DRAWER_PLUGIN_NAME;
73
- mySettings = new StSettings(myResMgr, anAppName);
74
+ myToHideUIFullScr(false),
75
+ myToCheckPoorOrient(true) {
76
+ mySettings = new StSettings(myResMgr, myAppName);
77
myLangMap = new StTranslations(myResMgr, StImageViewer::ST_DRAWER_PLUGIN_NAME);
78
myOpenDialog = new StOpenImage(this);
79
StImageViewerStrings::loadDefaults(*myLangMap);
80
81
params.checkUpdatesDays = new StInt32Param(7);
82
params.srcFormat = new StInt32Param(StFormat_AUTO);
83
params.srcFormat->signals.onChanged.connect(this, &StImageViewer::doSwitchSrcFormat);
84
+ params.ToTrackHead = new StBoolParamNamed(true, tr(StImageViewerStrings::MENU_VIEW_TRACK_HEAD));
85
params.ToShowFps = new StBoolParamNamed(false, tr(StImageViewerStrings::MENU_SHOW_FPS));
86
params.ToShowToolbar = new StBoolParamNamed(true, "Show toolbar");
87
params.IsMobileUI = new StBoolParamNamed(StWindow::isMobile(), "Mobile UI");
88
89
params.IsVSyncOn = new StBoolParam(true);
90
params.IsVSyncOn->signals.onChanged = stSlot(this, &StImageViewer::doSwitchVSync);
91
StApplication::params.VSyncMode->setValue(StGLContext::VSync_ON);
92
+ params.ToSaveRecent = new StBoolParam(false);
93
94
params.imageLib = StImageFile::ST_LIBAV,
95
params.TargetFps = 0;
96
97
mySettings->loadString(ST_SETTING_LAST_FOLDER, params.lastFolder);
98
mySettings->loadInt32 (ST_SETTING_UPDATES_LAST_CHECK, myLastUpdateDay);
99
mySettings->loadParam (ST_SETTING_UPDATES_INTERVAL, params.checkUpdatesDays);
100
+ myToCheckPoorOrient = !mySettings->loadParam(ST_SETTING_TRACK_HEAD, params.ToTrackHead);
101
mySettings->loadParam (ST_SETTING_SHOW_FPS, params.ToShowFps);
102
mySettings->loadParam (ST_SETTING_MOBILE_UI, params.IsMobileUI);
103
mySettings->loadParam (ST_SETTING_VSYNC, params.IsVSyncOn);
104
105
106
anAction = new StActionIntSlot(stCString("DoImageAdjustReset"), stSlot(this, &StImageViewer::doImageAdjustReset), 0);
107
addAction(Action_ImageAdjustReset, anAction);
108
+
109
+ anAction = new StActionIntSlot(stCString("DoPanoramaOnOff"), stSlot(this, &StImageViewer::doPanoramaOnOff), 0);
110
+ addAction(Action_PanoramaOnOff, anAction, ST_VK_P);
111
}
112
113
bool StImageViewer::resetDevice() {
114
115
116
mySettings->saveParam(ST_SETTING_STEREO_MODE, myGUI->myImage->params.displayMode);
117
mySettings->saveInt32(ST_SETTING_GAMMA, stRound(100.0f * myGUI->myImage->params.gamma->getValue()));
118
+ mySettings->saveParam(ST_SETTING_HEAL_ANAMORPHIC, myGUI->myImage->params.ToHealAnamorphicRatio);
119
if(params.toRestoreRatio->getValue()) {
120
mySettings->saveParam(ST_SETTING_RATIO, myGUI->myImage->params.displayRatio);
121
} else {
122
123
mySettings->saveParam(ST_SETTING_TEXFILTER, myGUI->myImage->params.textureFilter);
124
}
125
126
-void StImageViewer::releaseDevice() {
127
+void StImageViewer::saveAllParams() {
128
saveGuiParams();
129
if(!myGUI.isNull()) {
130
mySettings->saveParam (ST_SETTING_SCALE_ADJUST, params.ScaleAdjust);
131
132
mySettings->saveInt32(ST_SETTING_UPDATES_LAST_CHECK, myLastUpdateDay);
133
mySettings->saveParam(ST_SETTING_UPDATES_INTERVAL, params.checkUpdatesDays);
134
mySettings->saveString(ST_SETTING_IMAGELIB, StImageFile::imgLibToString(params.imageLib));
135
+ mySettings->saveParam (ST_SETTING_TRACK_HEAD,params.ToTrackHead);
136
mySettings->saveParam (ST_SETTING_SHOW_FPS, params.ToShowFps);
137
mySettings->saveParam (ST_SETTING_MOBILE_UI, params.IsMobileUI);
138
mySettings->saveParam (ST_SETTING_VSYNC, params.IsVSyncOn);
139
140
}
141
}
142
143
+ StString aLastL, aLastR;
144
+ StHandle<StFileNode> aFile = myLoader->getPlayList().getCurrentFile();
145
+ if(params.ToSaveRecent->getValue()
146
+ && !aFile.isNull()) {
147
+ if(aFile->isEmpty()) {
148
+ aLastL = aFile->getPath();
149
+ } else if(aFile->size() == 2) {
150
+ aLastL = aFile->getValue(0)->getPath();
151
+ aLastR = aFile->getValue(1)->getPath();
152
+ }
153
+ }
154
+ mySettings->saveString(ST_SETTING_RECENT_L, aLastL);
155
+ mySettings->saveString(ST_SETTING_RECENT_R, aLastR);
156
+ mySettings->flush();
157
+}
158
+
159
+void StImageViewer::releaseDevice() {
160
+ saveAllParams();
161
+
162
// release GUI data and GL resources before closing the window
163
myKeyActions.clear();
164
myGUI.nullify();
165
166
mySettings->loadParam (ST_SETTING_STEREO_MODE, myGUI->myImage->params.displayMode);
167
mySettings->loadParam (ST_SETTING_TEXFILTER, myGUI->myImage->params.textureFilter);
168
mySettings->loadParam (ST_SETTING_RATIO, myGUI->myImage->params.displayRatio);
169
+ mySettings->loadParam (ST_SETTING_HEAL_ANAMORPHIC, myGUI->myImage->params.ToHealAnamorphicRatio);
170
params.toRestoreRatio->setValue(myGUI->myImage->params.displayRatio->getValue() != StGLImageRegion::RATIO_AUTO);
171
int32_t loadedGamma = 100; // 1.0f
172
mySettings->loadInt32(ST_SETTING_GAMMA, loadedGamma);
173
174
StArgument argEscNoQuit = theArguments[ST_SETTING_ESCAPENOQUIT];
175
StArgument argFullScreenUI = theArguments[ST_SETTING_FULLSCREENUI];
176
StArgument argToolbar = theArguments[ST_SETTING_SHOW_TOOLBAR];
177
+ StArgument argSaveRecent = theArguments[ST_SETTING_SAVE_RECENT];
178
if(argToCompress.isValid()) {
179
myLoader->setCompressMemory(!argToCompress.isValueOff());
180
}
181
182
params.imageLib = StImageFile::imgLibFromString(argImgLibrary.getValue());
183
myLoader->setImageLib(params.imageLib);
184
}
185
+ if(argSaveRecent.isValid()) {
186
+ params.ToSaveRecent->setValue(!argSaveRecent.isValueOff());
187
+ }
188
}
189
190
bool StImageViewer::open() {
191
192
return false;
193
}
194
195
+ // disable head-tracking by default for poor sensors
196
+ if(myToCheckPoorOrient
197
+ && myWindow->isPoorOrientationSensor()) {
198
+ myToCheckPoorOrient = false;
199
+ params.ToTrackHead->setValue(false);
200
+ }
201
+
202
if(isReset) {
203
myLoader->doLoadNext();
204
return true;
205
206
parseArguments(myOpenFileInfo->getArgumentsMap());
207
const StMIME anOpenMIME = myOpenFileInfo->getMIME();
208
if(myOpenFileInfo->getPath().isEmpty()) {
209
+ const StArgument anArgLast = myOpenFileInfo->getArgumentsMap()[ST_ARGUMENT_FILE_LAST];
210
+ if(anArgLast.isValid() && !anArgLast.isValueOff()) {
211
+ StString aLastL, aLastR;
212
+ mySettings->loadString(ST_SETTING_RECENT_L, aLastL);
213
+ mySettings->loadString(ST_SETTING_RECENT_R, aLastR);
214
+ if(!aLastL.isEmpty()) {
215
+ if(!aLastR.isEmpty()) {
216
+ myLoader->getPlayList().clear();
217
+ myLoader->getPlayList().addOneFile(aLastL, aLastR);
218
+ } else {
219
+ myLoader->getPlayList().open(aLastL);
220
+ }
221
+
222
+ if(!myLoader->getPlayList().isEmpty()) {
223
+ doUpdateStateLoading();
224
+ myLoader->doLoadNext();
225
+ }
226
+ return true;
227
+ }
228
+ }
229
+
230
// open drawer without files
231
return true;
232
}
233
234
// update menu
235
}
236
237
+void StImageViewer::doPause(const StPauseEvent& theEvent) {
238
+ StApplication::doPause(theEvent);
239
+ saveAllParams();
240
+}
241
+
242
void StImageViewer::doResize(const StSizeEvent& ) {
243
if(myGUI.isNull()) {
244
return;
245
246
void StImageViewer::stglDraw(unsigned int theView) {
247
if( myContext.isNull()
248
|| !myContext->isBound()) {
249
+ if(theView == ST_DRAW_LEFT
250
+ || theView == ST_DRAW_MONO) {
251
+ if(myWindow->isPaused()) {
252
+ if(!myInactivityTimer.isOn()) {
253
+ myInactivityTimer.restart();
254
+ } else if(myInactivityTimer.getElapsedTimeInSec() > 60.0) {
255
+ // perform delayed destruction on long inactivity
256
+ exit(0);
257
+ } else {
258
+ // force deep sleeps
259
+ StThread::sleep(100);
260
+ }
261
+ }
262
+ }
263
return;
264
}
265
+ myInactivityTimer.stop();
266
267
if(myContext->core20fwd != NULL) {
268
// clear the screen and the depth buffer
269
270
}
271
}
272
273
+void StImageViewer::doPanoramaOnOff(const size_t ) {
274
+ if(myLoader.isNull()) {
275
+ return;
276
+ }
277
+
278
+ StHandle<StStereoParams> aParams = myGUI->myImage->getSource();
279
+ if(aParams.isNull()
280
+ || aParams->Src1SizeX == 0
281
+ || aParams->Src1SizeY == 0) {
282
+ return;
283
+ }
284
+
285
+ int aMode = myGUI->myImage->params.ViewMode->getValue();
286
+ if(aMode != StStereoParams::FLAT_IMAGE) {
287
+ myGUI->myImage->params.ViewMode->setValue(StStereoParams::FLAT_IMAGE);
288
+ return;
289
+ }
290
+
291
+ StPanorama aPano = st::probePanorama(aParams->StereoFormat,
292
+ aParams->Src1SizeX, aParams->Src1SizeY,
293
+ aParams->Src2SizeX, aParams->Src2SizeY);
294
+ myGUI->myImage->params.ViewMode->setValue(aPano == StPanorama_Cubemap6_1 || aPano == StPanorama_Cubemap3_2
295
+ ? StStereoParams::PANORAMA_CUBEMAP
296
+ : StStereoParams::PANORAMA_SPHERE);
297
+}
298
+
299
+void StImageViewer::doOpen1FileFromGui(StHandle<StString> thePath) {
300
+ myOpenDialog->setPaths(*thePath, "");
301
+}
302
+
303
void StImageViewer::doOpen1FileDialog(const size_t ) {
304
myOpenDialog->openDialog(1);
305
}
306
sview-15_08.tar.gz/StImageViewer/StImageViewer.h -> sview-15_10.tar.gz/StImageViewer/StImageViewer.h
Changed
72
1
2
private: //! @name window events slots
3
4
ST_LOCAL virtual void doChangeDevice(const int32_t theValue);
5
+ ST_LOCAL virtual void doPause (const StPauseEvent& theEvent);
6
ST_LOCAL virtual void doResize (const StSizeEvent& theEvent);
7
ST_LOCAL virtual void doKeyDown (const StKeyEvent& theEvent);
8
ST_LOCAL virtual void doKeyHold (const StKeyEvent& theEvent);
9
10
11
public: //! @name callback Slots
12
13
+ ST_LOCAL void doOpen1FileFromGui(StHandle<StString> thePath);
14
ST_LOCAL void doOpen1FileDialog(const size_t dummy = 0);
15
ST_LOCAL void doOpen2FilesDialog(const size_t dummy = 0);
16
ST_LOCAL void doSaveImageAs(const size_t theImgType) { myLoader->doSaveImageAs(theImgType); }
17
18
StHandle<StBoolParam> ScaleHiDPI2X; //!< option to set HiDPI resolution to 2.0
19
StHandle<StInt32Param> checkUpdatesDays; //!< days count between updates checks
20
StHandle<StInt32Param> srcFormat; //!< source format
21
+ StHandle<StBoolParam> ToTrackHead; //!< enable/disable head-tracking
22
StHandle<StBoolParam> ToShowToolbar; //!< show/hide toolbar
23
StHandle<StBoolParam> ToShowFps; //!< display FPS meter
24
StHandle<StBoolParam> IsMobileUI; //!< display mobile interface
25
StHandle<StBoolParam> IsVSyncOn; //!< flag to use VSync
26
+ StHandle<StBoolParam> ToSaveRecent; //!< load/save recent file
27
StString lastFolder; //!< laster folder used to open / save file
28
StImageFile::ImageClass imageLib; //!< preferred image library
29
int TargetFps; //!< limit or not rendering FPS
30
31
ST_LOCAL void doFullscreen(const bool theIsFullscreen);
32
ST_LOCAL void doSwitchSrcFormat(const int32_t theSrcFormat);
33
ST_LOCAL void doSwitchViewMode(const int32_t theMode);
34
+ ST_LOCAL void doPanoramaOnOff(const size_t );
35
36
public:
37
38
39
Action_DeleteFile,
40
Action_ImageAdjustReset,
41
Action_StereoParamsBegin,
42
- Action_StereoParamsEnd = Action_StereoParamsBegin + StGLImageRegion::ActionsNb,
43
+ Action_StereoParamsEnd = Action_StereoParamsBegin + StGLImageRegion::ActionsNb - 1,
44
+ Action_PanoramaOnOff,
45
};
46
47
private:
48
49
ST_LOCAL bool init();
50
ST_LOCAL bool createGui();
51
ST_LOCAL void saveGuiParams();
52
+ ST_LOCAL void saveAllParams();
53
54
/**
55
* Parse arguments.
56
57
StString myAppName; //!< name of customized application
58
59
StCondition myEventLoaded; //!< indicate that new file was open
60
+ StTimer myInactivityTimer; //!< timer initialized when application goes into paused state
61
62
StTimer mySlideShowTimer; //!< slideshow stuff
63
double mySlideShowDelay;
64
65
bool myToSaveSrcFormat; //!< indicates that active source format should be saved or not
66
bool myEscNoQuit; //!< if true then Escape will not quit application
67
bool myToHideUIFullScr; //!< if true then GUI will be hidden in full-screen mode
68
+ bool myToCheckPoorOrient; //!< switch off orientation sensor with poor quality
69
70
private:
71
72
sview-15_08.tar.gz/StImageViewer/StImageViewerGUI.cpp -> sview-15_10.tar.gz/StImageViewer/StImageViewerGUI.cpp
Changed
299
1
2
#include <StGLWidgets/StGLMenu.h>
3
#include <StGLWidgets/StGLMenuItem.h>
4
#include <StGLWidgets/StGLMsgStack.h>
5
+#include <StGLWidgets/StGLOpenFile.h>
6
#include <StGLWidgets/StGLRangeFieldFloat32.h>
7
#include <StGLWidgets/StGLScrollArea.h>
8
#include <StGLWidgets/StGLSwitchTextured.h>
9
10
iconTexture(stCString("menuOverUnderRL"), anIconSize),
11
iconTexture(stCString("menuRowLR"), anIconSize),
12
iconTexture(stCString("menuColLR"), anIconSize),
13
- iconTexture(stCString("menuSrcSeparate"), anIconSize),
14
+ iconTexture(stCString("menuDual"), anIconSize),
15
iconTexture(stCString("menuFrameSeqLR"), anIconSize),
16
iconTexture(stCString("menuRedCyanLR"), anIconSize),
17
iconTexture(stCString("menuGreenMagentaLR"), anIconSize),
18
19
StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
20
myBtnSwapLR->setDrawShadow(true);
21
myBtnSwapLR->changeMargins() = aButtonMargins;
22
+
23
+ StHandle<StBoolParam> aTrackedPano = new StBoolParam(false);
24
+ myBtnPanorama = new StGLCheckboxTextured(myPanelUpper, aTrackedPano,
25
+ iconTexture(stCString("actionPanoramaOff"), anIconSize),
26
+ iconTexture(stCString("actionPanorama"), anIconSize),
27
+ aLeft + (aBtnIter++) * anIconStep, aTop,
28
+ StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
29
+ myBtnPanorama->signals.onBtnClick += stSlot(this, &StImageViewerGUI::doPanoramaCombo);
30
+ myBtnPanorama->setDrawShadow(true);
31
+ myBtnPanorama->changeMargins() = aButtonMargins;
32
}
33
34
/**
35
36
StGLMenu* aMenuView = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
37
StGLMenu* aMenuDispMode = createDisplayModeMenu();
38
StGLMenu* aMenuDispRatio = createDisplayRatioMenu();
39
- StGLMenu* aMenuSurface = createSurfaceMenu();
40
+ StGLMenu* aMenuPanorama = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
41
+ fillPanoramaMenu(aMenuPanorama);
42
StGLMenu* aMenuTexFilter = createSmoothFilterMenu();
43
StGLMenu* aMenuImgAdjust = createImageAdjustMenu();
44
45
46
aMenuView->addItem(tr(MENU_VIEW_SWAP_LR), myImage->params.swapLR);
47
aMenuView->addItem(tr(MENU_VIEW_DISPLAY_RATIO), aMenuDispRatio)
48
->setIcon(stCMenuIcon("actionDisplayRatio"), false);
49
- aMenuView->addItem(tr(MENU_VIEW_SURFACE), aMenuSurface);
50
+ aMenuView->addItem(tr(MENU_VIEW_PANORAMA), aMenuPanorama)
51
+ ->setIcon(stCMenuIcon("actionPanorama"), false);
52
aMenuView->addItem(tr(MENU_VIEW_TEXFILTER), aMenuTexFilter)
53
->setIcon(stCMenuIcon("actionInterpolation"), false);
54
aMenuView->addItem(tr(MENU_VIEW_IMAGE_ADJUST), aMenuImgAdjust)
55
56
->setIcon(stCMenuIcon("menuRatio5_4_"));
57
aMenu->addItem("1:1", myImage->params.displayRatio, StGLImageRegion::RATIO_1_1)
58
->setIcon(stCMenuIcon("menuRatio1_1_"));
59
- aMenu->addItem(tr(MENU_VIEW_KEEP_ON_RESTART), myPlugin->params.toRestoreRatio);
60
+ aMenu->addItem(tr(MENU_VIEW_RATIO_KEEP_ON_RESTART), myPlugin->params.toRestoreRatio);
61
+ aMenu->addItem(tr(MENU_VIEW_RATIO_HEAL_ANAMORPHIC), myImage->params.ToHealAnamorphicRatio);
62
return aMenu;
63
}
64
65
-/**
66
- * Root -> View menu -> Surface
67
- */
68
-StGLMenu* StImageViewerGUI::createSurfaceMenu() {
69
- StGLMenu* aMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
70
- aMenu->addItem(tr(MENU_VIEW_SURFACE_PLANE),
71
- myImage->params.ViewMode, StStereoParams::FLAT_IMAGE);
72
- aMenu->addItem(tr(MENU_VIEW_SURFACE_SPHERE),
73
- myImage->params.ViewMode, StStereoParams::PANORAMA_SPHERE);
74
- aMenu->addItem("Cubemap",
75
- myImage->params.ViewMode, StStereoParams::PANORAMA_CUBEMAP);
76
- return aMenu;
77
+void StImageViewerGUI::fillPanoramaMenu(StGLMenu* theMenu) {
78
+ theMenu->addItem(tr(MENU_VIEW_SURFACE_PLANE),
79
+ myImage->params.ViewMode, StStereoParams::FLAT_IMAGE);
80
+ theMenu->addItem(tr(MENU_VIEW_SURFACE_SPHERE),
81
+ myImage->params.ViewMode, StStereoParams::PANORAMA_SPHERE);
82
+ theMenu->addItem(tr(MENU_VIEW_SURFACE_CUBEMAP),
83
+ myImage->params.ViewMode, StStereoParams::PANORAMA_CUBEMAP);
84
+ if(myWindow->hasOrientationSensor()) {
85
+ theMenu->addItem(tr(myWindow->isPoorOrientationSensor() ? MENU_VIEW_TRACK_HEAD_POOR : MENU_VIEW_TRACK_HEAD),
86
+ myPlugin->params.ToTrackHead);
87
+ }
88
+}
89
+
90
+void StImageViewerGUI::doPanoramaCombo(const size_t ) {
91
+ StGLCombobox::ListBuilder aBuilder(this);
92
+ fillPanoramaMenu(aBuilder.getMenu());
93
+ aBuilder.display();
94
}
95
96
/**
97
98
aParams.add(myPlugin->params.IsMobileUI);
99
myLangMap->params.language->setName(tr(MENU_HELP_LANGS));
100
101
- const StString aTitle = "Settings";
102
- StInfoDialog* aDialog = new StInfoDialog(myPlugin, this, aTitle, scale(512), scale(300));
103
+ StInfoDialog* aDialog = new StInfoDialog(myPlugin, this, tr(MENU_HELP_SETTINGS), scale(512), scale(300));
104
105
const int aWidthMax = aDialog->getContent()->getRectPx().width();
106
int aRowLast = (int )aParams.size();
107
108
109
int aBtnIter = 0;
110
111
+ myBtnOpen = new StGLTextureButton(myPanelUpper, (aBtnIter++) * anIconStep, 0);
112
+ myBtnOpen->signals.onBtnClick.connect(this, &StImageViewerGUI::doOpenFile);
113
+ myBtnOpen->setTexturePath(iconTexture(stCString("actionOpen"), anIconSize));
114
+ myBtnOpen->setDrawShadow(true);
115
+ myBtnOpen->changeMargins() = aButtonMargins;
116
+
117
StGLTextureButton* aSrcBtn = new StGLTextureButton(myPanelUpper, (aBtnIter++) * anIconStep, 0,
118
StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT), StFormat_NB);
119
aSrcBtn->changeMargins() = aButtonMargins;
120
121
iconTexture(stCString("menuOverUnderRL"), anIconSize),
122
iconTexture(stCString("menuRowLR"), anIconSize),
123
iconTexture(stCString("menuColLR"), anIconSize),
124
- iconTexture(stCString("menuSrcSeparate"), anIconSize),
125
+ iconTexture(stCString("menuDual"), anIconSize),
126
iconTexture(stCString("menuFrameSeqLR"), anIconSize),
127
iconTexture(stCString("menuRedCyanLR"), anIconSize),
128
iconTexture(stCString("menuGreenMagentaLR"), anIconSize),
129
130
myBtnSwapLR->setDrawShadow(true);
131
myBtnSwapLR->changeMargins() = aButtonMargins;
132
133
+ StHandle<StBoolParam> aTrackedPano = new StBoolParam(false);
134
+ myBtnPanorama = new StGLCheckboxTextured(myPanelUpper, aTrackedPano,
135
+ iconTexture(stCString("actionPanoramaOff"), anIconSize),
136
+ iconTexture(stCString("actionPanorama"), anIconSize),
137
+ (aBtnIter++) * anIconStep, 0,
138
+ StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
139
+ myBtnPanorama->signals.onBtnClick += stSlot(this, &StImageViewerGUI::doPanoramaCombo);
140
+ myBtnPanorama->setDrawShadow(true);
141
+ myBtnPanorama->changeMargins() = aButtonMargins;
142
+
143
aBtnIter = 0;
144
StGLTextureButton* aBtnEx = new StGLTextureButton(myPanelUpper, (aBtnIter--) * (-anIconStep), 0,
145
StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
146
147
myBtnInfo->changeMargins() = aButtonMargins;
148
149
aBtnIter = 0;
150
- StGLTextureButton* aBtnZoomOut = new StGLTextureButton(myPanelBottom, (aBtnIter++) * (-anIconStep), 0,
151
- StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
152
- aBtnZoomOut->changeMargins() = aButtonMargins;
153
- aBtnZoomOut->setTexturePath(iconTexture(stCString("actionZoomOut"), anIconSize));
154
- aBtnZoomOut->setDrawShadow(true);
155
- aBtnZoomOut->setUserData(StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_ScaleOut);
156
- aBtnZoomOut->signals.onBtnHold += stSlot(this, &StImageViewerGUI::doAction);
157
-
158
StGLTextureButton* aBtnZoomIn = new StGLTextureButton(myPanelBottom, (aBtnIter++) * (-anIconStep), 0,
159
StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
160
aBtnZoomIn->changeMargins() = aButtonMargins;
161
162
aBtnZoomIn->setDrawShadow(true);
163
aBtnZoomIn->setUserData(StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_ScaleIn);
164
aBtnZoomIn->signals.onBtnHold += stSlot(this, &StImageViewerGUI::doAction);
165
+
166
+ StGLTextureButton* aBtnZoomOut = new StGLTextureButton(myPanelBottom, (aBtnIter++) * (-anIconStep), 0,
167
+ StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
168
+ aBtnZoomOut->changeMargins() = aButtonMargins;
169
+ aBtnZoomOut->setTexturePath(iconTexture(stCString("actionZoomOut"), anIconSize));
170
+ aBtnZoomOut->setDrawShadow(true);
171
+ aBtnZoomOut->setUserData(StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_ScaleOut);
172
+ aBtnZoomOut->signals.onBtnHold += stSlot(this, &StImageViewerGUI::doAction);
173
+}
174
+
175
+void StImageViewerGUI::doOpenFile(const size_t ) {
176
+ /*if(!isMobile()) {
177
+ myPlugin->doOpen1FileDialog();
178
+ return;
179
+ }*/
180
+
181
+ StGLOpenFile* aDialog = new StGLOpenFile(this, tr(DIALOG_OPEN_FILE), tr(BUTTON_CLOSE));
182
+ aDialog->setMimeList(myPlugin->myLoader->getMimeList());
183
+ aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Downloads));
184
+ aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Pictures));
185
+ aDialog->signals.onFileSelected = stSlot(myPlugin, &StImageViewer::doOpen1FileFromGui);
186
+
187
+ if(myPlugin->params.lastFolder.isEmpty()) {
188
+ StHandle<StFileNode> aCurrFile = myPlugin->myLoader->getPlayList().getCurrentFile();
189
+ if(!aCurrFile.isNull()) {
190
+ myPlugin->params.lastFolder = aCurrFile->isEmpty() ? aCurrFile->getFolderPath() : aCurrFile->getValue(0)->getFolderPath();
191
+ }
192
+ }
193
+ aDialog->openFolder(myPlugin->params.lastFolder);
194
}
195
196
void StImageViewerGUI::doShowMobileExMenu(const size_t ) {
197
198
anItem->setIcon(stCMenuIcon("actionHelp"));
199
anItem->signals.onItemClick += stSlot(this, &StImageViewerGUI::doAboutProgram);
200
//anItem = aMenu->addItem(myPlugin->StApplication::params.ActiveDevice->getActiveValue());
201
- anItem = aMenu->addItem("Settings");
202
+ anItem = aMenu->addItem(tr(MENU_HELP_SETTINGS));
203
anItem->setIcon(stCMenuIcon("actionSettings"));
204
anItem->signals.onItemClick += stSlot(this, &StImageViewerGUI::doMobileSettings);
205
anItem = aMenu->addItem("Slideshow", myPlugin->getAction(StImageViewer::Action_SlideShow));
206
207
myBtnNext(NULL),
208
myBtnInfo(NULL),
209
myBtnSwapLR(NULL),
210
+ myBtnPanorama(NULL),
211
myBtnSrcFrmt(NULL),
212
myBtnPlayList(NULL),
213
myBtnFull(NULL),
214
215
inline bool isPointIn(const StGLWidget* theWidget,
216
const StPointD_t& theCursorZo) {
217
return theWidget != NULL
218
- && theWidget->isVisible()
219
+ && theWidget->isVisibleWithParents()
220
&& theWidget->isPointIn(theCursorZo);
221
}
222
223
224
const bool hasBottomPanel = toShowToolbar
225
&& myPanelBottom != NULL;
226
227
+ StHandle<StStereoParams> aParams = myImage->getSource();
228
myIsVisibleGUI = isMouseActive
229
+ || aParams.isNull()
230
|| myVisibilityTimer.getElapsedTime() < 2.0
231
|| (hasUpperPanel && myPanelUpper ->isPointIn(theCursor))
232
|| (hasBottomPanel && myPanelBottom->isPointIn(theCursor))
233
234
235
StFormat aSrcFormat = (StFormat )myPlugin->params.srcFormat->getValue();
236
if(aSrcFormat == StFormat_AUTO
237
- && !myImage->params.stereoFile.isNull()) {
238
- aSrcFormat = myImage->params.stereoFile->StereoFormat;
239
+ && !aParams.isNull()) {
240
+ aSrcFormat = aParams->StereoFormat;
241
}
242
- if(!myImage->params.stereoFile.isNull()
243
+ if(!aParams.isNull()
244
&& myImage->params.swapLR->getValue()) {
245
aSrcFormat = st::formatReversed(aSrcFormat);
246
}
247
248
myBtnSwapLR->setOpacity(aSrcFormat != StFormat_Mono ? myPanelUpper->getOpacity() : 0.0f, false);
249
}
250
251
+ const StStereoParams::ViewMode aViewMode = !aParams.isNull()
252
+ ? aParams->ViewingMode
253
+ : StStereoParams::FLAT_IMAGE;
254
+ bool toShowPano = aViewMode != StStereoParams::FLAT_IMAGE;
255
+ if(!toShowPano
256
+ && !aParams.isNull()
257
+ && st::probePanorama(aParams->StereoFormat,
258
+ aParams->Src1SizeX, aParams->Src1SizeY,
259
+ aParams->Src2SizeX, aParams->Src2SizeY) != StPanorama_OFF) {
260
+ toShowPano = true;
261
+ }
262
+ if(myBtnPanorama != NULL) {
263
+ myBtnPanorama->getTrackedValue()->setValue(aViewMode != StStereoParams::FLAT_IMAGE);
264
+ myBtnPanorama->setOpacity(toShowPano ? myPanelUpper->getOpacity() : 0.0f, false);
265
+ }
266
+ myWindow->setTrackOrientation(aViewMode != StStereoParams::FLAT_IMAGE
267
+ && myPlugin->params.ToTrackHead->getValue());
268
+ StQuaternion<double> aQ = myWindow->getDeviceOrientation();
269
+ myImage->setDeviceOrientation(StGLQuaternion((float )aQ.x(), (float )aQ.y(), (float )aQ.z(), (float )aQ.w()));
270
+
271
if(myDescr != NULL) {
272
myDescr->setOpacity(1.0f, true);
273
if(::isPointIn(myBtnOpen, theCursor)) {
274
275
myDescr->setText(tr(FULLSCREEN));
276
} else if(::isPointIn(myBtnSrcFrmt, theCursor)) {
277
myDescr->setText(tr(BTN_SRC_FORMAT) + "\n" + trSrcFormat(aSrcFormat));
278
+ } else if(::isPointIn(myBtnPanorama, theCursor)) {
279
+ size_t aTrPano = MENU_VIEW_SURFACE_PLANE;
280
+ switch(aViewMode) {
281
+ case StStereoParams::FLAT_IMAGE: aTrPano = MENU_VIEW_SURFACE_PLANE; break;
282
+ case StStereoParams::PANORAMA_SPHERE: aTrPano = MENU_VIEW_SURFACE_SPHERE; break;
283
+ case StStereoParams::PANORAMA_CUBEMAP: aTrPano = MENU_VIEW_SURFACE_CUBEMAP; break;
284
+ }
285
+ myDescr->setText(tr(MENU_VIEW_PANORAMA) + "\n" + tr(aTrPano));
286
} else {
287
myDescr->setOpacity(0.0f, true);
288
}
289
290
if((theView == ST_DRAW_LEFT || theView == ST_DRAW_MONO)
291
&& myFpsWidget != NULL) {
292
myFpsWidget->update(myPlugin->getMainWindow()->isStereoOutput(),
293
- myPlugin->getMainWindow()->getTargetFps());
294
+ myPlugin->getMainWindow()->getTargetFps(),
295
+ myPlugin->getMainWindow()->getStatistics());
296
}
297
StGLRootWidget::stglDraw(theView);
298
}
299
sview-15_08.tar.gz/StImageViewer/StImageViewerGUI.h -> sview-15_10.tar.gz/StImageViewer/StImageViewerGUI.h
Changed
45
1
2
#include <StThreads/StCondition.h>
3
4
// forward declarations
5
+class StGLCheckboxTextured;
6
class StGLDescription;
7
class StGLTextureButton;
8
class StImageViewer;
9
10
ST_LOCAL StGLMenu* createViewMenu(); // Root -> View menu
11
ST_LOCAL StGLMenu* createDisplayModeMenu(); // Root -> View menu -> Output
12
ST_LOCAL StGLMenu* createDisplayRatioMenu(); // Root -> View menu -> Display Ratio
13
- ST_LOCAL StGLMenu* createSurfaceMenu(); // Root -> View -> Surface
14
ST_LOCAL StGLMenu* createSmoothFilterMenu(); // Root -> View menu -> Smooth Filter
15
ST_LOCAL StGLMenu* createImageAdjustMenu(); // Root -> View menu -> Image Adjust
16
ST_LOCAL StGLMenu* createOutputMenu(); // Root -> Output menu
17
18
ST_LOCAL StGLMenu* createLanguageMenu(); // Root -> Help -> Language menu
19
20
ST_LOCAL void fillSrcFormatMenu(StGLMenu* theMenu);
21
+ ST_LOCAL void fillPanoramaMenu (StGLMenu* theMenu);
22
23
private: //! @name mobile interface creation routines
24
25
26
ST_LOCAL void doResetHotKeys(const size_t );
27
ST_LOCAL void doListHotKeys(const size_t );
28
29
+ ST_LOCAL void doOpenFile(const size_t );
30
ST_LOCAL void doShowMobileExMenu(const size_t );
31
ST_LOCAL void doMobileSettings(const size_t );
32
ST_LOCAL void doDisplayStereoFormatCombo(const size_t );
33
+ ST_LOCAL void doPanoramaCombo(const size_t );
34
35
private: //! @name private fields
36
37
38
StGLTextureButton* myBtnNext;
39
StGLTextureButton* myBtnInfo;
40
StGLTextureButton* myBtnSwapLR;
41
+ StGLCheckboxTextured* myBtnPanorama;
42
StGLTextureButton* myBtnSrcFrmt;
43
StGLTextureButton* myBtnPlayList;
44
StGLTextureButton* myBtnFull;
45
sview-15_08.tar.gz/StImageViewer/StImageViewerStrings.cpp -> sview-15_10.tar.gz/StImageViewer/StImageViewerStrings.cpp
Changed
75
1
2
theStrings(MENU_MEDIA_OPEN_IMAGE_2,
3
"Left+Right files");
4
theStrings(MENU_SRC_FORMAT_AUTO,
5
- "Autodetection");
6
+ "Source");
7
theStrings(MENU_SRC_FORMAT_MONO,
8
"Mono");
9
theStrings(MENU_SRC_FORMAT_CROSS_EYED,
10
11
"Saturation");
12
theStrings(MENU_VIEW_ADJUST_GAMMA,
13
"Gamma");
14
- theStrings(MENU_VIEW_SURFACE,
15
- "Surface");
16
+ theStrings(MENU_VIEW_PANORAMA,
17
+ "Panorama");
18
theStrings(MENU_VIEW_SURFACE_PLANE,
19
"Plane");
20
theStrings(MENU_VIEW_SURFACE_SPHERE,
21
"Sphere");
22
theStrings(MENU_VIEW_SURFACE_CYLINDER,
23
"Cylinder");
24
+ theStrings(MENU_VIEW_SURFACE_CUBEMAP,
25
+ "Cubemap");
26
+ theStrings(MENU_VIEW_TRACK_HEAD,
27
+ "Track orientation");
28
+ theStrings(MENU_VIEW_TRACK_HEAD_POOR,
29
+ "Track orientation (poor)");
30
theStrings(MENU_VIEW_DISPLAY_MODE_STEREO,
31
"Stereo");
32
theStrings(MENU_VIEW_DISPLAY_MODE_LEFT,
33
34
"Cross-eyed pair");
35
theStrings(MENU_VIEW_DISPLAY_RATIO_SRC,
36
"Source");
37
- theStrings(MENU_VIEW_KEEP_ON_RESTART,
38
+ theStrings(MENU_VIEW_RATIO_KEEP_ON_RESTART,
39
"Keep on restart");
40
+ theStrings(MENU_VIEW_RATIO_HEAL_ANAMORPHIC,
41
+ "Heal anamorphic 1080p/720p");
42
theStrings(MENU_VIEW_TEXFILTER_NEAREST,
43
"Nearest");
44
theStrings(MENU_VIEW_TEXFILTER_LINEAR,
45
46
"Never"),
47
theStrings(MENU_HELP_HOTKEYS,
48
"Hotkeys");
49
+ theStrings(MENU_HELP_SETTINGS,
50
+ "Settings");
51
theStrings(IMAGE_OPEN,
52
"Open another image");
53
theStrings(IMAGE_PREVIOUS,
54
55
"Rotate clockwise");
56
addAction(theStrings, StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_ModeNext,
57
"DoParamsModeNext",
58
- "Select next mode");
59
+ "Select next view mode");
60
addAction(theStrings, StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_PanLeft,
61
"DoParamsPanLeft",
62
"Panning - navigate to the left");
63
64
addAction(theStrings, StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_RotXDown,
65
"DoParamsRotXDown",
66
"X Rotation - down");
67
+
68
+ // new actions
69
+ addAction(theStrings, StImageViewer::Action_PanoramaOnOff,
70
+ "DoPanoramaOnOff",
71
+ "Enable/disable panorama mode");
72
}
73
74
};
75
sview-15_08.tar.gz/StImageViewer/StImageViewerStrings.h -> sview-15_10.tar.gz/StImageViewer/StImageViewerStrings.h
Changed
40
1
2
MENU_VIEW_DISPLAY_RATIO = 1205,
3
MENU_VIEW_TEXFILTER = 1206,
4
MENU_VIEW_IMAGE_ADJUST = 1207,
5
- MENU_VIEW_SURFACE = 1208,
6
+ MENU_VIEW_PANORAMA = 1208,
7
8
MENU_VIEW_DISPLAY_MODE_STEREO = 1210,
9
MENU_VIEW_DISPLAY_MODE_LEFT = 1211,
10
11
MENU_VIEW_DISPLAY_MODE_PARALLEL = 1213,
12
MENU_VIEW_DISPLAY_MODE_CROSSYED = 1214,
13
14
- MENU_VIEW_DISPLAY_RATIO_SRC = 1250,
15
- MENU_VIEW_KEEP_ON_RESTART = 1251,
16
+ MENU_VIEW_DISPLAY_RATIO_SRC = 1250,
17
+ MENU_VIEW_RATIO_KEEP_ON_RESTART = 1251,
18
+ MENU_VIEW_RATIO_HEAL_ANAMORPHIC = 1252,
19
20
MENU_VIEW_TEXFILTER_NEAREST = 1260,
21
MENU_VIEW_TEXFILTER_LINEAR = 1261,
22
23
MENU_VIEW_SURFACE_PLANE = 1280,
24
MENU_VIEW_SURFACE_SPHERE = 1281,
25
MENU_VIEW_SURFACE_CYLINDER = 1282,
26
+ MENU_VIEW_SURFACE_CUBEMAP = 1283,
27
+ MENU_VIEW_TRACK_HEAD = 1285,
28
+ MENU_VIEW_TRACK_HEAD_POOR = 1286,
29
30
// Root -> Output -> Change Device menu
31
MENU_CHANGE_DEVICE = 1400,
32
33
MENU_HELP_SYSINFO = 1508,
34
MENU_HELP_SCALE = 1509,
35
MENU_HELP_HOTKEYS = 1510,
36
+ MENU_HELP_SETTINGS= 1511,
37
38
// Root -> Help -> Check for updates menu
39
MENU_HELP_UPDATES_NOW = 1520,
40
sview-15_08.tar.gz/StImageViewer/lang/chinese/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/chinese/StImageViewer.lng
Changed
41
1
2
1214="对眼"
3
1250="源格式"
4
1251="重启维持"
5
+?1252="Heal anamorphic 1080p/720p"
6
1260="接近"
7
1261="线状"
8
1270="重置默认"
9
10
1280="平面"
11
1281="球面"
12
1282="圆柱"
13
+?1283="Cubemap"
14
+?1285="Track orientation"
15
+?1286="Track orientation (poor)"
16
1400="改变设备->>"
17
1401="关于插件..."
18
1402="显示 FPS"
19
20
1508="关于系统"
21
1509="界面大小->>"
22
?1510="Hotkeys"
23
+?1511="Settings"
24
1520="现在"
25
1521="每天"
26
1522="每周"
27
28
?6028="Rotate 90 degrees clockwise"
29
?6029="Rotate counterclockwise"
30
?6030="Rotate clockwise"
31
-?6031="Enable/disable panorama mode"
32
+?6031="Select next view mode"
33
?6032="Panning - navigate to the left"
34
?6033="Panning - navigate to the right"
35
?6034="Panning - navigate to the top"
36
37
?6039="Y Rotation - right"
38
?6040="X Rotation - up"
39
?6041="X Rotation - down"
40
+?6042="Enable/disable panorama mode"
41
sview-15_10.tar.gz/StImageViewer/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StImageViewer/lang/czech/StImageViewer.lng
Added
172
1
2
+# Czech translation file for StImageViewer program
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Zpět
7
+1001=Další
8
+1002=Přehodit levá/pravá
9
+1003=Vypnout přehození levá/pravá
10
+1004=Vstupní stereoskopický formát:
11
+1015=Otevřít soubor
12
+1028=zobrazit/skrýt soubory
13
+1029=Okno/přes celou obrazovku
14
+1100=Soubor
15
+1101=Otevřít soubor
16
+1102=Uložit jako…
17
+1103=Vstupní stereoformát
18
+1104=Informace o souboru
19
+1109=Zavřít (ESC)
20
+1110=Jeden stereosoubor
21
+1111=Dva soubory levý/pravý zvlášť
22
+1130=Původní
23
+1131=Mono
24
+1132=Křížem vedle sebe
25
+1133=Paralel vedle sebe
26
+1134=Nad/pod P/L
27
+1135=Nad/pod L/P
28
+1136=Prokládaný
29
+1137=Anaglyf červená/modrá
30
+1138=Anaglyf purporová
31
+1139=Anaglyf žlutá
32
+1142=2 stream
33
+1200=Zobrazení
34
+1201=Výstupní formát
35
+1202=Celá obrazovka (Enter)
36
+1203=Vrátit
37
+1204=Přehodit levá/pravá
38
+1205=Poměr stran
39
+1206=Vyhlazení
40
+1207=Barevné korekce
41
+1208=Panorama
42
+1210=Stereo
43
+1211=Levá
44
+1212=Pravá
45
+1213=Paralel vedle sebe
46
+1214=Křížem vedle sebe
47
+1250=Původní
48
+1251=Neukládat nastavení
49
+?1252=Heal anamorphic 1080p/720p
50
+1260=Sousední
51
+1261=Lineární
52
+1270=Resetovat nastavení
53
+1271=Jas
54
+1272=Sytost
55
+1273=Gama
56
+1280=Plocha
57
+1281=Koule
58
+1282=Válec
59
+?1283=Cubemap
60
+?1285="Track orientation"
61
+?1286="Track orientation (poor)"
62
+1400=Zobrazovací zařizení
63
+1401=O modulu
64
+1402=Zobrazovat snímkování (fps)
65
+1403=Vertikální synchronizace
66
+1500=Nápověda
67
+1501=O aplikaci sView…
68
+1502=Aktualizace
69
+1503=Licenční ujednání
70
+1504=Language
71
+1506=Nápověda/klávesové zkratky
72
+1508=O systému
73
+1509=Vzhled
74
+?1510=Hotkeys
75
+?1511=Settings
76
+1520=Nyní
77
+1521=Denně
78
+1522=Týdně
79
+1523=Ročně
80
+1524=Nikdy
81
+1590=Menší
82
+1591=Normální
83
+1592=Velké
84
+1593=Extravelké HiDPI 2x
85
+2000=Otevřít
86
+2001=Otevřít LEVÝ
87
+2002=Otevřít PRAVÝ
88
+2003=Informace o souboru
89
+2004=Žadné informace
90
+2005=Vymazat soubor
91
+2006=Skutečně chcete hodit soubor do koše?
92
+2007=Ukládání metadat
93
+2008=Skutečně chcete vložit metadata do souboru?
94
+2009=Ukládání metadat je možné jen v souborech JPEG
95
+2010=Vyberte místo uložení
96
+2011=Nic není otevřeno!
97
+2012=Obraz není možné uložit!
98
+?2013=Assign new Hot Key for action\n<i>{0}</i>
99
+?2014=Conflicts with: <i>{0}</i>
100
+3000=sView - aplikace pro zobrazení stereovizualizace.
101
+3001=verze
102
+3002=Aplikace zobrazuje soubory JPEG, PNG, MPO.\n © {0} Гаврилов Кирилл <{1}>\nOficiální stránka: {2}\n\nAplikace je vytvořena na platformě GPL3.0{3}\nČeská lokalizace Marek Audy
103
+3003=Nové verze aplikace jsou dostupné na:www.sview.ru.\nProsím aktualizujte svoji aplikaci
104
+3004=Informace o systému
105
+4000=Zavřít
106
+4001=Zrušit
107
+4006=Uložit
108
+4007=Smazat
109
+?4008=Default
110
+?4009=Defaults
111
+?4010=Assign
112
+5000=[levý]
113
+5001=[pravý]
114
+5002=Jméno souboru
115
+5003=Rozlišení
116
+5004=Načítání
117
+5005=ms
118
+5006=Poměr stran pixelu
119
+5007=Barevný model
120
+5008=(metada nejsou v informaci obsažena)
121
+5009=(neobsahuje metadata)
122
+5011=(informace není obsažena v metadatech,\nale byla přidělena podle jména souboru)
123
+5100=JPEG komentář
124
+5101=JPS komentář
125
+5200=Výrobce kamery
126
+5201=Model kamery
127
+5202=Komentář uživatele
128
+5203=Datum snímku
129
+?6000=Switch fullscreen/windowed
130
+?6001=Show/hide FPS meter
131
+?6002=Stereo format - Auto
132
+?6003=Stereo format - Mono
133
+?6004=Stereo format - Over/Under
134
+?6005=Stereo format - Side by side
135
+?6006=Show file info
136
+?6007=Playlist - Go to the first item
137
+?6008=Playlist - Go to the last item
138
+?6009=Playlist - Go to the previous item
139
+?6010=Playlist - Go to the next item
140
+?6011=Playlist - Start/stop slideshow
141
+?6012=Save in PNG format
142
+?6013=Save in JPEG format
143
+?6014=Save file metadata
144
+?6015=Delete the file from file system
145
+?6016=Reset image adjustment
146
+?6017=Reset image position
147
+?6018=Swap Left/Right
148
+?6019=Gamma correction - decrease
149
+?6020=Gamma correction - increase
150
+?6021=DX separation - decrease
151
+?6022=DX separation - increase
152
+?6023=DY separation - decrease
153
+?6024=DY separation - increase
154
+?6025=Angular separation - decrease
155
+?6026=Angular separation - increase
156
+?6027=Rotate 90 degrees counterclockwise
157
+?6028=Rotate 90 degrees clockwise
158
+?6029=Rotate counterclockwise
159
+?6030=Rotate clockwise
160
+?6031=Select next view mode
161
+?6032=Panning - navigate to the left
162
+?6033=Panning - navigate to the right
163
+?6034=Panning - navigate to the top
164
+?6035=Panning - navigate to the bottom
165
+?6036=Scale - increment
166
+?6037=Scale - decrement
167
+?6038=Y Rotation - left
168
+?6039=Y Rotation - right
169
+?6040=X Rotation - up
170
+?6041=X Rotation - down
171
+?6042=Enable/disable panorama mode
172
sview-15_10.tar.gz/StImageViewer/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StImageViewer/lang/english/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/english/StImageViewer.lng
Changed
62
1
2
1109="Quit"
3
1110="From One file"
4
1111="Left+Right files"
5
-1130="Autodetection"
6
+1130="Source"
7
1131="Mono"
8
1132="Cross-eyed"
9
1133="Parallel Pair"
10
11
1205="Display Ratio"
12
1206="Smooth Filter"
13
1207="Image Adjust"
14
-1208="Surface"
15
+1208="Panorama"
16
1210="Stereo"
17
1211="Left View"
18
1212="Right View"
19
20
1214="Cross-eyed"
21
1250="Source"
22
1251="Keep on restart"
23
+1252="Heal anamorphic 1080p/720p"
24
1260="Nearest"
25
1261="Linear"
26
1270="Reset to defaults"
27
1271="Brightness"
28
1272="Saturation"
29
1273="Gamma"
30
-1280="Plane"
31
+1280="Off"
32
1281="Sphere"
33
1282="Cylinder"
34
+1283="Cubemap"
35
+1285="Track orientation"
36
+1286="Track orientation (poor)"
37
1400="Change device"
38
1401="About Plugin..."
39
1402="Show FPS"
40
41
1508="About system"
42
1509="Interface Scale"
43
1510="Hotkeys"
44
+1511="Settings"
45
1520="Now"
46
1521="Each day"
47
1522="Each week"
48
49
6028="Rotate 90 degrees clockwise"
50
6029="Rotate counterclockwise"
51
6030="Rotate clockwise"
52
-6031="Enable/disable panorama mode"
53
+6031="Select next view mode"
54
6032="Panning - navigate to the left"
55
6033="Panning - navigate to the right"
56
6034="Panning - navigate to the top"
57
58
6039="Y Rotation - right"
59
6040="X Rotation - up"
60
6041="X Rotation - down"
61
+6042="Enable/disable panorama mode"
62
sview-15_08.tar.gz/StImageViewer/lang/french/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/french/StImageViewer.lng
Changed
59
1
2
1109="Quitter"
3
1110="Depuis un fichier"
4
1111="2 Fichiers Gauche+Droit"
5
-1130="Auto-détection"
6
+1130="Source"
7
1131="Mono"
8
1132="Cross-eyed"
9
1133="Coté/Coté (SbS)"
10
11
1205="Ratio d'affichage"
12
1206="Lissage antialiasing"
13
1207="Réglage de l'image"
14
-1208="Surface"
15
+1208="Panorama"
16
1210="Stéréo"
17
1211="Vue Gauche"
18
1212="Vue Droite"
19
20
1214="Cross-eyed"
21
1250="Source"
22
1251="Garder après redémarrage"
23
+?1252="Heal anamorphic 1080p/720p"
24
1260="Plus proche"
25
1261="Lineaire"
26
1270="Rétablir par défaut"
27
28
1280="Plan"
29
1281="Sphère"
30
1282="Cylindre"
31
+1283="Cubemap"
32
+?1285="Track orientation"
33
+?1286="Track orientation (poor)"
34
1400="Changer la sortie"
35
1401="A propos du Plugin..."
36
1402="Voir I/S"
37
38
?1508="About system"
39
?1509="Scale Interface"
40
1510="Raccourcis"
41
+1511="Paramètres"
42
1520="Maintenant"
43
1521="Chaque Jour"
44
1522="Chaque Mois"
45
46
6028="Faire pivoter un objet de 90 degrés vers la droite"
47
6029="Sens inverse des aiguilles d’une montre"
48
6030="Sens des aiguilles d’une montre"
49
-6031="Activer / désactiver le mode panorama"
50
+?6031="Select next view mode"
51
6032="Naviguer vers la gauche"
52
6033="Naviguer vers la droite"
53
6034="Naviguer vers le haut"
54
55
?6039="Y Rotation - right"
56
?6040="X Rotation - up"
57
?6041="X Rotation - down"
58
+6042="Activer / désactiver le mode panorama"
59
sview-15_08.tar.gz/StImageViewer/lang/german/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/german/StImageViewer.lng
Changed
62
1
2
1109="Beenden"
3
1110="Einer Datei"
4
1111="Zwei Dateien"
5
-1130="Autoerkennung"
6
+1130="Quelle"
7
1131="Mono"
8
1132="Schielend"
9
1133="Parallel Pair"
10
11
1205="Seitenverhältnis"
12
1206="Glatte Filter"
13
1207="Bildeinstellung"
14
-1208="Oberfläche"
15
+1208="Panorama"
16
1210="Stereo"
17
1211="Linke Bild"
18
1212="Rechte Bild"
19
20
1214="Cross-eyed"
21
1250="Quelle"
22
1251="Halten beim Neustart"
23
+?1252="Heal anamorphic 1080p/720p"
24
1260="Nearest"
25
1261="Linear"
26
1270="Auf Standardwerte zurücksetzen"
27
1271="Helligkeit"
28
1272="Sättigung"
29
1273="Gamma"
30
-1280="Fläche"
31
+1280="Aus"
32
1281="Kugel"
33
1282="Zylinder"
34
+1283="Cubemap"
35
+?1285="Track orientation"
36
+?1286="Track orientation (poor)"
37
1400="Gerät ändern"
38
1401="Über Plugin..."
39
1402="FPS anzeigen"
40
41
1508="Über System"
42
1509="Maßstab Benutzeroberfläche"
43
1510="Hotkeys"
44
+1511="Einstellungen"
45
1520="jetzt"
46
1521="täglich"
47
1522="wöchentlich"
48
49
6028="Um 90 Grad im Uhrzeigersinn drehen"
50
6029="Drehen gegen den Uhrzeigersinn"
51
6030="Im Uhrzeigersinn drehen"
52
-6031="Aktivieren / Deaktivieren der Panorama-Modus"
53
+?6031="Select next view mode"
54
6032="Navigieren nach links"
55
6033="Navigieren nach rechts"
56
6034="Navigieren nach oben"
57
58
6039="Y-Drehung - rechts"
59
6040="X-Drehung - nach oben"
60
6041="X-Drehung - nach unten"
61
+6042="Aktivieren / Deaktivieren der Panorama-Modus"
62
sview-15_08.tar.gz/StImageViewer/lang/korean/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/korean/StImageViewer.lng
Changed
53
1
2
1205="화면 비율"
3
?1206="Smooth Filter"
4
1207="이미지 보정"
5
-?1208="Surface"
6
+?1208="Panorama"
7
?1210="Stereo"
8
?1211="Left View"
9
?1212="Right View"
10
11
1214="크로스-아이"
12
?1250="Source"
13
1251="재시작시 유지"
14
+?1252="Heal anamorphic 1080p/720p"
15
?1260="Nearest"
16
?1261="Linear"
17
1270="기본값으로 리셋"
18
1271="밝기"
19
?1272="Saturation"
20
1273="감마"
21
-?1280="Plane"
22
+?1280="Off"
23
?1281="Sphere"
24
?1282="Cylinder"
25
+?1283="Cubemap"
26
+?1285="Track orientation"
27
+?1286="Track orientation (poor)"
28
1400="장치 변경"
29
?1401="About Plugin..."
30
?1402="Show FPS"
31
32
?1508="About system"
33
?1509="Interface Scale"
34
?1510="Hotkeys"
35
+?1511="Settings"
36
1520="지금"
37
1521="매일Each day"
38
1522="매주Each week"
39
40
?6028="Rotate 90 degrees clockwise"
41
?6029="Rotate counterclockwise"
42
?6030="Rotate clockwise"
43
-?6031="Enable/disable panorama mode"
44
+?6031="Select next view mode"
45
?6032="Panning - navigate to the left"
46
?6033="Panning - navigate to the right"
47
?6034="Panning - navigate to the top"
48
49
?6039="Y Rotation - right"
50
?6040="X Rotation - up"
51
?6041="X Rotation - down"
52
+?6042="Enable/disable panorama mode"
53
sview-15_08.tar.gz/StImageViewer/lang/russian/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/russian/StImageViewer.lng
Changed
50
1
2
1109="Выход"
3
1110="Из одного файла"
4
1111="Левый+Правый файлы"
5
-1130="Автоопределение"
6
+1130="Исходный"
7
1131="Моно"
8
1132="Перекрёстная пара"
9
1133="Параллельная пара"
10
11
1214="Перекрёстная пара"
12
1250="Исходное"
13
1251="Запомнить"
14
+?1252="Heal anamorphic 1080p/720p"
15
1260="Nearest"
16
1261="Linear"
17
1270="Сбросить настройки"
18
19
1280="Плоскость"
20
1281="Сфера"
21
1282="Цилиндр"
22
+1283="Куб"
23
+1285="Отслеживать ориентацию"
24
+1286="Отслеживать ориентацию (poor)"
25
1400="Выбрать устройство"
26
1401="О модуле..."
27
1402="Отображать FPS"
28
29
1508="О системе"
30
1509="Масштаб. интерфейса"
31
1510="Горячие клавиши"
32
+1511="Настройки"
33
1520="Сейчас"
34
1521="Каждый день"
35
1522="Каждую неделю"
36
37
6028="Поворот на 90 градусов по часовой стрелке"
38
6029="Поворот против часовой стрелки"
39
6030="Поворот по часовой стрелке"
40
-6031="Включить/выключить панорамный режим"
41
+6031="Выбрать следующий режим"
42
6032="Паннинг - движение налево"
43
6033="Паннинг - движение направо"
44
6034="Паннинг - движение наверх"
45
46
6039="Y наклон - направо"
47
6040="X наклон - наверх"
48
6041="X наклон - вниз"
49
+6042="Включить/выключить панорамный режим"
50
sview-15_08.tar.gz/StMonitorsDump/StMonitorsDump.cbp -> sview-15_10.tar.gz/StMonitorsDump/StMonitorsDump.cbp
Changed
14
1
2
<Add directory="../bin/$(TARGET_NAME)" />
3
</Linker>
4
<Unit filename="main.cpp" />
5
+ <Unit filename="main_1.mm">
6
+ <Option compile="1" />
7
+ <Option link="1" />
8
+ <Option target="MAC_gcc" />
9
+ <Option target="MAC_gcc_DEBUG" />
10
+ </Unit>
11
<Extensions>
12
<code_completion />
13
<envvars />
14
sview-15_08.tar.gz/StMonitorsDump/main.cpp -> sview-15_10.tar.gz/StMonitorsDump/main.cpp
Changed
52
1
2
/**
3
- * Copyright © 2009-2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2009-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* StMonitorsDump program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
9
10
};
11
12
-int main(int , char** ) { // force console output
13
+#if defined(__APPLE__)
14
+int stMonitorsDump_main() {
15
+#else
16
+int main(int , char** ) {
17
+#endif
18
+
19
#ifdef _WIN32
20
setlocale(LC_ALL, ".OCP"); // we set default locale for console output (useful only for debug)
21
#endif
22
23
}
24
genInf(anInputEdid, anOutInfFilename + ".inf");
25
}
26
+ #if !defined(__APPLE__)
27
st::cout << stostream_text("Press any key to exit...") << st::SYS_PAUSE_EMPTY;
28
+ #endif
29
return 0;
30
}
31
32
33
aFileOut.open(aFileName.toCString());
34
if(aFileOut.fail()) {
35
st::cout << st::COLOR_FOR_RED << stostream_text("Couldn't open file \"stMonitorsDump.htm\"!\n") << st::COLOR_FOR_WHITE;
36
+ #if !defined(__APPLE__)
37
st::cout << stostream_text("Press any key to exit...") << st::SYS_PAUSE_EMPTY;
38
+ #endif
39
return -1;
40
}
41
}
42
43
st::cout << st::COLOR_FOR_GREEN << stostream_text("Dump stored to file \"stMonitorsDump.htm\"\n") << st::COLOR_FOR_WHITE;
44
45
StProcess::openURL(aFileName);
46
+#if !defined(__APPLE__)
47
st::cout << stostream_text("Press any key to exit...") << st::SYS_PAUSE_EMPTY;
48
+#endif
49
if(isTmpFile) {
50
StFileNode::removeFile(aFileName);
51
}
52
sview-15_10.tar.gz/StMonitorsDump/main_1.mm
Added
137
1
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * StMonitorsDump program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * StMonitorsDump program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public
16
+ * License along with this program.
17
+ * If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+#if defined(__APPLE__)
21
+
22
+#include <StThreads/StThread.h>
23
+
24
+#import <Cocoa/Cocoa.h>
25
+
26
+#include <StCore/StApplication.h>
27
+#include <StCocoa/StCocoaLocalPool.h>
28
+#include <StStrings/stConsole.h>
29
+#include <StThreads/StProcess.h>
30
+
31
+extern int stMonitorsDump_main();
32
+
33
+/**
34
+ * Main Cocoa application responder.
35
+ */
36
+@interface StTestResponder : NSObject <NSApplicationDelegate>
37
+ {
38
+ }
39
+
40
+ + (StTestResponder* ) sharedInstance;
41
+
42
+ /**
43
+ * Default constructor.
44
+ */
45
+ - (id ) init;
46
+
47
+ /**
48
+ * Dummy method for thread-safety Cocoa initialization.
49
+ */
50
+ + (void ) doDummyThread: (id ) theParam;
51
+
52
+@end
53
+
54
+namespace {
55
+
56
+ static StTestResponder* TheAppResponder = NULL;
57
+
58
+}
59
+
60
+@implementation StTestResponder
61
+
62
+ /// Singletone implementation.
63
+
64
+ - (id ) init {
65
+ if(TheAppResponder != NULL) {
66
+ if(self != TheAppResponder) {
67
+ // should never happens
68
+ [self release];
69
+ }
70
+ return TheAppResponder;
71
+ }
72
+
73
+ self = [super init];
74
+ if(self == NULL) {
75
+ return NULL;
76
+ }
77
+ return self;
78
+ }
79
+
80
+ + (StTestResponder* ) sharedInstance {
81
+ if(TheAppResponder == NULL) {
82
+ TheAppResponder = [[super allocWithZone: NULL] init];
83
+ }
84
+ return TheAppResponder;
85
+ }
86
+
87
+ + (id ) allocWithZone: (NSZone* ) theZone { return [[self sharedInstance] retain]; }
88
+ - (id ) copyWithZone: (NSZone* ) theZone { return self; }
89
+ - (id ) retain { return self; }
90
+ - (NSUInteger ) retainCount { return NSUIntegerMax; } //denotes an object that cannot be released
91
+ - (oneway void ) release {}
92
+ - (id ) autorelease { return self; }
93
+
94
+ /// application logic
95
+
96
+ - (BOOL ) application: (NSApplication* ) theApplication
97
+ openFile: (NSString* ) theFilename {
98
+ return YES;
99
+ }
100
+
101
+ - (void ) applicationDidFinishLaunching: (NSNotification* ) theNotification {
102
+ int aResult = stMonitorsDump_main();
103
+ exit(aResult);
104
+ }
105
+
106
+ - (void ) applicationWillTerminate: (NSNotification* ) theNotification {}
107
+ + (void ) doDummyThread: (id ) theParam {}
108
+
109
+@end
110
+
111
+int main(int , char** ) {
112
+ StCocoaLocalPool aPool;
113
+
114
+ // dummy NSThread to ensure Cocoa thread-safety
115
+ [NSThread detachNewThreadSelector: @selector(doDummyThread: )
116
+ toTarget: [StTestResponder class]
117
+ withObject: NULL];
118
+
119
+ NSApplication* anAppNs = [NSApplication sharedApplication];
120
+ StTestResponder* anAppResp = [StTestResponder sharedInstance];
121
+ [anAppNs setDelegate: anAppResp];
122
+
123
+ // dummy hidden window for as workaround
124
+ NSWindow* aWin = [NSWindow alloc];
125
+ [aWin initWithContentRect: NSMakeRect(16, 16, 16, 16)
126
+ styleMask: NSBorderlessWindowMask
127
+ backing: NSBackingStoreBuffered
128
+ defer: NO];
129
+ [aWin release];
130
+
131
+ [anAppNs activateIgnoringOtherApps: YES];
132
+ [anAppNs run];
133
+ return 0;
134
+}
135
+
136
+#endif // __APPLE__
137
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayer.cpp -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayer.cpp
Changed
505
1
2
#include "StMoviePlayerGUI.h"
3
#include "StMoviePlayerStrings.h"
4
#include "StVideo/StVideo.h"
5
+#include "StSeekBar.h"
6
#include "StTimeBox.h"
7
8
#include <StImage/StImageFile.h>
9
10
static const char ST_SETTING_OPENAL_DEVICE[] = "alDevice";
11
static const char ST_SETTING_RECENT_FILES[] = "recent";
12
static const char ST_SETTING_SHOW_LIST[] = "showPlaylist";
13
+ static const char ST_SETTING_TRACK_HEAD[] = "toTrackHead";
14
static const char ST_SETTING_SHOW_FPS[] = "toShowFps";
15
static const char ST_SETTING_MOBILE_UI[] = "isMobileUI";
16
static const char ST_SETTING_LIMIT_FPS[] = "toLimitFps";
17
18
19
static const char ST_SETTING_SCALE_ADJUST[] = "scaleAdjust";
20
static const char ST_SETTING_SCALE_FORCE2X[] = "scale2X";
21
+ static const char ST_SETTING_SUBTITLES_PLACE[]="subsPlace";
22
+ static const char ST_SETTING_SUBTITLES_TOPDY[]="subsTopDY";
23
+ static const char ST_SETTING_SUBTITLES_BOTTOMDY[]="subsBottomDY";
24
static const char ST_SETTING_SUBTITLES_SIZE[]= "subsSize";
25
static const char ST_SETTING_SUBTITLES_PARALLAX[] = "subsParallax";
26
static const char ST_SETTING_SUBTITLES_PARSER[] = "subsParser";
27
28
static const char ST_SETTING_LOOP_SINGLE[] = "loopSingle";
29
static const char ST_SETTING_GLOBAL_MKEYS[] = "globalMediaKeys";
30
static const char ST_SETTING_RATIO[] = "ratio";
31
+ static const char ST_SETTING_HEAL_ANAMORPHIC[] = "toHealAnamorphic";
32
static const char ST_SETTING_UPDATES_LAST_CHECK[] = "updatesLastCheck";
33
static const char ST_SETTING_UPDATES_INTERVAL[] = "updatesInterval";
34
static const char ST_SETTING_SAVE_IMG_TYPE[] = "snapImgType";
35
36
*/
37
ST_LOCAL const StString& getPathSubtitles() const { return myPathSubs; }
38
39
+ /**
40
+ * Set paths to open.
41
+ */
42
+ ST_LOCAL void setPaths(const StString& thePathLeft,
43
+ const StString& thePathRight) {
44
+ StMutexAuto aLock(myMutex);
45
+ if(myState != StOpenVideo::Dialog_Inactive) {
46
+ return;
47
+ }
48
+
49
+ myPathVideoL = thePathLeft;
50
+ myPathVideoR = thePathRight;
51
+ myPathAudio.clear();
52
+ myPathSubs .clear();
53
+ if(!myPathVideoL.isEmpty()) {
54
+ myState = StOpenVideo::Dialog_HasFiles;
55
+ }
56
+ }
57
+
58
private:
59
60
/**
61
62
// update menu
63
}
64
65
+void StMoviePlayer::doPause(const StPauseEvent& theEvent) {
66
+ StApplication::doPause(theEvent);
67
+ saveAllParams();
68
+}
69
+
70
StMoviePlayer::StMoviePlayer(const StHandle<StResourceManager>& theResMgr,
71
const StNativeWin_t theParentWin,
72
const StHandle<StOpenInfo>& theOpenInfo)
73
74
myToRecreateMenu(false),
75
myToUpdateALList(false),
76
myIsBenchmark(false),
77
- myToCheckUpdates(true) {
78
+ myToCheckUpdates(true),
79
+ myToCheckPoorOrient(true) {
80
mySettings = new StSettings(myResMgr, ST_DRAWER_PLUGIN_NAME);
81
myLangMap = new StTranslations(myResMgr, StMoviePlayer::ST_DRAWER_PLUGIN_NAME);
82
myOpenDialog = new StOpenVideo(this);
83
84
params.ScaleHiDPI2X = new StBoolParam(false);
85
mySettings->loadParam (ST_SETTING_SCALE_FORCE2X, params.ScaleHiDPI2X);
86
params.ScaleHiDPI2X->signals.onChanged = stSlot(this, &StMoviePlayer::doScaleHiDPI);
87
+ params.SubtitlesPlace = new StInt32Param(ST_VCORNER_BOTTOM);
88
+ params.SubtitlesTopDY = new StFloat32Param(100.0f, // initial value
89
+ 0.0f, 400.0f,// min, max values
90
+ 100.0f, // default value
91
+ 5.0f, // incremental step
92
+ 0.1f); // equality tolerance
93
+ params.SubtitlesBottomDY= new StFloat32Param(100.0f, // initial value
94
+ 0.0f, 400.0f,// min, max values
95
+ 100.0f, // default value
96
+ 5.0f, // incremental step
97
+ 0.1f); // equality tolerance
98
params.SubtitlesSize = new StFloat32Param(28.0f, // initial value
99
8.0f, 96.0f, // min, max values
100
28.0f, // default value
101
102
params.srcFormat->signals.onChanged = stSlot(this, &StMoviePlayer::doSwitchSrcFormat);
103
params.ToShowPlayList = new StBoolParam(false);
104
params.ToShowPlayList->signals.onChanged = stSlot(this, &StMoviePlayer::doShowPlayList);
105
+ params.ToTrackHead = new StBoolParamNamed(true, tr(MENU_VIEW_TRACK_HEAD));
106
params.ToShowFps = new StBoolParamNamed(false, tr(MENU_FPS_METER));
107
params.IsMobileUI = new StBoolParamNamed(StWindow::isMobile(), "Mobile UI");
108
params.IsMobileUI->signals.onChanged = stSlot(this, &StMoviePlayer::doScaleHiDPI);
109
110
mySettings->loadParam (ST_SETTING_LOOP_SINGLE, params.ToLoopSingle);
111
mySettings->loadParam (ST_SETTING_GLOBAL_MKEYS, params.areGlobalMKeys);
112
mySettings->loadParam (ST_SETTING_SHOW_LIST, params.ToShowPlayList);
113
+ mySettings->loadParam (ST_SETTING_SUBTITLES_PLACE, params.SubtitlesPlace);
114
+ mySettings->loadParam (ST_SETTING_SUBTITLES_TOPDY, params.SubtitlesTopDY);
115
+ mySettings->loadParam (ST_SETTING_SUBTITLES_BOTTOMDY, params.SubtitlesBottomDY);
116
mySettings->loadParam (ST_SETTING_SUBTITLES_SIZE, params.SubtitlesSize);
117
mySettings->loadParam (ST_SETTING_SUBTITLES_PARALLAX, params.SubtitlesParallax);
118
mySettings->loadParam (ST_SETTING_SUBTITLES_PARSER, params.SubtitlesParser);
119
mySettings->loadParam (ST_SETTING_SEARCH_SUBS, params.ToSearchSubs);
120
121
+ myToCheckPoorOrient = !mySettings->loadParam(ST_SETTING_TRACK_HEAD, params.ToTrackHead);
122
mySettings->loadParam (ST_SETTING_SHOW_FPS, params.ToShowFps);
123
mySettings->loadParam (ST_SETTING_MOBILE_UI, params.IsMobileUI);
124
mySettings->loadParam (ST_SETTING_VSYNC, params.IsVSyncOn);
125
126
127
anAction = new StActionIntSlot(stCString("DoImageAdjustReset"), stSlot(this, &StMoviePlayer::doImageAdjustReset), 0);
128
addAction(Action_ImageAdjustReset, anAction);
129
+
130
+ anAction = new StActionIntSlot(stCString("DoPanoramaOnOff"), stSlot(this, &StMoviePlayer::doPanoramaOnOff), 0);
131
+ addAction(Action_PanoramaOnOff, anAction, ST_VK_P);
132
}
133
134
bool StMoviePlayer::resetDevice() {
135
136
137
mySettings->saveParam (ST_SETTING_STEREO_MODE, myGUI->myImage->params.displayMode);
138
mySettings->saveInt32 (ST_SETTING_GAMMA, stRound(100.0f * myGUI->myImage->params.gamma->getValue()));
139
+ mySettings->saveParam (ST_SETTING_HEAL_ANAMORPHIC, myGUI->myImage->params.ToHealAnamorphicRatio);
140
if(params.toRestoreRatio->getValue()) {
141
mySettings->saveParam(ST_SETTING_RATIO, myGUI->myImage->params.displayRatio);
142
} else {
143
144
mySettings->saveParam (ST_SETTING_TEXFILTER, myGUI->myImage->params.textureFilter);
145
}
146
147
-void StMoviePlayer::releaseDevice() {
148
+void StMoviePlayer::saveAllParams() {
149
saveGuiParams();
150
if(!myGUI.isNull()) {
151
mySettings->saveParam (ST_SETTING_SCALE_ADJUST, params.ScaleAdjust);
152
mySettings->saveParam (ST_SETTING_SCALE_FORCE2X, params.ScaleHiDPI2X);
153
+ mySettings->saveParam (ST_SETTING_SUBTITLES_PLACE, params.SubtitlesPlace);
154
+ mySettings->saveParam (ST_SETTING_SUBTITLES_TOPDY, params.SubtitlesTopDY);
155
+ mySettings->saveParam (ST_SETTING_SUBTITLES_BOTTOMDY, params.SubtitlesBottomDY);
156
mySettings->saveParam (ST_SETTING_SUBTITLES_SIZE, params.SubtitlesSize);
157
mySettings->saveParam (ST_SETTING_SUBTITLES_PARALLAX, params.SubtitlesParallax);
158
mySettings->saveParam (ST_SETTING_SUBTITLES_PARSER, params.SubtitlesParser);
159
160
mySettings->saveParam (ST_SETTING_GLOBAL_MKEYS, params.areGlobalMKeys);
161
mySettings->saveParam (ST_SETTING_SHOW_LIST, params.ToShowPlayList);
162
163
+ mySettings->saveParam (ST_SETTING_TRACK_HEAD, params.ToTrackHead);
164
mySettings->saveParam (ST_SETTING_SHOW_FPS, params.ToShowFps);
165
mySettings->saveParam (ST_SETTING_MOBILE_UI, params.IsMobileUI);
166
mySettings->saveParam (ST_SETTING_VSYNC, params.IsVSyncOn);
167
168
mySettings->saveHotKey(anIter->second);
169
}
170
}
171
+ myPlayList->currentToRecent();
172
+ mySettings->saveString(ST_SETTING_RECENT_FILES, myPlayList->dumpRecentList());
173
+ mySettings->flush();
174
+}
175
+
176
+void StMoviePlayer::releaseDevice() {
177
+ saveAllParams();
178
179
// release GUI data and GL resources before closing the window
180
myKeyActions.clear();
181
182
releaseDevice();
183
// wait video playback thread to quit and release resources
184
myVideo.nullify();
185
-
186
- mySettings->saveString(ST_SETTING_RECENT_FILES, myPlayList->dumpRecentList());
187
}
188
189
bool StMoviePlayer::createGui(StHandle<StGLTextureQueue>& theTextureQueue,
190
191
mySettings->loadParam (ST_SETTING_STEREO_MODE, myGUI->myImage->params.displayMode);
192
mySettings->loadParam (ST_SETTING_TEXFILTER, myGUI->myImage->params.textureFilter);
193
mySettings->loadParam (ST_SETTING_RATIO, myGUI->myImage->params.displayRatio);
194
+ mySettings->loadParam (ST_SETTING_HEAL_ANAMORPHIC, myGUI->myImage->params.ToHealAnamorphicRatio);
195
params.toRestoreRatio->setValue(myGUI->myImage->params.displayRatio->getValue() != StGLImageRegion::RATIO_AUTO);
196
int32_t loadedGamma = 100; // 1.0f
197
mySettings->loadInt32(ST_SETTING_GAMMA, loadedGamma);
198
199
return false;
200
}
201
202
+ // disable head-tracking by default for poor sensors
203
+ if(myToCheckPoorOrient
204
+ && myWindow->isPoorOrientationSensor()) {
205
+ myToCheckPoorOrient = false;
206
+ params.ToTrackHead->setValue(false);
207
+ }
208
+
209
if(isReset) {
210
//myVideo->doLoadNext();
211
doUpdateStateLoaded();
212
213
return;
214
}
215
216
+ if(myVideo->isDisconnected() || myToUpdateALList) {
217
+ const StString aPrevDev = params.alDevice->getTitle();
218
+ params.alDevice->initList();
219
+ myGUI->updateOpenALDeviceMenu();
220
+ // switch audio device
221
+ if(!params.alDevice->init(aPrevDev)) {
222
+ // select first existing device if any
223
+ params.alDevice->init(params.alDevice->getTitle());
224
+ }
225
+ myVideo->switchAudioDevice(params.alDevice->getTitle());
226
+ myToUpdateALList = false;
227
+ }
228
+ if(myPlayList->isRecentChanged()) {
229
+ myGUI->updateRecentMenu();
230
+ }
231
+
232
+ // fetch Open File operation results
233
if(myOpenDialog->hasResults()) {
234
StHandle<StFileNode> aCurrFile = myPlayList->getCurrentFile();
235
StString aFilePath;
236
237
myOpenDialog->resetResults();
238
}
239
240
+ // re-create GUI when necessary
241
+ const bool hasVideoStream = myVideo->hasVideoStream();
242
if(params.ScaleHiDPI->setValue(myWindow->getScaleFactor())
243
|| myToRecreateMenu) {
244
StHandle<StGLTextureQueue> aTextureQueue;
245
StHandle<StSubQueue> aSubQueue;
246
createGui(aTextureQueue, aSubQueue);
247
-
248
- myGUI->updateAudioStreamsMenu(myVideo->params.activeAudio->getList(),
249
- myVideo->hasVideoStream());
250
- myGUI->updateSubtitlesStreamsMenu(myVideo->params.activeSubtitles->getList(),
251
- myVideo->hasAudioStream() || myVideo->hasVideoStream());
252
-
253
myToRecreateMenu = false;
254
}
255
256
257
}
258
myToCheckUpdates = false;
259
}
260
- myGUI->setVisibility(myWindow->getMousePos(), isMouseMove);
261
+
262
+ double aDuration = 0.0;
263
+ double aPts = 0.0;
264
+ bool isVideoPlayed = false, isAudioPlayed = false;
265
+ const bool isPlaying = myVideo->getPlaybackState(aDuration, aPts, isVideoPlayed, isAudioPlayed);
266
+ const double aPosition = (aDuration > 0.0) ? (aPts / aDuration) : 0.0;
267
+ if(myGUI->myBtnPlay != NULL) {
268
+ myGUI->myBtnPlay->setFaceId(isPlaying ? 1 : 0); // set play/pause
269
+ }
270
+ if(myGUI->myTimeBox != NULL) {
271
+ myGUI->myTimeBox->stglUpdateTime(aPts, aDuration);
272
+ }
273
+ if(myGUI->mySubtitles != NULL) {
274
+ myGUI->mySubtitles->setPTS(aPts);
275
+ }
276
+ if(myGUI->mySeekBar != NULL) {
277
+ myGUI->mySeekBar->setProgress(GLfloat(aPosition));
278
+ }
279
+ myGUI->stglUpdate(myWindow->getMousePos(), isMouseMove || !hasVideoStream);
280
+
281
+ // prevent display going to sleep
282
+ bool toBlockSleepDisplay = false;
283
+ bool toBlockSleepSystem = false;
284
+ if(myIsBenchmark) {
285
+ toBlockSleepDisplay = true;
286
+ toBlockSleepSystem = true;
287
+ } else {
288
+ switch(params.blockSleeping->getValue()) {
289
+ case BLOCK_SLEEP_NEVER: {
290
+ toBlockSleepDisplay = false;
291
+ toBlockSleepSystem = false;
292
+ break;
293
+ }
294
+ case BLOCK_SLEEP_ALWAYS: {
295
+ toBlockSleepDisplay = true;
296
+ toBlockSleepSystem = true;
297
+ break;
298
+ }
299
+ case BLOCK_SLEEP_PLAYBACK: {
300
+ toBlockSleepDisplay = isVideoPlayed;
301
+ toBlockSleepSystem = isPlaying;
302
+ break;
303
+ }
304
+ case BLOCK_SLEEP_FULLSCREEN: {
305
+ toBlockSleepDisplay = myWindow->isFullScreen();;
306
+ toBlockSleepSystem = toBlockSleepDisplay;
307
+ break;
308
+ }
309
+ }
310
+ }
311
+
312
+ const StWinAttr anAttribs[] = {
313
+ StWinAttr_ToBlockSleepSystem, (StWinAttr )toBlockSleepSystem,
314
+ StWinAttr_ToBlockSleepDisplay, (StWinAttr )toBlockSleepDisplay,
315
+ StWinAttr_NULL
316
+ };
317
+ myWindow->setAttributes(anAttribs);
318
+ myWindow->showCursor(!myGUI->toHideCursor());
319
+
320
+ // check for mono state
321
+ StHandle<StStereoParams> aParams = myGUI->myImage->getSource();
322
+ if(!aParams.isNull()) {
323
+ myWindow->setStereoOutput(!aParams->isMono()
324
+ && (myGUI->myImage->params.displayMode->getValue() == StGLImageRegion::MODE_STEREO));
325
+ }
326
}
327
328
void StMoviePlayer::doUpdateOpenALDeviceList(const size_t ) {
329
330
&& myGUI->myImage != NULL) {
331
myGUI->myImage->stglSkipFrames();
332
}
333
+
334
+ if(theView == ST_DRAW_LEFT
335
+ || theView == ST_DRAW_MONO) {
336
+ if(myWindow->isPaused()) {
337
+ double aDuration = 0.0;
338
+ double aPts = 0.0;
339
+ bool isVideoPlayed = false, isAudioPlayed = false;
340
+ const bool isPlaying = !myVideo.isNull()
341
+ && myVideo->getPlaybackState(aDuration, aPts, isVideoPlayed, isAudioPlayed);
342
+ if(!myInactivityTimer.isOn()) {
343
+ myInactivityTimer.restart();
344
+ } else if(myInactivityTimer.getElapsedTimeInSec() > 60.0
345
+ && !isPlaying) {
346
+ // perform delayed destruction on long inactivity
347
+ exit(0);
348
+ } else if(!isVideoPlayed) {
349
+ // force deep sleeps
350
+ StThread::sleep(100);
351
+ }
352
+ }
353
+ }
354
return;
355
}
356
+ myInactivityTimer.stop();
357
358
if(myContext->core20fwd != NULL) {
359
// clear the screen and the depth buffer
360
361
return;
362
}
363
364
- if(myVideo->isDisconnected() || myToUpdateALList) {
365
- const StString aPrevDev = params.alDevice->getTitle();
366
- params.alDevice->initList();
367
- myGUI->updateOpenALDeviceMenu();
368
- // switch audio device
369
- if(!params.alDevice->init(aPrevDev)) {
370
- // select first existing device if any
371
- params.alDevice->init(params.alDevice->getTitle());
372
- }
373
- myVideo->switchAudioDevice(params.alDevice->getTitle());
374
- myToUpdateALList = false;
375
- }
376
- if(myPlayList->isRecentChanged()) {
377
- myGUI->updateRecentMenu();
378
- }
379
-
380
myGUI->getCamera()->setView(theView);
381
- if(theView == ST_DRAW_LEFT
382
- || theView == ST_DRAW_MONO) {
383
- double aDuration = 0.0;
384
- double aPts = 0.0;
385
- bool isVideoPlayed = false, isAudioPlayed = false;
386
- bool isPlaying = myVideo->getPlaybackState(aDuration, aPts, isVideoPlayed, isAudioPlayed);
387
- double aPosition = (aDuration > 0.0) ? (aPts / aDuration) : 0.0;
388
- if(myGUI->myBtnPlay != NULL) {
389
- myGUI->myBtnPlay->setFaceId(isPlaying ? 1 : 0); // set play/pause
390
- }
391
- if(myGUI->myTimeBox != NULL) {
392
- myGUI->myTimeBox->setTime(aPts, aDuration);
393
- }
394
- myGUI->stglUpdate(myWindow->getMousePos(), GLfloat(aPosition), aPts);
395
-
396
- // prevent display going to sleep
397
- bool toBlockSleepDisplay = false;
398
- bool toBlockSleepSystem = false;
399
- if(myIsBenchmark) {
400
- toBlockSleepDisplay = true;
401
- toBlockSleepSystem = true;
402
- } else {
403
- switch(params.blockSleeping->getValue()) {
404
- case BLOCK_SLEEP_NEVER: {
405
- toBlockSleepDisplay = false;
406
- toBlockSleepSystem = false;
407
- break;
408
- }
409
- case BLOCK_SLEEP_ALWAYS: {
410
- toBlockSleepDisplay = true;
411
- toBlockSleepSystem = true;
412
- break;
413
- }
414
- case BLOCK_SLEEP_PLAYBACK: {
415
- toBlockSleepDisplay = isVideoPlayed;
416
- toBlockSleepSystem = isPlaying;
417
- break;
418
- }
419
- case BLOCK_SLEEP_FULLSCREEN: {
420
- toBlockSleepDisplay = myWindow->isFullScreen();;
421
- toBlockSleepSystem = toBlockSleepDisplay;
422
- break;
423
- }
424
- }
425
- }
426
-
427
- const StWinAttr anAttribs[] = {
428
- StWinAttr_ToBlockSleepSystem, (StWinAttr )toBlockSleepSystem,
429
- StWinAttr_ToBlockSleepDisplay, (StWinAttr )toBlockSleepDisplay,
430
- StWinAttr_NULL
431
- };
432
- myWindow->setAttributes(anAttribs);
433
-
434
- myWindow->showCursor(!myGUI->toHideCursor());
435
-
436
- // check for mono state
437
- StHandle<StStereoParams> aParams = myGUI->myImage->getSource();
438
- if(!aParams.isNull()) {
439
- myWindow->setStereoOutput(!aParams->isMono()
440
- && (myGUI->myImage->params.displayMode->getValue() == StGLImageRegion::MODE_STEREO));
441
- }
442
- }
443
-
444
- // draw GUI
445
myGUI->stglDraw(theView);
446
}
447
448
449
} else {
450
myWindow->setTitle(aFileToLoad + " - sView");
451
}
452
- myGUI->updateAudioStreamsMenu(myVideo->params.activeAudio->getList(),
453
- myVideo->hasVideoStream());
454
- params.audioStream->setValue(myVideo->params.activeAudio->getValue());
455
- myGUI->updateSubtitlesStreamsMenu(myVideo->params.activeSubtitles->getList(),
456
- myVideo->hasAudioStream() || myVideo->hasVideoStream());
457
+ params.audioStream ->setValue(myVideo->params.activeAudio->getValue());
458
params.subtitlesStream->setValue(myVideo->params.activeSubtitles->getValue());
459
if(mySeekOnLoad > 0.0) {
460
myVideo->pushPlayEvent(ST_PLAYEVENT_SEEK, mySeekOnLoad);
461
462
}
463
}
464
465
+void StMoviePlayer::doPanoramaOnOff(const size_t ) {
466
+ if(myVideo.isNull()) {
467
+ return;
468
+ }
469
+
470
+ StHandle<StStereoParams> aParams = myGUI->myImage->getSource();
471
+ if(aParams.isNull()
472
+ || aParams->Src1SizeX == 0
473
+ || aParams->Src1SizeY == 0) {
474
+ return;
475
+ }
476
+
477
+ int aMode = myGUI->myImage->params.ViewMode->getValue();
478
+ if(aMode != StStereoParams::FLAT_IMAGE) {
479
+ myGUI->myImage->params.ViewMode->setValue(StStereoParams::FLAT_IMAGE);
480
+ return;
481
+ }
482
+
483
+ StPanorama aPano = st::probePanorama(aParams->StereoFormat,
484
+ aParams->Src1SizeX, aParams->Src1SizeY,
485
+ aParams->Src2SizeX, aParams->Src2SizeY);
486
+ myGUI->myImage->params.ViewMode->setValue(aPano == StPanorama_Cubemap6_1 || aPano == StPanorama_Cubemap3_2
487
+ ? StStereoParams::PANORAMA_CUBEMAP
488
+ : StStereoParams::PANORAMA_SPHERE);
489
+}
490
+
491
void StMoviePlayer::doSwitchSrcFormat(const int32_t theSrcFormat) {
492
myVideo->setStereoFormat(StFormat(theSrcFormat));
493
}
494
495
StApplication::exit(0);
496
}
497
498
+void StMoviePlayer::doOpen1FileFromGui(StHandle<StString> thePath) {
499
+ myOpenDialog->setPaths(*thePath, "");
500
+}
501
+
502
void StMoviePlayer::doOpen1File(const size_t ) {
503
myOpenDialog->openDialog(StOpenVideo::Dialog_SingleMovie);
504
}
505
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayer.h -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayer.h
Changed
84
1
2
/**
3
- * Copyright © 2007-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2007-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* StMoviePlayer program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
9
ST_LOCAL void doQuit(const size_t dummy = 0);
10
11
ST_LOCAL void doFileNext();
12
+ ST_LOCAL void doOpen1FileFromGui(StHandle<StString> thePath);
13
ST_LOCAL void doOpen1File(const size_t dummy = 0);
14
ST_LOCAL void doOpen2Files(const size_t dummy = 0);
15
ST_LOCAL void doSaveFileInfo(const size_t theToSave);
16
17
StHandle<StInt32Param> ScaleAdjust; //!< adjust GUI size, see StGLRootWidget::ScaleAdjust
18
StHandle<StFloat32Param> ScaleHiDPI; //!< adapt GUI size for HiDPI resolution
19
StHandle<StBoolParam> ScaleHiDPI2X; //!< option to set HiDPI resolution to 2.0
20
+ StHandle<StInt32Param> SubtitlesPlace; //!< subtitles placement
21
+ StHandle<StFloat32Param> SubtitlesTopDY; //!< subtitles vertical displacement
22
+ StHandle<StFloat32Param> SubtitlesBottomDY;//!< subtitles vertical displacement
23
StHandle<StFloat32Param> SubtitlesSize; //!< subtitles font size
24
StHandle<StFloat32Param> SubtitlesParallax;//!< subtitles parallax
25
StHandle<StBoolParam> ToSearchSubs; //!< automatically search for additional subtitles/audio track files nearby video file
26
27
StHandle<StBoolParam> areGlobalMKeys; //!< capture global multimedia keys
28
StHandle<StInt32Param> checkUpdatesDays; //!< days count between updates checks
29
StHandle<StInt32Param> srcFormat; //!< source format
30
+ StHandle<StBoolParam> ToTrackHead; //!< enable/disable head-tracking
31
StHandle<StBoolParam> ToShowPlayList; //!< display playlist
32
StHandle<StBoolParam> ToShowFps; //!< display FPS meter
33
StHandle<StBoolParam> IsMobileUI; //!< display mobile interface
34
35
private: //! @name window events slots
36
37
ST_LOCAL virtual void doChangeDevice(const int32_t theValue);
38
+ ST_LOCAL virtual void doPause (const StPauseEvent& theEvent);
39
ST_LOCAL virtual void doResize (const StSizeEvent& theEvent);
40
ST_LOCAL virtual void doKeyDown (const StKeyEvent& theEvent);
41
ST_LOCAL virtual void doKeyHold (const StKeyEvent& theEvent);
42
43
*/
44
ST_LOCAL bool init();
45
ST_LOCAL void saveGuiParams();
46
+ ST_LOCAL void saveAllParams();
47
ST_LOCAL bool createGui(StHandle<StGLTextureQueue>& theTextureQueue,
48
StHandle<StSubQueue>& theSubQueue);
49
50
51
ST_LOCAL void doSwitchLoopSingle(const bool theValue);
52
ST_LOCAL void doFullscreen(const bool theIsFullscreen);
53
ST_LOCAL void doSwitchSrcFormat(const int32_t theSrcFormat);
54
+ ST_LOCAL void doPanoramaOnOff(const size_t );
55
ST_LOCAL void doSwitchAudioStream(const int32_t theStreamId);
56
ST_LOCAL void doSwitchSubtitlesStream(const int32_t theStreamId);
57
ST_LOCAL void doShowPlayList(const bool theToShow);
58
59
Action_ShowList,
60
Action_ImageAdjustReset,
61
Action_StereoParamsBegin,
62
- Action_StereoParamsEnd = Action_StereoParamsBegin + StGLImageRegion::ActionsNb,
63
+ Action_StereoParamsEnd = Action_StereoParamsBegin + StGLImageRegion::ActionsNb - 1,
64
+ Action_PanoramaOnOff,
65
};
66
67
private: //! @name Web UI methods
68
69
StHandle<StOpenVideo> myOpenDialog; //!< file open dialog
70
71
StCondition myEventLoaded; //!< indicate that new file was open
72
+ StTimer myInactivityTimer; //!< timer initialized when application goes into paused state
73
double mySeekOnLoad; //!< seeking target
74
int32_t myAudioOnLoad; //!< audio track on load
75
int32_t mySubsOnLoad; //!< subtitles track on load
76
77
bool myToUpdateALList;
78
bool myIsBenchmark;
79
bool myToCheckUpdates;
80
+ bool myToCheckPoorOrient; //!< switch off orientation sensor with poor quality
81
82
friend class StMoviePlayerGUI;
83
84
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayerGUI.cpp -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayerGUI.cpp
Changed
637
1
2
#include <StGLWidgets/StGLMenuItem.h>
3
#include <StGLWidgets/StGLMessageBox.h>
4
#include <StGLWidgets/StGLMsgStack.h>
5
+#include <StGLWidgets/StGLOpenFile.h>
6
#include <StGLWidgets/StGLPlayList.h>
7
#include <StGLWidgets/StGLRangeFieldFloat32.h>
8
#include <StGLWidgets/StGLScrollArea.h>
9
10
*/
11
void StMoviePlayerGUI::createUpperToolbar() {
12
int aBtnIter = 0;
13
+ int aNbBtnRight = 0;
14
const int aTop = scale(DISPL_Y_REGION_UPPER);
15
const int aLeft = scale(DISPL_X_REGION_UPPER);
16
StMarginsI aButtonMargins;
17
18
iconTexture(stCString("menuOverUnderRL"), anIconSize),
19
iconTexture(stCString("menuRowLR"), anIconSize),
20
iconTexture(stCString("menuColLR"), anIconSize),
21
- iconTexture(stCString("menuSrcSeparate"), anIconSize),
22
+ iconTexture(stCString("menuDual"), anIconSize),
23
iconTexture(stCString("menuFrameSeqLR"), anIconSize),
24
iconTexture(stCString("menuRedCyanLR"), anIconSize),
25
iconTexture(stCString("menuGreenMagentaLR"), anIconSize),
26
27
StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
28
myBtnSwapLR->setDrawShadow(true);
29
myBtnSwapLR->changeMargins() = aButtonMargins;
30
+
31
+ StHandle<StBoolParam> aTrackedPano = new StBoolParam(false);
32
+ myBtnPanorama = new StGLCheckboxTextured(myPanelUpper, aTrackedPano,
33
+ iconTexture(stCString("actionPanoramaOff"), anIconSize),
34
+ iconTexture(stCString("actionPanorama"), anIconSize),
35
+ aLeft + (aBtnIter++) * anIconStep, aTop,
36
+ StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
37
+ myBtnPanorama->signals.onBtnClick += stSlot(this, &StMoviePlayerGUI::doPanoramaCombo);
38
+ myBtnPanorama->setDrawShadow(true);
39
+ myBtnPanorama->changeMargins() = aButtonMargins;
40
+
41
+ // right buttons
42
+ StHandle<StBoolParam> aTrackedSubs = new StBoolParam(false);
43
+ myBtnSubs = new StGLCheckboxTextured(myPanelUpper, aTrackedSubs,
44
+ iconTexture(stCString("actionStreamSubtitlesOff"), anIconSize),
45
+ iconTexture(stCString("actionStreamSubtitles"), anIconSize),
46
+ (aNbBtnRight++) * (-anIconStep) - aLeft, aTop,
47
+ StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
48
+ myBtnSubs->signals.onBtnClick = stSlot(this, &StMoviePlayerGUI::doSubtitlesStreamsCombo);
49
+ myBtnSubs->setDrawShadow(true);
50
+ myBtnSubs->changeMargins() = aButtonMargins;
51
+
52
+ StHandle<StBoolParam> aTrackedAudio = new StBoolParam(false);
53
+ myBtnAudio = new StGLCheckboxTextured(myPanelUpper, aTrackedAudio,
54
+ iconTexture(stCString("actionStreamAudioOff"), anIconSize),
55
+ iconTexture(stCString("actionStreamAudio"), anIconSize),
56
+ (aNbBtnRight++) * (-anIconStep) - aLeft, aTop,
57
+ StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
58
+ myBtnAudio->signals.onBtnClick = stSlot(this, &StMoviePlayerGUI::doAudioStreamsCombo);
59
+ myBtnAudio->setDrawShadow(true);
60
+ myBtnAudio->changeMargins() = aButtonMargins;
61
}
62
63
/**
64
65
66
StGLMenu* aMenuMedia = createMediaMenu(); // Root -> Media menu
67
StGLMenu* aMenuView = createViewMenu(); // Root -> View menu
68
- myMenuAudio = createAudioMenu(); // Root -> Audio menu
69
- myMenuSubtitles = createSubtitlesMenu(); // Root -> Subtitles menu
70
StGLMenu* aDevicesMenu = createOutputMenu(); // Root -> Output menu
71
StGLMenu* aMenuHelp = createHelpMenu(); // Root -> Help menu
72
73
// Attach sub menus to root
74
myMenuRoot->addItem(tr(MENU_MEDIA), aMenuMedia);
75
myMenuRoot->addItem(tr(MENU_VIEW), aMenuView);
76
- myMenuRoot->addItem(tr(MENU_AUDIO), myMenuAudio);
77
- myMenuRoot->addItem(tr(MENU_SUBTITLES), myMenuSubtitles);
78
myMenuRoot->addItem(myPlugin->StApplication::params.ActiveDevice->getActiveValue(), aDevicesMenu);
79
myMenuRoot->addItem(tr(MENU_HELP), aMenuHelp);
80
}
81
82
StGLMenu* aMenuView = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
83
StGLMenu* aMenuDispMode = createDisplayModeMenu();
84
StGLMenu* aMenuDispRatio = createDisplayRatioMenu();
85
- StGLMenu* aMenuSurface = createSurfaceMenu();
86
+ StGLMenu* aMenuPanorama = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
87
+ fillPanoramaMenu(aMenuPanorama);
88
StGLMenu* aMenuTexFilter = createSmoothFilterMenu();
89
StGLMenu* aMenuImgAdjust = createImageAdjustMenu();
90
91
92
aMenuView->addItem(tr(MENU_VIEW_SWAP_LR), myImage->params.swapLR);
93
aMenuView->addItem(tr(MENU_VIEW_DISPLAY_RATIO), aMenuDispRatio)
94
->setIcon(stCMenuIcon("actionDisplayRatio"), false);
95
- aMenuView->addItem(tr(MENU_VIEW_SURFACE), aMenuSurface);
96
+ aMenuView->addItem(tr(MENU_VIEW_PANORAMA), aMenuPanorama)
97
+ ->setIcon(stCMenuIcon("actionPanorama"), false);
98
aMenuView->addItem(tr(MENU_VIEW_TEXFILTER), aMenuTexFilter)
99
->setIcon(stCMenuIcon("actionInterpolation"), false);
100
aMenuView->addItem(tr(MENU_VIEW_IMAGE_ADJUST), aMenuImgAdjust)
101
102
StGLMenu* StMoviePlayerGUI::createDisplayRatioMenu() {
103
StGLMenu* aMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
104
fillDisplayRatioMenu(aMenu);
105
- aMenu->addItem("Keep on restart", myPlugin->params.toRestoreRatio);
106
+ aMenu->addItem(tr(MENU_VIEW_RATIO_KEEP_ON_RESTART), myPlugin->params.toRestoreRatio);
107
+ aMenu->addItem(tr(MENU_VIEW_RATIO_HEAL_ANAMORPHIC), myImage->params.ToHealAnamorphicRatio);
108
return aMenu;
109
}
110
111
void StMoviePlayerGUI::fillDisplayRatioMenu(StGLMenu* theMenu) {
112
- theMenu->addItem("Source", myImage->params.displayRatio, StGLImageRegion::RATIO_AUTO)
113
+ theMenu->addItem(tr(MENU_VIEW_DISPLAY_RATIO_SRC), myImage->params.displayRatio, StGLImageRegion::RATIO_AUTO)
114
->setIcon(stCMenuIcon("menuAuto"));
115
theMenu->addItem("2.21:1", myImage->params.displayRatio, StGLImageRegion::RATIO_221_1)
116
->setIcon(stCMenuIcon("menuRatio2_1_"));
117
118
void StMoviePlayerGUI::doDisplayRatioCombo(const size_t ) {
119
StGLCombobox::ListBuilder aBuilder(this);
120
fillDisplayRatioMenu(aBuilder.getMenu());
121
+ aBuilder.getMenu()->addItem(tr(MENU_VIEW_RATIO_HEAL_ANAMORPHIC), myImage->params.ToHealAnamorphicRatio);
122
aBuilder.display();
123
}
124
125
-/**
126
- * Root -> View menu -> Surface
127
- */
128
-StGLMenu* StMoviePlayerGUI::createSurfaceMenu() {
129
- StGLMenu* aMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
130
- aMenu->addItem(tr(MENU_VIEW_SURFACE_PLANE),
131
- myImage->params.ViewMode, StStereoParams::FLAT_IMAGE);
132
- aMenu->addItem(tr(MENU_VIEW_SURFACE_SPHERE),
133
- myImage->params.ViewMode, StStereoParams::PANORAMA_SPHERE);
134
- aMenu->addItem("Cubemap",
135
- myImage->params.ViewMode, StStereoParams::PANORAMA_CUBEMAP);
136
- return aMenu;
137
+void StMoviePlayerGUI::fillPanoramaMenu(StGLMenu* theMenu) {
138
+ theMenu->addItem(tr(MENU_VIEW_SURFACE_PLANE),
139
+ myImage->params.ViewMode, StStereoParams::FLAT_IMAGE);
140
+ theMenu->addItem(tr(MENU_VIEW_SURFACE_SPHERE),
141
+ myImage->params.ViewMode, StStereoParams::PANORAMA_SPHERE);
142
+ theMenu->addItem(tr(MENU_VIEW_SURFACE_CUBEMAP),
143
+ myImage->params.ViewMode, StStereoParams::PANORAMA_CUBEMAP);
144
+ if(myWindow->hasOrientationSensor()) {
145
+ theMenu->addItem(tr(myWindow->isPoorOrientationSensor() ? MENU_VIEW_TRACK_HEAD_POOR : MENU_VIEW_TRACK_HEAD),
146
+ myPlugin->params.ToTrackHead);
147
+ }
148
+}
149
+
150
+void StMoviePlayerGUI::doPanoramaCombo(const size_t ) {
151
+ StGLCombobox::ListBuilder aBuilder(this);
152
+ fillPanoramaMenu(aBuilder.getMenu());
153
+ aBuilder.display();
154
}
155
156
/**
157
158
159
int aBtnIter = 0;
160
161
+ myBtnOpen = new StGLTextureButton(myPanelUpper, (aBtnIter++) * myIconStep, 0);
162
+ myBtnOpen->signals.onBtnClick.connect(this, &StMoviePlayerGUI::doOpenFile);
163
+ myBtnOpen->setTexturePath(iconTexture(stCString("actionOpen"), anIconSize));
164
+ myBtnOpen->setDrawShadow(true);
165
+ myBtnOpen->changeMargins() = aButtonMargins;
166
+
167
StGLTextureButton* aSrcBtn = new StGLTextureButton(myPanelUpper, (aBtnIter++) * myIconStep, 0,
168
StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT), StFormat_NB);
169
aSrcBtn->changeMargins() = aButtonMargins;
170
171
iconTexture(stCString("menuOverUnderRL"), anIconSize),
172
iconTexture(stCString("menuRowLR"), anIconSize),
173
iconTexture(stCString("menuColLR"), anIconSize),
174
- iconTexture(stCString("menuSrcSeparate"), anIconSize),
175
+ iconTexture(stCString("menuDual"), anIconSize),
176
iconTexture(stCString("menuFrameSeqLR"), anIconSize),
177
iconTexture(stCString("menuRedCyanLR"), anIconSize),
178
iconTexture(stCString("menuGreenMagentaLR"), anIconSize),
179
180
myBtnSwapLR->setDrawShadow(true);
181
myBtnSwapLR->changeMargins() = aButtonMargins;
182
183
+ StHandle<StBoolParam> aTrackedPano = new StBoolParam(false);
184
+ myBtnPanorama = new StGLCheckboxTextured(myPanelUpper, aTrackedPano,
185
+ iconTexture(stCString("actionPanoramaOff"), anIconSize),
186
+ iconTexture(stCString("actionPanorama"), anIconSize),
187
+ (aBtnIter++) * myIconStep, 0,
188
+ StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
189
+ myBtnPanorama->signals.onBtnClick += stSlot(this, &StMoviePlayerGUI::doPanoramaCombo);
190
+ myBtnPanorama->setDrawShadow(true);
191
+ myBtnPanorama->changeMargins() = aButtonMargins;
192
+
193
aBtnIter = 0;
194
StGLTextureButton* aBtnEx = new StGLTextureButton(myPanelUpper, (aBtnIter--) * (-myIconStep), 0,
195
StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
196
197
myTimeBox->changeRectPx().bottom() = myTimeBox->getRectPx().top() + scale(56);
198
}
199
200
+void StMoviePlayerGUI::doOpenFile(const size_t ) {
201
+ /*if(!isMobile()) {
202
+ myPlugin->doOpen1File();
203
+ return;
204
+ }*/
205
+
206
+ StGLOpenFile* aDialog = new StGLOpenFile(this, tr(DIALOG_OPEN_FILE), tr(BUTTON_CLOSE));
207
+ aDialog->setMimeList(myPlugin->myVideo->getMimeListVideo());
208
+ aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Downloads));
209
+ aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Videos));
210
+ aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Music));
211
+ aDialog->signals.onFileSelected = stSlot(myPlugin, &StMoviePlayer::doOpen1FileFromGui);
212
+
213
+ if(myPlugin->params.lastFolder.isEmpty()) {
214
+ StHandle<StFileNode> aCurrFile = myPlugin->myVideo->getPlayList().getCurrentFile();
215
+ if(!aCurrFile.isNull()) {
216
+ myPlugin->params.lastFolder = aCurrFile->isEmpty() ? aCurrFile->getFolderPath() : aCurrFile->getValue(0)->getFolderPath();
217
+ }
218
+ }
219
+ aDialog->openFolder(myPlugin->params.lastFolder);
220
+}
221
+
222
void StMoviePlayerGUI::doShowMobileExMenu(const size_t ) {
223
const int aTop = scale(56);
224
225
226
anItem = aMenu->addItem(tr(MENU_HELP_ABOUT));
227
anItem->setIcon(stCMenuIcon("actionHelp"));
228
anItem->signals.onItemClick += stSlot(this, &StMoviePlayerGUI::doAboutProgram);
229
- //anItem = aMenu->addItem(myPlugin->StApplication::params.ActiveDevice->getActiveValue());
230
- anItem = aMenu->addItem("Settings");
231
+ anItem = aMenu->addItem(tr(MENU_HELP_SETTINGS));
232
anItem->setIcon(stCMenuIcon("actionSettings"));
233
anItem->signals.onItemClick += stSlot(this, &StMoviePlayerGUI::doMobileSettings);
234
aMenu->stglInit();
235
236
myMenuRoot(NULL),
237
myMenuOpenAL(NULL),
238
myMenuRecent(NULL),
239
- myMenuAudio(NULL),
240
- myMenuSubtitles(NULL),
241
// upper toolbar
242
myPanelUpper(NULL),
243
myBtnOpen(NULL),
244
myBtnInfo(NULL),
245
myBtnSwapLR(NULL),
246
+ myBtnPanorama(NULL),
247
myBtnSrcFrmt(NULL),
248
+ myBtnAudio(NULL),
249
+ myBtnSubs(NULL),
250
// bottom toolbar
251
myPanelBottom(NULL),
252
mySeekBar(NULL),
253
254
myImage->params.displayMode->changeValues()[StGLImageRegion::MODE_ONLY_RIGHT] = tr(MENU_VIEW_DISPLAY_MODE_RIGHT);
255
myImage->params.displayMode->changeValues()[StGLImageRegion::MODE_PARALLEL] = tr(MENU_VIEW_DISPLAY_MODE_PARALLEL);
256
myImage->params.displayMode->changeValues()[StGLImageRegion::MODE_CROSSYED] = tr(MENU_VIEW_DISPLAY_MODE_CROSSYED);
257
+ myImage->params.ToHealAnamorphicRatio->setValue(true);
258
259
mySubtitles = new StGLSubtitles (this, theSubQueue,
260
+ myPlugin->params.SubtitlesPlace,
261
+ myPlugin->params.SubtitlesTopDY,
262
+ myPlugin->params.SubtitlesBottomDY,
263
myPlugin->params.SubtitlesSize,
264
myPlugin->params.SubtitlesParallax,
265
myPlugin->params.SubtitlesParser);
266
267
}
268
269
void StMoviePlayerGUI::stglUpdate(const StPointD_t& thePointZo,
270
- const GLfloat theProgress,
271
- const double thePTS) {
272
- StGLRootWidget::stglUpdate(thePointZo);
273
- if(mySubtitles != NULL) {
274
- mySubtitles->setPTS(thePTS);
275
+ bool theIsMouseMoved) {
276
+ if(mySeekBar != NULL
277
+ && myPanelBottom != NULL
278
+ && myTimeBox->wasResized()) {
279
+ stglResizeSeekBar();
280
}
281
- if(mySeekBar != NULL) {
282
- mySeekBar->setProgress(theProgress);
283
+
284
+ if(myBtnAudio != NULL) {
285
+ myBtnAudio->getTrackedValue()->setValue(myPlugin->params.audioStream->getValue() != -1);
286
+ }
287
+ if(myBtnSubs != NULL) {
288
+ myBtnSubs->getTrackedValue()->setValue(myPlugin->params.subtitlesStream->getValue() != -1);
289
}
290
+
291
+ setVisibility(thePointZo, theIsMouseMoved);
292
+ StGLRootWidget::stglUpdate(thePointZo);
293
if(myVolumeBar != NULL) {
294
char aBuff[128];
295
stsprintf(aBuff, 128, "%+03.0f dB", myPlugin->params.AudioGain->getValue());
296
297
}
298
}
299
300
+ stglResizeSeekBar();
301
+ StGLRootWidget::stglResize(theRectPx);
302
+}
303
+
304
+void StMoviePlayerGUI::stglResizeSeekBar() {
305
if(mySeekBar != NULL
306
&& myPanelBottom != NULL) {
307
const int aPanelSizeY = myPanelBottom->getRectPx().height();
308
309
mySeekBar->changeRectPx().right() = aPanelSizeX - anXOffset - myBottomBarNbRight * myIconStep;
310
if(anXSpace2 >= anMinXSpace) {
311
// wide mode
312
- mySeekBar->changeRectPx().right() -= myIconStep * 2;
313
+ mySeekBar->changeRectPx().right() -= aBoxWidth;
314
myTimeBox->changeRectPx().moveLeftTo(myBottomBarNbRight * (-myIconStep));
315
myTimeBox->setOverlay(false);
316
} else {
317
318
}
319
}
320
}
321
-
322
- StGLRootWidget::stglResize(theRectPx);
323
}
324
325
bool StMoviePlayerGUI::toHideCursor() {
326
327
inline bool isPointIn(const StGLWidget* theWidget,
328
const StPointD_t& theCursorZo) {
329
return theWidget != NULL
330
- && theWidget->isVisible()
331
+ && theWidget->isVisibleWithParents()
332
&& theWidget->isPointIn(theCursorZo);
333
}
334
335
336
void StMoviePlayerGUI::setVisibility(const StPointD_t& theCursor,
337
bool theIsMouseMoved) {
338
const bool toShowPlayList = myPlugin->params.ToShowPlayList->getValue();
339
- const int aRootSizeY = getRectPx().height();
340
+ const int aRootSizeY = getRectPx().height();
341
+ const bool hasVideo = myPlugin->myVideo->hasVideoStream();
342
+ StHandle<StStereoParams> aParams = myImage->getSource();
343
myIsVisibleGUI = theIsMouseMoved
344
+ || aParams.isNull()
345
|| myVisibilityTimer.getElapsedTime() < 2.0
346
|| (myPanelUpper != NULL && myPanelUpper ->isPointIn(theCursor))
347
- || (myPanelBottom != NULL && int(aRootSizeY * theCursor.y()) > (aRootSizeY - 2 * myPanelBottom->getRectPx().height()))
348
+ || (myPanelBottom != NULL && int(aRootSizeY * theCursor.y()) > (aRootSizeY - 2 * myPanelBottom->getRectPx().height())
349
+ && theCursor.y() < 1.0)
350
|| (mySeekBar != NULL && mySeekBar ->isPointIn(theCursor))
351
|| (myPlayList != NULL && toShowPlayList && myPlayList->isPointIn(theCursor))
352
|| (myMenuRoot != NULL && myMenuRoot->isActive());
353
+ if(!myIsVisibleGUI
354
+ && myBtnPlay != NULL
355
+ && myBtnPlay->getFaceId() == 0
356
+ && (theCursor.x() < 0.0 || theCursor.x() > 1.0
357
+ || theCursor.y() < 0.0 || theCursor.y() > 1.0)) {
358
+ myIsVisibleGUI = true;
359
+ }
360
const float anOpacity = (float )myVisLerp.perform(myIsVisibleGUI, false);
361
if(theIsMouseMoved) {
362
myVisibilityTimer.restart();
363
364
365
StFormat aSrcFormat = (StFormat )myPlugin->params.srcFormat->getValue();
366
if(aSrcFormat == StFormat_AUTO
367
- && !myImage->params.stereoFile.isNull()) {
368
- aSrcFormat = myImage->params.stereoFile->StereoFormat;
369
+ && !aParams.isNull()) {
370
+ aSrcFormat = aParams->StereoFormat;
371
}
372
- if(!myImage->params.stereoFile.isNull()
373
+ if(!aParams.isNull()
374
&& myImage->params.swapLR->getValue()) {
375
aSrcFormat = st::formatReversed(aSrcFormat);
376
}
377
378
myBtnSwapLR->setOpacity(aSrcFormat != StFormat_Mono ? anOpacity : 0.0f, false);
379
}
380
381
+ const StStereoParams::ViewMode aViewMode = hasVideo && !aParams.isNull()
382
+ ? aParams->ViewingMode
383
+ : StStereoParams::FLAT_IMAGE;
384
+ bool toShowPano = aViewMode != StStereoParams::FLAT_IMAGE;
385
+ if(!toShowPano
386
+ && hasVideo
387
+ && !aParams.isNull()
388
+ && st::probePanorama(aParams->StereoFormat,
389
+ aParams->Src1SizeX, aParams->Src1SizeY,
390
+ aParams->Src2SizeX, aParams->Src2SizeY) != StPanorama_OFF) {
391
+ toShowPano = true;
392
+ }
393
+ if(myBtnPanorama != NULL) {
394
+ myBtnPanorama->getTrackedValue()->setValue(aViewMode != StStereoParams::FLAT_IMAGE);
395
+ myBtnPanorama->setOpacity(toShowPano ? anOpacity : 0.0f, false);
396
+ }
397
+ myWindow->setTrackOrientation(aViewMode != StStereoParams::FLAT_IMAGE
398
+ && myPlugin->params.ToTrackHead->getValue());
399
+ StQuaternion<double> aQ = myWindow->getDeviceOrientation();
400
+ myImage->setDeviceOrientation(StGLQuaternion((float )aQ.x(), (float )aQ.y(), (float )aQ.z(), (float )aQ.w()));
401
+
402
if(myDescr != NULL) {
403
myDescr->setOpacity(1.0f, false);
404
if(::isPointIn(myBtnOpen, theCursor)) {
405
406
myDescr->setText(tr(aLngId));
407
} else if(::isPointIn(myBtnSrcFrmt, theCursor)) {
408
myDescr->setText(tr(BTN_SRC_FORMAT) + "\n" + trSrcFormat(aSrcFormat));
409
+ } else if(::isPointIn(myBtnPanorama, theCursor)) {
410
+ size_t aTrPano = MENU_VIEW_SURFACE_PLANE;
411
+ switch(aViewMode) {
412
+ case StStereoParams::FLAT_IMAGE: aTrPano = MENU_VIEW_SURFACE_PLANE; break;
413
+ case StStereoParams::PANORAMA_SPHERE: aTrPano = MENU_VIEW_SURFACE_SPHERE; break;
414
+ case StStereoParams::PANORAMA_CUBEMAP: aTrPano = MENU_VIEW_SURFACE_CUBEMAP; break;
415
+ }
416
+ myDescr->setText(tr(MENU_VIEW_PANORAMA) + "\n" + tr(aTrPano));
417
+ } else if(::isPointIn(myBtnAudio, theCursor)) {
418
+ myDescr->setText(tr(MENU_AUDIO));
419
+ } else if(::isPointIn(myBtnSubs, theCursor)) {
420
+ myDescr->setText(tr(MENU_SUBTITLES));
421
} else if(::isPointIn(myBtnVolume, theCursor)) {
422
myDescr->setText("Mute");
423
} else if(::isPointIn(myBtnPlay, theCursor)) {
424
425
aBuilder.getMenu()->addItem(aStreams->getValue(aStreamId), myPlugin->params.audioStream, int32_t(aStreamId));
426
}
427
}
428
- aBuilder.display();
429
-}
430
-
431
-void StMoviePlayerGUI::updateAudioStreamsMenu(const StHandle< StArrayList<StString> >& theStreamsList,
432
- const bool theHasVideo) {
433
- if(myMenuAudio == NULL) {
434
+ if(myWindow->isMobile()) {
435
+ aBuilder.display();
436
return;
437
}
438
- for(StGLWidget* aChild = myMenuAudio->getChildren()->getStart(); aChild != NULL;) {
439
- StGLWidget* anItem = aChild;
440
- aChild = aChild->getNext();
441
- delete anItem;
442
- }
443
-
444
- if(theHasVideo || theStreamsList.isNull() || theStreamsList->isEmpty()) {
445
- myMenuAudio->addItem(tr(MENU_AUDIO_NONE), myPlugin->params.audioStream, -1);
446
- }
447
- if(!theStreamsList.isNull()) {
448
- for(size_t aStreamId = 0; aStreamId < theStreamsList->size(); ++aStreamId) {
449
- myMenuAudio->addItem(theStreamsList->getValue(aStreamId), myPlugin->params.audioStream, int32_t(aStreamId));
450
- }
451
- }
452
453
- //myMenuAudio->addSplitter();
454
+ //aBuilder.getMenu()->addSplitter();
455
StGLMenuItem* aDelayItem = NULL;
456
StGLRangeFieldFloat32* aDelayRange = NULL;
457
- if(theHasVideo) {
458
- if(!theStreamsList.isNull()
459
- && !theStreamsList->isEmpty()) {
460
- aDelayItem = myMenuAudio->addItem(tr(MENU_AUDIO_DELAY));
461
+ if(hasVideo) {
462
+ if(!aStreams.isNull()
463
+ && !aStreams->isEmpty()) {
464
+ aDelayItem = aBuilder.getMenu()->addItem(tr(MENU_AUDIO_DELAY));
465
aDelayItem->changeMargins().right = scale(100 + 16);
466
aDelayItem->signals.onItemClick.connect(this, &StMoviePlayerGUI::doAudioDelay);
467
aDelayRange = new StGLRangeFieldFloat32(aDelayItem, myPlugin->params.AudioDelay,
468
-scale(16), 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_RIGHT));
469
- aDelayRange->changeRectPx().bottom() = aDelayRange->getRectPx().top() + myMenuAudio->getItemHeight();
470
+ aDelayRange->changeRectPx().bottom() = aDelayRange->getRectPx().top() + aBuilder.getMenu()->getItemHeight();
471
aDelayRange->setFormat(stCString("%+01.3f"));
472
aDelayRange->setColor(StGLRangeFieldFloat32::FieldColor_Default, StGLVec3(0.0f, 0.0f, 0.0f));
473
aDelayRange->setColor(StGLRangeFieldFloat32::FieldColor_Positive, StGLVec3(0.4f, 0.8f, 0.4f));
474
aDelayRange->setColor(StGLRangeFieldFloat32::FieldColor_Negative, StGLVec3(1.0f, 0.0f, 0.0f));
475
}
476
- myMenuAudio->addItem(tr(MENU_AUDIO_ATTACH))
477
- ->setIcon(stCMenuIcon("actionOpen"), false)
478
- ->signals.onItemClick.connect(myPlugin, &StMoviePlayer::doAddAudioStream);
479
+ aBuilder.getMenu()->addItem(tr(MENU_AUDIO_ATTACH))
480
+ ->setIcon(stCMenuIcon("actionOpen"), false)
481
+ ->signals.onItemClick.connect(myPlugin, &StMoviePlayer::doAddAudioStream);
482
}
483
484
- // update menu representation
485
- myMenuAudio->stglInit();
486
+ aBuilder.display();
487
}
488
489
void StMoviePlayerGUI::doSubtitlesStreamsCombo(const size_t ) {
490
const StHandle< StArrayList<StString> >& aStreams = myPlugin->myVideo->params.activeSubtitles->getList();
491
492
StGLCombobox::ListBuilder aBuilder(this);
493
+
494
+ // create text parser menu
495
+ StGLMenu* aParserMenu = NULL;
496
+ if(!myWindow->isMobile()) {
497
+ aParserMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
498
+ for(size_t anIter = 0; anIter < myPlugin->params.SubtitlesParser->getValues().size(); ++anIter) {
499
+ aParserMenu->addItem(myPlugin->params.SubtitlesParser->getValues()[anIter], myPlugin->params.SubtitlesParser, (int32_t )anIter);
500
+ }
501
+ }
502
+
503
aBuilder.getMenu()->addItem(tr(MENU_SUBTITLES_NONE), myPlugin->params.subtitlesStream, -1);
504
if(!aStreams.isNull()) {
505
for(size_t aStreamId = 0; aStreamId < aStreams->size(); ++aStreamId) {
506
aBuilder.getMenu()->addItem(aStreams->getValue(aStreamId), myPlugin->params.subtitlesStream, int32_t(aStreamId));
507
}
508
}
509
- aBuilder.display();
510
-}
511
-
512
-void StMoviePlayerGUI::updateSubtitlesStreamsMenu(const StHandle< StArrayList<StString> >& theStreamsList,
513
- const bool theIsFilePlayed) {
514
- if(myMenuSubtitles == NULL) {
515
+ if(myWindow->isMobile()) {
516
+ aBuilder.display();
517
return;
518
}
519
- for(StGLWidget* aChild = myMenuSubtitles->getChildren()->getStart(); aChild != NULL;) {
520
- StGLWidget* anItem = aChild;
521
- aChild = aChild->getNext();
522
- delete anItem;
523
- }
524
525
- // create text parser menu
526
- StGLMenu* aParserMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
527
- for(size_t anIter = 0; anIter < myPlugin->params.SubtitlesParser->getValues().size(); ++anIter) {
528
- aParserMenu->addItem(myPlugin->params.SubtitlesParser->getValues()[anIter], myPlugin->params.SubtitlesParser, (int32_t )anIter);
529
- }
530
- aParserMenu->stglInit();
531
-
532
- myMenuSubtitles->addItem(tr(MENU_SUBTITLES_NONE), myPlugin->params.subtitlesStream, -1);
533
- if(!theStreamsList.isNull()) {
534
- for(size_t aStreamId = 0; aStreamId < theStreamsList->size(); ++aStreamId) {
535
- myMenuSubtitles->addItem(theStreamsList->getValue(aStreamId), myPlugin->params.subtitlesStream, int32_t(aStreamId));
536
- }
537
- }
538
-
539
- if(!theStreamsList.isNull()
540
- && !theStreamsList->isEmpty()) {
541
+ if(!aStreams.isNull()
542
+ && !aStreams->isEmpty()) {
543
//myMenuSubtitles->addSplitter();
544
- StGLMenuItem* anItem = myMenuSubtitles->addItem(tr(MENU_SUBTITLES_SIZE));
545
+ StGLMenuItem* anItem = aBuilder.getMenu()->addItem(tr(MENU_SUBTITLES_SIZE));
546
anItem->setIcon(stCMenuIcon("actionFontSize"), false);
547
anItem->changeMargins().right = scale(100 + 16);
548
StGLRangeFieldFloat32* aRange = new StGLRangeFieldFloat32(anItem, myPlugin->params.SubtitlesSize,
549
-scale(16), 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_RIGHT));
550
- aRange->changeRectPx().bottom() = aRange->getRectPx().top() + myMenuSubtitles->getItemHeight();
551
+ aRange->changeRectPx().bottom() = aRange->getRectPx().top() + aBuilder.getMenu()->getItemHeight();
552
aRange->setFormat(stCString("%02.0f"));
553
aRange->setColor(StGLRangeFieldFloat32::FieldColor_Default, aBlack);
554
aRange->setColor(StGLRangeFieldFloat32::FieldColor_Positive, aBlack);
555
aRange->setColor(StGLRangeFieldFloat32::FieldColor_Negative, aBlack);
556
557
- anItem = myMenuSubtitles->addItem(tr(MENU_SUBTITLES_PARALLAX));
558
+ StGLMenu* aPlaceMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
559
+
560
+ anItem = aPlaceMenu->addItem(tr(MENU_SUBTITLES_TOP), myPlugin->params.SubtitlesPlace, ST_VCORNER_TOP);
561
+ anItem->changeMargins().right = scale(100 + 16);
562
+ aRange = new StGLRangeFieldFloat32(anItem, myPlugin->params.SubtitlesTopDY,
563
+ -scale(16), 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_RIGHT));
564
+ aRange->changeRectPx().bottom() = aRange->getRectPx().top() + aBuilder.getMenu()->getItemHeight();
565
+ aRange->setFormat(stCString("%+03.0f"));
566
+ aRange->setColor(StGLRangeFieldFloat32::FieldColor_Default, aBlack);
567
+ aRange->setColor(StGLRangeFieldFloat32::FieldColor_Positive, aGreen);
568
+ aRange->setColor(StGLRangeFieldFloat32::FieldColor_Negative, aRed);
569
+
570
+ anItem = aPlaceMenu->addItem(tr(MENU_SUBTITLES_BOTTOM), myPlugin->params.SubtitlesPlace, ST_VCORNER_BOTTOM);
571
+ anItem->changeMargins().right = scale(100 + 16);
572
+ aRange = new StGLRangeFieldFloat32(anItem, myPlugin->params.SubtitlesBottomDY,
573
+ -scale(16), 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_RIGHT));
574
+ aRange->changeRectPx().bottom() = aRange->getRectPx().top() + aBuilder.getMenu()->getItemHeight();
575
+ aRange->setFormat(stCString("%+03.0f"));
576
+ aRange->setColor(StGLRangeFieldFloat32::FieldColor_Default, aBlack);
577
+ aRange->setColor(StGLRangeFieldFloat32::FieldColor_Positive, aGreen);
578
+ aRange->setColor(StGLRangeFieldFloat32::FieldColor_Negative, aRed);
579
+
580
+ anItem = aPlaceMenu->addItem(tr(MENU_SUBTITLES_PARALLAX));
581
anItem->changeMargins().right = scale(100 + 16);
582
aRange = new StGLRangeFieldFloat32(anItem, myPlugin->params.SubtitlesParallax,
583
-scale(16), 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_RIGHT));
584
- aRange->changeRectPx().bottom() = aRange->getRectPx().top() + myMenuSubtitles->getItemHeight();
585
+ aRange->changeRectPx().bottom() = aRange->getRectPx().top() + aBuilder.getMenu()->getItemHeight();
586
aRange->setFormat(stCString("%+03.0f"));
587
aRange->setColor(StGLRangeFieldFloat32::FieldColor_Default, aBlack);
588
aRange->setColor(StGLRangeFieldFloat32::FieldColor_Positive, aBlack);
589
aRange->setColor(StGLRangeFieldFloat32::FieldColor_Negative, aBlack);
590
+
591
+ anItem = aBuilder.getMenu()->addItem(tr(MENU_SUBTITLES_PLACEMENT), aPlaceMenu);
592
}
593
594
- myMenuSubtitles->addItem(tr(MENU_SUBTITLES_PARSER), aParserMenu)
595
- ->setIcon(stCMenuIcon("actionTextFormat"), false);
596
- if(theIsFilePlayed) {
597
- //myMenuSubtitles->addSplitter();
598
- myMenuSubtitles->addItem(tr(MENU_SUBTITLES_ATTACH))
599
- ->setIcon(stCMenuIcon("actionOpen"), false)
600
- ->signals.onItemClick.connect(myPlugin, &StMoviePlayer::doAddSubtitleStream);
601
+ aBuilder.getMenu()->addItem(tr(MENU_SUBTITLES_PARSER), aParserMenu)
602
+ ->setIcon(stCMenuIcon("actionTextFormat"), false);
603
+ if(myPlugin->myVideo->hasAudioStream()
604
+ || myPlugin->myVideo->hasVideoStream()) {
605
+ //aBuilder.getMenu()->addSplitter();
606
+ aBuilder.getMenu()->addItem(tr(MENU_SUBTITLES_ATTACH))
607
+ ->setIcon(stCMenuIcon("actionOpen"), false)
608
+ ->signals.onItemClick.connect(myPlugin, &StMoviePlayer::doAddSubtitleStream);
609
}
610
611
- // update menu representation
612
- myMenuSubtitles->stglInit();
613
+ aBuilder.display();
614
}
615
616
void StMoviePlayerGUI::stglDraw(unsigned int theView) {
617
618
myFpsWidget->changePlayQueueLength(),
619
myFpsWidget->changePlayFps());
620
myFpsWidget->update(myPlugin->getMainWindow()->isStereoOutput(),
621
- myPlugin->getMainWindow()->getTargetFps());
622
+ myPlugin->getMainWindow()->getTargetFps(),
623
+ myPlugin->getMainWindow()->getStatistics());
624
}
625
StGLRootWidget::stglDraw(theView);
626
}
627
628
aParams.add(myPlugin->params.IsMobileUI);
629
myLangMap->params.language->setName(tr(MENU_HELP_LANGS));
630
631
- const StString aTitle = "Settings";
632
- StInfoDialog* aDialog = new StInfoDialog(myPlugin, this, aTitle, scale(512), scale(300));
633
+ StInfoDialog* aDialog = new StInfoDialog(myPlugin, this, tr(MENU_HELP_SETTINGS), scale(512), scale(300));
634
635
const int aWidthMax = aDialog->getContent()->getRectPx().width();
636
int aRowLast = (int )aParams.size();
637
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayerGUI.h -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayerGUI.h
Changed
76
1
2
3
using StGLRootWidget::stglUpdate;
4
ST_LOCAL void stglUpdate(const StPointD_t& thePointZo,
5
- const GLfloat theProgress,
6
- const double thePTS);
7
+ bool theIsMouseMoved);
8
ST_LOCAL void setVisibility(const StPointD_t& theCursor,
9
bool theIsMouseMoved);
10
11
12
13
public: //! @name menu update routines
14
15
+ ST_LOCAL void stglResizeSeekBar();
16
ST_LOCAL void updateOpenALDeviceMenu();
17
- ST_LOCAL void updateAudioStreamsMenu (const StHandle< StArrayList<StString> >& theStreamsList,
18
- const bool theHasVideo);
19
- ST_LOCAL void updateSubtitlesStreamsMenu(const StHandle< StArrayList<StString> >& theStreamsList,
20
- const bool theIsFilePlayed);
21
-
22
ST_LOCAL void updateRecentMenu();
23
24
ST_LOCAL void doAboutFile(const size_t );
25
26
ST_LOCAL StGLMenu* createViewMenu(); // Root -> View menu
27
ST_LOCAL StGLMenu* createDisplayModeMenu(); // Root -> View -> Output
28
ST_LOCAL StGLMenu* createDisplayRatioMenu(); // Root -> View -> Display Ratio
29
- ST_LOCAL StGLMenu* createSurfaceMenu(); // Root -> View -> Surface
30
ST_LOCAL StGLMenu* createSmoothFilterMenu(); // Root -> View -> Smooth Filter
31
ST_LOCAL StGLMenu* createImageAdjustMenu(); // Root -> View -> Image Adjust
32
ST_LOCAL StGLMenu* createAudioMenu(); // Root -> Audio menu
33
34
ST_LOCAL void fillRecentMenu(StGLMenu* theMenu);
35
ST_LOCAL void fillDisplayRatioMenu(StGLMenu* theMenu);
36
ST_LOCAL void fillSrcFormatMenu(StGLMenu* theMenu);
37
+ ST_LOCAL void fillPanoramaMenu (StGLMenu* theMenu);
38
39
private: //! @name mobile interface creation routines
40
41
42
ST_LOCAL void doChangeHotKey1(const size_t );
43
ST_LOCAL void doChangeHotKey2(const size_t );
44
45
+ ST_LOCAL void doOpenFile(const size_t );
46
ST_LOCAL void doShowMobileExMenu(const size_t );
47
ST_LOCAL void doMobileSettings(const size_t );
48
ST_LOCAL void doAudioStreamsCombo(const size_t );
49
ST_LOCAL void doSubtitlesStreamsCombo(const size_t );
50
ST_LOCAL void doDisplayRatioCombo(const size_t );
51
ST_LOCAL void doDisplayStereoFormatCombo(const size_t );
52
+ ST_LOCAL void doPanoramaCombo(const size_t );
53
54
private: //! @name private fields
55
56
57
StGLMenu* myMenuRoot; //!< root of the main menu
58
StGLMenu* myMenuOpenAL;
59
StGLMenu* myMenuRecent;
60
- StGLMenu* myMenuAudio;
61
- StGLMenu* myMenuSubtitles;
62
63
StGLWidget* myPanelUpper; //!< upper toolbar
64
StGLTextureButton* myBtnOpen;
65
StGLTextureButton* myBtnInfo;
66
StGLTextureButton* myBtnSwapLR;
67
+ StGLCheckboxTextured* myBtnPanorama;
68
StGLTextureButton* myBtnSrcFrmt;
69
70
+ StGLCheckboxTextured* myBtnAudio;
71
+ StGLCheckboxTextured* myBtnSubs;
72
+
73
StGLWidget* myPanelBottom; //!< bottom toolbar
74
StSeekBar* mySeekBar;
75
StSeekBar* myVolumeBar;
76
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayerStrings.cpp -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayerStrings.cpp
Changed
79
1
2
"Parallax");
3
theStrings(MENU_SUBTITLES_PARSER,
4
"Parser");
5
+ theStrings(MENU_SUBTITLES_PLACEMENT,
6
+ "Placement");
7
+ theStrings(MENU_SUBTITLES_TOP,
8
+ "Top");
9
+ theStrings(MENU_SUBTITLES_BOTTOM,
10
+ "Bottom");
11
theStrings(MENU_SUBTITLES_PLAIN_TEXT,
12
"Plain text");
13
theStrings(MENU_SUBTITLES_LITE_HTML,
14
15
theStrings(MENU_MEDIA_OPEN_MOVIE_2,
16
"Left+Right files");
17
theStrings(MENU_SRC_FORMAT_AUTO,
18
- "Autodetection");
19
+ "Source");
20
theStrings(MENU_SRC_FORMAT_MONO,
21
"Mono");
22
theStrings(MENU_SRC_FORMAT_CROSS_EYED,
23
24
"Saturation");
25
theStrings(MENU_VIEW_ADJUST_GAMMA,
26
"Gamma");
27
- theStrings(MENU_VIEW_SURFACE,
28
- "Surface");
29
+ theStrings(MENU_VIEW_PANORAMA,
30
+ "Panorama");
31
theStrings(MENU_VIEW_SURFACE_PLANE,
32
"Plane");
33
theStrings(MENU_VIEW_SURFACE_SPHERE,
34
"Sphere");
35
theStrings(MENU_VIEW_SURFACE_CYLINDER,
36
"Cylinder");
37
+ theStrings(MENU_VIEW_SURFACE_CUBEMAP,
38
+ "Cubemap");
39
+ theStrings(MENU_VIEW_TRACK_HEAD,
40
+ "Track orientation");
41
+ theStrings(MENU_VIEW_TRACK_HEAD_POOR,
42
+ "Track orientation (poor)");
43
theStrings(MENU_VIEW_DISPLAY_MODE_STEREO,
44
"Stereo");
45
theStrings(MENU_VIEW_DISPLAY_MODE_LEFT,
46
47
"Cross-eyed pair");
48
theStrings(MENU_VIEW_DISPLAY_RATIO_SRC,
49
"Source");
50
- theStrings(MENU_VIEW_KEEP_ON_RESTART,
51
+ theStrings(MENU_VIEW_RATIO_KEEP_ON_RESTART,
52
"Keep on restart");
53
+ theStrings(MENU_VIEW_RATIO_HEAL_ANAMORPHIC,
54
+ "Heal anamorphic 1080p/720p");
55
theStrings(MENU_VIEW_TEXFILTER_NEAREST,
56
"Nearest");
57
theStrings(MENU_VIEW_TEXFILTER_LINEAR,
58
59
"Never");
60
theStrings(MENU_HELP_HOTKEYS,
61
"Hotkeys");
62
+ theStrings(MENU_HELP_SETTINGS,
63
+ "Settings");
64
theStrings(FILE_VIDEO_OPEN,
65
"Open another movie");
66
theStrings(BTN_SRC_FORMAT,
67
68
addAction(theStrings, StMoviePlayer::Action_StereoParamsBegin + StGLImageRegion::Action_RotXDown,
69
"DoParamsRotXDown",
70
"X Rotation - down");
71
+
72
+ // new actions
73
+ addAction(theStrings, StMoviePlayer::Action_PanoramaOnOff,
74
+ "DoPanoramaOnOff",
75
+ "Enable/disable panorama mode");
76
}
77
78
};
79
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayerStrings.h -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayerStrings.h
Changed
50
1
2
MENU_VIEW_DISPLAY_RATIO = 1205,
3
MENU_VIEW_TEXFILTER = 1206,
4
MENU_VIEW_IMAGE_ADJUST = 1207,
5
- MENU_VIEW_SURFACE = 1208,
6
+ MENU_VIEW_PANORAMA = 1208,
7
8
MENU_VIEW_DISPLAY_MODE_STEREO = 1210,
9
MENU_VIEW_DISPLAY_MODE_LEFT = 1211,
10
11
MENU_VIEW_DISPLAY_MODE_PARALLEL = 1213,
12
MENU_VIEW_DISPLAY_MODE_CROSSYED = 1214,
13
14
- MENU_VIEW_DISPLAY_RATIO_SRC = 1250,
15
- MENU_VIEW_KEEP_ON_RESTART = 1251,
16
+ MENU_VIEW_DISPLAY_RATIO_SRC = 1250,
17
+ MENU_VIEW_RATIO_KEEP_ON_RESTART = 1251,
18
+ MENU_VIEW_RATIO_HEAL_ANAMORPHIC = 1252,
19
20
MENU_VIEW_TEXFILTER_NEAREST = 1260,
21
MENU_VIEW_TEXFILTER_LINEAR = 1261,
22
23
MENU_VIEW_SURFACE_PLANE = 1280,
24
MENU_VIEW_SURFACE_SPHERE = 1281,
25
MENU_VIEW_SURFACE_CYLINDER = 1282,
26
+ MENU_VIEW_SURFACE_CUBEMAP = 1283,
27
+ MENU_VIEW_TRACK_HEAD = 1285,
28
+ MENU_VIEW_TRACK_HEAD_POOR = 1286,
29
30
// Root -> Audio menu
31
MENU_AUDIO = 1300,
32
33
MENU_SUBTITLES_SIZE = 1354,
34
MENU_SUBTITLES_PARALLAX = 1355,
35
MENU_SUBTITLES_PARSER = 1356,
36
+ MENU_SUBTITLES_PLACEMENT= 1357,
37
+ MENU_SUBTITLES_TOP = 1358,
38
+ MENU_SUBTITLES_BOTTOM = 1359,
39
40
MENU_SUBTITLES_PLAIN_TEXT = 1360,
41
MENU_SUBTITLES_LITE_HTML = 1361,
42
43
MENU_HELP_SYSINFO = 1508,
44
MENU_HELP_SCALE = 1509,
45
MENU_HELP_HOTKEYS = 1510,
46
+ MENU_HELP_SETTINGS= 1511,
47
48
// Root -> Help -> Check for updates menu
49
MENU_HELP_UPDATES_NOW = 1520,
50
sview-15_08.tar.gz/StMoviePlayer/StSeekBar.cpp -> sview-15_10.tar.gz/StMoviePlayer/StSeekBar.cpp
Changed
19
1
2
myRoot->getRectGl(aRectPx, aVertices, 8);
3
4
myVertices.init(getContext(), aVertices);
5
+ myIsResized = false;
6
}
7
8
bool StSeekBar::stglInit() {
9
10
StGLContext& aCtx = getContext();
11
12
// need to update vertices buffer?
13
- if(myProgressPx != int(myProgress * GLfloat((getRectPx().width() - myMargins.left - myMargins.right - 2)))) {
14
+ if(myIsResized
15
+ || myProgressPx != int(myProgress * GLfloat((getRectPx().width() - myMargins.left - myMargins.right - 2)))) {
16
stglUpdateVertices();
17
}
18
19
sview-15_08.tar.gz/StMoviePlayer/StTimeBox.h -> sview-15_10.tar.gz/StMoviePlayer/StTimeBox.h
Changed
77
1
2
const StGLCorner& theCorner,
3
const StGLTextArea::FontSize theSize = StGLTextArea::SIZE_NORMAL)
4
: StGLTextureButton(theParent, theLeft, theTop, theCorner),
5
- myProgressSec(0.0),
6
- myDurationSec(0.0),
7
+ myProgressSec(-1.0),
8
+ myDurationSec(-1.0),
9
myToShowElapsed(true),
10
myIsOverlay(false) {
11
- myTextArea = new StGLTextArea(this, 0, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_CENTER),
12
+ myMargins.left = myRoot->scale(8);
13
+ myMargins.right = myRoot->scale(8);
14
+ myTextArea = new StGLTextArea(this, 0, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_LEFT),
15
myRoot->scale(32), myRoot->scale(32), theSize);
16
myTextArea->setBorder(false);
17
myTextArea->setTextColor(StGLVec3(1.0f, 1.0f, 1.0f));
18
19
bool isBtnInit = StGLTextureButton::stglInit();
20
myTextArea->changeRectPx().right() = getRectPx().width();
21
myTextArea->changeRectPx().bottom() = getRectPx().height();
22
- return isBtnInit && myTextArea->stglInit();
23
+ const bool isOk = isBtnInit && myTextArea->stglInit();
24
+ myTextArea->setTextWidth(-1);
25
+ return isOk;
26
}
27
28
virtual void stglDraw(unsigned int theView) {
29
- if(myToShowElapsed) {
30
- myTextArea->setText(StFormatTime::formatSeconds(myProgressSec) + " / "
31
- + StFormatTime::formatSeconds(myDurationSec));
32
- } else {
33
- myTextArea->setText(StFormatTime::formatSeconds(myProgressSec - myDurationSec));
34
- }
35
StGLTextureButton::stglDraw(theView);
36
myTextArea->stglDraw(theView);
37
+ myIsResized = false;
38
}
39
40
virtual bool tryClick(const StPointD_t& theCursor,
41
42
: StGLTextureButton::tryUnClick(theCursor, theMouseBtn, theIsItemUnclicked);
43
}
44
45
- void setTime(const double theProgressSec,
46
- const double theDurationSec) {
47
+ void stglUpdateTime(const double theProgressSec,
48
+ const double theDurationSec) {
49
+ if(std::abs(myDurationSec - theDurationSec) > 0.1
50
+ && (theDurationSec > 0.1 || myDurationSec < 0.0)) {
51
+ int aWidth = 0;
52
+ int aHeight = 0;
53
+ myTextArea->computeTextWidth(StFormatTime::formatSeconds(theDurationSec) + " / "
54
+ + StFormatTime::formatSeconds(theDurationSec),
55
+ -1.0f, aWidth, aHeight);
56
+ const int aWidthNew = aWidth + myMargins.left + myMargins.right;
57
+ const int aWidthOld = getRectPx().width();
58
+ const int aToler = myRoot->scale(4);
59
+ if(std::abs(aWidthNew - aWidthOld) > aToler) {
60
+ myTextArea->changeRectPx().right() = myTextArea->getRectPx().left() + aWidthNew;
61
+ myTextArea->setTextWidth(aWidthNew);
62
+ changeRectPx().right() = getRectPx().left() + aWidthNew;
63
+ }
64
+ }
65
+
66
myProgressSec = theProgressSec;
67
myDurationSec = theDurationSec;
68
+ if(myToShowElapsed) {
69
+ myTextArea->setText(StFormatTime::formatSeconds(myProgressSec) + " / "
70
+ + StFormatTime::formatSeconds(myDurationSec));
71
+ } else {
72
+ myTextArea->setText(StFormatTime::formatSeconds(myProgressSec - myDurationSec));
73
+ }
74
}
75
76
public: //! @name callback Slots
77
sview-15_08.tar.gz/StMoviePlayer/StVideo/StVideo.cpp -> sview-15_10.tar.gz/StMoviePlayer/StVideo/StVideo.cpp
Changed
101
1
2
#endif
3
}
4
}
5
+ myFileList.clear();
6
myCtxList.clear();
7
myPlayCtxList.clear();
8
mySlaveCtx = NULL;
9
10
const int aCodedSizeX = myVideoMaster->getCodedSizeX();
11
const int aCodedSizeY = myVideoMaster->getCodedSizeY();
12
StString aDimsStr = StString() + aSizeX + " x " + aSizeY;
13
- if(aCodedSizeX != aSizeX
14
- || aCodedSizeY != aSizeY) {
15
- aDimsStr += StString(" (") + aCodedSizeX + " x " + aCodedSizeY + ")";
16
+ if((aCodedSizeX != aSizeX && aCodedSizeX != 0)
17
+ || (aCodedSizeY != aSizeY && aCodedSizeY != 0)) {
18
+ aDimsStr += StString(" [") + aCodedSizeX + " x " + aCodedSizeY + "]";
19
}
20
21
StDictEntry& aDimInfo = myFileInfoTmp->Info.addChange(tr(INFO_DIMENSIONS));
22
23
const int aCodedSizeX = myVideoSlave->getCodedSizeX();
24
const int aCodedSizeY = myVideoSlave->getCodedSizeY();
25
StString aDimsStr = StString() + aSizeX + " x " + aSizeY;
26
- if(aCodedSizeX != aSizeX
27
- || aCodedSizeY != aSizeY) {
28
- aDimsStr += StString(" (") + aCodedSizeX + " x " + aCodedSizeY + ")";
29
+ if((aCodedSizeX != aSizeX && aCodedSizeX != 0)
30
+ || (aCodedSizeY != aSizeY && aCodedSizeY != 0)) {
31
+ aDimsStr += StString(" [") + aCodedSizeX + " x " + aCodedSizeY + "]";
32
}
33
aDimsStr += " [2]";
34
35
36
}
37
38
myCtxList.add(aFormatCtx);
39
+ myFileList.add(theFileToLoad);
40
return true;
41
}
42
43
44
}
45
while(!myVideoMaster->isEmpty() || !myVideoMaster->isInDowntime()
46
|| !myVideoSlave->isEmpty() || !myVideoSlave->isInDowntime()) {
47
+ if(toQuit) {
48
+ break;
49
+ }
50
StThread::sleep(10);
51
}
52
myVideoMaster->deinit();
53
54
}
55
56
void StVideo::packetsLoop() {
57
- double aPts = 0.0;
58
- double aPtsbar = 10.0; /// debug variable
59
+#ifdef ST_DEBUG
60
+ double aPtsbar = 10.0;
61
+#endif
62
double aSeekPts = 0.0;
63
bool toSeekBack = false;
64
StPlayEvent_t aPlayEvent = ST_PLAYEVENT_NONE;
65
66
if(myAudio->isInitialized()) {
67
myAudio->pushEnd();
68
while(!myAudio->isEmpty() || !myAudio->isInDowntime()) {
69
+ if(toQuit) {
70
+ break;
71
+ }
72
StThread::sleep(10);
73
}
74
myAudio->deinit();
75
76
if(mySubtitles->isInitialized()) {
77
mySubtitles->pushEnd();
78
while(!mySubtitles->isEmpty() || !mySubtitles->isInDowntime()) {
79
+ if(toQuit) {
80
+ break;
81
+ }
82
StThread::sleep(10);
83
}
84
mySubtitles->deinit();
85
86
StThread::sleep(2);
87
}
88
89
- aPts = getPts();
90
+ #ifdef ST_DEBUG
91
+ const double aPts = getPts();
92
if(aPts > aPtsbar) {
93
aPtsbar = aPts + 10.0;
94
ST_DEBUG_LOG("Current position: " + StFormatTime::formatSeconds(aPts)
95
+ " from " + StFormatTime::formatSeconds(myDuration));
96
}
97
+ #endif
98
99
// All packets sent
100
if(anEmptyQueues == myPlayCtxList.size()) {
101
sview-15_08.tar.gz/StMoviePlayer/StVideo/StVideo.h -> sview-15_10.tar.gz/StMoviePlayer/StVideo/StVideo.h
Changed
9
1
2
StHandle<StThread> myThread; //!< main loop thread
3
StHandle<StTranslations> myLangMap; //!< translations dictionary
4
5
+ StArrayList<StString> myFileList; //!< file list
6
StArrayList<AVFormatContext*> myCtxList; //!< format context for each file
7
StArrayList<AVFormatContext*> myPlayCtxList; //!< currently played contexts
8
9
sview-15_08.tar.gz/StMoviePlayer/StVideo/StVideoQueue.cpp -> sview-15_10.tar.gz/StMoviePlayer/StVideo/StVideoQueue.cpp
Changed
23
1
2
return;
3
}
4
5
+ if(!theSrcDataLeft.isNull()) {
6
+ theStParams->Src1SizeX = theSrcDataLeft.getSizeX();
7
+ theStParams->Src1SizeY = theSrcDataLeft.getSizeY();
8
+ } else {
9
+ theStParams->Src1SizeX = 0;
10
+ theStParams->Src1SizeY = 0;
11
+ }
12
+ if(!theSrcDataRight.isNull()) {
13
+ theStParams->Src2SizeX = theSrcDataRight.getSizeX();
14
+ theStParams->Src2SizeY = theSrcDataRight.getSizeY();
15
+ } else {
16
+ theStParams->Src2SizeX = 0;
17
+ theStParams->Src2SizeY = 0;
18
+ }
19
+
20
myTextureQueue->push(theSrcDataLeft, theSrcDataRight, theStParams, theSrcFormat, theCubemapFormat, theSrcPTS);
21
myTextureQueue->setConnectedStream(true);
22
if(myWasFlushed) {
23
sview-15_08.tar.gz/StMoviePlayer/lang/chinese/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/chinese/StMoviePlayer.lng
Changed
42
1
2
1214="对眼"
3
1250="源格式"
4
1251="重启维持"
5
+?1252="Heal anamorphic 1080p/720p"
6
1260="接近"
7
1261="线性"
8
1262="混纺交织"
9
10
1280="平面"
11
1281="球面"
12
1282="圆筒"
13
+?1283="Cubemap"
14
+?1285="Track orientation"
15
+?1286="Track orientation (poor)"
16
1300="音频"
17
1301="无"
18
1302="音/视频 延迟"
19
20
1354="字体大小"
21
1355="视差"
22
1356="文本解析"
23
+?1357="Placement"
24
+?1358="Top"
25
+?1359="Bottom"
26
?1360="Plain text"
27
?1361="Lite HTML"
28
1400="改变设备->>"
29
30
1508="关于系统"
31
1509="界面尺寸->>"
32
?1510="Hotkeys"
33
+?1511="Settings"
34
1520="现在"
35
1521="每天"
36
1522="每周"
37
38
?6054="Y Rotation - right"
39
?6055="X Rotation - up"
40
?6056="X Rotation - down"
41
+?6057="Enable/disable panorama mode"
42
sview-15_10.tar.gz/StMoviePlayer/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StMoviePlayer/lang/czech/StMoviePlayer.lng
Added
249
1
2
+# Czech translation file for StMoviePlayer program
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1002=Přehodit levá/pravá
7
+1003=Vypnout přehození levá/pravá
8
+1004=Vstupní stereoskopický formát:
9
+1015=Otevřít soubor
10
+1020=Play/Pause
11
+1021=Zobrazit/skrýt playlist
12
+1022=Předchozí soubor
13
+1023=Další soubor
14
+1029=Okno/přes celou obrazovku
15
+1100=Soubor
16
+1101=Otevřít soubor...
17
+1102=Uložit jako...
18
+1103=Vstupní stereoformát
19
+1170=Informace o souboru
20
+1104=Audio zařízení
21
+1105=Náhodné pořadí
22
+1106=Otevřít poslední položku
23
+1107=Dekódování videa na GPU
24
+1108=Web UI
25
+1109=Zavřít (ESC)
26
+1110=Jeden stereosoubor
27
+1111=Dva soubory levý/pravý zvlášť
28
+1130=Původní
29
+1131=Mono
30
+1132=Křížem vedle sebe
31
+1133=Paralel vedle sebe
32
+1134=Nad/pod P/L
33
+1135=Nad/pod L/P
34
+1136=Prokládaný
35
+1137=Anaglyf červená/modrá
36
+1138=Anaglyf purporová
37
+1139=Anaglyf žlutá
38
+1140=Střídání L/R
39
+1141=2x720p v 1080p dlaždice
40
+1142=2 stream
41
+1160=Smazat historii
42
+1180=Vypnout
43
+1181=Spustit jednou
44
+1182=Spustit při startu
45
+1185=Zobrazit chyby
46
+1186=Web-připojení nemůže být na portu {0}!
47
+1200=Zobrazení
48
+1201=Výstupní formát
49
+1202=Celá obrazovka (Enter)
50
+1203=Vrátit
51
+1204=Přehodit levá/pravá
52
+1205=Poměr stran
53
+1206=Vyhlazení
54
+1207=Barevné korekce
55
+1208=Panorama
56
+1210=Stereo
57
+1211=Levá
58
+1212=Pravá
59
+1213=Paralel vedle sebe
60
+1214=Křížem vedle sebe
61
+1250=Původní
62
+1251=Neukládat nastavení
63
+?1252=Heal anamorphic 1080p/720p
64
+1260=Nevyhlazovat
65
+1261=Lineární
66
+1262=Odstranit prokládání
67
+1270=Resetovat nastavení
68
+1271=Jas
69
+1272=Sytost
70
+1273=Gama
71
+1280=Plocha
72
+1281=Koule
73
+1282=Válec
74
+?1283=Cubemap
75
+?1285="Track orientation"
76
+?1286="Track orientation (poor)"
77
+1300=Zvuk
78
+1301=Vypnout zvuk
79
+1302=Zpoždění zvuku
80
+1303=Přidat stopu ze souboru
81
+1320=Synchronizace zvuk/video
82
+1321=Zadejte kladnou hodnotu v případě, že zvuk předbíhá video, kladnou je-li opožděn.
83
+1322=Zpoždění zvuku
84
+1323=sekund (s)
85
+1350=Titulky
86
+1351=Bez titulků
87
+1353=Přidat soubor
88
+1354=Velikost textu
89
+1355=Paralaxa
90
+1356=Text parser
91
+?1357=Placement
92
+?1358=Top
93
+?1359=Bottom
94
+1360=Plain text
95
+1361=Lite HTML
96
+1400=Vybrat zařízení
97
+1401=O modulu…
98
+1402=FPS nastavení
99
+1420=Vertikální synchronizace
100
+1421=Zobrazovat snímkování (fps)
101
+1422=Omezit využití CPU
102
+1500=Nápověda
103
+1501=O aplikaci…
104
+1502=Aktualizace
105
+1503=Licenční ujednání
106
+1504=Language
107
+1505=Zakázat usínání
108
+1506=Nápověda/Tipy
109
+1507=Experimentální funkce
110
+1508=O systému
111
+1509=Vzhled/měřítko
112
+?1510=Hotkeys
113
+?1511=Settings
114
+1520=Nyní
115
+1521=Denně
116
+1522=Týdně
117
+1523=Ročně
118
+1524=Nikdy
119
+1550=Nikdy
120
+1551=Vždy
121
+1552=Během přehrávání
122
+1553=V režimu celé obrazovky
123
+1590=Menší
124
+1591=Normální
125
+1592=Velké
126
+1593=Extravelké HiDPI 2x
127
+2000=Otevřít video
128
+2001=Otevřít video s LEVOU stopou
129
+2002=Otevřít video s PRAVOU stopou
130
+2003=Informace o souboru
131
+2004=Žadné informace
132
+2005=Vymazat soubor
133
+2006=Skutečně chcete hodit soubor do koše?
134
+2007=Aktivní dekódery
135
+2010=Zvolte místo pro uložení obrázku
136
+2011=Nic není otevřeno!
137
+2012=Obraz není možné uložit!
138
+?2013=Assign new Hot Key for action\n<i>{0}</i>
139
+?2014=Conflicts with: <i>{0}</i>
140
+3000=sView - aplikace na přehrávání stereoskopického videa
141
+3001=verze
142
+3002=Aplikace přehrává stereoskopické video.\n © {0} Гаврилов Кирилл <{1}>\nOficiální stránka: {2}\n\nAplikace je vytvořena na platformě GPL3.0 {3}\nČeská lokalizace Marek Audy
143
+3003=Nové verze aplikace jsou dostupné na: www.sview.ru
144
+3004=Informace o systému
145
+4000=Zavřít
146
+4001=Zrušit
147
+4005=Obnovit
148
+4006=Uložit
149
+4007=Smazat
150
+?4008=Default
151
+?4009=Defaults
152
+?4010=Assign
153
+5000=[levý]
154
+5001=[pravý]
155
+5002=Jména souborů
156
+5003=Rozlišení videa
157
+5004=Načítání
158
+5005=мс
159
+5006=Poměr stran pixelu
160
+5007=Formát pixelu
161
+5008=(metada nejsou v informaci obsažena)
162
+5009=(neobsahuje metadata)
163
+5010=Doba trvání
164
+5011=(informace není obsažena v metadatech,\nale byla přidělena podle jména souboru)
165
+5300=Nadpis
166
+5301=Skladatel
167
+5302=Interpret
168
+5303=Výtvarník
169
+5304=Album
170
+5305=Disk
171
+5306=Kvalita disku
172
+5307=Žánr
173
+5308=Komentář
174
+5309=Poznámky
175
+5310=Popis
176
+5311=Vydavatel
177
+5312=Copyright
178
+5313=Encoder
179
+5314=Engineer
180
+5315=Původ
181
+5316=Datum vydání
182
+5317=Datum
183
+5318=Rok
184
+5319=Jazyk
185
+5320=Stopa
186
+5321=Počet stop
187
+5322=Track gain
188
+5323=Track peak
189
+5324=Album gain
190
+5325=Album peak
191
+?6000=Quit program
192
+?6001=Switch fullscreen/windowed
193
+?6002=Show/hide FPS meter
194
+?6003=Stereo format - Auto
195
+?6004=Stereo format - Mono
196
+?6005=Stereo format - Over/Under
197
+?6006=Stereo format - Side by side
198
+?6007=Show file info
199
+?6008=Playlist - Go to the first item
200
+?6009=Playlist - Go to the last item
201
+?6010=Playlist - Go to the previous item
202
+?6011=Playlist - Go to the next item
203
+?6012=Playlist - Go to the previous item [2]
204
+?6013=Playlist - Go to the next item [2]
205
+?6014=Play/pause playback
206
+?6015=Stop playback
207
+?6016=Seek 5 seconds backward
208
+?6017=Seek 5 seconds forward
209
+?6018=Show open file dialog
210
+?6019=Save snapshot
211
+?6020=Delete the file from file system
212
+?6021=Mute/unmute audio
213
+?6022=Audio volume down
214
+?6023=Audio volume up
215
+?6024=Previous audio track
216
+?6025=Next audio track
217
+?6026=Next subtitles track
218
+?6027=Next subtitles track
219
+?6028=Copy displayed subtitles text
220
+?6029=Open URL from clipboard
221
+?6030=Show/hide playlist
222
+?6031=Reset image adjustment
223
+?6032=Reset image position
224
+?6033=Swap Left/Right
225
+?6034=Gamma correction - decrease
226
+?6035=Gamma correction - increase
227
+?6036=DX separation - decrease
228
+?6037=DX separation - increase
229
+?6038=DY separation - decrease
230
+?6039=DY separation - increase
231
+?6040=Angular separation - decrease
232
+?6041=Angular separation - increase
233
+?6042=Rotate 90 degrees counterclockwise
234
+?6043=Rotate 90 degrees clockwise
235
+?6044=Rotate counterclockwise
236
+?6045=Rotate clockwise
237
+?6046=Enable/disable panorama mode
238
+?6047=Panning - navigate to the left
239
+?6048=Panning - navigate to the right
240
+?6049=Panning - navigate to the top
241
+?6050=Panning - navigate to the bottom
242
+?6051=Scale - increment
243
+?6052=Scale - decrement
244
+?6053=Y Rotation - left
245
+?6054=Y Rotation - right
246
+?6055=X Rotation - up
247
+?6056=X Rotation - down
248
+?6057=Enable/disable panorama mode
249
sview-15_10.tar.gz/StMoviePlayer/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StMoviePlayer/lang/english/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/english/StMoviePlayer.lng
Changed
60
1
2
1109="Quit"
3
1110="From One file"
4
1111="Left+Right files"
5
-1130="Autodetection"
6
+1130="Source"
7
1131="Mono"
8
1132="Cross-eyed"
9
1133="Parallel Pair"
10
11
1205="Display Ratio"
12
1206="Smooth Filter"
13
1207="Image Adjust"
14
-1208="Surface"
15
+1208="Panorama"
16
1210="Stereo"
17
1211="Left View"
18
1212="Right View"
19
20
1214="Cross-eyed"
21
1250="Source"
22
1251="Keep on restart"
23
+1252="Heal anamorphic 1080p/720p"
24
1260="Nearest"
25
1261="Linear"
26
1262="Blend Deinterlace"
27
28
1280="Plane"
29
1281="Sphere"
30
1282="Cylinder"
31
+1283="Cubemap"
32
+1285="Track orientation"
33
+1286="Track orientation (poor)"
34
1300="Audio"
35
1301="None"
36
1302="Audio/Video delay"
37
38
1354="Font Size"
39
1355="Parallax"
40
1356="Text parser"
41
+1357="Placement"
42
+1358="Top"
43
+1359="Bottom"
44
1360="Plain text"
45
1361="Lite HTML"
46
1400="Change device"
47
48
1508="About system"
49
1509="Interface Scale"
50
1510="Hotkeys"
51
+1511="Settings"
52
1520="Now"
53
1521="Each day"
54
1522="Each week"
55
56
6054="Y Rotation - right"
57
6055="X Rotation - up"
58
6056="X Rotation - down"
59
+6057="Enable/disable panorama mode"
60
sview-15_08.tar.gz/StMoviePlayer/lang/french/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/french/StMoviePlayer.lng
Changed
60
1
2
1109="Quitter"
3
1110="Depuis un fichier"
4
1111="2 Fichiers Gauche+Droit"
5
-1130="Auto-détection"
6
+1130="Source"
7
1131="Mono"
8
1132="Cross-eyed"
9
1133="Coté/Coté (SbS)"
10
11
1205="Ratio d'affichage"
12
1206="Lissage antialiasing"
13
1207="Réglage de l'image"
14
-1208="Surface"
15
+1208="Panorama"
16
1210="Stéréo"
17
1211="Vue Gauche"
18
1212="Vue Droite"
19
20
1214="Cross-eyed"
21
1250="Source"
22
1251="Garder après redémarrage"
23
+?1252="Heal anamorphic 1080p/720p"
24
1260="Plus proche"
25
1261="Lineaire"
26
1262="Blend Deinterlace"
27
28
1280="Plan"
29
1281="Sphère"
30
1282="Cylindre"
31
+1283="Cubemap"
32
+?1285="Track orientation"
33
+?1286="Track orientation (poor)"
34
1300="Audio"
35
1301="Aucun"
36
1302="Audio/Video delay"
37
38
1354="Taille De Police"
39
1355="Parallaxe"
40
?1356="Text parser"
41
+1357="Placement"
42
+1358="En haut"
43
+1359="Au fond"
44
?1360="Plain text"
45
?1361="Lite HTML"
46
1400="Changer la sortie"
47
48
?1508="About system"
49
?1509="Scale Interface"
50
1510="Raccourcis"
51
+1511="Paramètres"
52
1520="Maintenant"
53
1521="Chaque Jour"
54
1522="Chaque Mois"
55
56
?6054="Y Rotation - right"
57
?6055="X Rotation - up"
58
?6056="X Rotation - down"
59
+6057="Activer / désactiver le mode panorama"
60
sview-15_08.tar.gz/StMoviePlayer/lang/german/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/german/StMoviePlayer.lng
Changed
60
1
2
1109="Beenden"
3
1110="Einer Datei"
4
1111="Zwei Dateien"
5
-1130="Autoerkennung"
6
+1130="Quelle"
7
1131="Mono"
8
1132="Schielend"
9
1133="Parallel Pair"
10
11
1205="Seitenverhältnis"
12
1206="Glatte Filter"
13
1207="Bildeinstellung"
14
-1208="Oberfläche"
15
+1208="Panorama"
16
1210="Stereo"
17
1211="Linke Bild"
18
1212="Rechte Bild"
19
20
1214="Cross-eyed"
21
1250="Quelle"
22
1251="Halten beim Neustart"
23
+?1252="Heal anamorphic 1080p/720p"
24
1260="Nearest"
25
1261="Linear"
26
1262="Blend Deinterlace"
27
28
1280="Fläche"
29
1281="Kugel"
30
1282="Zylinder"
31
+1283="Cubemap"
32
+?1285="Track orientation"
33
+?1286="Track orientation (poor)"
34
1300="Audio"
35
1301="keiner"
36
1302="Audio/Video Verzögerung"
37
38
1354="Schriftgröße"
39
1355="Parallax"
40
1356="Text parser"
41
+1357="Platzierungen"
42
+1358="Top"
43
+1359="Boden"
44
1360="Plain text"
45
1361="Lite HTML"
46
1400="Gerät ändern"
47
48
1508="Über System"
49
1509="Maßstab Benutzeroberfläche"
50
1510="Hotkeys"
51
+1511="Einstellungen"
52
1520="jetzt"
53
1521="täglich"
54
1522="wöchentlich"
55
56
6054="Y-Drehung - rechts"
57
6055="X-Drehung - nach oben"
58
6056="X-Drehung - nach unten"
59
+6057="Aktivieren / Deaktivieren der Panorama-Modus"
60
sview-15_08.tar.gz/StMoviePlayer/lang/korean/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/korean/StMoviePlayer.lng
Changed
51
1
2
1205="화면 비율"
3
1206="Smooth 필터"
4
1207="이미지 수정"
5
-1208="Surface"
6
+?1208="Panorama"
7
1210="Stereo"
8
1211="왼쪽 View"
9
1212="오른쪽 View"
10
11
1214="크로스 아이"
12
?1250="Source"
13
1251="재시작시 유지"
14
+?1252="Heal anamorphic 1080p/720p"
15
?1260="Nearest"
16
?1261="Linear"
17
?1262="Blend Deinterlace"
18
19
?1280="Plane"
20
?1281="Sphere"
21
?1282="Cylinder"
22
+?1283="Cubemap"
23
+?1285="Track orientation"
24
+?1286="Track orientation (poor)"
25
?1300="Audio"
26
1301="없음"
27
1302="오디오/비디오 지연시간"
28
29
1354="폰트 크기"
30
?1355="Parallax"
31
?1356="Text parser"
32
+?1357="Placement"
33
+?1358="Top"
34
+?1359="Bottom"
35
?1360="Plain text"
36
?1361="Lite HTML"
37
1400="장치 변경"
38
39
1508="시스템에 대해"
40
?1509="Interface Scale"
41
?1510="Hotkeys"
42
+?1511="Settings"
43
1520="지금"
44
1521="매일"
45
1522="매주"
46
47
?6054="Y Rotation - right"
48
?6055="X Rotation - up"
49
?6056="X Rotation - down"
50
+?6057="Enable/disable panorama mode"
51
sview-15_08.tar.gz/StMoviePlayer/lang/russian/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/russian/StMoviePlayer.lng
Changed
51
1
2
1109="Выход"
3
1110="Из одного файла"
4
1111="Левый+Правый файлы"
5
-1130="Автоопределение"
6
+1130="Исходный"
7
1131="Моно"
8
1132="Перекрёстная пара"
9
1133="Параллельная пара"
10
11
1140="Чередование кадров"
12
1250="Исходное"
13
1251="Запомнить"
14
+?1252="Heal anamorphic 1080p/720p"
15
1260="Без сглаживания"
16
1261="Линейное"
17
1262="Blend Deinterlace"
18
19
1280="Плоскость"
20
1281="Сфера"
21
1282="Цилиндр
22
+1283="Куб"
23
+1285="Отслеживать ориентацию"
24
+1286="Отслеживать ориентацию (poor)"
25
1300="Аудио"
26
1301="Без звука"
27
1302="Задержка звука"
28
29
1508="О системе"
30
1509="Масштаб. интерфейса"
31
1510="Горячие клавиши"
32
+1511="Настройки"
33
1520="Сейчас"
34
1521="Каждый день"
35
1522="Каждую неделю"
36
37
1354="Размер текста"
38
1355="Параллакс"
39
1356="Text parser"
40
+1357="Положение"
41
+1358="Сверху"
42
+1359="Снизу"
43
1360="Plain text"
44
1361="Lite HTML"
45
1590="Мелко"
46
47
6054="Y наклон - направо"
48
6055="X наклон - наверх"
49
6056="X наклон - вниз"
50
+6057="Включить/выключить панорамный режим"
51
sview-15_08.tar.gz/StOutAnaglyph/StOutAnaglyph.cpp -> sview-15_10.tar.gz/StOutAnaglyph/StOutAnaglyph.cpp
Changed
27
1
2
StWindow::hide(ST_WIN_MASTER);
3
if(isMovable()) {
4
StWindow::setFullScreen(false);
5
- StRect<int32_t> savedRect = StWindow::getPlacement();
6
- mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, savedRect);
7
}
8
+}
9
+
10
+void StOutAnaglyph::beforeClose() {
11
+ mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
12
mySettings->saveParam(ST_SETTING_GLASSES, params.Glasses);
13
mySettings->saveParam(ST_SETTING_REDCYAN, params.RedCyan);
14
mySettings->saveParam(ST_SETTING_AMBERBLUE, params.AmberBlue);
15
+ mySettings->flush();
16
}
17
18
StOutAnaglyph::~StOutAnaglyph() {
19
20
21
void StOutAnaglyph::close() {
22
StWindow::params.VSyncMode->signals.onChanged -= stSlot(this, &StOutAnaglyph::doSwitchVSync);
23
+ beforeClose();
24
releaseResources();
25
StWindow::close();
26
}
27
sview-15_08.tar.gz/StOutAnaglyph/StOutAnaglyph.h -> sview-15_10.tar.gz/StOutAnaglyph/StOutAnaglyph.h
Changed
13
1
2
ST_CPPEXPORT virtual void close();
3
4
/**
5
+ * Extra routines to be processed before window close.
6
+ */
7
+ ST_CPPEXPORT virtual void beforeClose();
8
+
9
+ /**
10
* Process callback.
11
*/
12
ST_CPPEXPORT virtual void processEvents();
13
sview-15_10.tar.gz/StOutAnaglyph/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StOutAnaglyph/lang/czech/StOutAnaglyph.lng
Added
23
1
2
+# Czech translation file for StOutAnaglyph library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Brýle anaglyf
7
+1001=Brýle s barevnými filtry
8
+1010=Typ brýlí
9
+1011=Červená-azurová
10
+1012=Žlutá-modrá
11
+1013=Zelená-purpurová
12
+1102=Červeno-azurový filtr
13
+1120=Jednoduchý
14
+1121=Optimalizovaný
15
+1122=Šedý
16
+1123=Tmavý
17
+1103=Žluto-modrý filtr
18
+1130=Jednoduchý
19
+1131=Dubios
20
+2000=sView - modul pro výstup anaglyf
21
+2001=verze
22
+2002=© {0} Гаврилов Кирилл <{1}>\nОфициальный сайт: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
23
sview-15_10.tar.gz/StOutAnaglyph/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutDistorted/StOutDistorted.cpp -> sview-15_10.tar.gz/StOutDistorted/StOutDistorted.cpp
Changed
40
1
2
aDevDistorted->PluginId = ST_OUT_PLUGIN_NAME;
3
aDevDistorted->DeviceId = "Distorted";
4
aDevDistorted->Priority = ST_DEVICE_SUPPORT_NONE;
5
- aDevDistorted->Name = aLangMap.changeValueId(STTR_DISTORTED_NAME, "Parallel Pair");
6
+ aDevDistorted->Name = aLangMap.changeValueId(STTR_DISTORTED_NAME, "TV (parallel pair)");
7
aDevDistorted->Desc = aLangMap.changeValueId(STTR_DISTORTED_DESC, "Distorted Output");
8
myDevices.add(aDevDistorted);
9
10
11
StWindow::hide();
12
if(isMovable()) {
13
StWindow::setFullScreen(false);
14
- mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
15
}
16
+}
17
+
18
+void StOutDistorted::beforeClose() {
19
+ mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
20
21
StRectI_t aMargins;
22
aMargins.left() = myBarMargins.left;
23
24
if(myWasUsed) {
25
mySettings->saveInt32(ST_SETTING_DEVICE_ID, myDevice);
26
}
27
+ mySettings->flush();
28
}
29
30
StOutDistorted::~StOutDistorted() {
31
32
}
33
34
void StOutDistorted::close() {
35
+ beforeClose();
36
+
37
#ifdef ST_HAVE_LIBOVR
38
if(myOvrHmd != NULL) {
39
ovrHmd_Destroy(myOvrHmd);
40
sview-15_08.tar.gz/StOutDistorted/StOutDistorted.h -> sview-15_10.tar.gz/StOutDistorted/StOutDistorted.h
Changed
13
1
2
ST_CPPEXPORT virtual void close();
3
4
/**
5
+ * Extra routines to be processed before window close.
6
+ */
7
+ ST_CPPEXPORT virtual void beforeClose();
8
+
9
+ /**
10
* Process callback.
11
*/
12
ST_CPPEXPORT virtual void processEvents();
13
sview-15_08.tar.gz/StOutDistorted/lang/chinese/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/chinese/StOutDistorted.lng
Changed
10
1
2
•# Chinese translation file for StOutDistorted library
3
# @author YSC
4
--------
5
-1000="平行配对"
6
+1000="TV (平行配对)"
7
1001="扭曲输出"
8
1002="眼镜裂隙"
9
1003="桶变形"
10
sview-15_10.tar.gz/StOutDistorted/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StOutDistorted/lang/czech/StOutDistorted.lng
Added
19
1
2
+# Czech translation file for StOutDistorted library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Paralel vedle sebe
7
+1001=Deformovaný výstup
8
+1002=Oculus Rift
9
+1003=Soudková deformace
10
+1110=Uspořádání dvojice
11
+1111=Vedle sebe
12
+1112=Dvojice Nad/pod
13
+1120=Filtr
14
+1121=Žádný
15
+1123=Zobrazit mono ve stereu
16
+2000=sView - Modul deformace výstupu
17
+2001=verze
18
+2002=© {0} Гаврилов Кирилл <{1}>\nОфициальный сайт: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
19
sview-15_10.tar.gz/StOutDistorted/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutDistorted/lang/english/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/english/StOutDistorted.lng
Changed
10
1
2
# English translation file for StOutDistorted library
3
# @author Kirill Gavrilov
4
--------
5
-1000="Parallel Pair"
6
+1000="TV (parallel pair)"
7
1001="Distorted Output"
8
1002="Oculus Rift"
9
1003="Barrel distortion"
10
sview-15_08.tar.gz/StOutDistorted/lang/french/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/french/StOutDistorted.lng
Changed
10
1
2
# French translation file for StOutDistorted library
3
# @author gramoun for Kirill Gavrilov
4
--------
5
-1000="Parallel Pair"
6
+1000="TV (parallel pair)"
7
1001="Distorted Output"
8
1002="Oculus Rift"
9
1003="Barrel distortion"
10
sview-15_08.tar.gz/StOutDistorted/lang/german/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/german/StOutDistorted.lng
Changed
10
1
2
# German translation file for StOutDistorted library
3
# @author Kirill Gavrilov
4
--------
5
-1000="Parallel Pair"
6
+1000="TV (parallel pair)"
7
1001="Distorted Output"
8
1002="Oculus Rift"
9
1003="Barrel distortion"
10
sview-15_08.tar.gz/StOutDistorted/lang/korean/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/korean/StOutDistorted.lng
Changed
20
1
2
# English translation file for StOutDistorted library
3
# @author Kirill Gavrilov
4
--------
5
-?1000="Distorted Output"
6
-?1001="Oculur Rift"
7
+?1000="TV (parallel pair)"
8
+?1001="Distorted Output"
9
+?1002="Oculus Rift"
10
+?1003="Barrel distortion"
11
?1110="Layout"
12
?1111="Side-by-Side"
13
?1112="Top-and-Bottom"
14
?1120="Distortion"
15
?1121="None"
16
-?1122="Barrel"
17
?1123="Show Mono in Stereo"
18
?2000="sView - Distorted Output module"
19
?2001="version"
20
sview-15_08.tar.gz/StOutDistorted/lang/russian/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/russian/StOutDistorted.lng
Changed
10
1
2
# Russian translation file for StOutDistorted library
3
# @author Kirill Gavrilov
4
--------
5
-1000="Параллельная пара"
6
+1000="TV (параллельная пара)"
7
1001="Distorted Output"
8
1002="Oculus Rift"
9
1003="Barrel distortion"
10
sview-15_08.tar.gz/StOutDual/StOutDual.cpp -> sview-15_10.tar.gz/StOutDual/StOutDual.cpp
Changed
26
1
2
StWindow::hide();
3
if(isMovable()) {
4
StWindow::setFullScreen(false);
5
- mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
6
}
7
+}
8
+
9
+void StOutDual::beforeClose() {
10
+ mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
11
mySettings->saveParam(ST_SETTING_SLAVE_ID, params.SlaveMonId);
12
mySettings->saveParam(ST_SETTING_MONOCLONE, params.MonoClone);
13
mySettings->saveInt32(ST_SETTING_DEVICE_ID, myDevice);
14
+ mySettings->flush();
15
}
16
17
StOutDual::~StOutDual() {
18
19
20
void StOutDual::close() {
21
StWindow::params.VSyncMode->signals.onChanged -= stSlot(this, &StOutDual::doSwitchVSync);
22
+ beforeClose();
23
releaseResources();
24
StWindow::close();
25
}
26
sview-15_08.tar.gz/StOutDual/StOutDual.h -> sview-15_10.tar.gz/StOutDual/StOutDual.h
Changed
13
1
2
ST_CPPEXPORT virtual void close();
3
4
/**
5
+ * Extra routines to be processed before window close.
6
+ */
7
+ ST_CPPEXPORT virtual void beforeClose();
8
+
9
+ /**
10
* Process callback.
11
*/
12
ST_CPPEXPORT virtual void processEvents();
13
sview-15_10.tar.gz/StOutDual/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StOutDual/lang/czech/StOutDual.lng
Added
15
1
2
+# Czech translation file for StOutDual library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Duální výstup
7
+1001=Stereozařízení s duálním vstupem: dvojice projektorů, monitory se zrcadlem, HMD
8
+1002=Zrcadlově převrácený výstup
9
+1003=Svépomocné zrcadlové systémy
10
+1102=Druhý monitor
11
+1103=Zobrazovat mono ve stereu
12
+2000=sView - modul výstupu na zrcadlové a duální systémy
13
+2001=verze
14
+2002=© {0} Гаврилов Кирилл <{1}>\nОфициальный сайт: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
15
sview-15_10.tar.gz/StOutDual/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutIZ3D/StOutIZ3D.cpp -> sview-15_10.tar.gz/StOutIZ3D/StOutIZ3D.cpp
Changed
24
1
2
StWindow::hide();
3
if(isMovable()) {
4
StWindow::setFullScreen(false);
5
- mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
6
}
7
+}
8
+
9
+void StOutIZ3D::beforeClose() {
10
+ mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
11
mySettings->saveParam(ST_SETTING_TABLE, params.Glasses);
12
+ mySettings->flush();
13
}
14
15
StOutIZ3D::~StOutIZ3D() {
16
17
18
void StOutIZ3D::close() {
19
StWindow::params.VSyncMode->signals.onChanged -= stSlot(this, &StOutIZ3D::doSwitchVSync);
20
+ beforeClose();
21
releaseResources();
22
StWindow::close();
23
}
24
sview-15_08.tar.gz/StOutIZ3D/StOutIZ3D.h -> sview-15_10.tar.gz/StOutIZ3D/StOutIZ3D.h
Changed
13
1
2
ST_CPPEXPORT virtual void close();
3
4
/**
5
+ * Extra routines to be processed before window close.
6
+ */
7
+ ST_CPPEXPORT virtual void beforeClose();
8
+
9
+ /**
10
* Process callback.
11
*/
12
ST_CPPEXPORT virtual void processEvents();
13
sview-15_10.tar.gz/StOutIZ3D/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StOutIZ3D/lang/czech/StOutIZ3D.lng
Added
15
1
2
+# Czech translation file for StOutIZ3D library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Monitor IZ3D
7
+1001=Monitor IZ3D
8
+1102=Typ brýlí
9
+1120=Klasické
10
+1121=Moderní
11
+1122=Klasické (rychlé)
12
+2000=sView - Modul stereovýstupu pro monitor iZ3D
13
+2001=версия
14
+2002=© {0} Гаврилов Кирилл <{1}>\n© 2007-2009 iZ3D LLC\nОфициальный сайт: {2}\nСайт iZ3D LLC: www.iz3d.com\n\nБиблиотека распространяется на условиях LGPL3.0
15
sview-15_10.tar.gz/StOutIZ3D/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutInterlace/StOutInterlace.cpp -> sview-15_10.tar.gz/StOutInterlace/StOutInterlace.cpp
Changed
152
1
2
#endif
3
4
// detect connected displays
5
- bool myIsMonReversed = false;
6
- StHandle<StMonitor> aMonInterlaced = StOutInterlace::getHInterlaceMonitor(aMonitors, myIsMonReversed);
7
+ bool isDummyReversed= false;
8
+ StHandle<StMonitor> aMonInterlaced = StOutInterlace::getHInterlaceMonitor(aMonitors, isDummyReversed);
9
if(!aMonInterlaced.isNull()) {
10
aDevRow->Priority = ST_DEVICE_SUPPORT_PREFER;
11
}
12
13
StMonitor aMonitor = aMonitors[aRect.center()];
14
if(params.BindToMon->getValue()
15
&& !aMonInterlaced.isNull()
16
- && !isInterlacedMonitor(aMonitor, myIsMonReversed)) {
17
+ && !isInterlacedMonitor(aMonitor, isDummyReversed)) {
18
aMonitor = *aMonInterlaced;
19
}
20
if(isLoadedPosition) {
21
22
StWindow::setPlacement(aRect);
23
}
24
25
+ // setup myIsMonReversed value for actual placement
26
+ if(!aMonInterlaced.isNull()) {
27
+ myIsMonReversed = false;
28
+ StMonitor aMonitor = aMonitors[StWindow::getPlacement().center()];
29
+ isInterlacedMonitor(aMonitor, myIsMonReversed);
30
+ }
31
+
32
// load device settings
33
mySettings->loadInt32(ST_SETTING_DEVICE_ID, myDevice);
34
if(myDevice == DEVICE_AUTO) {
35
36
StWindow::hide();
37
if(isMovable()) {
38
StWindow::setFullScreen(false);
39
- mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
40
}
41
- mySettings->saveParam(ST_SETTING_BIND_MONITOR, params.BindToMon);
42
- mySettings->saveParam(ST_SETTING_REVERSE, params.ToReverse);
43
- mySettings->saveInt32(ST_SETTING_DEVICE_ID, myDevice);
44
}
45
46
StOutInterlace::~StOutInterlace() {
47
48
}
49
50
void StOutInterlace::beforeClose() {
51
+ mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
52
+ mySettings->saveParam(ST_SETTING_BIND_MONITOR, params.BindToMon);
53
+ mySettings->saveParam(ST_SETTING_REVERSE, params.ToReverse);
54
+ mySettings->saveInt32(ST_SETTING_DEVICE_ID, myDevice);
55
+ mySettings->flush();
56
+
57
// process exit from StApplication
58
if((myDevice == DEVICE_HINTERLACE_ED) && myIsEDactive) {
59
// disactivate eDimensional shuttered glasses
60
61
if(!aShaderRow.init(*myContext,
62
ST_SHADER_TEMPLATE[0],
63
// drop odd horizontal line (starts from bottom)
64
- "if(int(mod(gl_FragCoord.y + 1.5, 2.0)) == 1) { discard; }\n",
65
+ "if(int(mod(gl_FragCoord.y - 1023.5, 2.0)) != 1) { discard; }\n",
66
ST_SHADER_TEMPLATE[2])) {
67
myMsgQueue->pushError(aShadersError);
68
myIsBroken = true;
69
70
} else if(!aShaderRowRev.init(*myContext,
71
ST_SHADER_TEMPLATE[0],
72
// drop even horizontal line (starts from bottom)
73
- "if(int(mod(gl_FragCoord.y + 1.5, 2.0)) != 1) { discard; }\n",
74
+ "if(int(mod(gl_FragCoord.y - 1023.5, 2.0)) == 1) { discard; }\n",
75
ST_SHADER_TEMPLATE[2])) {
76
myMsgQueue->pushError(aShadersError);
77
myIsBroken = true;
78
79
if(!aShaderCol.init(*myContext,
80
ST_SHADER_TEMPLATE[0],
81
// drop odd column (starts from left)
82
- "if(int(mod(gl_FragCoord.x + 1.5, 2.0)) != 1) { discard; }\n",
83
+ "if(int(mod(gl_FragCoord.x - 1023.5, 2.0)) == 1) { discard; }\n",
84
ST_SHADER_TEMPLATE[2])) {
85
myMsgQueue->pushError(aShadersError);
86
myIsBroken = true;
87
88
} else if(!aShaderColRev.init(*myContext,
89
ST_SHADER_TEMPLATE[0],
90
// drop even column (starts from left)
91
- "if(int(mod(gl_FragCoord.x + 1.5, 2.0)) == 1) { discard; }\n",
92
+ "if(int(mod(gl_FragCoord.x - 1023.5, 2.0)) != 1) { discard; }\n",
93
ST_SHADER_TEMPLATE[2])) {
94
myMsgQueue->pushError(aShadersError);
95
myIsBroken = true;
96
97
StGLAutoRelease aTmp7(*myContext, aShaderChessRev);
98
if(!aShaderChess.init(*myContext,
99
ST_SHADER_TEMPLATE[0],
100
- "bool isEvenX = int(mod(floor(gl_FragCoord.x + 1.5), 2.0)) == 1;\n"
101
- "bool isEvenY = int(mod(floor(gl_FragCoord.y + 1.5), 2.0)) != 1;\n"
102
+ "bool isEvenX = int(mod(floor(gl_FragCoord.x - 1023.5), 2.0)) != 1;\n"
103
+ "bool isEvenY = int(mod(floor(gl_FragCoord.y - 1023.5), 2.0)) == 1;\n"
104
"if((isEvenX && isEvenY) || (!isEvenX && !isEvenY)) { discard; }\n",
105
ST_SHADER_TEMPLATE[2])) {
106
myMsgQueue->pushError(aShadersError);
107
108
return true;
109
} else if(!aShaderChessRev.init(*myContext,
110
ST_SHADER_TEMPLATE[0],
111
- "bool isEvenX = int(mod(floor(gl_FragCoord.x + 1.5), 2.0)) == 1;\n"
112
- "bool isEvenY = int(mod(floor(gl_FragCoord.y + 1.5), 2.0)) != 1;\n"
113
+ "bool isEvenX = int(mod(floor(gl_FragCoord.x - 1023.5), 2.0)) != 1;\n"
114
+ "bool isEvenY = int(mod(floor(gl_FragCoord.y - 1023.5), 2.0)) == 1;\n"
115
"if(!((isEvenX && isEvenY) || (!isEvenX && !isEvenY))) { discard; }\n",
116
ST_SHADER_TEMPLATE[2])) {
117
myMsgQueue->pushError(aShadersError);
118
119
const StSearchMonitors& aMonitors = StWindow::getMonitors();
120
StRectI_t aRect = StWindow::getPlacement();
121
StMonitor aMon = aMonitors[aRect.center()];
122
- StHandle<StMonitor> anInterlacedMon = StOutInterlace::getHInterlaceMonitor(aMonitors, myIsMonReversed);
123
-
124
- if(isMovable()) {
125
+ if(isInterlacedMonitor(aMon, myIsMonReversed)
126
+ || !isMovable()) {
127
return;
128
}
129
130
- if(!anInterlacedMon.isNull()
131
- && !isInterlacedMonitor(aMon, myIsMonReversed)) {
132
- int aWidth = aRect.width();
133
- int aHeight = aRect.height();
134
- aRect.left() = anInterlacedMon->getVRect().left() + 256;
135
- aRect.right() = aRect.left() + aWidth;
136
- aRect.top() = anInterlacedMon->getVRect().top() + 256;
137
- aRect.bottom() = aRect.top() + aHeight;
138
- StWindow::setPlacement(aRect);
139
+ StHandle<StMonitor> anInterlacedMon = StOutInterlace::getHInterlaceMonitor(aMonitors, myIsMonReversed);
140
+ if(anInterlacedMon.isNull()) {
141
+ return;
142
}
143
+
144
+ int aWidth = aRect.width();
145
+ int aHeight = aRect.height();
146
+ aRect.left() = anInterlacedMon->getVRect().left() + 256;
147
+ aRect.right() = aRect.left() + aWidth;
148
+ aRect.top() = anInterlacedMon->getVRect().top() + 256;
149
+ aRect.bottom() = aRect.top() + aHeight;
150
+ StWindow::setPlacement(aRect);
151
}
152
sview-15_10.tar.gz/StOutInterlace/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StOutInterlace/lang/czech/StOutInterlace.lng
Added
19
1
2
+# Russian translation file for StOutInterlace library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Prokládání řádků
7
+1001=Vodorovně prokládané monitory: Zalman, Hyundai, LG…
8
+1002=Prokládání sloupců
9
+1003=Svisle proklásané monitory
10
+1006=DLP TV (šachovnice)
11
+1007=DLP TV (šachovnice)
12
+1008=Prokládaný ED
13
+1009=EDimensional v prokládaném režimu
14
+1102=Přeskládat obráceně
15
+1103=Provázat s monitorem
16
+2000=sView - modul prokládaného zobrazování
17
+2001=verze
18
+2002=© {0} Гаврилов Кирилл <{1}>\noficiální strana: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
19
sview-15_10.tar.gz/StOutInterlace/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutPageFlip/StOutPageFlip.cpp -> sview-15_10.tar.gz/StOutPageFlip/StOutPageFlip.cpp
Changed
28
1
2
StWindow::hide();
3
if(isMovable()) {
4
StWindow::setFullScreen(false);
5
- mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
6
}
7
+}
8
+
9
+void StOutPageFlip::beforeClose() {
10
+ mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
11
mySettings->saveInt32(ST_SETTING_DEVICE_ID, myDevice);
12
mySettings->saveParam(ST_SETTING_ADVANCED, params.ToShowExtra);
13
if(myWasUsed) {
14
mySettings->saveParam(ST_SETTING_QUADBUFFER, params.QuadBuffer);
15
}
16
+ mySettings->flush();
17
}
18
19
StOutPageFlip::~StOutPageFlip() {
20
21
}
22
23
void StOutPageFlip::close() {
24
+ beforeClose();
25
StWindow::params.VSyncMode->signals.onChanged -= stSlot(this, &StOutPageFlip::doSwitchVSync);
26
myToResetDevice = false;
27
releaseResources();
28
sview-15_08.tar.gz/StOutPageFlip/StOutPageFlip.h -> sview-15_10.tar.gz/StOutPageFlip/StOutPageFlip.h
Changed
13
1
2
ST_CPPEXPORT virtual void close();
3
4
/**
5
+ * Extra routines to be processed before window close.
6
+ */
7
+ ST_CPPEXPORT virtual void beforeClose();
8
+
9
+ /**
10
* Process callback.
11
*/
12
ST_CPPEXPORT virtual void processEvents();
13
sview-15_08.tar.gz/StOutPageFlip/StOutPageFlipExt.cpp -> sview-15_10.tar.gz/StOutPageFlip/StOutPageFlipExt.cpp
Changed
25
1
2
myCodesLine.release(*myContext);
3
myCodesEDOnOff.release(*myContext);
4
}
5
- mySettings->saveParam(ST_SETTING_DEV_CONTROL, params.ControlCode);
6
StOutPageFlip::releaseResources();
7
}
8
9
10
releaseResources();
11
}
12
13
-void StOutPageFlipExt::close() {
14
- beforeClose();
15
- StOutPageFlip::close();
16
-}
17
-
18
void StOutPageFlipExt::beforeClose() {
19
+ StOutPageFlip::beforeClose();
20
+ mySettings->saveParam(ST_SETTING_DEV_CONTROL, params.ControlCode);
21
+ mySettings->flush();
22
if(!StOutPageFlip::params.ToShowExtra->getValue()) {
23
return;
24
}
25
sview-15_08.tar.gz/StOutPageFlip/StOutPageFlipExt.h -> sview-15_10.tar.gz/StOutPageFlip/StOutPageFlipExt.h
Changed
13
1
2
ST_CPPEXPORT virtual bool create();
3
4
/**
5
- * Close the window.
6
- */
7
- ST_CPPEXPORT virtual void close();
8
-
9
- /**
10
* Extra routines to be processed before window close.
11
*/
12
ST_CPPEXPORT virtual void beforeClose();
13
sview-15_10.tar.gz/StOutPageFlip/lang/czech
Added
2
1
+(directory)
2
sview-15_10.tar.gz/StOutPageFlip/lang/czech/StOutPageFlip.lng
Added
28
1
2
+# Czech translation file for StOutPageFlip library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Aktivní brýle (závěrkové)
7
+1001=Aktivní brýle (závěrkové)
8
+1002=Vuzix HMD
9
+1003=Vuzix HMD
10
+1102=Typ vícenásobného bufferingu
11
+1103=Nastavení brýlí
12
+1120=OpenGL emulovaný
13
+1122=OpenGL hardwarový
14
+1123=Direct3D (Celá obrazovka)
15
+1124=Direct3D (Nedostupné)
16
+1125=Direct3D AMD (Celá obrazovka)
17
+1126=Direct3D AMD (Nedostupné)
18
+1127=Direct3D NVIDIA (Celá obrazovka)
19
+1128=Direct3D NVIDIA (Vypnuto)
20
+1130=Bez ovládání
21
+1131=Modrá linka sync
22
+1132=Bílá linka sync
23
+1134=eDimensional auto on/off
24
+2000=sView - modul stereovýstupu pro aktivní závěrkové brýle
25
+2001=версия
26
+2002=© {0} Гаврилов Кирилл <{1}>\nОфициальный сайт: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
27
+3001=OpenGL Hardware QuadBuffer není dostupný!
28
sview-15_10.tar.gz/StOutPageFlip/lang/czech/language.lng
Added
4
1
2
+Čeština
3
\ No newline at end of file
4
sview-15_10.tar.gz/StShared/StAVVideoMuxer.cpp
Added
351
1
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#include <StAV/StAVVideoMuxer.h>
11
+
12
+#include <StAV/StAVPacket.h>
13
+#include <StStrings/StLogger.h>
14
+#include <StFile/StFileNode.h>
15
+
16
+#include <vector>
17
+
18
+StAVVideoMuxer::StAVVideoMuxer()
19
+: myStereoFormat(StFormat_Mono) {
20
+ //
21
+}
22
+
23
+StAVVideoMuxer::~StAVVideoMuxer() {
24
+ close();
25
+}
26
+
27
+void StAVVideoMuxer::close() {
28
+ for(size_t aCtxId = 0; aCtxId < myCtxListSrc.size(); ++aCtxId) {
29
+ AVFormatContext*& aFormatCtx = myCtxListSrc[aCtxId];
30
+ if(aFormatCtx != NULL) {
31
+ #if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0))
32
+ avformat_close_input(&aFormatCtx);
33
+ #else
34
+ av_close_input_file(aFormatCtx);
35
+ #endif
36
+ }
37
+ }
38
+ myCtxListSrc.clear();
39
+}
40
+
41
+bool StAVVideoMuxer::addFile(const StString& theFileToLoad) {
42
+ StString aFileName, aDummy;
43
+ StFileNode::getFolderAndFile(theFileToLoad, aDummy, aFileName);
44
+
45
+ AVFormatContext* aFormatCtx = NULL;
46
+#if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0))
47
+ int avErrCode = avformat_open_input(&aFormatCtx, theFileToLoad.toCString(), NULL, NULL);
48
+#else
49
+ int avErrCode = av_open_input_file (&aFormatCtx, theFileToLoad.toCString(), NULL, 0, NULL);
50
+#endif
51
+ if(avErrCode != 0) {
52
+ signals.onError(StString("FFmpeg: Couldn't open video file '") + theFileToLoad
53
+ + "'\nError: " + stAV::getAVErrorDescription(avErrCode));
54
+ if(aFormatCtx != NULL) {
55
+ #if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0))
56
+ avformat_close_input(&aFormatCtx);
57
+ #else
58
+ av_close_input_file(aFormatCtx);
59
+ #endif
60
+ }
61
+ return false;
62
+ }
63
+
64
+ // retrieve stream information
65
+#if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0))
66
+ if(avformat_find_stream_info(aFormatCtx, NULL) < 0) {
67
+#else
68
+ if(av_find_stream_info(aFormatCtx) < 0) {
69
+#endif
70
+ signals.onError(StString("FFmpeg: Couldn't find stream information in '") + theFileToLoad + "'");
71
+ if(aFormatCtx != NULL) {
72
+ #if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0))
73
+ avformat_close_input(&aFormatCtx);
74
+ #else
75
+ av_close_input_file(aFormatCtx); // close video file at all
76
+ #endif
77
+ }
78
+ return false;
79
+ }
80
+
81
+#ifdef ST_DEBUG
82
+#if(LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 101, 0))
83
+ av_dump_format(aFormatCtx, 0, theFileToLoad.toCString(), false);
84
+#else
85
+ dump_format (aFormatCtx, 0, theFileToLoad.toCString(), false);
86
+#endif
87
+#endif
88
+
89
+ myCtxListSrc.add(aFormatCtx);
90
+ return true;
91
+}
92
+
93
+class StAVOutContext {
94
+
95
+ public:
96
+
97
+ AVFormatContext* Context;
98
+
99
+ /**
100
+ * Empty constructor.
101
+ */
102
+ StAVOutContext() : Context(NULL), myFormat(NULL) {}
103
+
104
+ /**
105
+ * Determine the format.
106
+ */
107
+ bool findFormat(const char* theShortName,
108
+ const char* theFilename,
109
+ const char* theMimeType = NULL) {
110
+ myFormat = av_guess_format(theShortName, theFilename, theMimeType);
111
+ return myFormat != NULL;
112
+ }
113
+
114
+ /**
115
+ * Create context.
116
+ */
117
+ bool create(const StString& theFile) {
118
+ if(myFormat == NULL) {
119
+ return false;
120
+ }
121
+
122
+ #if !defined(ST_LIBAV_FORK)
123
+ avformat_alloc_output_context2(&Context, myFormat, NULL, theFile.toCString());
124
+ #else
125
+ Context = avformat_alloc_context();
126
+ if(Context == NULL) {
127
+ return false;
128
+ }
129
+
130
+ Context->oformat = myFormat;
131
+ if(Context->oformat->priv_data_size > 0) {
132
+ Context->priv_data = av_mallocz(Context->oformat->priv_data_size);
133
+ if(!Context->priv_data) {
134
+ //goto nomem;
135
+ }
136
+ if(Context->oformat->priv_class) {
137
+ *(const AVClass**)Context->priv_data = Context->oformat->priv_class;
138
+ //av_opt_set_defaults(aCtxOut->priv_data);
139
+ }
140
+ } else {
141
+ Context->priv_data = NULL;
142
+ }
143
+
144
+ const size_t aStrLen = stMin(theFile.Size + 1, size_t(1024));
145
+ stMemCpy(Context->filename, theFile.toCString(), aStrLen);
146
+ Context->filename[1023] = '\0';
147
+ #endif
148
+ return Context != NULL;
149
+ }
150
+
151
+ /**
152
+ * Destructor.
153
+ */
154
+ ~StAVOutContext() {
155
+ if(Context == NULL) {
156
+ return;
157
+ }
158
+
159
+ if(!(Context->oformat->flags & AVFMT_NOFILE)) {
160
+ avio_close(Context->pb);
161
+ }
162
+ avformat_free_context(Context);
163
+ }
164
+
165
+ private:
166
+
167
+ AVOutputFormat* myFormat;
168
+
169
+};
170
+
171
+/**
172
+ * Return string identifier for specified stereo format.
173
+ */
174
+const char* formatToMetadata(const StFormat theFormat) {
175
+ switch(theFormat) {
176
+ case StFormat_Mono: return "mono";
177
+ case StFormat_SideBySide_RL: return "right_left";
178
+ case StFormat_SideBySide_LR: return "left_right";
179
+ case StFormat_TopBottom_RL: return "bottom_top";
180
+ case StFormat_TopBottom_LR: return "top_bottom";
181
+ case StFormat_Rows: return "row_interleaved_lr";
182
+ case StFormat_Columns: return "col_interleaved_lr";
183
+ case StFormat_FrameSequence: return "block_lr";
184
+ case StFormat_AnaglyphRedCyan: return "anaglyph_cyan_red";
185
+ case StFormat_AnaglyphGreenMagenta: return "anaglyph_green_magenta";
186
+ case StFormat_AUTO:
187
+ case StFormat_SeparateFrames:
188
+ case StFormat_AnaglyphYellowBlue:
189
+ case StFormat_Tiled4x:
190
+ case StFormat_NB:
191
+ return NULL;
192
+ }
193
+ return NULL;
194
+}
195
+
196
+bool StAVVideoMuxer::addStream(AVFormatContext* theContext,
197
+ const AVStream* theStream) {
198
+ AVStream* aStreamOut = avformat_new_stream(theContext, theStream->codec->codec);
199
+ if(aStreamOut == NULL) {
200
+ signals.onError(StString("Failed allocating output stream."));
201
+ return false;
202
+ }
203
+ if(avcodec_copy_context(aStreamOut->codec, theStream->codec) < 0) {
204
+ signals.onError(StString("Failed to copy context from input to output stream codec context."));
205
+ return false;
206
+ }
207
+ av_dict_copy(&aStreamOut->metadata, theStream->metadata, AV_DICT_DONT_OVERWRITE);
208
+//#if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(54, 2, 100))
209
+// myIsAttachedPic = (theStream->disposition & AV_DISPOSITION_ATTACHED_PIC) != 0;
210
+//#endif
211
+ if(theStream->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
212
+ aStreamOut->sample_aspect_ratio = theStream->sample_aspect_ratio;
213
+ aStreamOut->codec->sample_aspect_ratio = aStreamOut->sample_aspect_ratio;
214
+ }
215
+
216
+ if(theContext->oformat->flags & AVFMT_GLOBALHEADER) {
217
+ aStreamOut->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
218
+ }
219
+ return true;
220
+}
221
+
222
+bool StAVVideoMuxer::save(const StString& theFile) {
223
+ if(myCtxListSrc.isEmpty()
224
+ || theFile.isEmpty()) {
225
+ return false;
226
+ }
227
+
228
+ StString aFormatName = myCtxListSrc[0]->iformat->name;
229
+ const char* aFormatStr = formatToMetadata(myStereoFormat);
230
+
231
+ std::vector<StRemuxContext> aSrcCtxList;
232
+ //StArrayList<StRemuxContext> aSrcCtxList;
233
+ unsigned int aStreamCount = 0;
234
+
235
+ StAVOutContext aCtxOut;
236
+ if(!aCtxOut.findFormat(NULL, theFile.toCString())) {
237
+ signals.onError(StString("Unable to find a suitable output format for '") + theFile + "'.");
238
+ return false;
239
+ } else if(!aCtxOut.create(theFile)) {
240
+ signals.onError(StString("Could not create output context."));
241
+ return false;
242
+ }
243
+
244
+ for(size_t aCtxId = 0; aCtxId < myCtxListSrc.size(); ++aCtxId) {
245
+ StRemuxContext aCtxSrc;
246
+ aCtxSrc.Context = myCtxListSrc[aCtxId];
247
+ if(aCtxId == 0) {
248
+ av_dict_copy(&aCtxOut.Context->metadata, aCtxSrc.Context->metadata, AV_DICT_DONT_OVERWRITE);
249
+ av_dict_set(&aCtxOut.Context->metadata, "STEREO_MODE", aFormatStr, 0);
250
+ }
251
+ for(unsigned int aStreamId = 0; aStreamId < aCtxSrc.Context->nb_streams; ++aStreamId) {
252
+ aCtxSrc.Streams.add((unsigned int )-1);
253
+ AVStream* aStreamSrc = aCtxSrc.Context->streams[aStreamId];
254
+ if(aStreamSrc->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
255
+ if(addStream(aCtxOut.Context, aStreamSrc)) {
256
+ aCtxSrc.Streams[aStreamId] = aStreamCount++;
257
+ }
258
+ }
259
+ }
260
+ aSrcCtxList.push_back(aCtxSrc);
261
+ }
262
+
263
+ // add audio streams after video
264
+ for(size_t aCtxId = 0; aCtxId < myCtxListSrc.size(); ++aCtxId) {
265
+ StRemuxContext& aCtxSrc = aSrcCtxList[aCtxId];
266
+ for(unsigned int aStreamId = 0; aStreamId < aCtxSrc.Context->nb_streams; ++aStreamId) {
267
+ AVStream* aStreamSrc = aCtxSrc.Context->streams[aStreamId];
268
+ if(aStreamSrc->codec->codec_type == AVMEDIA_TYPE_AUDIO
269
+ && addStream(aCtxOut.Context, aStreamSrc)) {
270
+ aCtxSrc.Streams[aStreamId] = aStreamCount++;
271
+ }
272
+ }
273
+ }
274
+
275
+ // add other streams (subtitles) at the end
276
+ for(size_t aCtxId = 0; aCtxId < myCtxListSrc.size(); ++aCtxId) {
277
+ StRemuxContext& aCtxSrc = aSrcCtxList[aCtxId];
278
+ for(unsigned int aStreamId = 0; aStreamId < aCtxSrc.Context->nb_streams; ++aStreamId) {
279
+ AVStream* aStreamSrc = aCtxSrc.Context->streams[aStreamId];
280
+ if(aStreamSrc->codec->codec_type != AVMEDIA_TYPE_VIDEO
281
+ && aStreamSrc->codec->codec_type != AVMEDIA_TYPE_AUDIO
282
+ && addStream(aCtxOut.Context, aStreamSrc)) {
283
+ aCtxSrc.Streams[aStreamId] = aStreamCount++;
284
+ }
285
+ }
286
+ }
287
+
288
+ av_dump_format(aCtxOut.Context, 0, theFile.toCString(), 1);
289
+ if(!(aCtxOut.Context->oformat->flags & AVFMT_NOFILE)) {
290
+ const int aState = avio_open2(&aCtxOut.Context->pb, theFile.toCString(), AVIO_FLAG_WRITE, NULL, NULL);
291
+ if(aState < 0) {
292
+ signals.onError(StString("Could not open output file '") + theFile + "' (" + stAV::getAVErrorDescription(aState) + ")");
293
+ return false;
294
+ }
295
+ }
296
+
297
+ int aState = avformat_write_header(aCtxOut.Context, NULL);
298
+ if(aState < 0) {
299
+ signals.onError(StString("Error occurred when opening output file (") + stAV::getAVErrorDescription(aState) + ").");
300
+ return false;
301
+ }
302
+
303
+ AVPacket aPacket;
304
+ for(;;) {
305
+ size_t aNbEmpty = 0;
306
+ for(size_t aCtxId = 0; aCtxId < aSrcCtxList.size(); ++aCtxId) {
307
+ StRemuxContext& aCtxSrc = aSrcCtxList[aCtxId];
308
+ if(!aCtxSrc.State) {
309
+ ++aNbEmpty;
310
+ continue;
311
+ }
312
+
313
+ if(av_read_frame(aCtxSrc.Context, &aPacket) < 0) {
314
+ aCtxSrc.State = false;
315
+ ++aNbEmpty;
316
+ continue;
317
+ }
318
+
319
+ unsigned int aStreamOutIndex = aCtxSrc.Streams[aPacket.stream_index];
320
+ if(aStreamOutIndex == (unsigned int )-1) {
321
+ continue;
322
+ }
323
+
324
+ AVStream* aStreamIn = aCtxSrc.Context->streams[aPacket.stream_index];
325
+ AVStream* aStreamOut = aCtxOut.Context->streams[aStreamOutIndex];
326
+
327
+ #ifdef ST_LIBAV_FORK
328
+ const AVRounding aRoundParams = AV_ROUND_NEAR_INF;
329
+ #else
330
+ const AVRounding aRoundParams = AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
331
+ #endif
332
+ aPacket.pts = av_rescale_q_rnd(aPacket.pts, aStreamIn->time_base, aStreamOut->time_base, aRoundParams);
333
+ aPacket.dts = av_rescale_q_rnd(aPacket.dts, aStreamIn->time_base, aStreamOut->time_base, aRoundParams);
334
+ aPacket.duration = static_cast<int >(av_rescale_q(aPacket.duration, aStreamIn->time_base, aStreamOut->time_base));
335
+ aPacket.pos = -1;
336
+
337
+ aState = av_interleaved_write_frame(aCtxOut.Context, &aPacket);
338
+ if(aState < 0) {
339
+ signals.onError(StString("Error muxing packet (") + stAV::getAVErrorDescription(aState) + ").");
340
+ return false;
341
+ }
342
+ av_free_packet(&aPacket);
343
+ }
344
+ if(aNbEmpty == aSrcCtxList.size()) {
345
+ break;
346
+ }
347
+ }
348
+ av_write_trailer(aCtxOut.Context);
349
+ return true;
350
+}
351
sview-15_08.tar.gz/StShared/StConfigImpl.cpp -> sview-15_10.tar.gz/StShared/StConfigImpl.cpp
Changed
166
1
2
/**
3
- * Copyright © 2007-2014 Kirill Gavrilov
4
+ * Copyright © 2007-2015 Kirill Gavrilov
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
10
#include <StSettings/StSettings.h>
11
12
-/*#if defined(__ANDROID__)
13
-
14
-bool StSettings::load() { return true; }
15
-bool StSettings::save() { return false; }
16
-StSettings::StSettings(const StString& theSettingsSet) {}
17
-StSettings::~StSettings() {}
18
-bool StSettings::loadInt32 (const StString& ,
19
- int32_t& ) { return false; }
20
-bool StSettings::saveInt32 (const StString& ,
21
- const int32_t& ) { return false; }
22
-bool StSettings::loadString(const StString& ,
23
- StString& ) { return false; }
24
-bool StSettings::saveString(const StString& ,
25
- const StString& ) { return false; }
26
-
27
-#elif !defined(_WIN32) && !defined(__APPLE__)*/
28
#if !defined(_WIN32) && !defined(__APPLE__)
29
30
#include <StStrings/StLogger.h>
31
32
using namespace libconfig;
33
34
bool StSettings::load() {
35
- if(myIsLoaded) {
36
- return true;
37
+ if(myFullFileName.isEmpty()
38
+ || !StFileNode::isFileExists(myFullFileName)) {
39
+ myIsLoaded = false;
40
+ ST_DEBUG_LOG("StSettings, file " + myFullFileName + " does not exist");
41
+ return false;
42
}
43
44
try {
45
- myConfig->readFile(myFullFileName.toCString()); // load the configuration
46
+ myConfig->readFile(myFullFileName.toCString());
47
+ myIsLoaded = true;
48
+ return true;
49
} catch(...) {
50
- ST_DEBUG_LOG("StSettings, failed to parse " + myFullFileName);
51
+ //
52
+ }
53
+
54
+ // the only option to recover?
55
+ delete myConfig;
56
+ myConfig = new Config();
57
+ ST_ERROR_LOG("StSettings, failed to parse " + myFullFileName);
58
+ if(!StFileNode::removeFile(myFullFileName)) {
59
+ ST_ERROR_LOG("StSettings, file " + myFullFileName + " can not be removed");
60
return false;
61
}
62
- return true;
63
+ return false;
64
}
65
66
-bool StSettings::save() {
67
+bool StSettings::flush() {
68
+ if(!myToFlush) {
69
+ return true;
70
+ }
71
+
72
try {
73
myConfig->writeFile(myFullFileName.toCString());
74
} catch(...) {
75
ST_DEBUG_LOG("StSettings, failed write to " + myFullFileName);
76
return false;
77
}
78
+
79
+ myToFlush = false;
80
return true;
81
}
82
83
StSettings::StSettings(const StHandle<StResourceManager>& theResMgr,
84
const StString& theSettingsSet)
85
: myConfig(new Config()),
86
- myIsLoaded(false) {
87
+ myIsLoaded(false),
88
+ myToFlush(false) {
89
myFullFileName = theResMgr->getSettingsFolder() + theSettingsSet + ".cfg";
90
+ load();
91
}
92
93
StSettings::~StSettings() {
94
+ flush();
95
delete myConfig;
96
}
97
98
bool StSettings::loadInt32(const StString& theParamPath,
99
int32_t& theValue) {
100
- if(!load()) {
101
+ if(!myIsLoaded) {
102
return false;
103
}
104
try {
105
106
107
bool StSettings::saveInt32(const StString& theParamPath,
108
const int32_t& theValue) {
109
- bool isLoaded = load(); // try to load config firstly
110
try {
111
- if(!isLoaded || !myConfig->exists(theParamPath.toCString())) {
112
+ if(!myConfig->exists(theParamPath.toCString())) {
113
Setting& aRoot = myConfig->getRoot();
114
StString aParamGroup, aParamName;
115
if(groupName(theParamPath, aParamGroup, aParamName)) {
116
117
);*/
118
}
119
myConfig->lookup(theParamPath.toCString()) = theValue;
120
- save();
121
} catch(ParseException& ex) {
122
ST_DEBUG_LOG("StSettings, error on line " + ex.getLine() + ": " + ex.getError());
123
return false;
124
125
ST_DEBUG_LOG("StSettings[" + theParamPath + "], config exception!");
126
return false;
127
}
128
+ myToFlush = true;
129
return true;
130
}
131
132
bool StSettings::loadString(const StString& theParamPath,
133
StString& theValue) {
134
- if(!load()) {
135
+ if(!myIsLoaded) {
136
return false;
137
}
138
try {
139
140
141
bool StSettings::saveString(const StString& theParamPath,
142
const StString& theValue) {
143
- bool isLoaded = load(); // try to load config firstly
144
try {
145
- if(!isLoaded || !myConfig->exists(theParamPath.toCString())) {
146
+ if(!myConfig->exists(theParamPath.toCString())) {
147
Setting& aRoot = myConfig->getRoot();
148
StString aParamGroup, aParamName;
149
if(groupName(theParamPath, aParamGroup, aParamName)) {
150
151
);*/
152
}
153
myConfig->lookup(theParamPath.toCString()) = theValue.toCString();
154
- save();
155
} catch(ParseException& ex) {
156
ST_DEBUG_LOG("StSettings, error on line " + ex.getLine() + ": " + ex.getError());
157
return false;
158
159
ST_DEBUG_LOG("StSettings[" + theParamPath + "], config exception!");
160
return false;
161
}
162
+ myToFlush = true;
163
return true;
164
}
165
166
sview-15_08.tar.gz/StShared/StFileNode.cpp -> sview-15_10.tar.gz/StShared/StFileNode.cpp
Changed
11
1
2
}
3
}
4
5
- if(aLastSplit != thePath.getSize()) {
6
+ if(aLastSplit != size_t(-1)
7
+ && aLastSplit + 1 == thePath.getLength()) {
8
aLastSplit = aPreSplit;
9
}
10
if(aLastSplit == size_t(-1)) {
11
sview-15_08.tar.gz/StShared/StGLContext.cpp -> sview-15_10.tar.gz/StShared/StGLContext.cpp
Changed
90
1
2
#include <StStrings/StDictionary.h>
3
#include <StStrings/StLogger.h>
4
5
+#include <StTemplates/StQuaternion.h>
6
+
7
#include <stAssert.h>
8
9
#if defined(__APPLE__)
10
11
arbTexRG(false),
12
arbTexClear(false),
13
#if defined(GL_ES_VERSION_2_0)
14
+ hasUnpack(false),
15
hasHighp(false),
16
hasTexRGBA8(false),
17
extTexBGRA8(false),
18
#else
19
+ hasUnpack(true),
20
hasHighp(true),
21
hasTexRGBA8(true), // always available on desktop
22
extTexBGRA8(true),
23
24
arbTexRG(false),
25
arbTexClear(false),
26
#if defined(GL_ES_VERSION_2_0)
27
+ hasUnpack(false),
28
hasHighp(false),
29
hasTexRGBA8(false),
30
extTexBGRA8(false),
31
#else
32
+ hasUnpack(true), // always available on desktop
33
hasHighp(true),
34
- hasTexRGBA8(true), // always available on desktop
35
+ hasTexRGBA8(true),
36
extTexBGRA8(true),
37
#endif
38
extAll(NULL),
39
40
StString() + (aDedicatedFree / 1024) + " MiB (from " + (aDedicated / 1024) + " MiB)"));
41
}
42
#endif
43
+
44
+#if !defined(GL_ES_VERSION_2_0) && !defined(__APPLE__) && !defined(_WIN32)
45
+ // GLX_RENDERER_VENDOR_ID_MESA
46
+ if(myFuncs->glXQueryCurrentRendererIntegerMESA != NULL) {
47
+ unsigned int aVMemMiB = 0;
48
+ if(myFuncs->glXQueryCurrentRendererIntegerMESA(GLX_RENDERER_VIDEO_MEMORY_MESA, &aVMemMiB) != False) {
49
+ theMap.add(StDictEntry("GPU memory", StString() + aVMemMiB + " MiB"));
50
+ }
51
+ }
52
+#endif
53
}
54
55
void StGLContext::stglSyncState() {
56
57
if(stglCheckExtension(aGlxExts, "GLX_SGI_swap_control")) {
58
STGL_READ_FUNC(glXSwapIntervalSGI);
59
}
60
+ if(stglCheckExtension(aGlxExts, "GLX_MESA_query_renderer")) {
61
+ STGL_READ_FUNC(glXQueryRendererIntegerMESA);
62
+ STGL_READ_FUNC(glXQueryCurrentRendererIntegerMESA);
63
+ STGL_READ_FUNC(glXQueryRendererStringMESA);
64
+ STGL_READ_FUNC(glXQueryCurrentRendererStringMESA);
65
+ }
66
extSwapTear = stglCheckExtension(aGlxExts, "GLX_EXT_swap_control_tear");
67
#endif
68
69
70
|| stglCheckExtension("GL_EXT_texture_rg");
71
const bool hasFBO = isGlGreaterEqual(2, 0)
72
|| stglCheckExtension("GL_OES_framebuffer_object");
73
+ hasUnpack = isGlGreaterEqual(3, 0);
74
75
if(isGlGreaterEqual(2, 0)) {
76
// enable compatible functions
77
78
79
return true;
80
}
81
+
82
+template class StVec2<float>;
83
+template class StVec2<double>;
84
+template class StVec3<float>;
85
+template class StVec3<double>;
86
+template class StVec4<float>;
87
+template class StVec4<double>;
88
+template class StQuaternion<float>;
89
+template class StQuaternion<double>;
90
sview-15_08.tar.gz/StShared/StGLMatrix.cpp -> sview-15_10.tar.gz/StShared/StGLMatrix.cpp
Changed
47
1
2
/**
3
- * Copyright © 2010-2011 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
0.0f, 0.0f, 1.0f, 0.0f,
10
0.0f, 0.0f, 0.0f, 1.0f
11
};
12
-};
13
+}
14
15
StGLMatrix::StGLMatrix() {
16
initIdentity();
17
18
return *this;
19
}
20
21
+StGLMatrix::StGLMatrix(const StGLQuaternion& theQ) {
22
+ initIdentity();
23
+
24
+ float wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2;
25
+ float s = 2.0f / theQ.vec4().squareModulus();
26
+ x2 = theQ.x() * s; y2 = theQ.y() * s; z2 = theQ.z() * s;
27
+ xx = theQ.x() * x2; xy = theQ.x() * y2; xz = theQ.x() * z2;
28
+ yy = theQ.y() * y2; yz = theQ.y() * z2; zz = theQ.z() * z2;
29
+ wx = theQ.w() * x2; wy = theQ.w() * y2; wz = theQ.w() * z2;
30
+
31
+ changeValue(0, 0) = 1.0f - (yy + zz);
32
+ changeValue(0, 1) = xy - wz;
33
+ changeValue(0, 2) = xz + wy;
34
+
35
+ changeValue(1, 0) = xy + wz;
36
+ changeValue(1, 1) = 1.0f - (xx + zz);
37
+ changeValue(1, 2) = yz - wx;
38
+
39
+ changeValue(2, 0) = xz - wy;
40
+ changeValue(2, 1) = yz + wx;
41
+ changeValue(2, 2) = 1.0f - (xx + yy);
42
+}
43
+
44
StGLMatrix::~StGLMatrix() {
45
//
46
}
47
sview-15_08.tar.gz/StShared/StGLTexture.cpp -> sview-15_10.tar.gz/StShared/StGLTexture.cpp
Changed
71
1
2
theCtx.core20fwd->glPixelStorei(GL_UNPACK_ALIGNMENT, GLint(anAligment));
3
4
bool toBatchCopy = theData.getSizeX() <= size_t(getSizeX())
5
- && theBatchRows > 1;
6
+ && theBatchRows != 1;
7
8
size_t anExtraBytes = theData.getRowExtraBytes();
9
size_t aPixelsWidth = theData.getSizeRowBytes() / theData.getSizePixelBytes();
10
11
toBatchCopy = false;
12
}
13
14
-#if defined(GL_ES_VERSION_2_0)
15
- if(anExtraBytes >= anAligment) {
16
+ if(!theCtx.hasUnpack
17
+ && anExtraBytes >= anAligment) {
18
toBatchCopy = false;
19
}
20
-#endif
21
+
22
if(toBatchCopy) {
23
- #if !defined(GL_ES_VERSION_2_0)
24
- // notice that GL_UNPACK_ROW_LENGTH is not available on OpenGL ES 2.0 without GL_EXT_unpack_subimage extension!
25
- theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, GLint(aPixelsWidth));
26
- #endif
27
+ if(theCtx.hasUnpack) {
28
+ theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, GLint(aPixelsWidth));
29
+ }
30
31
// do batch copy (more effective)
32
GLsizei aPatchWidth = GLsizei(theData.getSizeX());
33
- GLsizei aBatchRows = theBatchRows;
34
- for(GLsizei aRow(theRowFrom), aRowsRemain(aRowTo); aRow < aRowTo; aRow += theBatchRows) {
35
+ GLsizei aBatchRows = theBatchRows >= 1 ? theBatchRows : (aRowTo - theRowFrom);
36
+ GLsizei aNbRows = aBatchRows;
37
+ for(GLsizei aRow(theRowFrom), aRowsRemain(aRowTo); aRow < aRowTo; aRow += aBatchRows) {
38
aRowsRemain = aRowTo - aRow;
39
- if(aRowsRemain < aBatchRows) {
40
- aBatchRows = aRowsRemain;
41
+ if(aNbRows > aRowsRemain) {
42
+ aNbRows = aRowsRemain;
43
}
44
45
theCtx.core20fwd->glTexSubImage2D(theTarget, 0, // 0 = LOD number
46
0, aRow, // a texel offset in the (x, y) direction
47
- aPatchWidth, aBatchRows,
48
+ aPatchWidth, aNbRows,
49
aPixelFormat, // format of the pixel data
50
aDataType, // data type of the pixel data
51
theData.getData(aRow, 0));
52
}
53
54
- #if !defined(GL_ES_VERSION_2_0)
55
- theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
56
- #endif
57
+ if(theCtx.hasUnpack) {
58
+ theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
59
+ }
60
} else {
61
// copy row by row copy (the image plane greater than texture or batch copy is impossible)
62
- #if !defined(GL_ES_VERSION_2_0)
63
- theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
64
- #endif
65
+ if(theCtx.hasUnpack) {
66
+ theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
67
+ }
68
69
GLsizei aPatchWidth = stMin(GLsizei(theData.getSizeX()), getSizeX());
70
for(GLsizei aRow = theRowFrom; aRow < aRowTo; ++aRow) {
71
sview-15_08.tar.gz/StShared/StGLTextureData.cpp -> sview-15_10.tar.gz/StShared/StGLTextureData.cpp
Changed
101
1
2
return aBufferSize;
3
}
4
5
+/**
6
+ * Determine packed cubemap format (6:1 or 3:2).
7
+ */
8
+inline bool checkCubeMap(const StImagePlane& thePlane,
9
+ size_t& theCoeffX,
10
+ size_t& theCoeffY) {
11
+ if(thePlane.isNull()) {
12
+ return true;
13
+ }
14
+
15
+ if(theCoeffX == 0) {
16
+ if(thePlane.getSizeX() / 6 == thePlane.getSizeY()) {
17
+ theCoeffX = 6;
18
+ theCoeffY = 1;
19
+ return true;
20
+ } else if(thePlane.getSizeX() / 3 == thePlane.getSizeY() / 2) {
21
+ theCoeffX = 3;
22
+ theCoeffY = 2;
23
+ return true;
24
+ }
25
+ return false;
26
+ }
27
+ return thePlane.getSizeX() / theCoeffX == thePlane.getSizeY() / theCoeffY;
28
+}
29
+
30
void StGLTextureData::updateData(const StImage& theDataL,
31
const StImage& theDataR,
32
const StHandle<StStereoParams>& theStParams,
33
34
}
35
}
36
if(myCubemapFormat == StCubemap_Packed) {
37
+ size_t aCoeffs[2] = {0, 0};
38
if(!myDataL.isNull()) {
39
for(size_t aPlaneId = 0; aPlaneId < 4; ++aPlaneId) {
40
const StImagePlane& aPlane = myDataL.getPlane(aPlaneId);
41
- if(aPlane.getSizeX() / 6 != aPlane.getSizeY()) {
42
+ if(!checkCubeMap(aPlane, aCoeffs[0], aCoeffs[1])) {
43
myCubemapFormat = StCubemap_OFF;
44
break;
45
}
46
47
if(!myDataR.isNull()) {
48
for(size_t aPlaneId = 0; aPlaneId < 4; ++aPlaneId) {
49
const StImagePlane& aPlane = myDataR.getPlane(aPlaneId);
50
- if(aPlane.getSizeX() / 6 != aPlane.getSizeY()) {
51
+ if(!checkCubeMap(aPlane, aCoeffs[0], aCoeffs[1])) {
52
myCubemapFormat = StCubemap_OFF;
53
break;
54
}
55
56
return;
57
}
58
59
- size_t aPatchX = theData.getSizeX() / 6;
60
- if(aPatchX < 2) {
61
+ size_t aCoeffs[2] = {0, 0};
62
+ if(!checkCubeMap(theData, aCoeffs[0], aCoeffs[1])) {
63
+ return;
64
+ }
65
+
66
+ const size_t aPatch = theData.getSizeX() / aCoeffs[0];
67
+ if(aPatch < 2) {
68
return;
69
}
70
71
72
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z };
73
for(size_t aTargetIter = 0; aTargetIter < 6; ++aTargetIter) {
74
StImagePlane aPlane;
75
- if(!aPlane.initWrapper(theData.getFormat(), const_cast<GLubyte* >(theData.getData(0, aPatchX * aTargetIter)),
76
- aPatchX, theData.getSizeY(), theData.getSizeRowBytes())) {
77
+ const bool isSecondRow = (aCoeffs[1] == 2 && aTargetIter >= 3);
78
+ const size_t aLeft = isSecondRow ? (aPatch * (aTargetIter - 3)) : (aPatch * aTargetIter);
79
+ const size_t aTop = isSecondRow ? aPatch : 0;
80
+ if(!aPlane.initWrapper(theData.getFormat(), const_cast<GLubyte* >(theData.getData(aTop, aLeft)),
81
+ aPatch, aPatch, theData.getSizeRowBytes())) {
82
ST_DEBUG_LOG("StGLTextureData::fillTexture(). wrapping failure");
83
continue;
84
}
85
86
GLsizei aSizeX = (GLsizei )anImgPlane.getSizeX();
87
GLsizei aSizeY = (GLsizei )anImgPlane.getSizeY();
88
if(theCubemap == StCubemap_Packed) {
89
+ size_t aCoeffs[2] = {0, 0};
90
+ if(!checkCubeMap(anImgPlane, aCoeffs[0], aCoeffs[1])) {
91
+ aTexture.release(theCtx);
92
+ continue;
93
+ }
94
aTarget = GL_TEXTURE_CUBE_MAP;
95
- aSizeX = aSizeX / 6;
96
+ aSizeX = aSizeX / GLsizei(aCoeffs[0]);
97
+ aSizeY = aSizeY / GLsizei(aCoeffs[1]);
98
}
99
if(aSizeX < 1) {
100
aTexture.release(theCtx);
101
sview-15_08.tar.gz/StShared/StPListImpl.mm -> sview-15_10.tar.gz/StShared/StPListImpl.mm
Changed
64
1
2
/**
3
- * Copyright © 2011-2014 Kirill Gavrilov
4
+ * Copyright © 2011-2015 Kirill Gavrilov
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
return true;
10
}
11
12
-bool StSettings::save() {
13
+bool StSettings::flush() {
14
+ if(!myToFlush) {
15
+ return true;
16
+ }
17
+
18
StCocoaLocalPool aLocalPool;
19
StCocoaString aPath(myFilePath);
20
if([myDict writeToFile: aPath.toStringNs() atomically: NO] == NO) {
21
ST_DEBUG_LOG("StConfig, failed write to " + myFilePath);
22
return false;
23
}
24
+
25
+ myToFlush = false;
26
return true;
27
}
28
29
StSettings::StSettings(const StHandle<StResourceManager>& theResMgr,
30
const StString& theSettingsSet)
31
-: myDict(NULL){
32
+: myDict(NULL),
33
+ myToFlush(false) {
34
myFilePath = theResMgr->getSettingsFolder() + theSettingsSet + ".plist";
35
load();
36
}
37
38
StSettings::~StSettings() {
39
- save();
40
+ flush();
41
[myDict release];
42
}
43
44
45
NSNumber* aNumber = [[NSNumber alloc] initWithInt: theValue];
46
[myDict setObject: aNumber forKey: aPath.toStringNs()];
47
[aNumber release];
48
- return save();
49
+ myToFlush = true;
50
+ return true;
51
}
52
53
bool StSettings::loadString(const StString& theParamPath,
54
55
StCocoaString aPath(theParamPath);
56
StCocoaString aValue(theValue);
57
[myDict setObject: aValue.toStringNs() forKey: aPath.toStringNs()];
58
- return save();
59
+ myToFlush = true;
60
+ return true;
61
}
62
63
#endif // __APPLE__
64
sview-15_08.tar.gz/StShared/StPlayList.cpp -> sview-15_10.tar.gz/StShared/StPlayList.cpp
Changed
27
1
2
myLast(NULL),
3
myCurrent(NULL),
4
myItemsCount(0),
5
- myDefStParams(StStereoParams::FLAT_IMAGE),
6
+ myDefStParams(),
7
myPlayedCount(0),
8
myRecursionDeep(theRecursionDeep),
9
myIsShuffle(false),
10
11
}
12
}
13
14
+void StPlayList::currentToRecent() {
15
+ StMutexAuto anAutoLock(myMutex);
16
+ if( myCurrent == NULL
17
+ || !myPlsFile.isNull()) {
18
+ return;
19
+ }
20
+
21
+ addRecentFile(*myCurrent->getFileNode());
22
+}
23
+
24
const StHandle<StPlayList::StRecentItem>& StPlayList::addRecentFile(const StFileNode& theFile,
25
const bool theToFront) {
26
// remove duplicates
27
sview-15_08.tar.gz/StShared/StRegisterImpl.cpp -> sview-15_10.tar.gz/StShared/StRegisterImpl.cpp
Changed
33
1
2
/**
3
- * Copyright © 2007-2014 Kirill Gavrilov
4
+ * Copyright © 2007-2015 Kirill Gavrilov
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
StSettings::StSettings(const StHandle<StResourceManager>& /*theResMgr*/,
10
const StString& theSettingsSet)
11
: mySettingsSet(theSettingsSet.toUtfWide()),
12
- myRegisterPath(StStringUtfWide("SOFTWARE\\sView\\") + theSettingsSet.toUtfWide()) {
13
+ myRegisterPath(StStringUtfWide("SOFTWARE\\sView\\") + theSettingsSet.toUtfWide()),
14
+ myToFlush(false) {
15
//
16
}
17
18
19
//
20
}
21
22
+bool StSettings::load() {
23
+ return true; // has no effect
24
+}
25
+
26
+bool StSettings::flush() {
27
+ return true; // has no effect
28
+}
29
+
30
bool StSettings::loadInt32(const StString& theParam,
31
int32_t& theValue) {
32
StRegKey aKey;
33
sview-15_08.tar.gz/StShared/StResourceManager.cpp -> sview-15_10.tar.gz/StShared/StResourceManager.cpp
Changed
79
1
2
/**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
const GUID THE_FOLDER_APPROA = { 0x3EB685DB, 0x65F9, 0x4CF6, {0xA0, 0x3A, 0xE3, 0xEF, 0x65, 0x72, 0x9F, 0x3D} }; // FOLDERID_RoamingAppData
10
const GUID THE_FOLDER_DOCS = { 0xFDD39AD0, 0x238F, 0x46AF, {0xAD, 0xB4, 0x6C, 0x85, 0x48, 0x03, 0x69, 0xC7} }; // FOLDERID_Documents
11
12
+ const GUID THE_FOLDER_DOWN = { 0x374DE290, 0x123F, 0x4565, {0x91, 0x64, 0x39, 0xC4, 0x92, 0x5E, 0x46, 0x7B} }; // FOLDERID_Downloads
13
+ const GUID THE_FOLDER_PICS = { 0x33E28130, 0x4E1E, 0x4676, {0x83, 0x5A, 0x98, 0x39, 0x5C, 0x3B, 0xC3, 0xBB} }; // FOLDERID_Pictures
14
+ const GUID THE_FOLDER_MUSIC = { 0x4BD8D571, 0x6D19, 0x48D3, {0xBE, 0x97, 0x42, 0x22, 0x20, 0x08, 0x0E, 0x43} }; // FOLDERID_Music
15
+ const GUID THE_FOLDER_VIDS = { 0x18989B1D, 0x99B5, 0x455B, {0x84, 0x1C, 0xAB, 0x7C, 0x74, 0xE4, 0xDD, 0xFC} }; // FOLDERID_Videos
16
+
17
if(aGetFolder(&THE_FOLDER_APPLOC, 0, NULL, &aPath) == S_OK) {
18
anAppDataLocal.fromUnicode(aPath);
19
::CoTaskMemFree(aPath);
20
21
myUserHomeFolder += "\\";
22
::CoTaskMemFree(aPath);
23
}
24
+
25
+ if(aGetFolder(&THE_FOLDER_DOWN, 0, NULL, &aPath) == S_OK) {
26
+ myFolders[FolderId_Downloads].fromUnicode(aPath);
27
+ ::CoTaskMemFree(aPath);
28
+ }
29
+ if(aGetFolder(&THE_FOLDER_PICS, 0, NULL, &aPath) == S_OK) {
30
+ myFolders[FolderId_Pictures].fromUnicode(aPath);
31
+ ::CoTaskMemFree(aPath);
32
+ }
33
+ if(aGetFolder(&THE_FOLDER_MUSIC, 0, NULL, &aPath) == S_OK) {
34
+ myFolders[FolderId_Music].fromUnicode(aPath);
35
+ ::CoTaskMemFree(aPath);
36
+ }
37
+ if(aGetFolder(&THE_FOLDER_VIDS, 0, NULL, &aPath) == S_OK) {
38
+ myFolders[FolderId_Videos].fromUnicode(aPath);
39
+ ::CoTaskMemFree(aPath);
40
+ }
41
} else {
42
wchar_t aPath[MAX_PATH];
43
if(::SHGetFolderPathW(NULL, CSIDL_FLAG_CREATE | CSIDL_LOCAL_APPDATA, NULL, 0, aPath) == S_OK) {
44
45
myUserDataFolder = myUserHomeFolder + "Library/Application Support/" + myAppName + "/";
46
mySettingsFolder = myUserHomeFolder + "Library/Preferences/" + myAppName + "/";
47
myCacheFolder = myUserHomeFolder + "Library/Caches/" + myAppName + "/";
48
+
49
+ myFolders[FolderId_Downloads] = myUserHomeFolder + "Downloads";
50
+ myFolders[FolderId_Pictures] = myUserHomeFolder + "Pictures";
51
+ myFolders[FolderId_Music] = myUserHomeFolder + "Music";
52
+ myFolders[FolderId_Videos] = myUserHomeFolder + "Movies";
53
+
54
// make sure parent paths are also exist (on broken home)
55
StFolder::createFolder(myUserHomeFolder + "Library");
56
StFolder::createFolder(myUserHomeFolder + "Library/Application Support");
57
58
myUserDataFolder = myUserHomeFolder + ".local/share/" + myAppName + "/";
59
mySettingsFolder = myUserHomeFolder + ".config/" + myAppName + "/";
60
myCacheFolder = myUserHomeFolder + ".cache/" + myAppName + "/";
61
+
62
+ myFolders[FolderId_Downloads] = myUserHomeFolder + "Downloads";
63
+ myFolders[FolderId_Pictures] = myUserHomeFolder + "Pictures";
64
+ myFolders[FolderId_Music] = myUserHomeFolder + "Music";
65
+ myFolders[FolderId_Videos] = myUserHomeFolder + "Videos";
66
+
67
// make sure parent paths are also exist (on broken home)
68
StFolder::createFolder(myUserHomeFolder + ".local");
69
StFolder::createFolder(myUserHomeFolder + ".local/share");
70
71
myLang = "ko";
72
} else if(aSysLoc.isStartsWith(stCString("chinese"))) {
73
myLang = "zh";
74
+ } else if(aSysLoc.isStartsWith(stCString("czech"))) {
75
+ myLang = "cs";
76
}
77
#endif
78
}
79
sview-15_08.tar.gz/StShared/StShared.cbp -> sview-15_10.tar.gz/StShared/StShared.cbp
Changed
17
1
2
<Unit filename="StAVFrame.cpp" />
3
<Unit filename="StAVImage.cpp" />
4
<Unit filename="StAVPacket.cpp" />
5
+ <Unit filename="StAVVideoMuxer.cpp" />
6
<Unit filename="StAction.cpp" />
7
<Unit filename="StBndBox.cpp" />
8
<Unit filename="StBndCameraBox.cpp" />
9
10
<Unit filename="../include/StAV/StAVFrame.h" />
11
<Unit filename="../include/StAV/StAVImage.h" />
12
<Unit filename="../include/StAV/StAVPacket.h" />
13
+ <Unit filename="../include/StAV/StAVVideoMuxer.h" />
14
<Unit filename="../include/StAV/stAV.h" />
15
<Unit filename="../include/StAlienData.h" />
16
<Unit filename="../include/StCocoa/StCocoaCoords.h">
17
sview-15_08.tar.gz/StShared/StShared.vcxproj -> sview-15_10.tar.gz/StShared/StShared.vcxproj
Changed
9
1
2
<ClCompile Include="StAVFrame.cpp" />
3
<ClCompile Include="StAVImage.cpp" />
4
<ClCompile Include="StAVPacket.cpp" />
5
+ <ClCompile Include="StAVVideoMuxer.cpp" />
6
<ClCompile Include="StAction.cpp" />
7
<ClCompile Include="StBndBox.cpp" />
8
<ClCompile Include="StBndCameraBox.cpp" />
9
sview-15_08.tar.gz/StShared/StTranslations.cpp -> sview-15_10.tar.gz/StShared/StTranslations.cpp
Changed
33
1
2
params.language->changeValues().add("한국어");
3
myLangFolderList.add("Korean");
4
}
5
+ if(myResMgr->isResourceExist(StString("lang" ST_FILE_SPLITTER "Czech" ST_FILE_SPLITTER) + myModuleName + StTranslations::DEFAULT_SUFFIX)) {
6
+ params.language->changeValues().add("Čeština");
7
+ myLangFolderList.add("Czech");
8
+ }
9
}
10
#endif
11
12
13
params.language->setValue(int32_t(anIdInList));
14
isLangSet = true;
15
}
16
+ } else if(aLang.isEqualsIgnoreCase(stCString("cs"))) {
17
+ if(myLangFolderList.contains(stCString("Čeština"), anIdInList)) {
18
+ params.language->setValue(int32_t(anIdInList));
19
+ isLangSet = true;
20
+ }
21
}
22
}
23
if(!isLangSet) {
24
25
myLangCode = "kor";
26
} else if(aLang == stCString("简体中文")) {
27
myLangCode = "chi";
28
+ } else if(aLang == stCString("Čeština")) {
29
+ myLangCode = "cze";
30
} else if(aLang == stCString("English")) {
31
myLangCode = "eng";
32
} else {
33
sview-15_08.tar.gz/copy_res.bat -> sview-15_10.tar.gz/copy_res.bat
Changed
17
1
2
if not exist "%TARGET_OUTPUT_DIR%lang\Deutsch" mkdir "%TARGET_OUTPUT_DIR%lang\Deutsch"
3
if not exist "%TARGET_OUTPUT_DIR%lang\ChineseS" mkdir "%TARGET_OUTPUT_DIR%lang\ChineseS"
4
if not exist "%TARGET_OUTPUT_DIR%lang\Korean" mkdir "%TARGET_OUTPUT_DIR%lang\Korean"
5
+if not exist "%TARGET_OUTPUT_DIR%lang\Czech" mkdir "%TARGET_OUTPUT_DIR%lang\Czech"
6
7
copy /Y lang\english\* "%TARGET_OUTPUT_DIR%lang\English\"
8
copy /Y lang\russian\* "%TARGET_OUTPUT_DIR%lang\русский\"
9
10
copy /Y lang\german\* "%TARGET_OUTPUT_DIR%lang\Deutsch\"
11
copy /Y lang\chinese\* "%TARGET_OUTPUT_DIR%lang\ChineseS\"
12
copy /Y lang\korean\* "%TARGET_OUTPUT_DIR%lang\Korean\"
13
+copy /Y lang\czech\* "%TARGET_OUTPUT_DIR%lang\Czech\"
14
15
if exist "shaders" (
16
if not exist "%TARGET_OUTPUT_DIR%shaders\%TARGET_OUTPUT_BASENAME%" mkdir "%TARGET_OUTPUT_DIR%shaders\%TARGET_OUTPUT_BASENAME%"
17
sview-15_08.tar.gz/copy_res.sh -> sview-15_10.tar.gz/copy_res.sh
Changed
16
1
2
mkdir -p "${TARGET_OUTPUT_DIR}lang/Deutsch/"
3
mkdir -p "${TARGET_OUTPUT_DIR}lang/ChineseS/"
4
mkdir -p "${TARGET_OUTPUT_DIR}lang/Korean/"
5
+mkdir -p "${TARGET_OUTPUT_DIR}lang/Czech/"
6
cp -f -r lang/english/* "${TARGET_OUTPUT_DIR}lang/English/"
7
cp -f -r lang/russian/* "${TARGET_OUTPUT_DIR}lang/русский/"
8
cp -f -r lang/french/* "${TARGET_OUTPUT_DIR}lang/français/"
9
cp -f -r lang/german/* "${TARGET_OUTPUT_DIR}lang/Deutsch/"
10
cp -f -r lang/chinese/* "${TARGET_OUTPUT_DIR}lang/ChineseS/"
11
cp -f -r lang/korean/* "${TARGET_OUTPUT_DIR}lang/Korean/"
12
+cp -f -r lang/czech/* "${TARGET_OUTPUT_DIR}lang/Czech/"
13
14
if [ -d "shaders" ]; then
15
mkdir -p "${TARGET_OUTPUT_DIR}shaders/${PROJECT_NAME}"
16
sview-15_08.tar.gz/debian/changelog.tmpl -> sview-15_10.tar.gz/debian/changelog.tmpl
Changed
19
1
2
3
-- Kirill Gavrilov <kirill@sview.ru> unknown_date
4
5
+sview (unknown_version) unknown_distrib; urgency=low
6
+
7
+ + Support reading cubemaps in format 3:2 (two rows per 3 quad sides).
8
+ + Add panorama icon to toolbar.
9
+ + Add Czech translation files.
10
+ * Improve handling of recent files when file has been selected within automatically generated playlist.
11
+ * Add option to automatically workaround aspect ratio of anamorphic videos (turned on by default).
12
+ * Improve settings processing on Linux and Android - eliminate redundant file store/restore operations and add recovery for broken files.
13
+
14
+ -- Kirill Gavrilov <kirill@sview.ru> Sun, 04 Oct 2015 19:52:13 +0300
15
+
16
sview (15.08-1~unknown_distrib) unknown_distrib; urgency=low
17
18
+ Support Cubemap images (6 sides of the cube stacked horizontally).
19
sview-15_08.tar.gz/distribution/build.bat -> sview-15_10.tar.gz/distribution/build.bat
Changed
40
1
2
if exist "%~dp0env.bat" call "%~dp0env.bat"
3
4
set YEAR=%date:~-2,4%
5
+set MONTH00=%date:~-7,2%
6
set MONTH=%date:~-7,2%
7
set DAY=%date:~0,2%
8
9
10
echo #define SVIEW_SDK_VERSION ^%YEAR%^, ^%MONTH%^, ^%SVIEW_VER_TYPE_NUM%^, ^%DAY%>> "%SVIEW_BUILD_CONF%"
11
echo #endif>> "%SVIEW_BUILD_CONF%"
12
13
-echo Version String="%YEAR%.%MONTH%%SVIEW_VER_TYPE%%DAY%"
14
+echo Version String="%YEAR%.%MONTH00%%SVIEW_VER_TYPE%%DAY%"
15
echo #ifndef SVIEW_SDK_VER_STRING>> "%SVIEW_BUILD_CONF%"
16
-echo #define SVIEW_SDK_VER_STRING "%YEAR%.%MONTH%%SVIEW_VER_TYPE%%DAY%">> "%SVIEW_BUILD_CONF%"
17
+echo #define SVIEW_SDK_VER_STRING "%YEAR%.%MONTH00%%SVIEW_VER_TYPE%%DAY%">> "%SVIEW_BUILD_CONF%"
18
echo #endif>> "%SVIEW_BUILD_CONF%"
19
20
rem Activate experimental WebP support
21
22
23
rem Create configuration for InnoSetup build script
24
echo #define SVIEW_VER "%YEAR%.%MONTH%.%SVIEW_VER_TYPE_NUM%.%DAY%"> config.iss
25
-echo #define SVIEW_VER_FULL "v.%YEAR%.%MONTH%%SVIEW_VER_TYPE%%DAY%">> config.iss
26
-echo #define SVIEW_VER_NAME "sView (version %YEAR%.%MONTH%%SVIEW_VER_TYPE%%DAY%)">> config.iss
27
+echo #define SVIEW_VER_FULL "v.%YEAR%.%MONTH00%%SVIEW_VER_TYPE%%DAY%">> config.iss
28
+echo #define SVIEW_VER_NAME "sView (version %YEAR%.%MONTH00%%SVIEW_VER_TYPE%%DAY%)">> config.iss
29
echo #define SVIEW_DISTR_PATH_x86 "%SVIEW_DISTR_PATH_X86%">> config.iss
30
echo #define SVIEW_DISTR_PATH_AMD64 "%SVIEW_DISTR_PATH_AMD64%">> config.iss
31
32
33
34
rem shared resources
35
xcopy /Y ..\share\sView\demo\demo.jps %SVIEW_DISTR_PATH_X86%\
36
+xcopy /Y ..\share\sView\demo\demo_robot.jps %SVIEW_DISTR_PATH_X86%\
37
xcopy /S /Y ..\bin\WIN_vc_x86\lang\* %SVIEW_DISTR_PATH_X86%\lang\
38
xcopy /S /Y ..\bin\WIN_vc_x86\shaders\* %SVIEW_DISTR_PATH_X86%\shaders\
39
xcopy /Y ..\bin\WIN_vc_x86\textures\* %SVIEW_DISTR_PATH_X86%\textures\
40
sview-15_08.tar.gz/distribution/build.iss -> sview-15_10.tar.gz/distribution/build.iss
Changed
66
1
2
-
3
+•
4
#include "temp\config.iss"
5
6
; Should be defined in config file
7
8
Source: {#SVIEW_DISTR_PATH_x86}\shaders\StGLWidgets\*; DestDir: {app}\shaders\StGLWidgets; Flags: 32bit ignoreversion; Components: StCore
9
Source: {#SVIEW_DISTR_PATH_x86}\lang\Korean\language.lng; DestDir: {app}\lang\Korean; Flags: 32bit ignoreversion; Components: StCore
10
Source: {#SVIEW_DISTR_PATH_x86}\lang\ChineseS\language.lng; DestDir: {app}\lang\ChineseS; Flags: 32bit ignoreversion; Components: StCore
11
+Source: {#SVIEW_DISTR_PATH_x86}\lang\Czech\language.lng; DestDir: {app}\lang\Czech; Flags: 32bit ignoreversion; Components: StCore
12
; MSVC C-Runtime libraries (mask compatible for vc100)
13
Source: {#SVIEW_DISTR_PATH_x86}\msvc*.dll; DestDir: {app}; Flags: 32bit ignoreversion; Components: StCore
14
Source: {#SVIEW_DISTR_PATH_AMD64}\msvc*.dll; DestDir: {app}\amd64; Flags: 64bit ignoreversion; Components: StCore; Check: IsWin64
15
16
Source: {#SVIEW_DISTR_PATH_x86}\icons\sView_JPS.ico; DestDir: {app}\icons; Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
17
Source: {#SVIEW_DISTR_PATH_x86}\icons\sView_PNS.ico; DestDir: {app}\icons; Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
18
Source: {#SVIEW_DISTR_PATH_x86}\demo.jps; DestDir: {app}; Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
19
+Source: {#SVIEW_DISTR_PATH_x86}\demo_robot.jps; DestDir: {app}; Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
20
Source: {#SVIEW_DISTR_PATH_AMD64}\StImageViewer.dll; DestDir: {app}\amd64; Flags: 64bit ignoreversion; Components: StCore; Check: IsWin64
21
; FreeImage library (should be optional)
22
Source: {#SVIEW_DISTR_PATH_x86}\FreeImage.dll; DestDir: {app}; Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
23
24
25
Root: HKCR; SubKey: .bmp; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
26
Root: HKCR; SubKey: .jpg; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
27
+Root: HKCR; SubKey: .j2k; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
28
+Root: HKCR; SubKey: .jp2; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
29
Root: HKCR; SubKey: .tga; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
30
Root: HKCR; SubKey: .png; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
31
Root: HKCR; SubKey: .exr; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
32
Root: HKCR; SubKey: .hdr; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
33
Root: HKCR; SubKey: .webp; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
34
Root: HKCR; SubKey: .webpll; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
35
+Root: HKCR; SubKey: .tif; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
36
+Root: HKCR; SubKey: .tiff; ValueType: string; ValueData: sView Image; Tasks: flagAssocImages; Flags: uninsdeletekey
37
38
; Associations Video
39
Root: HKCR; SubKey: sView Video; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
40
41
Root: HKCR; SubKey: .webm; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
42
Root: HKCR; SubKey: .wmv; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
43
Root: HKCR; SubKey: .ts; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
44
+Root: HKCR; SubKey: .mts; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
45
+Root: HKCR; SubKey: .m2ts; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
46
+Root: HKCR; SubKey: .mt2s; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
47
+Root: HKCR; SubKey: .vob; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
48
+Root: HKCR; SubKey: .mp4; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
49
+Root: HKCR; SubKey: .mpg; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
50
+Root: HKCR; SubKey: .flv; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
51
+Root: HKCR; SubKey: .mov; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
52
+Root: HKCR; SubKey: .ogm; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
53
+Root: HKCR; SubKey: .bik; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
54
+Root: HKCR; SubKey: .mj2; ValueType: string; ValueData: sView Video; Tasks: flagAssocMovies; Flags: uninsdeletekey
55
56
; Associations Audio
57
Root: HKCR; SubKey: sView Audio; ValueType: string; ValueData: sView Audio; Tasks: flagAssocMusic; Flags: uninsdeletekey
58
59
Root: HKCR; SubKey: .wav; ValueType: string; ValueData: sView Audio; Tasks: flagAssocMusic; Flags: uninsdeletekey
60
Root: HKCR; SubKey: .flac; ValueType: string; ValueData: sView Audio; Tasks: flagAssocMusic; Flags: uninsdeletekey
61
Root: HKCR; SubKey: .ape; ValueType: string; ValueData: sView Audio; Tasks: flagAssocMusic; Flags: uninsdeletekey
62
+Root: HKCR; SubKey: .mka; ValueType: string; ValueData: sView Audio; Tasks: flagAssocMusic; Flags: uninsdeletekey
63
64
; StCoreXX environment variables
65
Root: HKLM32; SubKey: SYSTEM\CurrentControlSet\Control\Session Manager\Environment; ValueType: string; ValueName: StShare; ValueData: {app}\; Flags: uninsdeletevalue
66
sview-15_10.tar.gz/distribution/media/sView_Logo.svg
Added
748
1
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:xlink="http://www.w3.org/1999/xlink"
12
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
14
+ width="128"
15
+ height="128"
16
+ id="svg3214"
17
+ version="1.1"
18
+ inkscape:version="0.91 r13725"
19
+ sodipodi:docname="sView_Logo.svg"
20
+ inkscape:export-filename="sView_Logo.png"
21
+ inkscape:export-xdpi="720"
22
+ inkscape:export-ydpi="720">
23
+ <defs
24
+ id="defs3216">
25
+ <linearGradient
26
+ y2="20.731297"
27
+ x2="27.375"
28
+ y1="31.77206"
29
+ x1="28.029287"
30
+ gradientUnits="userSpaceOnUse"
31
+ id="linearGradient5820"
32
+ xlink:href="#linearGradient6234"
33
+ inkscape:collect="always" />
34
+ <filter
35
+ id="filter5737"
36
+ height="1.4385543"
37
+ y="-0.21927714"
38
+ width="1.3626142"
39
+ x="-0.18130708"
40
+ inkscape:collect="always"
41
+ style="color-interpolation-filters:sRGB">
42
+ <feGaussianBlur
43
+ id="feGaussianBlur5739"
44
+ stdDeviation="2.1813507"
45
+ inkscape:collect="always" />
46
+ </filter>
47
+ <filter
48
+ id="filter5729"
49
+ height="2.4825463"
50
+ y="-0.74127316"
51
+ width="1.3227895"
52
+ x="-0.16139475"
53
+ inkscape:collect="always"
54
+ style="color-interpolation-filters:sRGB">
55
+ <feGaussianBlur
56
+ id="feGaussianBlur5731"
57
+ stdDeviation="2.1813507"
58
+ inkscape:collect="always" />
59
+ </filter>
60
+ <linearGradient
61
+ inkscape:collect="always"
62
+ id="linearGradient6234">
63
+ <stop
64
+ style="stop-color:#ffffff;stop-opacity:1;"
65
+ offset="0"
66
+ id="stop6236" />
67
+ <stop
68
+ style="stop-color:#ffffff;stop-opacity:0;"
69
+ offset="1"
70
+ id="stop6238" />
71
+ </linearGradient>
72
+ <linearGradient
73
+ id="linearGradient4467-1">
74
+ <stop
75
+ id="stop4469-8"
76
+ style="stop-color:#ffffff;stop-opacity:1;"
77
+ offset="0" />
78
+ <stop
79
+ id="stop4471-9"
80
+ style="stop-color:#ffffff;stop-opacity:0.24761905;"
81
+ offset="1.0000000" />
82
+ </linearGradient>
83
+ <radialGradient
84
+ gradientTransform="matrix(0.617019,0,0,0.617019,9.054796,7.969543)"
85
+ cx="25.0527"
86
+ cy="39.5928"
87
+ gradientUnits="userSpaceOnUse"
88
+ fy="39.5928"
89
+ fx="25.0527"
90
+ id="aigrd2-2-3"
91
+ r="15.7572">
92
+ <stop
93
+ id="stop8602-3"
94
+ style="stop-color:#777777;stop-opacity:1.0000000;"
95
+ offset="0.0000000" />
96
+ <stop
97
+ id="stop8604-3"
98
+ style="stop-color:#000000"
99
+ offset="1" />
100
+ </radialGradient>
101
+ <linearGradient
102
+ id="linearGradient3290-6">
103
+ <stop
104
+ id="stop3292-0"
105
+ style="stop-color:#fffcde;stop-opacity:1.0000000;"
106
+ offset="0.0000000" />
107
+ <stop
108
+ id="stop3294-4"
109
+ style="stop-color:#f6e76a;stop-opacity:1.0000000;"
110
+ offset="0.64485979" />
111
+ <stop
112
+ id="stop3296-8"
113
+ style="stop-color:#ffb738;stop-opacity:1.0000000;"
114
+ offset="1.0000000" />
115
+ </linearGradient>
116
+ <linearGradient
117
+ inkscape:collect="always"
118
+ id="linearGradient4565-8">
119
+ <stop
120
+ id="stop4567-9"
121
+ style="stop-color:#000000;stop-opacity:1;"
122
+ offset="0" />
123
+ <stop
124
+ id="stop4569-7"
125
+ style="stop-color:#000000;stop-opacity:0;"
126
+ offset="1" />
127
+ </linearGradient>
128
+ <filter
129
+ inkscape:collect="always"
130
+ id="filter78486-7"
131
+ style="color-interpolation-filters:sRGB">
132
+ <feGaussianBlur
133
+ inkscape:collect="always"
134
+ id="feGaussianBlur78488-6"
135
+ stdDeviation="0.246274" />
136
+ </filter>
137
+ <filter
138
+ inkscape:collect="always"
139
+ id="filter78694-4"
140
+ style="color-interpolation-filters:sRGB">
141
+ <feGaussianBlur
142
+ inkscape:collect="always"
143
+ id="feGaussianBlur78696-3"
144
+ stdDeviation="0.84984893" />
145
+ </filter>
146
+ <filter
147
+ inkscape:collect="always"
148
+ height="1.2604995"
149
+ x="-0.046955407"
150
+ y="-0.13024975"
151
+ width="1.0939108"
152
+ id="filter78638-0"
153
+ style="color-interpolation-filters:sRGB">
154
+ <feGaussianBlur
155
+ inkscape:collect="always"
156
+ id="feGaussianBlur78640-3"
157
+ stdDeviation="1.1747766" />
158
+ </filter>
159
+ <filter
160
+ inkscape:collect="always"
161
+ id="filter78450-0"
162
+ style="color-interpolation-filters:sRGB">
163
+ <feGaussianBlur
164
+ inkscape:collect="always"
165
+ id="feGaussianBlur78452-9"
166
+ stdDeviation="0.39648414" />
167
+ </filter>
168
+ <radialGradient
169
+ gradientTransform="matrix(1.158233,-0.08160287,0.05119299,1.1715514,-36.462915,48.248828)"
170
+ cx="134.13086"
171
+ cy="81.594727"
172
+ gradientUnits="userSpaceOnUse"
173
+ fy="81.594727"
174
+ fx="134.13086"
175
+ id="XMLID_55_-5"
176
+ r="95.281982">
177
+ <stop
178
+ id="stop382-4"
179
+ style="stop-color:#0099ff;stop-opacity:1.0000000;"
180
+ offset="0.0056179999" />
181
+ <stop
182
+ id="stop384-0"
183
+ style="stop-color:#0066cc;stop-opacity:1.0000000;"
184
+ offset="0.39887601" />
185
+ <stop
186
+ id="stop386-5"
187
+ style="stop-color:#00008d;stop-opacity:1.0000000;"
188
+ offset="1.0000000" />
189
+ </radialGradient>
190
+ <radialGradient
191
+ gradientTransform="matrix(1.158233,-0.08160287,0.05119299,1.1715514,-36.462915,48.248828)"
192
+ cx="138.71191"
193
+ cy="128.80225"
194
+ gradientUnits="userSpaceOnUse"
195
+ fy="128.80225"
196
+ fx="138.71191"
197
+ id="XMLID_54_-4"
198
+ r="103.02309">
199
+ <stop
200
+ id="stop361-6"
201
+ style="stop-color:#3e9ade;stop-opacity:1.0000000;"
202
+ offset="0.0056179999" />
203
+ <stop
204
+ id="stop363-9"
205
+ style="stop-color:#0066cc;stop-opacity:1.0000000;"
206
+ offset="0.39887601" />
207
+ <stop
208
+ id="stop365-2"
209
+ style="stop-color:#00008d;stop-opacity:1.0000000;"
210
+ offset="1.0000000" />
211
+ </radialGradient>
212
+ <radialGradient
213
+ gradientTransform="matrix(1.158233,-0.08160287,0.05119299,1.1715514,-36.462915,48.248828)"
214
+ cx="138.72363"
215
+ cy="128.80811"
216
+ gradientUnits="userSpaceOnUse"
217
+ fy="128.80811"
218
+ fx="138.72363"
219
+ id="XMLID_53_-4"
220
+ r="103.00073">
221
+ <stop
222
+ id="stop340-7"
223
+ style="stop-color:#3e9ade;stop-opacity:1.0000000;"
224
+ offset="0.0056179999" />
225
+ <stop
226
+ id="stop342-7"
227
+ style="stop-color:#0066cc;stop-opacity:1.0000000;"
228
+ offset="0.39887601" />
229
+ <stop
230
+ id="stop344-5"
231
+ style="stop-color:#00008d;stop-opacity:1.0000000;"
232
+ offset="1.0000000" />
233
+ </radialGradient>
234
+ <linearGradient
235
+ y2="75.628906"
236
+ y1="75.628906"
237
+ x2="190.76367"
238
+ x1="61.221191"
239
+ gradientUnits="userSpaceOnUse"
240
+ id="XMLID_52_-4">
241
+ <stop
242
+ id="stop325-8"
243
+ style="stop-color:#000000;stop-opacity:1.0000000;"
244
+ offset="0.0056179999" />
245
+ <stop
246
+ id="stop327-1"
247
+ style="stop-color:#494949;stop-opacity:1.0000000;"
248
+ offset="1.0000000" />
249
+ </linearGradient>
250
+ <linearGradient
251
+ y2="121.52731"
252
+ y1="19.987305"
253
+ x2="135.62952"
254
+ x1="117.05518"
255
+ gradientUnits="userSpaceOnUse"
256
+ id="XMLID_51_-2">
257
+ <stop
258
+ id="stop310-8"
259
+ style="stop-color:#9a9ab1;stop-opacity:1.0000000;"
260
+ offset="0.0000000" />
261
+ <stop
262
+ id="stop312-9"
263
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
264
+ offset="1.0000000" />
265
+ </linearGradient>
266
+ <linearGradient
267
+ y2="75.348633"
268
+ y1="75.348633"
269
+ x2="204.31836"
270
+ x1="45.217773"
271
+ gradientUnits="userSpaceOnUse"
272
+ id="XMLID_50_-3">
273
+ <stop
274
+ id="stop293-6"
275
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
276
+ offset="0.0000000" />
277
+ <stop
278
+ id="stop295-8"
279
+ style="stop-color:#cecedb;stop-opacity:1.0000000;"
280
+ offset="1.0000000" />
281
+ </linearGradient>
282
+ <linearGradient
283
+ y2="4.1227713"
284
+ y1="139.66699"
285
+ x2="50.743862"
286
+ x1="186.28809"
287
+ gradientUnits="userSpaceOnUse"
288
+ id="XMLID_49_-0">
289
+ <stop
290
+ id="stop278-2"
291
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
292
+ offset="0.0000000" />
293
+ <stop
294
+ id="stop280-1"
295
+ style="stop-color:#9a9ab1;stop-opacity:1.0000000;"
296
+ offset="1.0000000" />
297
+ </linearGradient>
298
+ <linearGradient
299
+ y2="4.1137614"
300
+ y1="139.66113"
301
+ gradientTransform="matrix(1.158233,-0.08160287,0.05119299,1.1715514,-36.462915,48.248828)"
302
+ x2="50.734852"
303
+ x1="186.28223"
304
+ gradientUnits="userSpaceOnUse"
305
+ id="XMLID_48_-5">
306
+ <stop
307
+ id="stop253-1"
308
+ style="stop-color:#5f5f5f;stop-opacity:1;"
309
+ offset="0" />
310
+ <stop
311
+ id="stop255-1"
312
+ style="stop-color:#7a7a95;stop-opacity:1.0000000;"
313
+ offset="0.18601960" />
314
+ <stop
315
+ id="stop257-0"
316
+ style="stop-color:#717188;stop-opacity:1.0000000;"
317
+ offset="0.37826309" />
318
+ <stop
319
+ id="stop259-8"
320
+ style="stop-color:#616174;stop-opacity:1.0000000;"
321
+ offset="0.57334977" />
322
+ <stop
323
+ id="stop261-9-5"
324
+ style="stop-color:#4c4c57;stop-opacity:1.0000000;"
325
+ offset="0.77042061" />
326
+ <stop
327
+ id="stop263-0"
328
+ style="stop-color:#303032;stop-opacity:1.0000000;"
329
+ offset="0.96729457" />
330
+ <stop
331
+ id="stop265-6"
332
+ style="stop-color:#2b2b2b;stop-opacity:1.0000000;"
333
+ offset="1.0000000" />
334
+ </linearGradient>
335
+ <linearGradient
336
+ inkscape:collect="always"
337
+ xlink:href="#XMLID_48_-5"
338
+ id="linearGradient7337"
339
+ gradientUnits="userSpaceOnUse"
340
+ gradientTransform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.18539,857.48723)"
341
+ x1="186.28223"
342
+ y1="139.66113"
343
+ x2="50.734852"
344
+ y2="4.1137614" />
345
+ <linearGradient
346
+ inkscape:collect="always"
347
+ xlink:href="#XMLID_49_-0"
348
+ id="linearGradient7339"
349
+ gradientUnits="userSpaceOnUse"
350
+ x1="186.28809"
351
+ y1="139.66699"
352
+ x2="50.743862"
353
+ y2="4.1227713" />
354
+ <linearGradient
355
+ inkscape:collect="always"
356
+ xlink:href="#XMLID_50_-3"
357
+ id="linearGradient7341"
358
+ gradientUnits="userSpaceOnUse"
359
+ x1="45.217773"
360
+ y1="75.348633"
361
+ x2="204.31836"
362
+ y2="75.348633" />
363
+ <linearGradient
364
+ inkscape:collect="always"
365
+ xlink:href="#XMLID_51_-2"
366
+ id="linearGradient7343"
367
+ gradientUnits="userSpaceOnUse"
368
+ x1="117.05518"
369
+ y1="19.987305"
370
+ x2="135.62952"
371
+ y2="121.52731" />
372
+ <linearGradient
373
+ inkscape:collect="always"
374
+ xlink:href="#XMLID_52_-4"
375
+ id="linearGradient7345"
376
+ gradientUnits="userSpaceOnUse"
377
+ x1="61.221191"
378
+ y1="75.628906"
379
+ x2="190.76367"
380
+ y2="75.628906" />
381
+ <radialGradient
382
+ inkscape:collect="always"
383
+ xlink:href="#XMLID_53_-4"
384
+ id="radialGradient7347"
385
+ gradientUnits="userSpaceOnUse"
386
+ gradientTransform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.18539,857.48723)"
387
+ cx="138.72363"
388
+ cy="128.80811"
389
+ fx="138.72363"
390
+ fy="128.80811"
391
+ r="103.00073" />
392
+ <radialGradient
393
+ inkscape:collect="always"
394
+ xlink:href="#XMLID_54_-4"
395
+ id="radialGradient7349"
396
+ gradientUnits="userSpaceOnUse"
397
+ gradientTransform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.18539,857.48723)"
398
+ cx="138.71191"
399
+ cy="128.80225"
400
+ fx="138.71191"
401
+ fy="128.80225"
402
+ r="103.02309" />
403
+ <radialGradient
404
+ inkscape:collect="always"
405
+ xlink:href="#XMLID_55_-5"
406
+ id="radialGradient7351"
407
+ gradientUnits="userSpaceOnUse"
408
+ gradientTransform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.18539,857.48723)"
409
+ cx="134.13086"
410
+ cy="81.594727"
411
+ fx="134.13086"
412
+ fy="81.594727"
413
+ r="95.281982" />
414
+ <radialGradient
415
+ inkscape:collect="always"
416
+ xlink:href="#linearGradient4565-8"
417
+ id="radialGradient7353"
418
+ gradientUnits="userSpaceOnUse"
419
+ gradientTransform="matrix(1,0,0,0.333333,0,25.71429)"
420
+ cx="24.714285"
421
+ cy="38.57143"
422
+ fx="24.714285"
423
+ fy="38.57143"
424
+ r="19.714285" />
425
+ <radialGradient
426
+ inkscape:collect="always"
427
+ xlink:href="#linearGradient3290-6"
428
+ id="radialGradient7355"
429
+ gradientUnits="userSpaceOnUse"
430
+ cx="29.288071"
431
+ cy="15.720984"
432
+ fx="29.158466"
433
+ fy="15.755712"
434
+ r="8.9020796" />
435
+ <radialGradient
436
+ inkscape:collect="always"
437
+ xlink:href="#aigrd2-2-3"
438
+ id="radialGradient7357"
439
+ gradientUnits="userSpaceOnUse"
440
+ gradientTransform="matrix(0.40606226,0,0,0.40578271,456.0797,858.75606)"
441
+ cx="25.0527"
442
+ cy="39.5928"
443
+ fx="25.0527"
444
+ fy="39.5928"
445
+ r="15.7572" />
446
+ <radialGradient
447
+ inkscape:collect="always"
448
+ xlink:href="#linearGradient4467-1"
449
+ id="radialGradient7359"
450
+ gradientUnits="userSpaceOnUse"
451
+ gradientTransform="matrix(1.2593281,0,0,1.0930299,452.99056,845.80836)"
452
+ cx="15.414371"
453
+ cy="13.078408"
454
+ fx="15.414371"
455
+ fy="13.078408"
456
+ r="6.65625" />
457
+ <radialGradient
458
+ inkscape:collect="always"
459
+ xlink:href="#linearGradient4467-1"
460
+ id="radialGradient7361"
461
+ gradientUnits="userSpaceOnUse"
462
+ gradientTransform="matrix(1.2593281,0,0,1.0930299,436.84706,845.80836)"
463
+ cx="15.414371"
464
+ cy="13.078408"
465
+ fx="15.414371"
466
+ fy="13.078408"
467
+ r="6.65625" />
468
+ </defs>
469
+ <sodipodi:namedview
470
+ id="base"
471
+ pagecolor="#ffffff"
472
+ bordercolor="#666666"
473
+ borderopacity="1.0"
474
+ inkscape:pageopacity="0.0"
475
+ inkscape:pageshadow="2"
476
+ inkscape:zoom="2.8284271"
477
+ inkscape:cx="-23.245674"
478
+ inkscape:cy="86.26557"
479
+ inkscape:document-units="px"
480
+ inkscape:current-layer="layer1"
481
+ showgrid="false"
482
+ inkscape:window-width="1920"
483
+ inkscape:window-height="1047"
484
+ inkscape:window-x="0"
485
+ inkscape:window-y="0"
486
+ inkscape:window-maximized="1"
487
+ showguides="true"
488
+ inkscape:guide-bbox="true"
489
+ fit-margin-top="0"
490
+ fit-margin-left="0"
491
+ fit-margin-right="0"
492
+ fit-margin-bottom="0" />
493
+ <metadata
494
+ id="metadata3219">
495
+ <rdf:RDF>
496
+ <cc:Work
497
+ rdf:about="">
498
+ <dc:format>image/svg+xml</dc:format>
499
+ <dc:type
500
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
501
+ <dc:title />
502
+ </cc:Work>
503
+ </rdf:RDF>
504
+ </metadata>
505
+ <g
506
+ inkscape:label="Layer 1"
507
+ inkscape:groupmode="layer"
508
+ id="layer1"
509
+ transform="translate(-6.3597048e-7,-924.36218)">
510
+ <path
511
+ sodipodi:type="inkscape:offset"
512
+ inkscape:radius="-1.0565168"
513
+ inkscape:original="M 289.5 431.40625 C 287.23603 431.40625 285.40625 433.20529 285.40625 435.4375 L 285.40625 482.09375 C 285.40625 484.32596 287.23603 486.125 289.5 486.125 L 347.5 486.125 C 349.76397 486.125 351.59375 484.32596 351.59375 482.09375 L 351.59375 435.4375 C 351.59375 433.20529 349.76397 431.40625 347.5 431.40625 L 289.5 431.40625 z "
514
+ xlink:href="#rect4873"
515
+ style="color:#000000;display:block;overflow:visible;visibility:visible;opacity:0.47647059;fill:none;stroke:url(#linearGradient5820);stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
516
+ id="path6230"
517
+ inkscape:href="#rect4873"
518
+ d="m 289.5,432.46289 c -1.70427,0 -3.03711,1.31976 -3.03711,2.97461 l 0,46.65625 c 0,1.65485 1.33284,2.97461 3.03711,2.97461 l 58,0 c 1.70427,0 3.03711,-1.31976 3.03711,-2.97461 l 0,-46.65625 c 0,-1.65485 -1.33284,-2.97461 -3.03711,-2.97461 l -58,0 z"
519
+ transform="matrix(2.1348662,0,0,2.1049142,269.388,407.19722)" />
520
+ <path
521
+ d="m 289.5,432.46289 c -1.70427,0 -3.03711,1.31976 -3.03711,2.97461 l 0,46.65625 c 0,1.65485 1.33284,2.97461 3.03711,2.97461 l 58,0 c 1.70427,0 3.03711,-1.31976 3.03711,-2.97461 l 0,-46.65625 c 0,-1.65485 -1.33284,-2.97461 -3.03711,-2.97461 l -58,0 z"
522
+ inkscape:href="#rect4873"
523
+ id="path4017"
524
+ style="color:#000000;display:block;overflow:visible;visibility:visible;opacity:0.47647059;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;filter:url(#filter5737);enable-background:accumulate"
525
+ xlink:href="#rect4873"
526
+ inkscape:original="M 289.5 431.40625 C 287.23603 431.40625 285.40625 433.20529 285.40625 435.4375 L 285.40625 482.09375 C 285.40625 484.32596 287.23603 486.125 289.5 486.125 L 347.5 486.125 C 349.76397 486.125 351.59375 484.32596 351.59375 482.09375 L 351.59375 435.4375 C 351.59375 433.20529 349.76397 431.40625 347.5 431.40625 L 289.5 431.40625 z "
527
+ inkscape:radius="-1.0565168"
528
+ sodipodi:type="inkscape:offset"
529
+ transform="matrix(2.6066103,0,0,2.6459651,271.58446,433.14775)" />
530
+ <path
531
+ d="m 286.33008,432.28125 -3.83203,17.0625 72.04883,0 -3.63672,-17.00195 -64.58008,-0.0605 z"
532
+ inkscape:href="#path4885"
533
+ id="path4021"
534
+ style="color:#000000;display:block;overflow:visible;visibility:visible;opacity:0.25882353;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;filter:url(#filter5729);enable-background:accumulate"
535
+ xlink:href="#path4885"
536
+ inkscape:original="M 285.53125 431.28125 L 281.25 450.34375 L 355.78125 450.34375 L 351.71875 431.34375 L 285.53125 431.28125 z "
537
+ inkscape:radius="-0.99911743"
538
+ sodipodi:type="inkscape:offset"
539
+ transform="matrix(2.6066103,0,0,2.6459651,271.58446,433.14775)" />
540
+ <g
541
+ id="g76565"
542
+ transform="translate(1072.4101,216.95544)">
543
+ <path
544
+ inkscape:connector-curvature="0"
545
+ style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';opacity:0.09090899;fill:#000000;fill-opacity:1;stroke:none"
546
+ d=""
547
+ id="text76617" />
548
+ </g>
549
+ <g
550
+ id="g7305"
551
+ transform="matrix(1.1697057,0,0,1.1697057,-508.8862,-58.795809)">
552
+ <path
553
+ sodipodi:nodetypes="czcccczcc"
554
+ d="m 524.35949,853.68722 c 0,0 -77.60659,7.48791 -78.83969,7.67698 -1.24018,0.19017 -4.15931,1.73655 -5.69537,3.22877 -0.3638,0.5061 -0.23268,1.00596 -0.0936,1.60451 l 16.54452,71.17535 c 0.25326,1.09074 0.99121,2.10979 2.40847,1.5295 18.00324,-7.39684 80.95112,-10.85632 80.90492,-21.09632 -0.0462,-10.06742 -13.05017,-62.50574 -13.05017,-62.50574 -0.21357,-1.02311 -1.1439,-1.71149 -2.1791,-1.61305 z"
555
+ id="path274-4"
556
+ style="fill:url(#linearGradient7337)"
557
+ inkscape:connector-curvature="0" />
558
+ <polygon
559
+ points="39.503906,16.282227 39.371094,16.286133 39.381836,16.34375 39.249023,16.34668 39.260254,16.404785 39.127441,16.407715 39.138184,16.465332 39.005371,16.468262 39.016602,16.525879 38.883789,16.529297 38.894531,16.587402 38.762207,16.59082 38.772949,16.647949 38.640137,16.651367 38.650879,16.708984 38.518555,16.711914 38.529297,16.77002 38.396484,16.773438 38.407715,16.831055 38.274902,16.833984 38.285156,16.891602 38.152832,16.894531 38.164062,16.952148 38.03125,16.955566 38.041992,17.013672 37.909668,17.01709 37.92041,17.074219 37.787598,17.077637 61.716309,144.46582 196.88867,125.35107 196.88184,125.30811 197.01074,125.29004 197.00195,125.24707 197.13281,125.22949 197.12598,125.18652 197.25391,125.16846 197.24609,125.12451 197.37598,125.10645 197.36914,125.06445 197.49609,125.0459 197.48926,125.00342 197.62012,124.98486 197.61133,124.94287 197.74121,124.9248 197.73438,124.88184 197.86328,124.86377 197.85645,124.8208 197.98535,124.80322 197.97852,124.75977 198.10645,124.74121 198.09863,124.69824 198.22852,124.68018 198.22168,124.63818 198.35059,124.61963 198.34375,124.57715 198.47266,124.55859 198.46387,124.5166 198.59375,124.49854 198.58691,124.45557 198.71582,124.4375 198.70898,124.39453 198.83789,124.37695 198.83105,124.3335 198.95898,124.31494 198.95117,124.27246 199.08105,124.25391 199.07422,124.21191 199.20312,124.19336 199.19629,124.15088 199.3252,124.13232 199.31641,124.08984 199.44629,124.07227 199.43945,124.0293 199.56836,124.01123 199.56152,123.96729 199.69043,123.94971 199.68359,123.90723 199.81152,123.88867 199.80371,123.84619 199.93359,123.82764 199.92676,123.78564 200.05566,123.76758 200.04883,123.72461 200.17773,123.70605 200.16895,123.66357 200.29883,123.646 200.29102,123.60205 200.4209,123.58398 200.41406,123.54102 200.54297,123.52295 200.53613,123.48096 200.66309,123.4624 200.65625,123.41992 200.78613,123.40137 200.7793,123.35938 200.9082,123.34131 200.90137,123.29834 201.03027,123.27979 201.02344,123.2373 201.15137,123.21973 201.14355,123.17578 201.27344,123.15771 201.2666,123.11475 201.39551,123.09668 201.38867,123.05469 201.51562,123.03613 201.50879,122.99365 201.63965,122.9751 201.63184,122.93311 201.76074,122.91504 201.75391,122.87207 201.88281,122.85352 201.87598,122.81006 202.00391,122.79248 201.99609,122.75 202.12598,122.73145 202.11914,122.68848 202.24805,122.67041 202.24121,122.62842 202.36816,122.60986 202.36133,122.56738 202.49219,122.54883 202.4834,122.50586 202.61328,122.48877 202.60645,122.4458 202.73535,122.42725 202.72852,122.38379 202.85547,122.36621 202.84863,122.32373 202.97852,122.30518 202.97168,122.26221 203.10059,122.24414 203.09375,122.20215 203.22266,122.18359 203.21387,122.14111 203.34473,122.12256 203.33594,122.08008 203.46582,122.0625 203.45898,122.01855 203.58789,122.00049 203.58105,121.95752 203.70996,121.93896 203.70312,121.89746 203.83105,121.87891 203.82422,121.83594 203.95312,121.81787 203.94629,121.77588 204.0752,121.75732 204.06641,121.71484 204.19727,121.69629 204.19043,121.65381 204.19043,121.65381 204.31836,121.63623 185.93848,9.9467773 175.01367,10.211914 45.217773,13.362305 45.228516,13.419922 45.095703,13.42334 45.106445,13.480957 44.973633,13.484863 44.984863,13.54248 44.852051,13.54541 44.862793,13.603027 44.730469,13.605957 44.741699,13.663574 44.608887,13.666992 44.619141,13.725098 44.486328,13.728027 44.497559,13.785645 44.365234,13.788574 44.375977,13.846191 44.243164,13.849609 44.253906,13.907227 44.121582,13.911133 44.132324,13.96875 43.999512,13.97168 44.010254,14.029297 43.87793,14.032227 43.88916,14.090332 43.755859,14.093262 43.766602,14.151367 43.633789,14.154297 43.645019,14.211914 43.512695,14.215332 43.523438,14.272461 43.390137,14.275879 43.401367,14.333984 43.269043,14.337402 43.279785,14.39502 43.146973,14.397949 43.157715,14.455566 43.025391,14.458496 43.035644,14.516602 42.90332,14.519531 42.914062,14.577148 42.78125,14.580566 42.792481,14.638184 42.660156,14.641602 42.670898,14.69873 42.537598,14.702148 42.548828,14.760254 42.416016,14.763672 42.426758,14.821289 42.294434,14.824219 42.305664,14.881836 42.172363,14.884766 42.183106,14.942871 42.050781,14.945801 42.061523,15.003418 41.929199,15.007324 41.939941,15.064453 41.806641,15.067871 41.817383,15.125977 41.685059,15.128906 41.696289,15.186523 41.563477,15.189453 41.574219,15.247559 41.441894,15.250488 41.452637,15.308105 41.319824,15.311035 41.330566,15.369141 41.198242,15.37207 41.209473,15.429688 41.07666,15.433594 41.087402,15.490723 40.954102,15.494141 40.965332,15.552246 40.833008,15.555176 40.84375,15.612793 40.710938,15.615723 40.72168,15.673828 40.588867,15.676758 40.600098,15.734863 40.467285,15.737793 40.478027,15.79541 40.345215,15.798828 40.356445,15.855957 40.223633,15.859863 40.234375,15.91748 40.101562,15.92041 40.112793,15.978516 39.980469,15.981445 39.991211,16.039062 39.858398,16.041992 39.869141,16.099609 39.736328,16.103027 39.74707,16.161133 39.614746,16.164062 39.625488,16.22168 39.492676,16.225098 "
560
+ transform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.1854,857.48723)"
561
+ style="fill:url(#linearGradient7339)"
562
+ id="polygon289-6" />
563
+ <polygon
564
+ points="204.31836,121.63623 185.93848,9.9467773 175.01367,10.211914 175.01367,10.211914 45.217773,13.362305 69.146484,140.75 "
565
+ transform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.1854,857.48723)"
566
+ style="fill:url(#linearGradient7341)"
567
+ id="polygon304-2" />
568
+ <polygon
569
+ points="193.04688,112.42627 177.67383,18.998535 175.24902,19.057617 175.24902,19.057617 56.949707,21.928711 77.030273,128.83252 "
570
+ transform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.1854,857.48723)"
571
+ style="fill:#ffffff"
572
+ id="polygon306-5" />
573
+ <polygon
574
+ points="193.04688,113.35498 177.67383,19.927246 175.24902,19.986328 175.24902,19.986328 56.949707,22.85791 77.030273,129.76074 "
575
+ transform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.1854,857.48723)"
576
+ style="fill:url(#linearGradient7343)"
577
+ id="polygon321-8" />
578
+ <polygon
579
+ points="80.206055,127.55811 80.206055,127.55811 190.76367,111.92334 176.24707,23.700195 61.221191,26.492188 "
580
+ transform="matrix(0.55969937,-0.03943341,0.02473827,0.56613529,420.1854,857.48723)"
581
+ style="fill:url(#linearGradient7345)"
582
+ id="polygon336-6" />
583
+ <path
584
+ d="m 514.97113,865.43394 -53.68905,5.10639 c -1.2181,0.11605 -2.33775,0.76643 -3.06351,1.77973 -0.72524,1.01272 -0.98319,2.28616 -0.70502,3.48301 l 10.59879,45.59634 c 0.50707,2.18145 2.62962,3.52895 4.81723,3.05928 l 51.37173,-11.03673 c 1.10154,-0.23649 2.07375,-0.91085 2.69634,-1.86975 0.62205,-0.95887 0.84318,-2.12185 0.61345,-3.22617 l -8.28175,-39.66627 c -0.42716,-2.04649 -2.28671,-3.42279 -4.35821,-3.22583 z"
585
+ id="path357-2"
586
+ style="fill:url(#radialGradient7347)"
587
+ inkscape:connector-curvature="0" />
588
+ <path
589
+ d="m 515.11384,867.53291 0,0 -53.68931,5.1067 c -0.61016,0.0579 -1.16866,0.38208 -1.5319,0.88986 -0.36326,0.50724 -0.49206,1.14187 -0.35239,1.74094 l 10.59854,45.59693 c 0.25443,1.0926 1.31236,1.76505 2.40871,1.52892 l 51.37094,-11.0361 c 0.54805,-0.11792 1.03922,-0.45837 1.349,-0.93495 0.30868,-0.47649 0.42061,-1.06445 0.30616,-1.61317 l -8.28066,-39.66636 c -0.21221,-1.0171 -1.14991,-1.71079 -2.17909,-1.61277 z"
590
+ id="path378-8"
591
+ style="fill:url(#radialGradient7349)"
592
+ inkscape:connector-curvature="0" />
593
+ <path
594
+ d="m 517.29293,869.14568 c -0.21221,-1.0171 -1.14991,-1.71079 -2.17909,-1.61277 l -53.68931,5.1067 c -0.61016,0.0579 -1.16866,0.38208 -1.5319,0.88986 -0.36326,0.50724 -0.49206,1.14187 -0.35239,1.74094 l 4.10484,17.6597 c 7.81824,3.9334 19.1093,5.17815 31.1196,2.71292 10.44013,-2.14334 19.42701,-6.679 25.49884,-12.26677 l -2.97059,-14.23058 z"
595
+ id="path399-4"
596
+ style="fill:url(#radialGradient7351)"
597
+ inkscape:connector-curvature="0" />
598
+ <g
599
+ id="g78698-7"
600
+ transform="matrix(0.48323555,0,0,0.48323555,437.80557,834.17168)">
601
+ <path
602
+ inkscape:transform-center-x="1.2636495"
603
+ inkscape:transform-center-y="-0.14665398"
604
+ transform="matrix(1.1645808,0,0,1.1687526,-22.635297,-74.413789)"
605
+ d="m 145.2759,159.60495 c -0.40124,-4.84971 -0.80252,-9.69942 -1.20376,-14.54916 -1.07121,0.60511 -2.14246,1.21021 -3.21368,1.81531 0.36445,3.19749 0.72891,6.39499 1.09336,9.59251 -1.72209,-2.43063 -3.44415,-4.86126 -5.16625,-7.29188 -0.97079,0.54836 -1.94159,1.09673 -2.91238,1.64511 0.35701,3.20169 0.71402,6.40341 1.07103,9.60511 -1.86343,-2.3508 -3.72684,-4.70159 -5.59029,-7.05237 -0.94847,0.53577 -1.89695,1.07153 -2.84544,1.60728 2.86359,3.45885 5.72719,6.91769 8.59077,10.3765 0.98938,-0.55885 1.97879,-1.11774 2.96819,-1.67661 -0.30275,-3.06028 -0.6055,-6.12055 -0.90825,-9.18081 1.70127,2.27027 3.40259,4.54058 5.10387,6.81084 1.00428,-0.56726 2.00857,-1.13455 3.01283,-1.70183 z m -20.39806,2.67433 c -1.67008,0.94336 -3.34016,1.88673 -5.01021,2.8301 -0.26703,-0.69099 -0.44076,-1.43229 -0.36258,-2.17028 0.1039,-1.31629 1.23513,-2.54899 2.67339,-2.60464 1.26487,-0.0502 2.17799,0.96937 2.6994,1.94482 z m 3.87143,0.32267 c -0.45621,-1.28934 -1.17264,-2.52218 -2.15423,-3.52261 -1.24365,-1.30695 -3.26635,-1.92185 -5.06138,-1.40785 -1.71779,0.49821 -3.25507,1.57586 -4.25622,2.98573 -1.55563,2.27509 -1.39824,5.33842 -0.01,7.65502 0.87338,1.55449 2.3583,2.88885 4.22018,3.26469 2.23828,0.51906 4.6066,-0.42466 6.16579,-1.93714 1.40501,-1.3463 1.9987,-3.31077 1.77803,-5.1719 -0.89084,0.32911 -1.78168,0.65823 -2.67252,0.98736 -0.47726,0.066 -0.56427,0.3617 -0.49381,0.79598 -0.047,1.29845 -1.10862,2.51644 -2.49279,2.68595 -1.31744,0.16545 -2.52662,-0.70395 -3.05745,-1.797 2.67806,-1.51275 5.35612,-3.0255 8.03418,-4.53823 z m -19.54776,2.15101 c 1.54313,4.20468 3.08629,8.40941 4.62944,12.61409 1.06751,-0.60301 2.13503,-1.20599 3.20253,-1.80898 -1.54317,-4.2047 -3.08631,-8.40942 -4.62947,-12.61409 -1.0675,0.60299 -2.13499,1.20598 -3.2025,1.80898 z m -1.76616,-4.79575 c 0.37912,1.02868 0.75821,2.05734 1.13729,3.086 1.06751,-0.60299 2.13502,-1.20599 3.20254,-1.80899 -0.37911,-1.02866 -0.75819,-2.05733 -1.13731,-3.08599 -1.06751,0.60299 -2.13501,1.20601 -3.20252,1.80898 z m -0.66779,21.3997 c -0.26467,-6.85799 -0.52933,-13.71599 -0.79398,-20.57398 -1.11215,0.62819 -2.22429,1.25641 -3.33643,1.88461 0.21598,5.17904 0.43195,10.35807 0.64791,15.53713 -3.16556,-3.51294 -6.331123,-7.02586 -9.496673,-10.53876 -1.11958,0.63239 -2.23917,1.2648 -3.35875,1.89722 4.24829,4.60779 8.49657,9.21558 12.744853,13.82336 1.19769,-0.67653 2.39538,-1.35305 3.59307,-2.02958 z m -23.322703,8.91515 0,0 0.09579,0.0821 c 1.41442,1.25032 3.53795,1.68095 5.371,1.10543 1.6239,-0.49157 3.16048,-1.30492 4.39351,-2.423 1.45309,-1.31032 2.1799,-3.48561 1.30605,-5.27092 -0.4567,-1.06027 -1.56409,-1.78202 -2.75621,-1.8964 -1.8127,-0.12954 -3.54897,0.49843 -5.29832,0.83737 -0.64887,0.2146 -1.63877,0.11327 -1.7491,-0.67521 -0.09892,-0.93229 0.84319,-1.52534 1.5992,-1.91295 0.92961,-0.48388 2.21599,-0.66076 3.06977,0.0641 0.88306,-0.71869 1.76614,-1.4374 2.6492,-2.15608 -1.11334,-1.18284 -2.96896,-1.60861 -4.54637,-1.11491 -1.65013,0.50341 -3.18938,1.38095 -4.40075,2.55623 -1.1832,1.15593 -1.90103,2.93101 -1.25157,4.49951 0.43886,1.15609 1.57383,2.07277 2.89287,2.14943 1.84732,0.0267 3.62597,-0.52872 5.43584,-0.78889 0.68276,-0.19116 1.45672,0.33347 1.34794,1.03357 -0.21328,1.15494 -1.38333,1.87689 -2.46232,2.27051 -0.98914,0.38704 -2.08764,0.0188 -2.88887,-0.57674 -0.93589,0.73896 -1.87178,1.47794 -2.80766,2.2169 z"
606
+ id="path78352-2"
607
+ style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';opacity:0.8495575;fill:#ff4300;fill-opacity:1;stroke:#000000;stroke-width:0.14506666;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter78486-7)"
608
+ inkscape:connector-curvature="0" />
609
+ <path
610
+ inkscape:transform-center-x="1.1367486"
611
+ inkscape:transform-center-y="-0.19942563"
612
+ transform="matrix(1.1645808,0,0,1.1687526,-22.635297,-74.413789)"
613
+ d="m 139.83617,162.31302 c 0.17679,-4.30711 0.35352,-8.61423 0.53031,-12.92136 -1.03188,0.40989 -2.06378,0.81977 -3.09566,1.22965 -0.0266,2.8511 -0.0531,5.70222 -0.0797,8.55335 -1.2812,-2.33166 -2.56237,-4.66331 -3.84358,-6.99497 -0.93513,0.37145 -1.87029,0.7429 -2.80543,1.11436 -0.0337,2.85395 -0.0675,5.70793 -0.10123,8.5619 -1.41735,-2.2776 -2.83467,-4.55517 -4.25205,-6.83274 -0.91364,0.36292 -1.82728,0.72583 -2.74094,1.08873 2.19514,3.36498 4.39029,6.72996 6.58541,10.09491 0.95305,-0.37856 1.90613,-0.75713 2.85919,-1.13569 0.0669,-2.72353 0.13383,-5.44704 0.20075,-8.17055 1.28025,2.18838 2.56053,4.37681 3.84078,6.56518 0.9674,-0.38424 1.9348,-0.76851 2.90218,-1.15277 z m -18.66715,0.0302 c -1.60875,0.639 -3.21749,1.27802 -4.82621,1.91704 -0.16381,-0.63755 -0.23802,-1.30869 -0.0857,-1.94828 0.23963,-1.14482 1.3952,-2.09935 2.69665,-1.98469 1.14471,0.0998 1.85393,1.09949 2.21528,2.01593 z m 3.45078,0.72381 c -0.26779,-1.18483 -0.7762,-2.34962 -1.5492,-3.34034 -0.97502,-1.28986 -2.72842,-2.06021 -4.40205,-1.8127 -1.60231,0.24243 -3.10637,1.01454 -4.16444,2.13954 -1.65344,1.82223 -1.85161,4.53191 -0.85822,6.72542 0.61407,1.46527 1.80333,2.80665 3.43842,3.34865 1.95819,0.71065 4.19581,0.15074 5.76784,-1.00097 1.41473,-1.02322 2.16738,-2.68189 2.17516,-4.34238 -0.8388,0.18788 -1.67761,0.37578 -2.51641,0.56367 -0.43715,0.004 -0.54832,0.25365 -0.53305,0.64327 -0.18642,1.13562 -1.27765,2.08514 -2.54303,2.07668 -1.20485,-0.004 -2.19736,-0.90591 -2.55414,-1.92676 2.57972,-1.02469 5.15942,-2.04939 7.73912,-3.07408 z m -17.84331,-0.33298 c 0.92318,3.87018 1.84638,7.74041 2.76958,11.61059 1.0283,-0.40847 2.05662,-0.8169 3.08491,-1.22535 -0.92321,-3.87021 -1.84639,-7.74042 -2.7696,-11.6106 -1.0283,0.40845 -2.05658,0.8169 -3.08489,1.22536 z m -1.05845,-4.41492 c 0.22729,0.94702 0.45456,1.89403 0.68182,2.84103 1.0283,-0.40845 2.05661,-0.8169 3.08492,-1.22536 -0.22729,-0.94701 -0.45454,-1.89402 -0.68184,-2.84103 -1.0283,0.40845 -2.0566,0.81693 -3.0849,1.22536 z m -2.97596,18.72814 c 0.52261,-6.05627 1.04524,-12.11254 1.56787,-18.16882 -1.0713,0.42552 -2.14259,0.85106 -3.21389,1.27658 -0.38017,4.57544 -0.76034,9.15085 -1.140523,13.7263 -2.4611,-3.44687 -4.92219,-6.8937 -7.38327,-10.34052 -1.07846,0.42836 -2.15693,0.85674 -3.23539,1.28513 3.3147,4.53204 6.6294,9.06409 9.9441,13.59611 1.153703,-0.45826 2.307403,-0.91652 3.461103,-1.37478 z m -21.993573,5.18142 0,0 0.07716,0.083 c 1.13508,1.25952 2.99974,1.87942 4.71444,1.58217 1.51702,-0.24727 2.99112,-0.78722 4.22564,-1.62946 1.45404,-0.98613 2.34998,-2.81491 1.76109,-4.48306 -0.29364,-0.9836 -1.21088,-1.74375 -2.2718,-1.97983 -1.61813,-0.31999 -3.25149,0.0344 -4.86456,0.13324 -0.60818,0.11478 -1.48844,-0.0868 -1.50031,-0.79223 0.01436,-0.83046 0.92863,-1.24443 1.6525,-1.49905 0.89089,-0.31947 2.06903,-0.3286 2.75751,0.40543 0.87502,-0.53109 1.75008,-1.0622 2.6251,-1.59328 -0.87142,-1.16599 -2.49533,-1.75114 -3.97073,-1.49672 -1.54196,0.25468 -3.02557,0.85074 -4.24694,1.7457 -1.19385,0.88116 -2.0373,2.3593 -1.62643,3.81141 0.26694,1.06578 1.18738,2.00034 2.3668,2.21772 1.66073,0.23352 3.3242,-0.0522 4.98303,-0.075 0.63611,-0.0903 1.27492,0.45869 1.09926,1.0615 -0.32023,0.9906 -1.45408,1.49193 -2.46949,1.71509 -0.93376,0.22761 -1.88221,-0.22091 -2.53771,-0.83533 -0.92485,0.5429 -1.84972,1.08581 -2.77456,1.62871 z"
614
+ id="path78354-4"
615
+ style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';opacity:0.79646014;fill:#ff4300;fill-opacity:1;stroke:#000000;stroke-width:0.14506666;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter78694-4)"
616
+ inkscape:connector-curvature="0" />
617
+ <path
618
+ inkscape:transform-center-x="0.85115577"
619
+ inkscape:transform-center-y="-0.25241573"
620
+ transform="matrix(1.1645808,0,0,1.1687526,-22.635297,-74.413789)"
621
+ d="m 134.95062,164.31066 c 0.92413,-3.80682 1.84822,-7.61367 2.77236,-11.42051 -1.00191,0.18387 -2.00383,0.36773 -3.00574,0.5516 -0.53028,2.53583 -1.06059,5.07168 -1.59088,7.60754 -0.73949,-2.30283 -1.47896,-4.60565 -2.21846,-6.90849 -0.90796,0.16663 -1.81596,0.33325 -2.72393,0.49988 -0.53724,2.53712 -1.07451,5.07425 -1.61177,7.61139 -0.87168,-2.2786 -1.74333,-4.55715 -2.61505,-6.83572 -0.8871,0.1628 -1.7742,0.32559 -2.66131,0.48837 1.37889,3.38421 2.75777,6.76844 4.13665,10.15263 0.92536,-0.16982 1.85075,-0.33963 2.77613,-0.50944 0.54396,-2.41507 1.08791,-4.83012 1.63186,-7.24518 0.76408,2.17499 1.52819,4.35004 2.29227,6.52504 0.93929,-0.17236 1.87859,-0.34474 2.81787,-0.51711 z m -16.81335,-3.25405 c -1.56202,0.28664 -3.12402,0.57329 -4.68601,0.85995 -0.0343,-0.59689 0.0181,-1.20795 0.26884,-1.7511 0.41908,-0.97799 1.62909,-1.62543 2.78056,-1.29452 1.01298,0.2901 1.47401,1.30556 1.63661,2.18567 z m 2.97855,1.25147 c -0.0307,-1.10282 -0.28159,-2.23008 -0.80166,-3.24873 -0.64882,-1.32072 -2.09078,-2.31532 -3.64168,-2.38894 -1.48579,-0.0656 -2.97717,0.35805 -4.12967,1.17453 -1.8124,1.33311 -2.47208,3.71277 -1.96719,5.84192 0.29267,1.41357 1.12525,2.81785 2.50123,3.58819 1.63695,0.97741 3.75116,0.87177 5.37117,0.12183 1.45556,-0.6631 2.42783,-2.00879 2.72974,-3.48703 -0.78863,0.02 -1.57727,0.04 -2.36589,0.06 -0.39428,-0.0735 -0.53876,0.12965 -0.59421,0.47951 -0.36955,0.97915 -1.52073,1.63343 -2.65858,1.40349 -1.08407,-0.21573 -1.81762,-1.19343 -1.95757,-2.16577 2.50478,-0.45966 5.00955,-0.91932 7.51431,-1.37898 z m -16.00706,-3.43284 c 0.14388,3.61084 0.28777,7.2217 0.43168,10.83254 0.99843,-0.18324 1.99687,-0.36644 2.99529,-0.54966 -0.14391,-3.61086 -0.28778,-7.22171 -0.4317,-10.83255 -0.99842,0.18322 -1.99683,0.36645 -2.99527,0.54967 z m -0.16894,-4.11999 c 0.0365,0.8838 0.0729,1.76759 0.10934,2.65137 0.99844,-0.18322 1.99687,-0.36645 2.99531,-0.54967 -0.0365,-0.88379 -0.0729,-1.76757 -0.10936,-2.65136 -0.99843,0.18321 -1.99686,0.36646 -2.99529,0.54966 z m -6.005723,16.16487 c 1.546173,-5.30466 3.092353,-10.60931 4.638543,-15.91397 -1.04018,0.19088 -2.08035,0.38177 -3.12053,0.57264 -1.154913,4.01018 -2.309823,8.02033 -3.464753,12.03052 -1.60381,-3.50393 -3.20762,-7.00783 -4.81143,-10.51172 -1.04713,0.19215 -2.09427,0.38431 -3.1414,0.57648 2.17967,4.62092 4.35934,9.24184 6.53901,13.86275 1.12019,-0.20557 2.24037,-0.41113 3.36056,-0.6167 z m -20.72335,0.75139 0,0 0.05474,0.0875 c 0.79833,1.32182 2.36719,2.20192 3.9639,2.23843 1.40985,0.0463 2.83303,-0.17575 4.09418,-0.70926 1.48437,-0.62314 2.61588,-2.09523 2.3819,-3.68515 -0.08971,-0.92806 -0.78059,-1.76662 -1.69391,-2.16344 -1.40015,-0.56953 -2.93377,-0.54087 -4.40374,-0.73627 -0.568,-0.005 -1.32478,-0.33898 -1.21019,-0.96962 0.16043,-0.73747 1.05716,-0.94565 1.75416,-1.0453 0.8589,-0.12809 1.92132,0.0709 2.41086,0.84592 0.8822,-0.31944 1.76443,-0.63889 2.64663,-0.95833 -0.57755,-1.19213 -1.9358,-1.99895 -3.30945,-2.03156 -1.43362,-0.0441 -2.87533,0.22629 -4.134,0.80909 -1.23145,0.57533 -2.25341,1.74421 -2.14136,3.11034 0.05107,0.99659 0.71385,1.99111 1.7372,2.39211 1.45386,0.49997 3.00241,0.53773 4.50007,0.80897 0.5888,0.0313 1.06648,0.6328 0.80125,1.13907 -0.46426,0.82641 -1.57423,1.07384 -2.52814,1.09422 -0.88118,0.0387 -1.65552,-0.52767 -2.1366,-1.19036 -0.92917,0.32121 -1.85834,0.64242 -2.7875,0.96363 z"
622
+ id="path78356-0"
623
+ style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';opacity:0.53982299;fill:#ff4300;fill-opacity:1;stroke:#000000;stroke-width:0.14506666;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter78638-0)"
624
+ inkscape:connector-curvature="0" />
625
+ <path
626
+ inkscape:transform-center-x="1.1896032"
627
+ inkscape:transform-center-y="-0.040916555"
628
+ transform="matrix(1.1645808,0,0,1.1687526,-22.635297,-74.413789)"
629
+ d="m 145.71273,160.19173 c -1.17675,-5.00695 -2.35352,-10.0139 -3.53028,-15.02089 -0.98962,0.79738 -1.97927,1.59476 -2.9689,2.39214 0.8771,3.28579 1.75422,6.57158 2.63132,9.85738 -2.13134,-2.27523 -4.26266,-4.55047 -6.394,-6.8257 -0.89686,0.72262 -1.79371,1.44524 -2.69057,2.16787 0.87023,3.29132 1.74047,6.58266 2.6107,9.87399 -2.26191,-2.17003 -4.52382,-4.34006 -6.78575,-6.51007 -0.87623,0.70601 -1.75247,1.41202 -2.62872,2.11802 3.45156,3.17411 6.90311,6.34823 10.35466,9.52232 0.91402,-0.73645 1.82808,-1.47293 2.74212,-2.20938 -0.79278,-3.15188 -1.58557,-6.30375 -2.37834,-9.4556 2.08478,2.11084 4.16961,4.2217 6.2544,6.33254 0.9278,-0.74753 1.85559,-1.49508 2.78336,-2.24262 z m -20.24938,5.93605 c -1.54288,1.24313 -3.08575,2.48626 -4.62861,3.7294 -0.38036,-0.68108 -0.67415,-1.42911 -0.71209,-2.21247 -0.10371,-1.39173 0.84708,-2.8543 2.29597,-3.13393 1.27402,-0.24718 2.36137,0.67779 3.04473,1.617 z m 3.97505,-0.25889 c -0.66712,-1.27732 -1.58901,-2.45553 -2.74272,-3.34999 -1.46801,-1.17448 -3.61571,-1.50569 -5.35342,-0.69208 -1.66191,0.78523 -3.04887,2.14827 -3.8397,3.77597 -1.21542,2.61738 -0.56948,5.79483 1.20561,8.00225 1.13204,1.49021 2.84893,2.65618 4.79567,2.76231 2.35099,0.19784 4.60149,-1.15318 5.94162,-2.97406 1.21024,-1.62345 1.50003,-3.76806 0.98084,-5.67927 -0.85063,0.48116 -1.70126,0.96232 -2.55189,1.44348 -0.47323,0.14248 -0.51447,0.46492 -0.3741,0.90796 0.15854,1.36434 -0.72404,2.80081 -2.10002,3.19112 -1.30899,0.37577 -2.67259,-0.3467 -3.38416,-1.40738 2.47409,-1.99344 4.94818,-3.98688 7.42227,-5.98031 z m -19.47068,5.25816 c 2.23167,4.15697 4.46336,8.31397 6.69504,12.47094 0.98621,-0.79462 1.97242,-1.58921 2.95861,-2.38381 -2.23169,-4.15698 -4.46338,-8.31398 -6.69506,-12.47094 -0.9862,0.7946 -1.97239,1.5892 -2.95859,2.38381 z m -2.55156,-4.74038 c 0.54758,1.01675 1.09514,2.0335 1.6427,3.05025 0.9862,-0.7946 1.97241,-1.58922 2.95861,-2.38382 -0.54757,-1.01675 -1.09512,-2.0335 -1.64271,-3.05025 -0.9862,0.79461 -1.9724,1.58923 -2.9586,2.38382 z m 2.72119,22.46901 c -1.35721,-7.12697 -2.71442,-14.25394 -4.07162,-21.38092 -1.02745,0.82782 -2.05488,1.65566 -3.08232,2.48348 1.04127,5.37969 2.08253,10.75937 3.12379,16.13908 -3.76621,-3.18416 -7.532403,-6.3683 -11.298593,-9.55242 -1.0343,0.83335 -2.06862,1.66672 -3.10293,2.50009 5.03742,4.16174 10.074853,8.32348 15.112263,12.4852 1.10647,-0.89151 2.21294,-1.783 3.31941,-2.67451 z m -22.222633,12.90907 0,0 0.11013,0.071 c 1.63208,1.089 3.85273,1.21209 5.61919,0.32833 1.56781,-0.76383 2.99603,-1.85052 4.06821,-3.20897 1.26469,-1.59324 1.65591,-3.97869 0.48676,-5.71008 -0.63124,-1.03783 -1.86822,-1.62165 -3.09463,-1.55764 -1.8578,0.14374 -3.51784,1.06742 -5.23703,1.69103 -0.62358,0.32422 -1.64296,0.37074 -1.87999,-0.43637 -0.24829,-0.95916 0.61239,-1.72406 1.31709,-2.24559 0.86535,-0.64887 2.14105,-1.03182 3.12148,-0.4057 0.78089,-0.88713 1.56179,-1.77427 2.34268,-2.66139 -1.31623,-1.06483 -3.26455,-1.22409 -4.78491,-0.4652 -1.59253,0.78023 -3.01326,1.93442 -4.05439,3.34931 -1.01566,1.39033 -1.46134,3.35611 -0.55404,4.89544 0.62837,1.14073 1.92425,1.92404 3.27331,1.80106 1.87655,-0.25658 3.59107,-1.11094 5.38411,-1.66154 0.66165,-0.30492 1.52939,0.12422 1.53031,0.87269 -0.03278,1.23994 -1.10403,2.17467 -2.13511,2.75221 -0.94107,0.55683 -2.1129,0.3411 -3.01954,-0.15795 -0.83121,0.91644 -1.66242,1.83291 -2.49363,2.74935 z"
630
+ id="path77381-6"
631
+ style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';opacity:0.8053097;fill:#ff4300;fill-opacity:1;stroke:#000000;stroke-width:0.14506666;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter78450-0)"
632
+ inkscape:connector-curvature="0" />
633
+ <path
634
+ inkscape:transform-center-x="1.268782"
635
+ d="m 158.66511,106.3675 c -1.88115,-6.740483 -3.76231,-13.480953 -5.64347,-20.221453 -1.21568,1.15128 -2.4314,2.30255 -3.6471,3.45384 1.36949,4.41645 2.739,8.83292 4.1085,13.249403 -2.91024,-2.957403 -5.82047,-5.914803 -8.73072,-8.872193 -1.10174,1.04335 -2.20346,2.0867 -3.30519,3.13004 1.36103,4.424443 2.7221,8.848923 4.08316,13.273383 -3.07064,-2.80549 -6.14129,-5.61098 -9.21195,-8.41646 -1.07639,1.01936 -2.1528,2.0387 -3.22921,3.05806 4.6756,4.09414 9.35118,8.18832 14.02677,12.28246 1.12283,-1.06332 2.24569,-2.12665 3.36853,-3.18999 -1.25115,-4.23968 -2.5023,-8.47934 -3.75343,-12.71899 2.8383,2.73661 5.67663,5.47323 8.51493,8.20985 1.13973,-1.07932 2.27946,-2.15865 3.41918,-3.23795 z m -25.63428,9.42242 c -1.89532,1.79488 -3.79064,3.58973 -5.68596,5.38461 -0.53947,-0.90232 -0.97239,-1.90152 -1.07854,-2.96577 -0.23531,-1.88834 0.88174,-3.94288 2.72654,-4.41948 1.62205,-0.42085 3.08954,0.76685 4.03796,2.00064 z m 5.09843,-0.61538 c -0.95226,-1.69529 -2.22527,-3.23879 -3.77592,-4.38053 -1.97579,-1.5023 -4.7649,-1.81131 -6.94247,-0.58847 -2.08205,1.17918 -3.76788,3.12702 -4.66693,5.39586 -1.37324,3.64463 -0.30927,7.92884 2.13739,10.81745 1.56636,1.95444 3.86191,3.4287 6.37586,3.4445 3.04106,0.11396 5.83946,-1.87463 7.43154,-4.44285 1.43927,-2.29077 1.65547,-5.23039 0.84728,-7.79865 -1.05989,0.71145 -2.11975,1.42293 -3.17963,2.1344 -0.59881,0.22532 -0.62832,0.66713 -0.41521,1.26116 0.30391,1.84743 -0.72724,3.86191 -2.47009,4.48441 -1.65766,0.59826 -3.46598,-0.2954 -4.4596,-1.69275 3.03925,-2.87818 6.07852,-5.75636 9.11778,-8.63453 z m -24.68138,8.44781 c 3.17706,5.51325 6.35412,11.0265 9.53118,16.53975 1.21149,-1.14728 2.42299,-2.29454 3.63446,-3.44182 -3.17705,-5.51324 -6.35413,-11.0265 -9.53119,-16.53974 -1.21149,1.14727 -2.42296,2.29453 -3.63445,3.44181 z m -3.63153,-6.28654 c 0.7793,1.34836 1.55859,2.69672 2.33787,4.04507 1.21149,-1.14726 2.42298,-2.29454 3.63447,-3.44181 -0.7793,-1.34837 -1.55858,-2.69672 -2.33788,-4.04509 -1.21148,1.14727 -2.42297,2.29455 -3.63446,3.44183 z m 5.14665,30.41749 c -2.26852,-9.61549 -4.53705,-19.23099 -6.80556,-28.84649 -1.26215,1.19523 -2.5243,2.39049 -3.78644,3.58574 1.73398,7.25699 3.46796,14.51399 5.20194,21.771 -5.08139,-4.08702 -10.162803,-8.17403 -15.244163,-12.26101 -1.2706,1.20322 -2.54118,2.40646 -3.811763,3.6097 6.789443,5.3342 13.578876,10.66841 20.368306,16.00261 1.35924,-1.28718 2.71845,-2.57436 4.07768,-3.86155 z m -27.664556,19.04852 0,0 0.14699,0.0894 c 2.18074,1.37505 5.048543,1.39583 7.257993,0.0756 1.9625,-1.14383 3.72165,-2.71809 5.00258,-4.63888 1.511593,-2.25323 1.840743,-5.5275 0.20898,-7.80795 -0.88855,-1.37154 -2.52372,-2.08475 -4.09787,-1.9165 -2.38117,0.31857 -4.450683,1.68619 -6.618333,2.64908 -0.77904,0.48274 -2.08796,0.61349 -2.45215,-0.46993 -0.3898,-1.28974 0.66229,-2.38827 1.53134,-3.14507 1.06656,-0.94083 2.68084,-1.54664 3.988813,-0.75885 0.94042,-1.25969 1.88085,-2.5194 2.82125,-3.77909 -1.77236,-1.363 -4.292223,-1.45106 -6.193993,-0.3171 -1.9931,1.16779 -3.73768,2.83347 -4.97452,4.82906 -1.205833,1.96045 -1.635803,4.66685 -0.35519,6.70306 0.89239,1.51184 2.61798,2.49284 4.34572,2.23615 2.39704,-0.47346 4.541783,-1.75028 6.809823,-2.61862 0.82947,-0.45896 1.97798,0.068 2.03389,1.0872 0.04849,1.69068 -1.26222,3.03439 -2.54736,3.88905 -1.17078,0.8205 -2.69513,0.6042 -3.898843,-0.0154 -1.00303,1.30294 -2.00607,2.60591 -3.00912,3.90886 z"
636
+ id="text75582-2"
637
+ style="font-style:normal;font-weight:normal;font-size:12px;font-family:'Bitstream Vera Sans';fill:#ff2a2a;fill-opacity:1;stroke:#000000;stroke-width:1.16666484px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
638
+ inkscape:connector-curvature="0" />
639
+ </g>
640
+ <ellipse
641
+ transform="matrix(0.65810333,0,0,0.65765029,450.12071,853.51489)"
642
+ id="path2640-9"
643
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.53164559;fill:url(#radialGradient7353);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.40487173;marker:none"
644
+ cx="24.714285"
645
+ cy="38.57143"
646
+ rx="19.714285"
647
+ ry="6.5714288" />
648
+ <circle
649
+ transform="matrix(1.3709227,0,0,1.3699789,423.4365,842.66876)"
650
+ id="path2642-9"
651
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#radialGradient7355);fill-opacity:1;fill-rule:evenodd;stroke:#9c8c0a;stroke-width:0.48004404;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none"
652
+ cx="31.112698"
653
+ cy="19.008621"
654
+ r="8.6620579" />
655
+ <g
656
+ id="g2644-0"
657
+ transform="matrix(0.65810333,0,0,0.65765029,450.12071,853.51489)">
658
+ <ellipse
659
+ transform="translate(-2.875,-0.625)"
660
+ id="path2646-8"
661
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999946;marker:none"
662
+ cx="36"
663
+ cy="19.1875"
664
+ rx="2.375"
665
+ ry="0.5625" />
666
+ <ellipse
667
+ transform="translate(-20.25,-0.625)"
668
+ id="path2648-1"
669
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999946;marker:none"
670
+ cx="36"
671
+ cy="19.1875"
672
+ rx="2.375"
673
+ ry="0.5625" />
674
+ </g>
675
+ <circle
676
+ transform="matrix(1.3029011,0,0,1.3020042,425.55287,843.9609)"
677
+ id="path2650-3"
678
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.67721522;fill:none;stroke:#ffffff;stroke-width:0.50510627;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none"
679
+ cx="31.112698"
680
+ cy="19.008621"
681
+ r="8.6620579" />
682
+ <path
683
+ d="m 470.29647,871.12176 c -0.97991,1.69606 -2.12566,2.9184 -4.16528,2.9184 -1.98159,0 -3.43221,-1.40878 -4.33755,-2.97579 0.82818,0.99203 2.04101,2.1316 4.25142,2.1316 2.64109,0 3.10289,-0.94364 4.25141,-2.07421 z"
684
+ sodipodi:nodetypes="czczc"
685
+ id="path2652-1"
686
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.36000001;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none"
687
+ inkscape:connector-curvature="0" />
688
+ <path
689
+ d="m 470.29647,870.89221 c -0.97991,1.69607 -2.12566,2.91841 -4.16528,2.91841 -1.98159,0 -3.43221,-1.40879 -4.33755,-2.97579 0.82818,0.99203 2.04101,2.1316 4.25142,2.1316 2.64109,0 3.10289,-0.94365 4.25141,-2.07422 z"
690
+ sodipodi:nodetypes="czczc"
691
+ id="path2654-1"
692
+ style="fill:url(#radialGradient7357);fill-rule:nonzero;stroke:none"
693
+ inkscape:connector-curvature="0" />
694
+ <circle
695
+ transform="matrix(0.65810333,0,0,0.65765029,450.3675,855.32343)"
696
+ id="path2656-0"
697
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#414141;stroke-width:0.99999946;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none"
698
+ cx="11.490486"
699
+ cy="12.467883"
700
+ r="9.5459423" />
701
+ <circle
702
+ transform="matrix(0.65810333,0,0,0.65765029,466.53839,855.32343)"
703
+ id="path2658-3"
704
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#414141;stroke-width:0.99999946;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none"
705
+ cx="11.490486"
706
+ cy="12.467883"
707
+ r="9.5459423" />
708
+ <path
709
+ sodipodi:ry="6.5936913"
710
+ sodipodi:rx="6.1559095"
711
+ transform="matrix(-0.26439301,-0.31536435,0.31558162,-0.26421102,464.96555,871.02982)"
712
+ sodipodi:end="1.3891474"
713
+ sodipodi:start="0"
714
+ d="m 17.646396,12.467883 a 6.1559095,6.5936913 0 0 1 -5.043835,6.485206"
715
+ sodipodi:open="true"
716
+ sodipodi:cy="12.467883"
717
+ sodipodi:cx="11.490486"
718
+ id="path2660-4"
719
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#414141;stroke-width:1.59850872;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none"
720
+ sodipodi:type="arc" />
721
+ <circle
722
+ transform="matrix(0.67926663,0,0,0.678799,462.13838,850.97333)"
723
+ id="path2662-0"
724
+ style="color:#000000;visibility:visible;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:#3063a3;stroke-width:0.968844;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dashoffset:0;stroke-opacity:1;marker:none"
725
+ cx="17.589281"
726
+ cy="18.478292"
727
+ r="8.3085051" />
728
+ <path
729
+ d="m 473.97966,858.59102 c -2.52918,0 -4.57723,2.04664 -4.57723,4.57408 0,0.72993 0.20413,1.40155 0.50858,2.0141 0.60825,0.22404 1.25437,0.37646 1.94015,0.37646 2.99705,0 5.3906,-2.35953 5.57555,-5.30819 -0.84068,-0.99276 -2.04469,-1.65645 -3.44705,-1.65645 z"
730
+ id="path2664-3"
731
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.83422457;fill:url(#radialGradient7359);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none"
732
+ inkscape:connector-curvature="0" />
733
+ <circle
734
+ transform="matrix(0.67926663,0,0,0.678799,445.99489,850.97333)"
735
+ id="path2666-9"
736
+ style="color:#000000;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke:#3063a3;stroke-width:0.968844;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dashoffset:0;stroke-opacity:1;marker:none"
737
+ cx="17.589281"
738
+ cy="18.478292"
739
+ r="8.3085051" />
740
+ <path
741
+ d="m 457.83617,858.59102 c -2.52918,0 -4.57724,2.04664 -4.57724,4.57408 0,0.72993 0.20414,1.40155 0.50859,2.0141 0.60824,0.22404 1.25437,0.37646 1.94014,0.37646 2.99706,0 5.39061,-2.35953 5.57556,-5.30819 -0.84067,-0.99276 -2.04469,-1.65645 -3.44705,-1.65645 z"
742
+ id="path2668-1"
743
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.83422457;fill:url(#radialGradient7361);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none"
744
+ inkscape:connector-curvature="0" />
745
+ </g>
746
+ </g>
747
+</svg>
748
sview-15_10.tar.gz/include/StAV/StAVVideoMuxer.h
Added
104
1
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#ifndef __StAVVideoMuxer_h_
11
+#define __StAVVideoMuxer_h_
12
+
13
+#include <StGLStereo/StFormatEnum.h>
14
+#include <StSlots/StSignal.h>
15
+#include <StTemplates/StArrayList.h>
16
+
17
+struct AVFormatContext;
18
+struct AVCodecContext;
19
+struct AVCodec;
20
+struct AVFrame;
21
+struct AVStream;
22
+
23
+/**
24
+ * This class implements video re-muxing operation using libav* libraries.
25
+ */
26
+class StAVVideoMuxer {
27
+
28
+ protected:
29
+
30
+ struct StRemuxContext {
31
+ AVFormatContext* Context;
32
+ bool State;
33
+ StArrayList<unsigned int> Streams;
34
+
35
+ StRemuxContext() : Context(NULL), State(true) {}
36
+ };
37
+
38
+ public:
39
+
40
+ /**
41
+ * Initialize empty image.
42
+ */
43
+ ST_CPPEXPORT StAVVideoMuxer();
44
+
45
+ /**
46
+ * Destructor.
47
+ */
48
+ ST_CPPEXPORT virtual ~StAVVideoMuxer();
49
+
50
+ /**
51
+ * Close currently opened files.
52
+ */
53
+ ST_CPPEXPORT void close();
54
+
55
+ /**
56
+ * Return stereo format.
57
+ */
58
+ ST_LOCAL StFormat getStereoFormat() const { return myStereoFormat; }
59
+
60
+ /**
61
+ * Set stereo format.
62
+ */
63
+ ST_LOCAL void setStereoFormat(const StFormat theStereoFormat) { myStereoFormat = theStereoFormat; }
64
+
65
+ /**
66
+ * Add input file.
67
+ */
68
+ ST_CPPEXPORT bool addFile(const StString& theFileToLoad);
69
+
70
+ /**
71
+ * Save to the file.
72
+ */
73
+ ST_CPPEXPORT virtual bool save(const StString& theFile);
74
+
75
+ public: //! @name signals
76
+
77
+ /**
78
+ * All callback handlers should be thread-safe.
79
+ */
80
+ struct {
81
+ /**
82
+ * Emit callback Slot on error.
83
+ * @param theUserData (const StString& ) - error description.
84
+ */
85
+ StSignal<void (const StCString& )> onError;
86
+ } signals;
87
+
88
+ protected:
89
+
90
+ /**
91
+ * Create output stream from input stream.
92
+ */
93
+ ST_CPPEXPORT bool addStream(AVFormatContext* theContext,
94
+ const AVStream* theStream);
95
+
96
+ private:
97
+
98
+ StArrayList<AVFormatContext*> myCtxListSrc;
99
+ StFormat myStereoFormat;
100
+
101
+};
102
+
103
+#endif // __StAVVideoMuxer_h_
104
sview-15_08.tar.gz/include/StAV/stAV.h -> sview-15_10.tar.gz/include/StAV/stAV.h
Changed
13
1
2
3
#include <libavcodec/avcodec.h>
4
#include <libavformat/avformat.h>
5
+ #include <libavutil/avutil.h>
6
#include <libswscale/swscale.h>
7
8
+ #include <libavutil/mathematics.h>
9
+
10
// new stereoscopic info API
11
#if(LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 56, 100))
12
#define ST_AV_NEWSTEREO
13
sview-15_08.tar.gz/include/StCore/StAndroidGlue.h -> sview-15_10.tar.gz/include/StCore/StAndroidGlue.h
Changed
120
1
2
/**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* StCore library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
9
#include <StStrings/StString.h>
10
#include <StThreads/StMutex.h>
11
#include <StThreads/StThread.h>
12
+#include <StTemplates/StQuaternion.h>
13
14
#include <android/configuration.h>
15
#include <android/native_activity.h>
16
17
CommandId_Pause, //!< activity has been paused
18
CommandId_Stop, //!< activity has been stopped
19
CommandId_Destroy, //!< activity is being destroyed, and waiting for the application thread to clean up and exit before proceeding
20
+ CommandId_BackPressed, //!< pressed special back button
21
};
22
23
/**
24
25
}
26
27
/**
28
- * Pop onNewIntent() open file event.
29
+ * Return true if device has orientation sensor.
30
*/
31
- ST_CPPEXPORT bool popOpenNewFile(StString& theNewFile);
32
+ ST_LOCAL bool hasOrientationSensor() const { return myHasOrientSensor; }
33
+
34
+ /**
35
+ * Return true if orientation sensor has poor quality.
36
+ */
37
+ ST_LOCAL bool isPoorOrientationSensor() const { return myIsPoorOrient; }
38
+
39
+ /**
40
+ * Turn orientation sensor on/off.
41
+ * Has no effect in case if sensor is unavailable.
42
+ */
43
+ ST_CPPEXPORT void setTrackOrientation(const bool theToTrack);
44
+
45
+ /**
46
+ * Fetch current state:
47
+ * @param theNewFile pop onNewIntent() open file event
48
+ * @param theQuaternion device orientation
49
+ */
50
+ ST_CPPEXPORT void fetchState(StString& theNewFile,
51
+ StQuaternion<double>& theQuaternion);
52
53
/**
54
* Return device memory class.
55
56
*/
57
ST_CPPEXPORT void postExit();
58
59
+ /**
60
+ * Low-level method to write command into queue.
61
+ */
62
+ ST_CPPEXPORT bool writeCommand(const int8_t theCmd);
63
+
64
public: //! @name Signals
65
66
struct {
67
68
69
ST_CPPEXPORT void readOpenPath();
70
71
- ST_CPPEXPORT bool writeCommand(const int8_t theCmd);
72
ST_CPPEXPORT void printConfig();
73
ST_CPPEXPORT void freeSavedState();
74
75
76
77
ST_CPPEXPORT void threadEntry();
78
79
+ public: //! @name StActivity callbacks
80
+
81
+ /**
82
+ * Define device orientation sensor.
83
+ * @param theHasSensor flag indicating that device has orientation sensors
84
+ * @param theIsPoor flag indicating that available orientation sensor provides imprecise values
85
+ */
86
+ ST_LOCAL void defineOrientationSensor(bool theHasSensor,
87
+ bool theIsPoor) {
88
+ myHasOrientSensor = theHasSensor;
89
+ myIsPoorOrient = theIsPoor;
90
+ }
91
+
92
+ /**
93
+ * Define device orientation by quaternion.
94
+ */
95
+ ST_LOCAL void setQuaternion(const StQuaternion<float>& theQ, const float theScreenRotDeg);
96
+
97
+ /**
98
+ * Define device orientation using deprecated Android API.
99
+ */
100
+ ST_LOCAL void setOrientation(float theAzimuthDeg, float thePitchDeg, float theRollDeg, float theScreenRotDeg);
101
+
102
private: //! @name ANativeActivity callbacks
103
104
ST_LOCAL static void processInputWrapper(StAndroidGlue* theApp,
105
106
StAndroidPollSource myCmdPollSource;
107
StAndroidPollSource myInputPollSource;
108
109
- StMutex myDndLock; //!< Drag & Drop data lock
110
+ StMutex myFetchLock; //!< fetch data lock
111
StString myDndPath; //!< intent data string
112
+ StString myCreatePath; //!< intent data string used to open this activity
113
+ StQuaternion<double> myQuaternion; //!< device orientation
114
+ bool myHasOrientSensor; //!< flag indicating that device has orientation sensors
115
+ bool myIsPoorOrient; //!< flag indicating that available orientation sensor provides imprecise values
116
+ bool myToTrackOrient; //!< track device orientation
117
118
bool myIsRunning;
119
bool myIsStateSaved;
120
sview-15_08.tar.gz/include/StCore/StApplication.h -> sview-15_10.tar.gz/include/StCore/StApplication.h
Changed
14
1
2
ST_CPPEXPORT virtual void doClose(const StCloseEvent& theEvent);
3
4
/**
5
+ * Process window pause event - application can be closed at any moment.
6
+ * Implementation should save the state to avoid data loss.
7
+ */
8
+ ST_CPPEXPORT virtual void doPause(const StPauseEvent& theEvent);
9
+
10
+ /**
11
* Process window resize.
12
*/
13
ST_CPPEXPORT virtual void doResize(const StSizeEvent& theEvent);
14
sview-15_08.tar.gz/include/StCore/StEvent.h -> sview-15_10.tar.gz/include/StCore/StEvent.h
Changed
34
1
2
enum StEventType {
3
stEvent_None, //!< StAnyEvent, undefined event
4
stEvent_Close, //!< StCloseEvent, window close requested
5
+ stEvent_Pause, //!< StPauseEvent, window can be closed at any moment
6
stEvent_Size, //!< StSizeEvent, window resized
7
stEvent_NewMonitor, //!< StSizeEvent, window moved to another monitor
8
stEvent_KeyDown, //!< StKeyEvent, keyboard key pressed
9
10
};
11
12
/**
13
+ * Pause window request.
14
+ */
15
+struct StPauseEvent {
16
+
17
+ StEventType Type; //!< event type
18
+ double Time; //!< time in seconds when event was registered
19
+
20
+};
21
+
22
+/**
23
* Window resize event.
24
*/
25
struct StSizeEvent {
26
27
StEventType Type; //!< event type
28
StAnyEvent Base; //!< fields shared between all event
29
StCloseEvent Close; //!< window close event
30
+ StPauseEvent Pause; //!< window pause event
31
StSizeEvent Size; //!< window resize event
32
StKeyEvent Key; //!< keyboard key down/up event
33
StClickEvent Button; //!< mouse button down/up event
34
sview-15_08.tar.gz/include/StCore/StOpenInfo.h -> sview-15_10.tar.gz/include/StCore/StOpenInfo.h
Changed
23
1
2
/**
3
* Automatically create formatted string from MIME.
4
*/
5
- void setMIME(const StMIME& mime) {
6
- this->mime = mime.toString();
7
+ void setMIME(const StMIME& theMime) {
8
+ this->mime = theMime.toString();
9
}
10
11
/**
12
13
/**
14
* Set path to open.
15
*/
16
- void setPath(const StString& path) {
17
- this->path = path;
18
+ void setPath(const StString& thePath) {
19
+ this->path = thePath;
20
}
21
22
/**
23
sview-15_08.tar.gz/include/StCore/StWindow.h -> sview-15_10.tar.gz/include/StCore/StWindow.h
Changed
75
1
2
ST_CPPEXPORT bool isActive() const;
3
4
/**
5
+ * Return true if window is in paused state (e.g. it is hidden and can be closed by system at any moment).
6
+ * Similar to !isActive() but more aggressive - application should consider destroying itself.
7
+ */
8
+ ST_CPPEXPORT bool isPaused() const;
9
+
10
+ /**
11
* Show up the window.
12
*/
13
ST_CPPEXPORT virtual void show();
14
15
ST_CPPEXPORT StRectI_t getPlacement() const;
16
17
/**
18
+ * Return GUI GL window placement in windowed state (ignores active full-screen placement).
19
+ */
20
+ ST_CPPEXPORT StRectI_t getWindowedPlacement() const;
21
+
22
+ /**
23
* Return false if window position or dimensions can not be changes
24
* (systems supports only full-screen mode, or window is embedded).
25
*/
26
27
ST_CPPEXPORT void setTargetFps(const double theFPS);
28
29
/**
30
+ * Return optional statistics for verbose output.
31
+ */
32
+ ST_CPPEXPORT const StString& getStatistics() const;
33
+
34
+ /**
35
+ * Return true if device has orientation sensor.
36
+ */
37
+ ST_CPPEXPORT virtual bool hasOrientationSensor() const;
38
+
39
+ /**
40
+ * Return true if orientation sensor has poor quality.
41
+ */
42
+ ST_CPPEXPORT virtual bool isPoorOrientationSensor() const;
43
+
44
+ /**
45
+ * Return true if orientation sensor has been enabled.
46
+ */
47
+ ST_CPPEXPORT virtual bool toTrackOrientation() const;
48
+
49
+ /**
50
+ * Turn orientation sensor on/off.
51
+ * Has no effect in case if sensor is unavailable.
52
+ */
53
+ ST_CPPEXPORT virtual void setTrackOrientation(const bool theToTrack);
54
+
55
+ /**
56
+ * Return device orientation (for head-tracking) within right-handed coordinate system:
57
+ * - Y is positive in up direction (towards the sky, perpendicular to the ground).
58
+ * - X is positive to the right (tangential to the ground).
59
+ * - Z is positive heading backwards (tangential to the ground).
60
+ */
61
+ ST_CPPEXPORT virtual StQuaternion<double> getDeviceOrientation() const;
62
+
63
+ /**
64
* Retrieve options list.
65
*/
66
ST_CPPEXPORT virtual void getOptions(StParamsList& theList) const;
67
68
StSignal<void (const unsigned int )> onRedraw;
69
70
StSignal<void (const StCloseEvent& )> onClose;
71
+ StSignal<void (const StPauseEvent& )> onPause;
72
StSignal<void (const StSizeEvent& )> onResize;
73
StSignal<void (const StSizeEvent& )> onAnotherMonitor;
74
StSignal<void (const StKeyEvent& )> onKeyUp;
75
sview-15_08.tar.gz/include/StFile/StNode.h -> sview-15_10.tar.gz/include/StFile/StNode.h
Changed
19
1
2
/**
3
- * Copyright © 2010 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
return subPath;
10
}
11
12
- virtual void setSubPath(const StString& subPath) {
13
- this->subPath = subPath;
14
+ virtual void setSubPath(const StString& theSubPath) {
15
+ this->subPath = theSubPath;
16
}
17
18
virtual StString getPath() const {
19
sview-15_08.tar.gz/include/StGL/StGLContext.h -> sview-15_10.tar.gz/include/StGL/StGLContext.h
Changed
9
1
2
bool arbNPTW; //!< GL_ARB_texture_non_power_of_two
3
bool arbTexRG; //!< GL_ARB_texture_rg
4
bool arbTexClear;//!< GL_ARB_clear_texture
5
+ bool hasUnpack; //!< GL_PACK_ROW_LENGTH / GL_UNPACK_ROW_LENGTH can be used - OpenGL ES 3.0+ or any desktop
6
bool hasHighp; //!< highp in GLSL ES fragment shader is supported
7
bool hasTexRGBA8;//!< always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_rgb8_rgba8
8
bool extTexBGRA8;//!< GL_EXT_texture_format_BGRA8888 for OpenGL ES
9
sview-15_08.tar.gz/include/StGL/StGLFunctions.h -> sview-15_10.tar.gz/include/StGL/StGLFunctions.h
Changed
67
1
2
#include <GLES2/gl2.h>
3
///#include <GLES3/gl3.h>
4
5
+ // in core since OpenGL ES 3.0
6
+ #define GL_UNPACK_ROW_LENGTH 0x0CF2
7
+ #define GL_UNPACK_SKIP_ROWS 0x0CF3
8
+ #define GL_UNPACK_SKIP_PIXELS 0x0CF4
9
+ #define GL_PACK_ROW_LENGTH 0x0D02
10
+ #define GL_PACK_SKIP_ROWS 0x0D03
11
+ #define GL_PACK_SKIP_PIXELS 0x0D04
12
+
13
// in core since OpenGL ES 3.0, extension GL_EXT_texture_rg
14
#define GL_RED 0x1903
15
#define GL_R8 0x8229
16
17
public: //! @name CGL extensions
18
19
#else
20
- public: //! @name glX extensions
21
+ public: //! @name GLX extensions
22
23
// GLX_EXT_swap_control
24
//typedef int (*glXSwapIntervalEXT_t)(Display* theDisplay, GLXDrawable theDrawable, int theInterval);
25
26
27
typedef int (*glXSwapIntervalSGI_t)(int theInterval);
28
glXSwapIntervalSGI_t glXSwapIntervalSGI;
29
+
30
+ // GLX_MESA_query_renderer
31
+
32
+#ifndef GLX_RENDERER_VENDOR_ID_MESA
33
+ // for glXQueryRendererIntegerMESA() and glXQueryCurrentRendererIntegerMESA()
34
+ #define GLX_RENDERER_VENDOR_ID_MESA 0x8183
35
+ #define GLX_RENDERER_DEVICE_ID_MESA 0x8184
36
+ #define GLX_RENDERER_VERSION_MESA 0x8185
37
+ #define GLX_RENDERER_ACCELERATED_MESA 0x8186
38
+ #define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
39
+ #define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
40
+ #define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
41
+ #define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
42
+ #define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
43
+ #define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
44
+ #define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
45
+
46
+ #define GLX_RENDERER_ID_MESA 0x818E
47
+#endif // GLX_RENDERER_VENDOR_ID_MESA
48
+
49
+ typedef void* stglxDisplay_t; // Display*
50
+ typedef int stglxBool; // Bool
51
+ typedef stglxBool (*glXQueryRendererIntegerMESA_t)(stglxDisplay_t dpy, int screen,
52
+ int renderer, int attribute,
53
+ unsigned int *value);
54
+ typedef stglxBool (*glXQueryCurrentRendererIntegerMESA_t)(int attribute, unsigned int *value);
55
+ typedef const char* (*glXQueryRendererStringMESA_t)(stglxDisplay_t dpy, int screen,
56
+ int renderer, int attribute);
57
+ typedef const char* (*glXQueryCurrentRendererStringMESA_t)(int attribute);
58
+
59
+ glXQueryRendererIntegerMESA_t glXQueryRendererIntegerMESA;
60
+ glXQueryCurrentRendererIntegerMESA_t glXQueryCurrentRendererIntegerMESA;
61
+ glXQueryRendererStringMESA_t glXQueryRendererStringMESA;
62
+ glXQueryCurrentRendererStringMESA_t glXQueryCurrentRendererStringMESA;
63
+
64
#endif
65
66
#endif // OpenGL desktop or ES
67
sview-15_08.tar.gz/include/StGL/StGLMatrix.h -> sview-15_10.tar.gz/include/StGL/StGLMatrix.h
Changed
20
1
2
/**
3
- * Copyright © 2010-2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
ST_CPPEXPORT StGLMatrix(const StGLMatrix& copyMat);
10
11
/**
12
+ * Construct rotation matrix from quaternion.
13
+ */
14
+ ST_CPPEXPORT explicit StGLMatrix(const StGLQuaternion& theQ);
15
+
16
+ /**
17
* Assignment operator.
18
*/
19
ST_CPPEXPORT const StGLMatrix& operator=(const StGLMatrix& copyMat);
20
sview-15_08.tar.gz/include/StGL/StGLTexture.h -> sview-15_10.tar.gz/include/StGL/StGLTexture.h
Changed
14
1
2
* @param theData the image plane to copy data from
3
* @param theTarget texture target
4
* @param theRowFrom fill data from row (for both - input image plane and the texture!)
5
- * @param theRowTo fill data up to the row (if zero - all rows)
6
+ * @param theRowTo fill data up to the row (0 means all rows)
7
* @param theBatchRows maximal step for GL function call (greater - more effective)
8
+ * 0 to copy in single batch
9
+ * 1 to copy row-by-row
10
+ * N to copy in batches of specified number of rows
11
* @return true on success
12
*/
13
ST_CPPEXPORT bool fillPatch(StGLContext& theCtx,
14
sview-15_08.tar.gz/include/StGL/StGLVec.h -> sview-15_10.tar.gz/include/StGL/StGLVec.h
Changed
15
1
2
#include <StTemplates/StVec2.h>
3
#include <StTemplates/StVec3.h>
4
#include <StTemplates/StVec4.h>
5
+#include <StTemplates/StQuaternion.h>
6
#include <StTemplates/StArrayList.h>
7
8
typedef StVec2<GLfloat> StGLVec2;
9
typedef StVec3<GLfloat> StGLVec3;
10
typedef StVec4<GLfloat> StGLVec4;
11
+typedef StQuaternion<GLfloat> StGLQuaternion;
12
13
/**
14
* POD structure for OpenGL rectangle in window coordinates (y coordinates is from bottom corner).
15
sview-15_08.tar.gz/include/StGL/StParams.h -> sview-15_10.tar.gz/include/StGL/StParams.h
Changed
83
1
2
/**
3
* Main constructor - default parameters.
4
*/
5
- StStereoParams(ViewMode theViewMode = FLAT_IMAGE)
6
- : ViewingMode(theViewMode),
7
+ StStereoParams()
8
+ : Src1SizeX(0),
9
+ Src1SizeY(0),
10
+ Src2SizeX(0),
11
+ Src2SizeY(0),
12
+ ViewingMode(FLAT_IMAGE),
13
Timestamp(0.0f),
14
StereoFormat(StFormat_Mono),
15
ToSwapLR(false),
16
17
18
void moveSphere(const StGLVec2& theMoveVec) {
19
PanPhi += theMoveVec.x();
20
- PanTheta += theMoveVec.y();
21
+ PanTheta = clipPitch(PanTheta + theMoveVec.y());
22
}
23
24
void moveToRight(const GLfloat theDuration = 0.02f) {
25
26
}
27
}
28
29
+ /**
30
+ * Clip pitch angle to the range [-90, 90] degrees.
31
+ */
32
+ static float clipPitch(const float thePitchDeg) {
33
+ if(thePitchDeg <= -90.0f) {
34
+ return -90.0f;
35
+ } else if(thePitchDeg >= 90.0f) {
36
+ return 90.0f;
37
+ }
38
+ return thePitchDeg;
39
+ }
40
+
41
void moveToDown(const GLfloat theDuration = 0.02f) {
42
switch(ViewingMode) {
43
case PANORAMA_SPHERE:
44
- case PANORAMA_CUBEMAP: PanTheta -= 100.0f * theDuration; break;
45
+ case PANORAMA_CUBEMAP:
46
+ PanTheta = clipPitch(PanTheta - 100.0f * theDuration);
47
+ break;
48
case FLAT_IMAGE:
49
- default: PanCenter.y() -= 0.5f * theDuration / ScaleFactor;
50
+ default:
51
+ PanCenter.y() -= 0.5f * theDuration / ScaleFactor;
52
+ break;
53
}
54
}
55
56
void moveToUp(const GLfloat theDuration = 0.02f) {
57
switch(ViewingMode) {
58
case PANORAMA_SPHERE:
59
- case PANORAMA_CUBEMAP: PanTheta += 100.0f * theDuration; break;
60
+ case PANORAMA_CUBEMAP:
61
+ PanTheta = clipPitch(PanTheta + 100.0f * theDuration);
62
+ break;
63
case FLAT_IMAGE:
64
- default: PanCenter.y() += 0.5f * theDuration / ScaleFactor;
65
+ default:
66
+ PanCenter.y() += 0.5f * theDuration / ScaleFactor;
67
+ break;
68
}
69
}
70
71
72
73
public:
74
75
+ size_t Src1SizeX; //!< width of the 1st original image
76
+ size_t Src1SizeY; //!< height of the 1st original image
77
+ size_t Src2SizeX; //!< width of the 2nd original image
78
+ size_t Src2SizeY; //!< height of the 2nd original image
79
+
80
ViewMode ViewingMode; //!< viewing mode - panorama or flat image
81
GLfloat Timestamp; //!< playback timestamp
82
83
sview-15_08.tar.gz/include/StGL/StPlayList.h -> sview-15_10.tar.gz/include/StGL/StPlayList.h
Changed
14
1
2
ST_CPPEXPORT StString dumpRecentList() const;
3
4
/**
5
+ * Set last recent file to the currently played file.
6
+ * Has effect only for playlist automatically generated from opened file (not folder).
7
+ */
8
+ ST_CPPEXPORT void currentToRecent();
9
+
10
+ /**
11
* Open recent file at specified position.
12
* @param theItemId Position in recent files list
13
* @return saved parameters or NULL
14
sview-15_08.tar.gz/include/StGLStereo/StFormatEnum.h -> sview-15_10.tar.gz/include/StGLStereo/StFormatEnum.h
Changed
54
1
2
StCubemap_Packed //!< cubemap data packed into single image frame - 6 horizontally stacked planes
3
};
4
5
+enum StPanorama {
6
+ StPanorama_OFF = 0, //!< no cubemap data
7
+ StPanorama_Sphere, //!< spherical panorama
8
+ StPanorama_Cubemap6_1, //!< cubemap data packed into single image frame - 6:1
9
+ StPanorama_Cubemap3_2 //!< cubemap data packed into single image frame - 3:2
10
+};
11
+
12
namespace st {
13
14
/**
15
16
}
17
}
18
19
+ /**
20
+ * Probe panorama mode from image dimensions.
21
+ */
22
+ ST_LOCAL inline StPanorama probePanorama(StFormat theFormat,
23
+ size_t theSrc1SizeX,
24
+ size_t theSrc1SizeY,
25
+ size_t theSrc2SizeX,
26
+ size_t theSrc2SizeY) {
27
+ StPairRatio aPairRatio = st::formatToPairRatio(theFormat);
28
+ if(aPairRatio == StPairRatio_HalfWidth) {
29
+ theSrc1SizeX /= 2;
30
+ } else if(aPairRatio == StPairRatio_HalfHeight) {
31
+ theSrc1SizeY /= 2;
32
+ }
33
+ if(theSrc1SizeX < 8
34
+ || theSrc1SizeY < 8) {
35
+ return StPanorama_OFF;
36
+ }
37
+
38
+ if(theSrc1SizeX / 2 == theSrc1SizeY
39
+ && theSrc2SizeX / 2 == theSrc2SizeY) {
40
+ return StPanorama_Sphere;
41
+ } else if(theSrc1SizeX / 6 == theSrc1SizeY
42
+ && theSrc2SizeX / 6 == theSrc2SizeY) {
43
+ return StPanorama_Cubemap6_1;
44
+ } else if(theSrc1SizeX / 3 == theSrc1SizeY / 2
45
+ && theSrc2SizeX / 3 == theSrc2SizeY / 2) {
46
+ return StPanorama_Cubemap3_2;
47
+ }
48
+ return StPanorama_OFF;
49
+ }
50
+
51
};
52
53
#endif // __StFormatEnum_h_
54
sview-15_08.tar.gz/include/StGLWidgets/StGLCheckboxTextured.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLCheckboxTextured.h
Changed
15
1
2
ST_CPPEXPORT virtual void stglUpdate(const StPointD_t& theCursorZo);
3
4
/**
5
+ * Return tracked value.
6
+ */
7
+ ST_LOCAL StHandle<StBoolParam>& getTrackedValue() {
8
+ return myTrackValue;
9
+ }
10
+
11
+ /**
12
* Return opacity scale for FALSE value, 0.5f by default.
13
*/
14
ST_LOCAL float getFalseOpacity() const {
15
sview-15_08.tar.gz/include/StGLWidgets/StGLFpsLabel.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLFpsLabel.h
Changed
59
1
2
/**
3
- * Copyright © 2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2013-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
#include <StGLWidgets/StGLMenuProgram.h>
10
11
/**
12
- * FPS widget.
13
+ * Widget for displaying diagnostic information
14
+ * (frame rate, buffers state, etc.).
15
*/
16
class StGLFpsLabel : public StGLTextArea {
17
18
19
20
public:
21
22
- ST_CPPEXPORT void update(const bool theIsStereo,
23
- const double theTargetFps);
24
+ ST_CPPEXPORT void update(const bool theIsStereo,
25
+ const double theTargetFps,
26
+ const StString& theExtraInfo);
27
28
- ST_LOCAL inline double& changePlayFps() {
29
- return myPlayFps;
30
- }
31
-
32
- ST_LOCAL inline int& changePlayQueued() {
33
- return myPlayQueued;
34
- }
35
-
36
- ST_LOCAL inline int& changePlayQueueLength() {
37
- return myPlayQueueLen;
38
- }
39
+ ST_LOCAL double& changePlayFps() { return myPlayFps; }
40
+ ST_LOCAL int& changePlayQueued() { return myPlayQueued; }
41
+ ST_LOCAL int& changePlayQueueLength() { return myPlayQueueLen; }
42
43
public: //! @name Signals
44
45
struct {
46
/**
47
* Emit callback Slot on button click.
48
- * @param theUserData (const size_t ) - user predefined data.
49
+ * @param theUserData user predefined data
50
*/
51
StSignal<void (const size_t )> onBtnClick;
52
} signals;
53
54
- private: //!< callback Slots (private overriders)
55
+ private: //! @name callback Slots (private overriders)
56
57
ST_LOCAL void doMouseUnclick(const int theBtnId);
58
59
sview-15_08.tar.gz/include/StGLWidgets/StGLImageProgram.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLImageProgram.h
Changed
10
1
2
3
public:
4
5
- ST_CPPEXPORT StGLImageProgram(const StString& theTitle);
6
+ ST_CPPEXPORT StGLImageProgram();
7
8
ST_CPPEXPORT virtual ~StGLImageProgram();
9
10
sview-15_08.tar.gz/include/StGLWidgets/StGLImageRegion.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLImageRegion.h
Changed
75
1
2
#include <StGLMesh/StGLQuads.h>
3
4
#include <StGLWidgets/StGLWidget.h>
5
-#include <StGLWidgets/StGLImageFlatProgram.h>
6
-#include <StGLWidgets/StGLImageSphereProgram.h>
7
+#include <StGLWidgets/StGLImageProgram.h>
8
#include <StGLStereo/StGLTextureQueue.h>
9
10
#include <StGL/StParams.h>
11
12
const bool theUsePanningKeys);
13
14
/**
15
+ * Setup device orientation.
16
+ */
17
+ ST_LOCAL void setDeviceOrientation(const StGLQuaternion& theQ) { myDeviceQuat = theQ; }
18
+
19
+ /**
20
* Dragging delay in milliseconds, 0.0 by default.
21
*/
22
ST_LOCAL inline double getDragDelayMs() const {
23
24
25
ST_CPPEXPORT StHandle<StStereoParams> getSource();
26
27
+ /**
28
+ * Return true if there is any video stream.
29
+ */
30
+ ST_LOCAL bool hasVideoStream() { return myHasVideoStream; }
31
+
32
const StArrayList< StHandle<StAction> >& getActions() const {
33
return myActions;
34
}
35
36
37
StHandle<StEnumParam> displayMode; //!< StGLImageRegion::DisplayMode - display mode
38
StHandle<StInt32Param> displayRatio; //!< StGLImageRegion::DisplayRatio - display ratio
39
+ StHandle<StBoolParam> ToHealAnamorphicRatio; //!< correct aspect ratio for 1080p/720p anamorphic pairs
40
StHandle<StInt32Param> textureFilter; //!< StGLImageProgram::TextureFilter - texture filter;
41
StHandle<StFloat32Param> gamma; //!< gamma correction coefficient
42
StHandle<StFloat32Param> brightness; //!< brightness level
43
44
const int aMode = params.ViewMode->getValue();
45
switch(aMode) {
46
case StStereoParams::FLAT_IMAGE: {
47
- params.ViewMode->setValue(StStereoParams::PANORAMA_CUBEMAP);
48
+ params.ViewMode->setValue(StStereoParams::PANORAMA_SPHERE);
49
return;
50
}
51
case StStereoParams::PANORAMA_CUBEMAP: {
52
53
return;
54
}
55
case StStereoParams::PANORAMA_SPHERE: {
56
- params.ViewMode->setValue(StStereoParams::FLAT_IMAGE);
57
+ params.ViewMode->setValue(StStereoParams::PANORAMA_CUBEMAP);
58
return;
59
}
60
}
61
62
63
StGLQuads myQuad; //!< flat quad
64
StGLUVSphere myUVSphere; //!< sphere output helper class
65
- StGLImageFlatProgram myProgramFlat; //!< GL program to draw flat image
66
- StGLImageSphereProgram myProgramSphere; //!< GL program to draw spheric panorama
67
+ StGLImageProgram myProgram; //!< GL program to draw flat image
68
StHandle<StGLTextureQueue> myTextureQueue; //!< shared texture queue
69
StPointD_t myClickPntZo; //!< remembered mouse click position
70
StTimer myClickTimer; //!< timer to delay dragging action
71
+ StGLQuaternion myDeviceQuat; //!< device orientation
72
StVirtFlags myKeyFlags; //!< active key flags
73
double myDragDelayMs; //!< dragging delay in milliseconds
74
bool myIsClickAborted;
75
sview-15_08.tar.gz/include/StGLWidgets/StGLMenu.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLMenu.h
Changed
33
1
2
}
3
4
/**
5
+ * Return minimum width of item in this menu.
6
+ */
7
+ ST_LOCAL int getItemWidthMin() const {
8
+ return myWidthMin;
9
+ }
10
+
11
+ /**
12
+ * Setup minimum width of item in this menu.
13
+ */
14
+ ST_LOCAL void setItemWidthMin(const int theWidth) {
15
+ myWidthMin = theWidth;
16
+ }
17
+
18
+ /**
19
* Setup background color of menu.
20
*/
21
inline void setColor(const StGLVec3& theColor) {
22
23
StGLVec4 myColorVec;
24
int myOrient;
25
int myItemHeight;
26
+ int myWidthMin;
27
int myWidth;
28
- bool myIsRootMenu;
29
+ bool myIsRootMenu; //!< the root menu does not show sub-menus until first click
30
bool myIsContextual;
31
bool myIsActive;
32
bool myKeepActive;
33
sview-15_08.tar.gz/include/StGLWidgets/StGLMenuItem.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLMenuItem.h
Changed
20
1
2
ST_CPPEXPORT void setHilightText();
3
4
/**
5
+ * Get assigned icon.
6
+ */
7
+ ST_LOCAL StGLIcon* getIcon() {
8
+ return myIcon;
9
+ }
10
+
11
+ /**
12
+ * Assign new icon.
13
+ */
14
+ ST_CPPEXPORT void setIcon(StGLIcon* theIcon);
15
+
16
+ /**
17
* Setup icon.
18
*/
19
ST_CPPEXPORT StGLMenuItem* setIcon(const StString* theImgPaths,
20
sview-15_08.tar.gz/include/StGLWidgets/StGLMessageBox.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLMessageBox.h
Changed
71
1
2
3
public:
4
5
+ /**
6
+ * Main constructor creating message box of size 384 x 200 (clipped by root widget size).
7
+ */
8
ST_CPPEXPORT StGLMessageBox(StGLWidget* theParent,
9
const StString& theTitle,
10
const StString& theText);
11
+
12
+ /**
13
+ * Main constructor creating message box of specified size (clipped by root widget size).
14
+ */
15
ST_CPPEXPORT StGLMessageBox(StGLWidget* theParent,
16
const StString& theTitle,
17
const StString& theText,
18
const int theWidth,
19
const int theHeight);
20
+
21
+ /**
22
+ * Destructor.
23
+ */
24
ST_CPPEXPORT virtual ~StGLMessageBox();
25
ST_CPPEXPORT virtual bool stglInit();
26
ST_CPPEXPORT virtual void stglResize();
27
28
ST_CPPEXPORT void setTitle(const StString& theTitle);
29
30
/**
31
- * Set content to the plain text.
32
+ * Set content to the plain text (previous content will be discarded).
33
*/
34
ST_CPPEXPORT void setText(const StString& theText);
35
36
37
ST_LOCAL int getMarginTop() const { return myMarginTop; }
38
ST_LOCAL int getMarginBottom() const { return myMarginBottom; }
39
40
+ protected:
41
+
42
+ /**
43
+ * Protected empty constructor (does not call create()).
44
+ */
45
+ ST_CPPEXPORT StGLMessageBox(StGLWidget* theParent);
46
+
47
+ /**
48
+ * Initializes the layout of the widget.
49
+ * Should be called once, in constructor.
50
+ */
51
+ ST_CPPEXPORT void create(const StString& theTitle,
52
+ const StString& theText,
53
+ const int theWidth,
54
+ const int theHeight);
55
+
56
private: //! @name callback Slots (private overriders)
57
58
ST_LOCAL void doMouseUnclick(const int theBtnId);
59
60
*/
61
ST_LOCAL bool doNextButton(const int theDir);
62
63
- ST_LOCAL void create(const StString& theTitle,
64
- const StString& theText,
65
- const int theWidth,
66
- const int theHeight);
67
-
68
public: //! @name Signals
69
70
struct {
71
sview-15_10.tar.gz/include/StGLWidgets/StGLOpenFile.h
Added
121
1
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#ifndef __StGLOpenFile_h_
11
+#define __StGLOpenFile_h_
12
+
13
+#include <StGLWidgets/StGLMessageBox.h>
14
+#include <StGLWidgets/StGLRootWidget.h>
15
+#include <StFile/StMIMEList.h>
16
+
17
+class StGLMenu;
18
+class StGLMenuItem;
19
+
20
+/**
21
+ * Widget for file system navigation.
22
+ */
23
+class StGLOpenFile : public StGLMessageBox {
24
+
25
+ public:
26
+
27
+ /**
28
+ * Main constructor.
29
+ */
30
+ ST_CPPEXPORT StGLOpenFile(StGLWidget* theParent,
31
+ const StString& theTitle,
32
+ const StString& theCloseText);
33
+
34
+ /**
35
+ * Destructor.
36
+ */
37
+ ST_CPPEXPORT virtual ~StGLOpenFile();
38
+
39
+ /**
40
+ * Define file filter.
41
+ */
42
+ ST_CPPEXPORT void setMimeList(const StMIMEList& theFilter);
43
+
44
+ /**
45
+ * Open new folder.
46
+ */
47
+ ST_CPPEXPORT void addHotItem(const StString& theTarget,
48
+ const StString& theName = "");
49
+
50
+ /**
51
+ * Open new folder.
52
+ */
53
+ ST_CPPEXPORT void openFolder(const StString& theFolder);
54
+
55
+ public: //! @name Signals
56
+
57
+ struct {
58
+ /**
59
+ * @param path to selected file
60
+ */
61
+ StSignal<void (StHandle<StString> )> onFileSelected;
62
+ } signals;
63
+
64
+ protected:
65
+
66
+ /**
67
+ * Assign icon to the item.
68
+ */
69
+ ST_CPPEXPORT void setItemIcon(StGLMenuItem* theItem,
70
+ const StGLVec4& theColor,
71
+ const bool theisFolder);
72
+
73
+ /**
74
+ * Handle hot-item click event - just remember item id.
75
+ */
76
+ ST_CPPEXPORT void doHotItemClick(const size_t theItemId);
77
+
78
+ /**
79
+ * Handle item click event - just remember item id.
80
+ */
81
+ ST_CPPEXPORT void doFileItemClick(const size_t theItemId);
82
+
83
+ /**
84
+ * Handle folder-up event.
85
+ */
86
+ ST_CPPEXPORT void doFolderUpClick(const size_t );
87
+
88
+ /**
89
+ * Override unclick to open new folder.
90
+ */
91
+ ST_CPPEXPORT virtual bool tryUnClick(const StPointD_t& theCursorZo,
92
+ const int& theMouseBtn,
93
+ bool& isItemUnclicked);
94
+
95
+ protected: //! @name class fields
96
+
97
+ StHandle<StGLTextureArray> myTextureFolder;
98
+ StHandle<StGLTextureArray> myTextureFile;
99
+ StGLTextArea* myCurrentPath;
100
+ StGLMenu* myHotList; //!< widget containing the list of predefined libraries
101
+ StGLMenu* myList; //!< widget containing the file list of currently opened folder
102
+ StArrayList<StString> myHotPaths; //!< array of hot-links
103
+ StHandle<StFolder> myFolder; //!< currently opened folder
104
+ StMIMEList myFilter; //!< file filter
105
+ StArrayList<StString> myExtensions; //!< extensions filter
106
+ StString myItemToLoad; //!< new item to open
107
+
108
+ protected: //! @name main file list settings
109
+
110
+ StGLVec4 myHighlightColor;//!< item highlighting
111
+ StGLVec4 myItemColor; //!< color of icons and text labels for the list
112
+ StGLVec4 myFileColor; //!< color of icons and text labels for the list
113
+ StGLVec4 myHotColor; //!< color of icons and text labels for the hot-list
114
+ int myHotSizeX;
115
+ int myMarginX;
116
+ int myIconSizeX;
117
+
118
+};
119
+
120
+#endif // __StGLOpenFile_h_
121
sview-15_08.tar.gz/include/StGLWidgets/StGLRootWidget.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLRootWidget.h
Changed
30
1
2
IconImage_CheckboxOn,
3
IconImage_RadioButtonOff,
4
IconImage_RadioButtonOn,
5
+ IconImage_Folder,
6
+ IconImage_File,
7
IconImage_NB
8
};
9
10
11
}
12
13
/**
14
+ * Cursor distance between click/unclick events to determine as clicking.
15
+ */
16
+ ST_LOCAL int getClickThreshold() const { return myClickThreshold; }
17
+
18
+ /**
19
* @return scale factor for GUI elements (text, icons), 1.0 for normal displays
20
*/
21
ST_LOCAL inline GLfloat getScale() const {
22
23
protected:
24
25
IconSize myMenuIconSize; //!< scaled size of menu icon
26
+ int myClickThreshold;//!< cursor distance between click/unclick events to determine as clicking
27
28
};
29
30
sview-15_08.tar.gz/include/StGLWidgets/StGLScrollArea.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLScrollArea.h
Changed
14
1
2
StGLVertexBuffer myBarVertBuf; //!< vertices buffer
3
StGLVec4 myBarColor; //!< color of scroll bar
4
5
+ bool myIsLeftClick; //!< flag to perform dragging - some item has been clicked (but not yet unclicked)
6
+ bool myHasDragged; //!< indicates that dragging has been confirmed
7
StPointD_t myClickPntZo; //!< remembered mouse click position
8
StTimer myDragTimer; //!< timer between dragging animation
9
double myDragYDelta; //!< last dragged distance
10
+ int myDragYCumul; //!< cumulative dragged distance
11
double myFlingAccel; //!< (positive) fling acceleration
12
StTimer myFlingTimer; //!< timer for dragging inertia
13
double myFlingYSpeed; //!< the dragging velocity for inertial scrolling
14
sview-15_08.tar.gz/include/StGLWidgets/StGLSubtitles.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLSubtitles.h
Changed
28
1
2
/**
3
- * Copyright © 2010-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
10
ST_CPPEXPORT StGLSubtitles(StGLWidget* theParent,
11
const StHandle<StSubQueue>& theSubQueue,
12
+ const StHandle<StInt32Param>& thePlace,
13
+ const StHandle<StFloat32Param>& theTopDY,
14
+ const StHandle<StFloat32Param>& theBottomDY,
15
const StHandle<StFloat32Param>& theFontSize,
16
const StHandle<StFloat32Param>& theParallax,
17
const StHandle<StEnumParam>& theParser);
18
19
20
private:
21
22
+ StHandle<StInt32Param> myPlace; //!< placement
23
+ StHandle<StFloat32Param> myTopDY; //!< displacement
24
+ StHandle<StFloat32Param> myBottomDY; //!< displacement
25
StHandle<StFloat32Param> myFontSize; //!< font size parameter
26
StHandle<StFloat32Param> myParallax; //!< text parallax
27
StHandle<StEnumParam> myParser; //!< text parser option
28
sview-15_08.tar.gz/include/StGLWidgets/StGLTextArea.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLTextArea.h
Changed
12
1
2
3
/**
4
* @param theText new text to draw
5
+ * @return true if text has been changed
6
*/
7
- ST_CPPEXPORT void setText(const StString& theText);
8
+ ST_CPPEXPORT bool setText(const StString& theText);
9
10
/**
11
* Setup alignment style.
12
sview-15_08.tar.gz/include/StGLWidgets/StGLTextureButton.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLTextureButton.h
Changed
25
1
2
const StGLCorner theCorner = StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT),
3
const size_t theFacesCount = 1);
4
5
+ ST_CPPEXPORT virtual ~StGLIcon();
6
+
7
ST_CPPEXPORT virtual bool tryClick(const StPointD_t& cursorZo, const int& mouseBtn, bool& isItemClicked);
8
ST_CPPEXPORT virtual bool tryUnClick(const StPointD_t& cursorZo, const int& mouseBtn, bool& isItemUnclicked);
9
10
+ /**
11
+ * Define externally managed textures.
12
+ */
13
+ ST_LOCAL void setExternalTextures(const StHandle<StGLTextureArray>& theTextures) {
14
+ myTextures = theTextures;
15
+ myIsExternalTexture = true;
16
+ }
17
+
18
+ protected:
19
+
20
+ bool myIsExternalTexture; //!< flag indicating that assigned texture should not be released
21
+
22
};
23
24
#endif // __StGLTextureButton_h_
25
sview-15_08.tar.gz/include/StGLWidgets/StGLWidget.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLWidget.h
Changed
51
1
2
/**
3
* Assign new area rectangle for modification and set IsResized flag on.
4
*/
5
- ST_LOCAL void setRectPx(const StRectI_t& rectPx) {
6
+ ST_LOCAL void setRectPx(const StRectI_t& theRectPx) {
7
myIsResized = true;
8
- this->rectPx = rectPx;
9
+ this->rectPx = theRectPx;
10
}
11
12
/**
13
14
}
15
16
/**
17
+ * Return true if widget has been marked resized, but not yet updated.
18
+ */
19
+ ST_LOCAL bool wasResized() const { return myIsResized; }
20
+
21
+ /**
22
* Function returns <i>global</i> area rectangle (in pixels).
23
* @return rectangle
24
*/
25
26
}
27
28
/**
29
+ * Check visibility of this widget taking into account visibility of parents.
30
+ */
31
+ ST_LOCAL bool isVisibleWithParents() const {
32
+ return myOpacity > 0.0f
33
+ && (myParent == NULL || myParent->isVisibleWithParents());
34
+ }
35
+
36
+ /**
37
* Return opacity value.
38
*/
39
ST_LOCAL float getOpacity() const {
40
41
/**
42
* @param userData user-defined data
43
*/
44
- inline void setUserData(const size_t userData) {
45
- this->userData = userData;
46
+ inline void setUserData(const size_t theUserData) {
47
+ this->userData = theUserData;
48
}
49
50
/**
51
sview-15_08.tar.gz/include/StSettings/StFloat32Param.h -> sview-15_10.tar.gz/include/StSettings/StFloat32Param.h
Changed
16
1
2
return myMinValue;
3
}
4
5
+ bool hasMinValue() const {
6
+ return myMinValue != -1E+37f;
7
+ }
8
+
9
+ bool hasMaxValue() const {
10
+ return myMaxValue != 1E+37f;
11
+ }
12
+
13
float getMaxValue() const {
14
return myMaxValue;
15
}
16
sview-15_08.tar.gz/include/StSettings/StSettings.h -> sview-15_10.tar.gz/include/StSettings/StSettings.h
Changed
57
1
2
/**
3
- * Copyright © 2007-2014 Kirill Gavrilov
4
+ * Copyright © 2007-2015 Kirill Gavrilov
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
*/
10
ST_CPPEXPORT virtual ~StSettings();
11
12
+ /**
13
+ * Immediately write settings into external storage (e.g. file).
14
+ * Has no effect on implementations storing data on saving each individual parameter.
15
+ *
16
+ * Usually settings will be stored automatically within class destruction.
17
+ * This method can be used to perform this more frequently in environments
18
+ * where application can be destroyed in unsafe way.
19
+ *
20
+ * @return true if settings have been saved
21
+ */
22
+ ST_CPPEXPORT bool flush();
23
+
24
public: //! @name persistence implementation
25
26
/**
27
28
29
private:
30
31
-#ifndef _WIN32
32
+ /**
33
+ * Read settings from external storage.
34
+ * Called within main constructor.
35
+ */
36
ST_LOCAL bool load();
37
- ST_LOCAL bool save();
38
-#endif
39
40
private:
41
42
43
StString myFilePath;
44
NSMutableDictionary* myDict;
45
#else
46
- StString myFullFileName;
47
- libconfig::Config* myConfig;
48
- bool myIsLoaded;
49
+ StString myFullFileName; //!< path to the file
50
+ libconfig::Config* myConfig; //!< config instance
51
+ bool myIsLoaded; //!< flag indicating last parsing state
52
#endif
53
+ bool myToFlush; //!< settings have been changed but not yet saved
54
55
};
56
57
sview-15_08.tar.gz/include/StTemplates/StHandle.h -> sview-15_10.tar.gz/include/StTemplates/StHandle.h
Changed
22
1
2
/**
3
* Cast handle to contained type
4
*/
5
- inline Type* operator->() {
6
+ inline Type* operator->() const {
7
return myEntity->myPointer;
8
}
9
10
/**
11
* Cast handle to contained type
12
*/
13
- inline const Type* operator->() const {
14
- return myEntity->myPointer;
15
- }
16
+ //inline const Type* operator->() const {
17
+ // return myEntity->myPointer;
18
+ //}
19
20
/**
21
* Cast handle to contained type
22
sview-15_10.tar.gz/include/StTemplates/StQuaternion.h
Added
96
1
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#ifndef __StQuaternion_h_
11
+#define __StQuaternion_h_
12
+
13
+#include <StTemplates/StVec4.h>
14
+
15
+template<typename Element_t>
16
+class StQuaternion {
17
+
18
+ public:
19
+
20
+ /**
21
+ * Construct identity quaternion.
22
+ */
23
+ StQuaternion() : myV((Element_t )0, (Element_t )0, (Element_t )0, (Element_t )1) {}
24
+
25
+ /**
26
+ * Construct quaternion from component values.
27
+ */
28
+ StQuaternion(const Element_t theX, const Element_t theY, const Element_t theZ, const Element_t theW)
29
+ : myV(theX, theY, theZ, theW) {}
30
+
31
+ /**
32
+ * Construct orientation as rotation around axis.
33
+ */
34
+ StQuaternion(const StVec3<Element_t>& theAxis,
35
+ const Element_t theAngle) {
36
+ setVectorAndAngle(theAxis, theAngle);
37
+ }
38
+
39
+ /**
40
+ * Setup orientation as rotation around axis.
41
+ */
42
+ void setVectorAndAngle(const StVec3<Element_t>& theAxis,
43
+ const Element_t theAngle) {
44
+ StVec3<Element_t> anAxis = theAxis.normalized();
45
+ Element_t anAngleHalf = Element_t(0.5) * theAngle;
46
+ Element_t aSin = std::sin(anAngleHalf);
47
+ myV.x() = anAxis.x() * aSin;
48
+ myV.y() = anAxis.y() * aSin;
49
+ myV.z() = anAxis.z() * aSin;
50
+ myV.w() = std::cos(anAngleHalf);
51
+ }
52
+
53
+ /**
54
+ * Return quaternion components.
55
+ */
56
+ const StVec4<Element_t>& vec4() const { return myV; }
57
+
58
+ /**
59
+ * Get x component.
60
+ */
61
+ Element_t x() const { return myV.x(); }
62
+
63
+ /**
64
+ * Get y component.
65
+ */
66
+ Element_t y() const { return myV.y(); }
67
+
68
+ /**
69
+ * Get z component.
70
+ */
71
+ Element_t z() const { return myV.z(); }
72
+
73
+ /**
74
+ * Get w component.
75
+ */
76
+ Element_t w() const { return myV.w(); }
77
+
78
+ /**
79
+ * Multiply two quaternions (e.g. rotate object by theQ2 and then by theQ1 - order is important!).
80
+ */
81
+ static StQuaternion multiply(const StQuaternion& theQ1,
82
+ const StQuaternion& theQ2) {
83
+ return StQuaternion(theQ1.w() * theQ2.x() + theQ1.x() * theQ2.w() + theQ1.y() * theQ2.z() - theQ1.z() * theQ2.y(),
84
+ theQ1.w() * theQ2.y() + theQ1.y() * theQ2.w() + theQ1.z() * theQ2.x() - theQ1.x() * theQ2.z(),
85
+ theQ1.w() * theQ2.z() + theQ1.z() * theQ2.w() + theQ1.x() * theQ2.y() - theQ1.y() * theQ2.x(),
86
+ theQ1.w() * theQ2.w() - theQ1.x() * theQ2.x() - theQ1.y() * theQ2.y() - theQ1.z() * theQ2.z());
87
+ }
88
+
89
+ private:
90
+
91
+ StVec4<Element_t> myV;
92
+
93
+};
94
+
95
+#endif //__StQuaternion_h_
96
sview-15_08.tar.gz/include/StTemplates/StVec4.h -> sview-15_10.tar.gz/include/StTemplates/StVec4.h
Changed
29
1
2
/**
3
- * Copyright © 2010-2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
return result /= invFactor;
10
}
11
12
+ /**
13
+ * Computes the vector modulus (magnitude, length).
14
+ */
15
+ Element_t modulus() const {
16
+ return std::sqrt(x() * x() + y() * y() + z() * z() + w() * w());
17
+ }
18
+
19
+ /**
20
+ * Computes the square of vector modulus (magnitude, length).
21
+ */
22
+ Element_t squareModulus() const {
23
+ return x() * x() + y() * y() + z() * z() + w() * w();
24
+ }
25
+
26
StString toString() const {
27
return StString('(') + x() + "; " + y() + "; " + z() + "; " + w() + ')';
28
}
29
sview-15_08.tar.gz/include/StThreads/StResourceManager.h -> sview-15_10.tar.gz/include/StThreads/StResourceManager.h
Changed
50
1
2
/**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
*
6
* Distributed under the Boost Software License, Version 1.0.
7
* See accompanying file license-boost.txt or copy at
8
9
public:
10
11
/**
12
+ * The list of standard folders.
13
+ */
14
+ enum FolderId {
15
+ FolderId_Downloads,
16
+ FolderId_Pictures,
17
+ FolderId_Music,
18
+ FolderId_Videos,
19
+ FolderId_NB
20
+ };
21
+
22
+ public:
23
+
24
+ /**
25
* Main constructor.
26
*/
27
ST_CPPEXPORT StResourceManager(const StString& theAppName = "sview");
28
29
ST_CPPEXPORT virtual ~StResourceManager();
30
31
/**
32
+ * Return folder for specified task.
33
+ */
34
+ ST_LOCAL const StString& getFolder(const FolderId theId) const {
35
+ return myFolders[theId];
36
+ }
37
+
38
+ /**
39
* Folder containing user-specific application data.
40
*/
41
ST_LOCAL const StString& getUserDataFolder() const {
42
43
44
protected:
45
46
+ StString myFolders[FolderId_NB];
47
StString myAppName; //!< application name - "sview" by default
48
StString myUserHomeFolder; //!< user home folder
49
StString myUserDataFolder; //!< folder for saving user-specific application data
50
sview-15_08.tar.gz/include/stTypes.h -> sview-15_10.tar.gz/include/stTypes.h
Changed
27
1
2
return isOddNumber(number) ? (number + 1) : number;
3
}
4
5
-#ifdef __cplusplus
6
- #include <StTemplates/StTemplates.h> // include commonly-used templates
7
-#endif
8
+#include <StTemplates/StTemplates.h> // include commonly-used templates
9
+
10
+/**
11
+ * Convert degrees to radians.
12
+ */
13
+template<typename Type>
14
+inline Type stToRadians(const Type theDegrees) {
15
+ return Type(3.14159265358979323846) * theDegrees / Type(180.0);
16
+}
17
+
18
+/**
19
+ * Convert radians to degrees.
20
+ */
21
+template<typename Type>
22
+inline Type stToDegrees(const Type theRadians) {
23
+ return Type(180.0) * theRadians / Type(3.14159265358979323846);
24
+}
25
26
#endif //__stTypes_h_
27
sview-15_08.tar.gz/share/sView/demo/demo.jps -> sview-15_10.tar.gz/share/sView/demo/demo.jps
Changed
sview-15_10.tar.gz/share/sView/demo/demo_robot.jps
Added
sview-15_08.tar.gz/sview/AndroidManifest.xml -> sview-15_10.tar.gz/sview/AndroidManifest.xml
Changed
12
1
2
<?xml version="1.0" encoding="utf-8"?>
3
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
4
package="com.sview"
5
- android:versionCode="6"
6
- android:versionName="15.08">
7
+ android:versionCode="8"
8
+ android:versionName="15.10">
9
<application android:label="@string/app_name"
10
android:hasCode="true"
11
android:icon="@drawable/ic_launcher">
12
sview-15_08.tar.gz/sview/jni/main.cpp -> sview-15_10.tar.gz/sview/jni/main.cpp
Changed
34
1
2
/**
3
* This is source code for sView
4
*
5
- * Copyright © Kirill Gavrilov, 2014
6
+ * Copyright © Kirill Gavrilov, 2014-2015
7
*/
8
9
#if defined(__ANDROID__)
10
11
* Choose and instantiate StApplication.
12
*/
13
ST_LOCAL virtual void createApplication() override {
14
- StMutexAuto aLock(myDndLock);
15
- const StString aFileExtension = StFileNode::getExtension(myDndPath);
16
+ StMutexAuto aLock(myFetchLock);
17
+ const StString aFileExtension = StFileNode::getExtension(myCreatePath);
18
19
StHandle<StOpenInfo> anInfo = new StOpenInfo();
20
anInfo->setPath(myDndPath);
21
22
const StMIMEList aMimeImg(ST_IMAGE_PLUGIN_MIME_CHAR);
23
for(size_t aMimeIter = 0; aMimeIter < aMimeImg.size(); ++aMimeIter) {
24
if(aFileExtension.isEqualsIgnoreCase(aMimeImg[aMimeIter].getExtension())) {
25
+ StArgumentsMap anArgs = anInfo->getArgumentsMap();
26
+ if(anInfo->isEmpty()) {
27
+ anArgs.set(StDictEntry("last", "true"));
28
+ }
29
+ anArgs.set(StDictEntry("toSaveRecent","true"));
30
+ anInfo->setArgumentsMap(anArgs);
31
myApp = new StImageViewer(aResMgr, this, anInfo);
32
return;
33
}
34
sview-15_08.tar.gz/sview/sViewMake.cbp -> sview-15_10.tar.gz/sview/sViewMake.cbp
Changed
50
1
2
<FileVersion major="1" minor="6" />
3
<Project>
4
<Option title="sViewMakefile" />
5
+ <Option makefile="$(PROJECT_DIRECTORY)../Makefile" />
6
<Option makefile_is_custom="1" />
7
- <Option execution_dir="/home/kirill/develop/sview" />
8
+ <Option execution_dir="$(PROJECT_DIRECTORY).." />
9
<Option pch_mode="2" />
10
<Option compiler="gcc" />
11
<Build>
12
13
<Option type="1" />
14
<Option compiler="gcc" />
15
<MakeCommands>
16
- <Build command="$make -f $makefile all" />
17
- <CompileFile command="$make -f $makefile $file" />
18
- <Clean command="$make -f $makefile clean" />
19
- <DistClean command="$make -f $makefile distclean$target" />
20
- <AskRebuildNeeded command="$make -q -f $makefile all" />
21
- <SilentBuild command="$make -f $makefile all > $(CMD_NULL)" />
22
+ <Build command="$make -j6 --directory=$(PROJECT_DIRECTORY).. -f $makefile all" />
23
+ <CompileFile command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile $file" />
24
+ <Clean command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile clean" />
25
+ <DistClean command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile distclean$target" />
26
+ <AskRebuildNeeded command="$make -j6 --directory=$(PROJECT_DIRECTORY).. -q -f $makefile all" />
27
+ <SilentBuild command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile all > $(CMD_NULL)" />
28
</MakeCommands>
29
</Target>
30
<Target title="make_android">
31
32
<Option type="0" />
33
<Option compiler="gcc" />
34
<MakeCommands>
35
- <Build command="$make -f $makefile android" />
36
- <CompileFile command="$make -f $makefile $file" />
37
- <Clean command="$make -f $makefile clean" />
38
- <DistClean command="$make -f $makefile distclean$target" />
39
- <AskRebuildNeeded command="$make -q -f $makefile android" />
40
- <SilentBuild command="$make -f $makefile android > $(CMD_NULL)" />
41
+ <Build command="$make -j6 --directory=$(PROJECT_DIRECTORY).. -f $makefile android" />
42
+ <CompileFile command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile $file" />
43
+ <Clean command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile clean" />
44
+ <DistClean command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile distclean$target" />
45
+ <AskRebuildNeeded command="$make -j6 --directory=$(PROJECT_DIRECTORY).. -q -f $makefile android" />
46
+ <SilentBuild command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile android > $(CMD_NULL)" />
47
</MakeCommands>
48
</Target>
49
</Build>
50
sview-15_08.tar.gz/sview/src/com/sview/StActivity.java -> sview-15_10.tar.gz/sview/src/com/sview/StActivity.java
Changed
262
1
2
import android.content.ContextWrapper;
3
import android.content.DialogInterface;
4
import android.content.Intent;
5
+import android.hardware.Sensor;
6
+import android.hardware.SensorEvent;
7
+import android.hardware.SensorEventListener;
8
+import android.hardware.SensorManager;
9
import android.os.Bundle;
10
import android.widget.Toast;
11
12
/**
13
* Customize NativeActivity
14
*/
15
-public class StActivity extends NativeActivity {
16
+public class StActivity extends NativeActivity implements SensorEventListener {
17
+
18
+//region Native libraries loading routines
19
20
/**
21
* Auxiliary method to close activity on critical error
22
23
theErrors.append(theLibName);
24
theErrors.append("\" has been loaded\n");
25
return true;
26
- } catch(java.lang.UnsatisfiedLinkError theError) {
27
+ } catch(java.lang.UnsatisfiedLinkError theError) {
28
theErrors.append("Error: native library \"");
29
theErrors.append(theLibName);
30
theErrors.append("\" is unavailable:\n " + theError.getMessage());
31
return false;
32
- } catch(SecurityException theError) {
33
+ } catch(SecurityException theError) {
34
theErrors.append("Error: native library \"");
35
theErrors.append(theLibName);
36
theErrors.append("\" can not be loaded for security reasons:\n " + theError.getMessage());
37
return false;
38
- }
39
+ }
40
}
41
42
private static boolean wasNativesLoadCalled = false;
43
44
return true;
45
}
46
47
+//endregion
48
+
49
+//region Overridden methods of NativeActivity class
50
+
51
/**
52
* Create activity.
53
*/
54
55
myContext = new ContextWrapper(this);
56
myContext.getExternalFilesDir(null);
57
58
+ mySensorMgr = (SensorManager )getSystemService(Context.SENSOR_SERVICE);
59
+ mySensorOri = mySensorMgr.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);
60
+ if(mySensorOri == null) {
61
+ myIsPoorOri = true;
62
+ mySensorOri = mySensorMgr.getDefaultSensor(Sensor.TYPE_ORIENTATION);
63
+ } else {
64
+ myIsPoorOri = mySensorMgr.getDefaultSensor(Sensor.TYPE_GYROSCOPE) == null;
65
+ }
66
super.onCreate(theSavedInstanceState);
67
}
68
69
70
}
71
72
/**
73
+ * Handle resume event.
74
+ */
75
+ @Override
76
+ protected void onResume() {
77
+ super.onResume();
78
+ if(myToTrackOrient) {
79
+ updateTrackOrientation(true);
80
+ }
81
+ }
82
+
83
+ /**
84
+ * Handle pause event.
85
+ */
86
+ @Override
87
+ protected void onPause() {
88
+ super.onPause();
89
+ updateTrackOrientation(false);
90
+ }
91
+
92
+ /**
93
+ * Redirect back button to C++ level.
94
+ */
95
+ @Override
96
+ public void onBackPressed() {
97
+ if(myCppGlue != 0) {
98
+ cppOnBackPressed(myCppGlue);
99
+ } else {
100
+ super.onBackPressed();
101
+ }
102
+ }
103
+
104
+//endregion
105
+
106
+//region Implementation of SensorEventListener interface
107
+
108
+ @Override
109
+ public void onAccuracyChanged(Sensor theSensor, int theAccuracy) {}
110
+
111
+ /**
112
+ * Fetch new orientation quaternion.
113
+ */
114
+ @Override
115
+ public void onSensorChanged(SensorEvent theEvent) {
116
+ if(myCppGlue == 0) {
117
+ return;
118
+ }
119
+
120
+ float aScreenRot = 0.0f;
121
+ switch(getWindowManager().getDefaultDisplay().getRotation()) {
122
+ case android.view.Surface.ROTATION_0: aScreenRot = 0.0f; break;
123
+ case android.view.Surface.ROTATION_90: aScreenRot = 90.0f; break;
124
+ case android.view.Surface.ROTATION_180: aScreenRot = 180.0f; break;
125
+ case android.view.Surface.ROTATION_270: aScreenRot = 270.0f; break;
126
+ }
127
+
128
+ switch(theEvent.sensor.getType()) {
129
+ case Sensor.TYPE_ORIENTATION: {
130
+ cppSetOrientation(myCppGlue, theEvent.values[0], theEvent.values[1], theEvent.values[2], aScreenRot);
131
+ return;
132
+ }
133
+ case Sensor.TYPE_ROTATION_VECTOR: {
134
+ SensorManager.getQuaternionFromVector(myQuat, theEvent.values);
135
+ cppSetQuaternion(myCppGlue, myQuat[0], myQuat[1], myQuat[2], myQuat[3], aScreenRot);
136
+ return;
137
+ }
138
+ }
139
+ }
140
+
141
+//endregion
142
+
143
+//region Auxiliary methods
144
+
145
+ /**
146
+ * Wrapper to turn orientation sensor on/off (regardless off myToTrackOrient flag).
147
+ */
148
+ protected void updateTrackOrientation(boolean theToTrack) {
149
+ if(mySensorOri == null) {
150
+ return;
151
+ }
152
+
153
+ if(theToTrack) {
154
+ mySensorMgr.registerListener(this, mySensorOri, SensorManager.SENSOR_DELAY_FASTEST);
155
+ } else {
156
+ mySensorMgr.unregisterListener(this);
157
+ }
158
+ }
159
+
160
+//endregion
161
+
162
+//region Methods to be called from C++ level
163
+
164
+ /**
165
+ * Method is called when StAndroidGlue has been created (BEFORE starting application thread!)
166
+ * or during destruction.
167
+ */
168
+ public void setCppInstance(long theCppInstance) {
169
+ myCppGlue = theCppInstance;
170
+ if(myCppGlue != 0) {
171
+ cppDefineOrientationSensor(myCppGlue, mySensorOri != null, myIsPoorOri);
172
+ if(myToTrackOrient) {
173
+ updateTrackOrientation(true);
174
+ }
175
+ } else {
176
+ updateTrackOrientation(false);
177
+ }
178
+ }
179
+
180
+ /**
181
+ * Method to turn orientation sensor on/off.
182
+ */
183
+ public void setTrackOrientation(boolean theToTrack) {
184
+ final boolean toTrack = theToTrack;
185
+ this.runOnUiThread (new Runnable() { public void run() {
186
+ if(myToTrackOrient == toTrack
187
+ || mySensorOri == null) {
188
+ myToTrackOrient = toTrack;
189
+ return;
190
+ }
191
+
192
+ myToTrackOrient = toTrack;
193
+ updateTrackOrientation(toTrack);
194
+ }});
195
+ }
196
+
197
+ /**
198
* Auxiliary method to show temporary info message.
199
*/
200
public void postToast(String theInfo) {
201
final String aText = theInfo;
202
this.runOnUiThread (new Runnable() { public void run() {
203
- Context aCtx = getApplicationContext();
204
- Toast aToast = Toast.makeText(aCtx, aText, Toast.LENGTH_SHORT);
205
- aToast.show();
206
+ Context aCtx = getApplicationContext();
207
+ Toast aToast = Toast.makeText(aCtx, aText, Toast.LENGTH_SHORT);
208
+ aToast.show();
209
}});
210
}
211
212
213
}});
214
}
215
216
- private ContextWrapper myContext;
217
+//endregion
218
+
219
+//region Methods to call C++ code
220
+
221
+ /**
222
+ * Redirect back button to C++ level.
223
+ */
224
+ private native void cppOnBackPressed(long theCppPtr);
225
+
226
+ /**
227
+ * Define device orientation sensor.
228
+ */
229
+ private native void cppDefineOrientationSensor(long theCppPtr,
230
+ boolean theHasOri,
231
+ boolean theIsPoorOri);
232
+
233
+ /**
234
+ * Define device orientation by quaternion.
235
+ */
236
+ private native void cppSetQuaternion(long theCppPtr,
237
+ float theX, float theY, float theZ, float theW,
238
+ float theScreenRotDeg);
239
+
240
+ /**
241
+ * Define device orientation using deprecated Android API.
242
+ */
243
+ private native void cppSetOrientation(long theCppPtr,
244
+ float theAzimuthDeg, float thePitchDeg, float theRollDeg,
245
+ float theScreenRotDeg);
246
+
247
+//endregion
248
+
249
+//region class fields
250
+
251
+ protected ContextWrapper myContext;
252
+ protected SensorManager mySensorMgr;
253
+ protected Sensor mySensorOri;
254
+ protected float myQuat[] = { 0.0f, 0.0f, 0.0f, 1.0f };
255
+ protected boolean myIsPoorOri = false;
256
+ protected boolean myToTrackOrient = false;
257
+ protected long myCppGlue = 0; //!< pointer to c++ class StAndroidGlue instance
258
+
259
+//endregion
260
261
}
262
sview-15_10.tar.gz/textures/actionFile128.png
Added
sview-15_10.tar.gz/textures/actionFile144.png
Added
sview-15_10.tar.gz/textures/actionFile16.png
Added
sview-15_10.tar.gz/textures/actionFile192.png
Added
sview-15_10.tar.gz/textures/actionFile24.png
Added
sview-15_10.tar.gz/textures/actionFile256.png
Added
sview-15_10.tar.gz/textures/actionFile32.png
Added
sview-15_10.tar.gz/textures/actionFile48.png
Added
sview-15_10.tar.gz/textures/actionFile64.png
Added
sview-15_10.tar.gz/textures/actionFile72.png
Added
sview-15_10.tar.gz/textures/actionFile96.png
Added
sview-15_10.tar.gz/textures/actionPanorama128.png
Added
sview-15_10.tar.gz/textures/actionPanorama144.png
Added
sview-15_10.tar.gz/textures/actionPanorama16.png
Added
sview-15_10.tar.gz/textures/actionPanorama192.png
Added
sview-15_10.tar.gz/textures/actionPanorama24.png
Added
sview-15_10.tar.gz/textures/actionPanorama256.png
Added
sview-15_10.tar.gz/textures/actionPanorama32.png
Added
sview-15_10.tar.gz/textures/actionPanorama48.png
Added
sview-15_10.tar.gz/textures/actionPanorama64.png
Added
sview-15_10.tar.gz/textures/actionPanorama72.png
Added
sview-15_10.tar.gz/textures/actionPanorama96.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff128.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff144.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff16.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff192.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff24.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff256.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff32.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff48.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff64.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff72.png
Added
sview-15_10.tar.gz/textures/actionPanoramaOff96.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff128.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff144.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff16.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff192.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff24.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff256.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff32.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff48.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff64.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff72.png
Added
sview-15_10.tar.gz/textures/actionStreamAudioOff96.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff128.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff144.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff16.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff192.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff24.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff256.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff32.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff48.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff64.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff72.png
Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff96.png
Added
sview-15_10.tar.gz/textures/menuDual128.png
Added
sview-15_10.tar.gz/textures/menuDual144.png
Added
sview-15_10.tar.gz/textures/menuDual16.png
Added
sview-15_10.tar.gz/textures/menuDual192.png
Added
sview-15_10.tar.gz/textures/menuDual24.png
Added
sview-15_10.tar.gz/textures/menuDual256.png
Added
sview-15_10.tar.gz/textures/menuDual32.png
Added
sview-15_10.tar.gz/textures/menuDual48.png
Added
sview-15_10.tar.gz/textures/menuDual64.png
Added
sview-15_10.tar.gz/textures/menuDual72.png
Added
sview-15_10.tar.gz/textures/menuDual96.png
Added
sview-15_10.tar.gz/texturesSrc/actionFile.svg
Added
72
1
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ width="32"
14
+ height="32"
15
+ id="svg2"
16
+ version="1.1"
17
+ inkscape:version="0.48.5 r10040"
18
+ sodipodi:docname="actionFile.svg"
19
+ inkscape:export-filename="actionFile.png"
20
+ inkscape:export-xdpi="90"
21
+ inkscape:export-ydpi="90">
22
+ <defs
23
+ id="defs4" />
24
+ <sodipodi:namedview
25
+ id="base"
26
+ pagecolor="#ffffff"
27
+ bordercolor="#666666"
28
+ borderopacity="1.0"
29
+ inkscape:pageopacity="1"
30
+ inkscape:pageshadow="2"
31
+ inkscape:zoom="16"
32
+ inkscape:cx="15.611319"
33
+ inkscape:cy="19.490394"
34
+ inkscape:document-units="px"
35
+ inkscape:current-layer="layer1"
36
+ showgrid="false"
37
+ inkscape:window-width="2560"
38
+ inkscape:window-height="1364"
39
+ inkscape:window-x="-9"
40
+ inkscape:window-y="-9"
41
+ inkscape:window-maximized="1" />
42
+ <metadata
43
+ id="metadata7">
44
+ <rdf:RDF>
45
+ <cc:Work
46
+ rdf:about="">
47
+ <dc:format>image/svg+xml</dc:format>
48
+ <dc:type
49
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50
+ <dc:title />
51
+ </cc:Work>
52
+ </rdf:RDF>
53
+ </metadata>
54
+ <g
55
+ inkscape:label="Layer 1"
56
+ inkscape:groupmode="layer"
57
+ id="layer1"
58
+ transform="translate(0,-1020.3622)">
59
+ <path
60
+ d="m 0,1020.3622 h 32 v 32 H 0 z"
61
+ id="path5998"
62
+ inkscape:connector-curvature="0"
63
+ style="fill:none" />
64
+ <path
65
+ style="fill:#000000;fill-opacity:1;stroke:none"
66
+ d="m 8.0625,1023.034 c -1.4735,0 -2.71875,1.0482 -2.71875,2.6564 l 0,13.3437 0,8 c 0,1.4734 1.18265,2.6563 2.65625,2.6563 l 16,0 c 1.4733,0 2.65625,-1.183 2.65625,-2.6563 l 0,-18.375 -5.75,-5.6251 z m 12.28125,1.3595 4.96875,4.9063 c 0.131547,0.1315 0.05739,0.4375 -0.1875,0.4375 l -4.53125,0 c -0.506916,0.019 -0.65817,-0.2807 -0.6875,-0.7188 l 0,-4.4687 c 0,-0.2934 0.23552,-0.3583 0.4375,-0.1563 z"
67
+ id="path3006"
68
+ inkscape:connector-curvature="0"
69
+ sodipodi:nodetypes="sscssssccsccccccc" />
70
+ </g>
71
+</svg>
72
sview-15_10.tar.gz/texturesSrc/actionPanorama.svg
Added
74
1
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ width="32"
14
+ height="32"
15
+ id="svg2"
16
+ version="1.1"
17
+ inkscape:version="0.48.5 r10040"
18
+ sodipodi:docname="actionPanorama.svg"
19
+ inkscape:export-filename="actionPanorama.png"
20
+ inkscape:export-xdpi="90"
21
+ inkscape:export-ydpi="90">
22
+ <defs
23
+ id="defs4" />
24
+ <sodipodi:namedview
25
+ id="base"
26
+ pagecolor="#ffffff"
27
+ bordercolor="#666666"
28
+ borderopacity="1.0"
29
+ inkscape:pageopacity="1"
30
+ inkscape:pageshadow="2"
31
+ inkscape:zoom="16"
32
+ inkscape:cx="15.609629"
33
+ inkscape:cy="18.000209"
34
+ inkscape:document-units="px"
35
+ inkscape:current-layer="layer1"
36
+ showgrid="false"
37
+ inkscape:window-width="1920"
38
+ inkscape:window-height="1004"
39
+ inkscape:window-x="-9"
40
+ inkscape:window-y="-9"
41
+ inkscape:window-maximized="1"
42
+ showguides="true"
43
+ inkscape:guide-bbox="true" />
44
+ <metadata
45
+ id="metadata7">
46
+ <rdf:RDF>
47
+ <cc:Work
48
+ rdf:about="">
49
+ <dc:format>image/svg+xml</dc:format>
50
+ <dc:type
51
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
52
+ <dc:title />
53
+ </cc:Work>
54
+ </rdf:RDF>
55
+ </metadata>
56
+ <g
57
+ inkscape:label="Layer 1"
58
+ inkscape:groupmode="layer"
59
+ id="layer1"
60
+ transform="translate(0,-1020.3622)">
61
+ <path
62
+ d="m 0,1020.3622 h 32 v 32 H 0 z"
63
+ id="path5998"
64
+ inkscape:connector-curvature="0"
65
+ style="fill:none" />
66
+ <path
67
+ sodipodi:nodetypes="ccccccccccc"
68
+ inkscape:connector-curvature="0"
69
+ id="path2984"
70
+ d="m 3.5063587,1046.9456 c 7.7876473,-4.5065 16.1588333,-4.5115 25.1131473,-0.018 l 0.0027,-21.0774 c -7.378842,3.4895 -17.670722,3.2974 -25.1157603,0 z m 15.1068073,-14.2561 5.950444,8.5923 c -5.687323,-1.7259 -11.408219,-2.3901 -16.860485,-0.1197 l 4.814396,-6.8289 2.404354,3.0736 z"
71
+ style="fill:#000000;fill-opacity:1;stroke:none" />
72
+ </g>
73
+</svg>
74
sview-15_10.tar.gz/texturesSrc/actionPanoramaOff.svg
Added
78
1
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ width="32"
14
+ height="32"
15
+ id="svg2"
16
+ version="1.1"
17
+ inkscape:version="0.48.5 r10040"
18
+ sodipodi:docname="actionPanoramaOff.svg"
19
+ inkscape:export-filename="actionPanoramaOff.png"
20
+ inkscape:export-xdpi="90"
21
+ inkscape:export-ydpi="90">
22
+ <defs
23
+ id="defs4" />
24
+ <sodipodi:namedview
25
+ id="base"
26
+ pagecolor="#ffffff"
27
+ bordercolor="#666666"
28
+ borderopacity="1.0"
29
+ inkscape:pageopacity="1"
30
+ inkscape:pageshadow="2"
31
+ inkscape:zoom="16"
32
+ inkscape:cx="15.609629"
33
+ inkscape:cy="18.000209"
34
+ inkscape:document-units="px"
35
+ inkscape:current-layer="layer1"
36
+ showgrid="false"
37
+ inkscape:window-width="1920"
38
+ inkscape:window-height="1004"
39
+ inkscape:window-x="-9"
40
+ inkscape:window-y="-9"
41
+ inkscape:window-maximized="1"
42
+ showguides="true"
43
+ inkscape:guide-bbox="true" />
44
+ <metadata
45
+ id="metadata7">
46
+ <rdf:RDF>
47
+ <cc:Work
48
+ rdf:about="">
49
+ <dc:format>image/svg+xml</dc:format>
50
+ <dc:type
51
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
52
+ <dc:title />
53
+ </cc:Work>
54
+ </rdf:RDF>
55
+ </metadata>
56
+ <g
57
+ inkscape:label="Layer 1"
58
+ inkscape:groupmode="layer"
59
+ id="layer1"
60
+ transform="translate(0,-1020.3622)">
61
+ <path
62
+ d="m 0,1020.3622 h 32 v 32 H 0 z"
63
+ id="path5998"
64
+ inkscape:connector-curvature="0"
65
+ style="fill:none" />
66
+ <path
67
+ style="fill:#000000;fill-opacity:1;stroke:none"
68
+ d="M 3.5 5.5 L 3.5 26.59375 C 10.211288 22.71011 17.359715 22.168001 24.9375 24.96875 L 22.125 22.15625 L 19.71875 19.75 C 15.645714 19.051532 11.595784 19.185036 7.6875 20.8125 L 12.53125 13.96875 L 14.9375 17.03125 L 15.84375 15.875 L 13.34375 13.375 L 7.15625 7.1875 L 6.65625 6.6875 L 6.6875 6.65625 C 5.5806328 6.323486 4.5155463 5.9497844 3.5 5.5 z M 28.625 5.5 C 23.507501 7.9200967 16.998384 8.5543072 11 7.625 L 17.34375 13.96875 L 18.625 12.3125 L 24.5625 20.90625 C 24.438001 20.868469 24.312028 20.849244 24.1875 20.8125 L 28.625 25.25 L 28.625 5.5 z "
69
+ transform="translate(0,1020.3622)"
70
+ id="path2984" />
71
+ <path
72
+ id="path3122"
73
+ d="m 4.6875,1025.0341 -1.71875,1.6875 0.5,0.5 6.1875,6.1875 8.78125,8.7813 5.5,5.5 1.71875,-1.6875 -20.96875,-20.9688 z"
74
+ inkscape:connector-curvature="0"
75
+ style="fill:#000000;fill-opacity:1;stroke:none" />
76
+ </g>
77
+</svg>
78
sview-15_10.tar.gz/texturesSrc/actionStreamAudioOff.svg
Added
76
1
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ width="32"
14
+ height="32"
15
+ id="svg2"
16
+ version="1.1"
17
+ inkscape:version="0.48.5 r10040"
18
+ sodipodi:docname="actionStreamAudioOff.svg"
19
+ inkscape:export-filename="actionStreamAudioOff.png"
20
+ inkscape:export-xdpi="90"
21
+ inkscape:export-ydpi="90">
22
+ <defs
23
+ id="defs4" />
24
+ <sodipodi:namedview
25
+ id="base"
26
+ pagecolor="#ffffff"
27
+ bordercolor="#666666"
28
+ borderopacity="1.0"
29
+ inkscape:pageopacity="1"
30
+ inkscape:pageshadow="2"
31
+ inkscape:zoom="11.313709"
32
+ inkscape:cx="62.163495"
33
+ inkscape:cy="13.93474"
34
+ inkscape:document-units="px"
35
+ inkscape:current-layer="layer1"
36
+ showgrid="false"
37
+ inkscape:window-width="2560"
38
+ inkscape:window-height="1364"
39
+ inkscape:window-x="-9"
40
+ inkscape:window-y="-9"
41
+ inkscape:window-maximized="1" />
42
+ <metadata
43
+ id="metadata7">
44
+ <rdf:RDF>
45
+ <cc:Work
46
+ rdf:about="">
47
+ <dc:format>image/svg+xml</dc:format>
48
+ <dc:type
49
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50
+ <dc:title />
51
+ </cc:Work>
52
+ </rdf:RDF>
53
+ </metadata>
54
+ <g
55
+ inkscape:label="Layer 1"
56
+ inkscape:groupmode="layer"
57
+ id="layer1"
58
+ transform="translate(0,-1020.3622)">
59
+ <path
60
+ d="m 0,1020.3622 h 32 v 32 H 0 z"
61
+ id="path4"
62
+ inkscape:connector-curvature="0"
63
+ style="fill:none" />
64
+ <path
65
+ style="fill:#000000;fill-opacity:1"
66
+ d="M 4 8 L 4 10.65625 L 10.625 10.65625 L 7.96875 8 L 4 8 z M 11.375 8 L 14.03125 10.65625 L 20 10.65625 L 20 8 L 11.375 8 z M 22.65625 8 L 22.65625 18.90625 C 22.478039 18.841203 22.311431 18.790898 22.125 18.75 L 25.34375 21.96875 L 25.34375 10.65625 L 29.34375 10.65625 L 29.34375 8 L 22.65625 8 z M 4 13.34375 L 4 16 L 15.96875 16 L 13.3125 13.34375 L 4 13.34375 z M 16.71875 13.34375 L 19.375 16 L 20 16 L 20 13.34375 L 16.71875 13.34375 z M 4 18.65625 L 4 21.34375 L 14.65625 21.34375 L 14.65625 18.65625 L 4 18.65625 z M 19.25 19.28125 C 18.108742 19.986285 17.34375 21.218205 17.34375 22.65625 C 17.34375 24.86285 19.137084 26.65625 21.34375 26.65625 C 22.781773 26.65625 24.013708 25.891259 24.71875 24.75 L 21.8125 21.84375 L 19.25 19.28125 z "
67
+ transform="translate(0,1020.3622)"
68
+ id="path6" />
69
+ <path
70
+ id="path3122"
71
+ d="m 4.6875,1025.0341 -1.71875,1.6875 0.5,0.5 6.1875,6.1875 8.78125,8.7813 5.5,5.5 1.71875,-1.6875 -20.96875,-20.9688 z"
72
+ inkscape:connector-curvature="0"
73
+ style="fill:#000000;fill-opacity:1;stroke:none" />
74
+ </g>
75
+</svg>
76
sview-15_10.tar.gz/texturesSrc/actionStreamSubtitlesOff.svg
Added
76
1
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ width="32"
14
+ height="32"
15
+ id="svg2"
16
+ version="1.1"
17
+ inkscape:version="0.48.5 r10040"
18
+ sodipodi:docname="actionStreamSubtitlesOff.svg"
19
+ inkscape:export-filename="actionStreamSubtitlesOff.png"
20
+ inkscape:export-xdpi="90"
21
+ inkscape:export-ydpi="90">
22
+ <defs
23
+ id="defs4" />
24
+ <sodipodi:namedview
25
+ id="base"
26
+ pagecolor="#ffffff"
27
+ bordercolor="#666666"
28
+ borderopacity="1.0"
29
+ inkscape:pageopacity="1"
30
+ inkscape:pageshadow="2"
31
+ inkscape:zoom="16"
32
+ inkscape:cx="20.649495"
33
+ inkscape:cy="6.3567748"
34
+ inkscape:document-units="px"
35
+ inkscape:current-layer="layer1"
36
+ showgrid="false"
37
+ inkscape:window-width="2560"
38
+ inkscape:window-height="1364"
39
+ inkscape:window-x="-9"
40
+ inkscape:window-y="-9"
41
+ inkscape:window-maximized="1" />
42
+ <metadata
43
+ id="metadata7">
44
+ <rdf:RDF>
45
+ <cc:Work
46
+ rdf:about="">
47
+ <dc:format>image/svg+xml</dc:format>
48
+ <dc:type
49
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50
+ <dc:title />
51
+ </cc:Work>
52
+ </rdf:RDF>
53
+ </metadata>
54
+ <g
55
+ inkscape:label="Layer 1"
56
+ inkscape:groupmode="layer"
57
+ id="layer1"
58
+ transform="translate(0,-1020.3622)">
59
+ <path
60
+ d="m 0,1020.3622 h 32 v 32 H 0 z"
61
+ id="path4"
62
+ inkscape:connector-curvature="0"
63
+ style="fill:none" />
64
+ <path
65
+ style="fill:#000000;fill-opacity:1"
66
+ d="M 5.34375 5.34375 C 3.8704167 5.34375 2.65625 6.5267 2.65625 8 L 2.65625 24 C 2.65625 25.4733 3.8704167 26.65625 5.34375 26.65625 L 26.65625 26.65625 L 24 24 L 21.34375 24 L 21.34375 21.34375 L 18.65625 18.65625 L 13.34375 18.65625 L 13.34375 16 L 16 16 L 13.0625 13.0625 L 6.875 6.875 L 5.34375 5.34375 z M 8.75 5.34375 L 19.40625 16 L 26.65625 16 L 26.65625 18.65625 L 22.0625 18.65625 L 24.75 21.34375 L 26.65625 21.34375 L 26.65625 23.25 L 28.875 25.46875 C 29.153405 25.047558 29.34375 24.542929 29.34375 24 L 29.34375 8 C 29.34375 6.5267 28.129583 5.34375 26.65625 5.34375 L 8.75 5.34375 z M 5.34375 16 L 10.65625 16 L 10.65625 18.65625 L 5.34375 18.65625 L 5.34375 16 z M 5.34375 21.34375 L 18.65625 21.34375 L 18.65625 24 L 5.34375 24 L 5.34375 21.34375 z "
67
+ transform="translate(0,1020.3622)"
68
+ id="path6" />
69
+ <path
70
+ id="path3122"
71
+ d="m 4.6875,1025.0341 -1.71875,1.6875 0.5,0.5 6.1875,6.1875 8.78125,8.7813 5.5,5.5 1.71875,-1.6875 -20.96875,-20.9688 z"
72
+ inkscape:connector-curvature="0"
73
+ style="fill:#000000;fill-opacity:1;stroke:none" />
74
+ </g>
75
+</svg>
76
sview-15_08.tar.gz/texturesSrc/menuSrcFormat.svg -> sview-15_10.tar.gz/texturesSrc/menuSrcFormat.svg
Changed
125
1
2
height="16"
3
id="svg2"
4
version="1.1"
5
- inkscape:version="0.48.3.1 r9886"
6
+ inkscape:version="0.48.5 r10040"
7
sodipodi:docname="menuSrcFormat.svg"
8
inkscape:export-filename="/home/menuSbsLR16.png"
9
inkscape:export-xdpi="90"
10
11
borderopacity="1.0"
12
inkscape:pageopacity="0.0"
13
inkscape:pageshadow="2"
14
- inkscape:zoom="11.313708"
15
- inkscape:cx="3.695895"
16
- inkscape:cy="23.911929"
17
+ inkscape:zoom="31.999999"
18
+ inkscape:cx="8.3167614"
19
+ inkscape:cy="6.1548109"
20
inkscape:document-units="px"
21
- inkscape:current-layer="g4541"
22
+ inkscape:current-layer="layer8"
23
showgrid="false"
24
inkscape:window-width="1920"
25
- inkscape:window-height="1109"
26
- inkscape:window-x="0"
27
- inkscape:window-y="0"
28
+ inkscape:window-height="1004"
29
+ inkscape:window-x="-9"
30
+ inkscape:window-y="-9"
31
inkscape:window-maximized="1"
32
inkscape:snap-grids="true" />
33
<metadata
34
35
<dc:format>image/svg+xml</dc:format>
36
<dc:type
37
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
38
- <dc:title></dc:title>
39
+ <dc:title />
40
</cc:Work>
41
</rdf:RDF>
42
</metadata>
43
44
inkscape:label="Rectangle"
45
inkscape:groupmode="layer"
46
id="layer1"
47
- transform="translate(0,-1036.3622)">
48
+ transform="translate(0,-1036.3622)"
49
+ sodipodi:insensitive="true">
50
<rect
51
style="fill:#c8c8c8;fill-opacity:1;stroke:#000000;stroke-width:0.99977112;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
52
id="rect2985"
53
54
</g>
55
<g
56
inkscape:groupmode="layer"
57
+ id="layer8"
58
+ inkscape:label="DualStream">
59
+ <rect
60
+ y="2"
61
+ x="2"
62
+ height="8"
63
+ width="8"
64
+ id="rect4448-1"
65
+ style="fill:#808080;fill-opacity:1;stroke:none;display:inline" />
66
+ <text
67
+ xml:space="preserve"
68
+ style="font-size:8px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#fcfcfc;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
69
+ x="3.3710938"
70
+ y="8.8398438"
71
+ id="text3829-8"
72
+ sodipodi:linespacing="125%"><tspan
73
+ sodipodi:role="line"
74
+ id="tspan3831-2"
75
+ x="3.3710938"
76
+ y="8.8398438"
77
+ style="font-weight:bold;-inkscape-font-specification:Sans Bold">L</tspan></text>
78
+ <rect
79
+ y="6"
80
+ x="6"
81
+ height="8"
82
+ width="8"
83
+ id="rect4448-2-9-0"
84
+ style="fill:#fcfcfc;fill-opacity:1;stroke:none;display:inline" />
85
+ <text
86
+ xml:space="preserve"
87
+ style="font-size:8px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
88
+ x="6.8398438"
89
+ y="12.863281"
90
+ id="text3835-4"
91
+ sodipodi:linespacing="125%"><tspan
92
+ sodipodi:role="line"
93
+ id="tspan3837-5"
94
+ x="6.8398438"
95
+ y="12.863281"
96
+ style="font-weight:bold;-inkscape-font-specification:Sans Bold">R</tspan></text>
97
+ </g>
98
+ <g
99
+ inkscape:groupmode="layer"
100
id="g4541"
101
inkscape:label="Tiled720in1080"
102
- style="display:inline">
103
+ style="display:none">
104
<rect
105
style="fill:#fcfcfc;fill-opacity:1;stroke:none;display:inline"
106
id="rect4545"
107
108
y="2.9835343" />
109
<text
110
xml:space="preserve"
111
- style="font-size:7.10074090999999985px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4640);fill-opacity:1;stroke:none;display:inline;font-family:Sans"
112
+ style="font-size:7.10074091px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4640);fill-opacity:1;stroke:none;display:inline;font-family:Sans"
113
x="9.524538"
114
y="9.9912825"
115
id="text4046-0"
116
117
id="tspan4048-7"
118
x="9.524538"
119
y="9.9912825"
120
- style="font-weight:bold;-inkscape-font-specification:Sans Bold;fill-opacity:1;fill:url(#linearGradient4640)">R</tspan></text>
121
+ style="font-weight:bold;fill:url(#linearGradient4640);fill-opacity:1;-inkscape-font-specification:Sans Bold">R</tspan></text>
122
<rect
123
style="fill:#fcfcfc;fill-opacity:1;stroke:none;display:inline"
124
id="rect4545-2"
125
Refresh
No build results available
Refresh
No rpmlint results available
Login required, please
login
or
signup
in order to comment
Request History
awissu created request over 9 years ago
awissu accepted request over 9 years ago
Please add a comment