Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
fd162372
Commit
fd162372
authored
Sep 11, 2012
by
Mark Nauwelaerts
Browse files
directsoundsink: port to the new GLib thread API
parent
a3742177
Changes
2
Hide whitespace changes
Inline
Side-by-side
sys/directsound/gstdirectsoundsink.c
View file @
fd162372
...
...
@@ -136,6 +136,10 @@ G_DEFINE_TYPE_WITH_CODE (GstDirectSoundSink, gst_directsound_sink,
static
void
gst_directsound_sink_finalize
(
GObject
*
object
)
{
GstDirectSoundSink
*
dsoundsink
=
GST_DIRECTSOUND_SINK
(
object
);
g_mutex_clear
(
&
dsoundsink
->
dsound_lock
);
G_OBJECT_CLASS
(
parent_class
)
->
finalize
(
object
);
}
...
...
@@ -208,7 +212,7 @@ gst_directsound_sink_init (GstDirectSoundSink * dsoundsink)
dsoundsink
->
current_circular_offset
=
0
;
dsoundsink
->
buffer_size
=
DSBSIZE_MIN
;
dsoundsink
->
volume
=
100
;
dsoundsink
->
dsound_lock
=
g_mutex_new
(
);
g_mutex_init
(
&
dsoundsink
->
dsound_lock
);
dsoundsink
->
first_buffer_after_reset
=
FALSE
;
}
...
...
sys/directsound/gstdirectsoundsink.h
View file @
fd162372
...
...
@@ -48,8 +48,8 @@ G_BEGIN_DECLS
typedef
struct
_GstDirectSoundSink
GstDirectSoundSink
;
typedef
struct
_GstDirectSoundSinkClass
GstDirectSoundSinkClass
;
#define GST_DSOUND_LOCK(obj) (g_mutex_lock (obj->dsound_lock))
#define GST_DSOUND_UNLOCK(obj) (g_mutex_unlock (obj->dsound_lock))
#define GST_DSOUND_LOCK(obj) (g_mutex_lock (
&
obj->dsound_lock))
#define GST_DSOUND_UNLOCK(obj) (g_mutex_unlock (
&
obj->dsound_lock))
struct
_GstDirectSoundSink
{
...
...
@@ -76,7 +76,7 @@ struct _GstDirectSoundSink
GstCaps
*
cached_caps
;
/* lock used to protect writes and resets */
GMutex
*
dsound_lock
;
GMutex
dsound_lock
;
gboolean
first_buffer_after_reset
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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