mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 15:36:42 +00:00
ext/pango/: Those functions are called with lock held.
Original commit message from CVS: 2006-02-18 Julien MOUTTE <julien@moutte.net> * ext/pango/gstclockoverlay.c: (gst_clock_overlay_get_text): * ext/pango/gsttimeoverlay.c: (gst_time_overlay_get_text): Those functions are called with lock held.
This commit is contained in:
parent
f46d2ed4c4
commit
0f1a1598ca
3 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2006-02-18 Julien MOUTTE <julien@moutte.net>
|
||||||
|
|
||||||
|
* ext/pango/gstclockoverlay.c: (gst_clock_overlay_get_text):
|
||||||
|
* ext/pango/gsttimeoverlay.c: (gst_time_overlay_get_text): Those
|
||||||
|
functions are called with lock held.
|
||||||
|
|
||||||
2006-02-18 Julien MOUTTE <julien@moutte.net>
|
2006-02-18 Julien MOUTTE <julien@moutte.net>
|
||||||
|
|
||||||
* ext/pango/gsttextoverlay.c: (gst_text_overlay_base_init),
|
* ext/pango/gsttextoverlay.c: (gst_text_overlay_base_init),
|
||||||
|
|
|
@ -86,6 +86,7 @@ gst_clock_overlay_render_time (GstClockOverlay * overlay)
|
||||||
return g_strdup_printf ("%02u:%02u:%02u", t.tm_hour, t.tm_min, t.tm_sec);
|
return g_strdup_printf ("%02u:%02u:%02u", t.tm_hour, t.tm_min, t.tm_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Called with lock held */
|
||||||
static gchar *
|
static gchar *
|
||||||
gst_clock_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame)
|
gst_clock_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame)
|
||||||
{
|
{
|
||||||
|
@ -93,9 +94,7 @@ gst_clock_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame)
|
||||||
|
|
||||||
overlay->need_render = TRUE;
|
overlay->need_render = TRUE;
|
||||||
|
|
||||||
GST_OBJECT_LOCK (overlay);
|
|
||||||
txt = g_strdup (overlay->default_text);
|
txt = g_strdup (overlay->default_text);
|
||||||
GST_OBJECT_UNLOCK (overlay);
|
|
||||||
|
|
||||||
time_str = gst_clock_overlay_render_time (GST_CLOCK_OVERLAY (overlay));
|
time_str = gst_clock_overlay_render_time (GST_CLOCK_OVERLAY (overlay));
|
||||||
if (txt != NULL && *txt != '\0') {
|
if (txt != NULL && *txt != '\0') {
|
||||||
|
|
|
@ -89,6 +89,7 @@ gst_time_overlay_render_time (GstTimeOverlay * overlay, GstClockTime time)
|
||||||
return g_strdup_printf ("%u:%02u:%02u.%03u", hours, mins, secs, msecs);
|
return g_strdup_printf ("%u:%02u:%02u.%03u", hours, mins, secs, msecs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Called with lock held */
|
||||||
static gchar *
|
static gchar *
|
||||||
gst_time_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame)
|
gst_time_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame)
|
||||||
{
|
{
|
||||||
|
@ -104,9 +105,7 @@ gst_time_overlay_get_text (GstTextOverlay * overlay, GstBuffer * video_frame)
|
||||||
|
|
||||||
GST_DEBUG ("buffer with timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (time));
|
GST_DEBUG ("buffer with timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (time));
|
||||||
|
|
||||||
GST_OBJECT_LOCK (overlay);
|
|
||||||
txt = g_strdup (overlay->default_text);
|
txt = g_strdup (overlay->default_text);
|
||||||
GST_OBJECT_UNLOCK (overlay);
|
|
||||||
|
|
||||||
time_str = gst_time_overlay_render_time (GST_TIME_OVERLAY (overlay), time);
|
time_str = gst_time_overlay_render_time (GST_TIME_OVERLAY (overlay), time);
|
||||||
if (txt != NULL && *txt != '\0') {
|
if (txt != NULL && *txt != '\0') {
|
||||||
|
|
Loading…
Reference in a new issue