Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gstreamer
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thibault Saunier
gstreamer
Commits
56d01406
Commit
56d01406
authored
May 14, 2019
by
Thibault Saunier
Committed by
Thibault Saunier
May 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: Do not pass the json through stdout
Unicode encoding breaks on windows when doing so
parent
e31f06f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
docs/gst-hotdoc-plugins-scanner.c
docs/gst-hotdoc-plugins-scanner.c
+10
-3
docs/gst-plugins-doc-cache-generator.py
docs/gst-plugins-doc-cache-generator.py
+10
-6
No files found.
docs/gst-hotdoc-plugins-scanner.c
View file @
56d01406
...
...
@@ -690,8 +690,9 @@ main (int argc, char *argv[])
GList
*
features
,
*
tmp
;
gint
i
;
gboolean
first
=
TRUE
;
GError
*
err
=
NULL
;
g_assert
(
argc
>=
2
);
g_assert
(
argc
>=
3
);
setlocale
(
LC_ALL
,
""
);
setlocale
(
LC_NUMERIC
,
"C"
);
...
...
@@ -706,7 +707,7 @@ main (int argc, char *argv[])
gst_init
(
NULL
,
NULL
);
json
=
g_string_new
(
"{"
);
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
for
(
i
=
2
;
i
<
argc
;
i
++
)
{
gchar
*
basename
;
libfile
=
argv
[
i
];
plugin
=
gst_plugin_load_file
(
libfile
,
&
error
);
...
...
@@ -757,7 +758,13 @@ main (int argc, char *argv[])
}
g_string_append_c
(
json
,
'}'
);
g_print
(
"%s"
,
json
->
str
);
if
(
!
g_file_set_contents
(
argv
[
1
],
json
->
str
,
-
1
,
&
err
))
{
g_printerr
(
"Could not set json to %s: %s"
,
argv
[
1
],
err
->
message
);
g_clear_error
(
&
err
);
return
-
1
;
}
g_string_free
(
json
,
TRUE
);
return
0
;
}
docs/gst-plugins-doc-cache-generator.py
View file @
56d01406
...
...
@@ -21,6 +21,7 @@ import json
import
os
import
sys
import
subprocess
import
tempfile
from
collections
import
OrderedDict
try
:
...
...
@@ -84,7 +85,8 @@ if __name__ == "__main__":
except
FileNotFoundError
:
pass
cmd
=
[
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'gst-hotdoc-plugins-scanner'
)]
out
=
output_filename
+
'.tmp'
cmd
=
[
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'gst-hotdoc-plugins-scanner'
),
out
]
gst_plugins_paths
=
[]
for
plugin_path
in
sys
.
argv
[
3
:]:
cmd
.
append
(
plugin_path
)
...
...
@@ -110,11 +112,13 @@ if __name__ == "__main__":
with
open
(
stderrlogfile
,
'r'
)
as
f
:
print
(
f
.
read
(),
file
=
sys
.
stderr
)
raise
try
:
plugins
=
json
.
loads
(
data
.
decode
(),
object_pairs_hook
=
OrderedDict
)
except
json
.
decoder
.
JSONDecodeError
:
print
(
"Could not decode:
\n
%
s"
%
data
.
decode
(),
file
=
sys
.
stderr
)
raise
with
open
(
out
,
'r'
)
as
jfile
:
try
:
plugins
=
json
.
load
(
jfile
,
object_pairs_hook
=
OrderedDict
)
except
json
.
decoder
.
JSONDecodeError
:
print
(
"Could not decode:
\n
%
s"
%
jfile
.
read
(),
file
=
sys
.
stderr
)
raise
modified
=
dict_recursive_update
(
cache
,
plugins
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment