Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gst-plugins-base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
George Kiagiadakis
gst-plugins-base
Commits
d2ce4911
Commit
d2ce4911
authored
Apr 16, 2011
by
Sebastian Dröge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{time,clock}overlay: Hold the class-global pango mutex when changing the pango context
parent
72b142bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
ext/pango/gstclockoverlay.c
ext/pango/gstclockoverlay.c
+2
-0
ext/pango/gsttimeoverlay.c
ext/pango/gsttimeoverlay.c
+2
-0
No files found.
ext/pango/gstclockoverlay.c
View file @
d2ce4911
...
...
@@ -163,6 +163,7 @@ gst_clock_overlay_class_init (GstClockOverlayClass * klass)
"Format to use for time and date value, as in strftime."
,
DEFAULT_PROP_TIMEFORMAT
,
G_PARAM_READWRITE
|
G_PARAM_STATIC_STRINGS
));
g_mutex_lock
(
GST_TEXT_OVERLAY_CLASS
(
klass
)
->
pango_lock
);
context
=
GST_TEXT_OVERLAY_CLASS
(
klass
)
->
pango_context
;
pango_context_set_language
(
context
,
pango_language_from_string
(
"en_US"
));
...
...
@@ -177,6 +178,7 @@ gst_clock_overlay_class_init (GstClockOverlayClass * klass)
pango_font_description_set_size
(
font_description
,
18
*
PANGO_SCALE
);
pango_context_set_font_description
(
context
,
font_description
);
pango_font_description_free
(
font_description
);
g_mutex_unlock
(
GST_TEXT_OVERLAY_CLASS
(
klass
)
->
pango_lock
);
}
...
...
ext/pango/gsttimeoverlay.c
View file @
d2ce4911
...
...
@@ -123,6 +123,7 @@ gst_time_overlay_class_init (GstTimeOverlayClass * klass)
gsttextoverlay_class
->
get_text
=
gst_time_overlay_get_text
;
g_mutex_lock
(
GST_TEXT_OVERLAY_CLASS
(
klass
)
->
pango_lock
);
context
=
GST_TEXT_OVERLAY_CLASS
(
klass
)
->
pango_context
;
pango_context_set_language
(
context
,
pango_language_from_string
(
"en_US"
));
...
...
@@ -137,6 +138,7 @@ gst_time_overlay_class_init (GstTimeOverlayClass * klass)
pango_font_description_set_size
(
font_description
,
18
*
PANGO_SCALE
);
pango_context_set_font_description
(
context
,
font_description
);
pango_font_description_free
(
font_description
);
g_mutex_unlock
(
GST_TEXT_OVERLAY_CLASS
(
klass
)
->
pango_lock
);
}
static
void
...
...
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