Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Seungha Yang
gst-plugins-base
Commits
5bb8021f
Commit
5bb8021f
authored
Sep 10, 2012
by
Tim-Philipp Müller
🐠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oggdemux: port to new GLib thread API
parent
794af4fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
ext/ogg/gstoggdemux.c
ext/ogg/gstoggdemux.c
+8
-8
ext/ogg/gstoggdemux.h
ext/ogg/gstoggdemux.h
+2
-2
No files found.
ext/ogg/gstoggdemux.c
View file @
5bb8021f
...
...
@@ -61,19 +61,19 @@
#define GST_FLOW_LIMIT GST_FLOW_CUSTOM_ERROR
#define GST_FLOW_SKIP_PUSH GST_FLOW_CUSTOM_SUCCESS_1
#define GST_CHAIN_LOCK(ogg) g_mutex_lock((ogg)->chain_lock)
#define GST_CHAIN_UNLOCK(ogg) g_mutex_unlock((ogg)->chain_lock)
#define GST_CHAIN_LOCK(ogg) g_mutex_lock(
&
(ogg)->chain_lock)
#define GST_CHAIN_UNLOCK(ogg) g_mutex_unlock(
&
(ogg)->chain_lock)
#define GST_PUSH_LOCK(ogg) \
do { \
GST_TRACE_OBJECT(ogg, "Push lock"); \
g_mutex_lock((ogg)->push_lock);
\
g_mutex_lock(
&
(ogg)->push_lock); \
} while(0)
#define GST_PUSH_UNLOCK(ogg) \
do { \
GST_TRACE_OBJECT(ogg, "Push unlock"); \
g_mutex_unlock((ogg)->push_lock);
\
g_mutex_unlock(
&
(ogg)->push_lock); \
} while(0)
GST_DEBUG_CATEGORY
(
gst_ogg_demux_debug
);
...
...
@@ -2019,8 +2019,8 @@ gst_ogg_demux_init (GstOggDemux * ogg)
gst_ogg_demux_sink_activate_mode
);
gst_element_add_pad
(
GST_ELEMENT
(
ogg
),
ogg
->
sinkpad
);
ogg
->
chain_lock
=
g_mutex_new
(
);
ogg
->
push_lock
=
g_mutex_new
(
);
g_mutex_init
(
&
ogg
->
chain_lock
);
g_mutex_init
(
&
ogg
->
push_lock
);
ogg
->
chains
=
g_array_new
(
FALSE
,
TRUE
,
sizeof
(
GstOggChain
*
));
ogg
->
stats_nbisections
=
0
;
...
...
@@ -2040,8 +2040,8 @@ gst_ogg_demux_finalize (GObject * object)
ogg
=
GST_OGG_DEMUX
(
object
);
g_array_free
(
ogg
->
chains
,
TRUE
);
g_mutex_
free
(
ogg
->
chain_lock
);
g_mutex_
free
(
ogg
->
push_lock
);
g_mutex_
clear
(
&
ogg
->
chain_lock
);
g_mutex_
clear
(
&
ogg
->
push_lock
);
ogg_sync_clear
(
&
ogg
->
sync
);
if
(
ogg
->
newsegment
)
...
...
ext/ogg/gstoggdemux.h
View file @
5bb8021f
...
...
@@ -142,7 +142,7 @@ struct _GstOggDemux
guint64
max_packet_size
,
max_page_size
;
/* state */
GMutex
*
chain_lock
;
/* we need the lock to protect the chains */
GMutex
chain_lock
;
/* we need the lock to protect the chains */
GArray
*
chains
;
/* list of chains we know */
GstClockTime
total_time
;
gint
bitrate
;
/* bitrate of the current chain */
...
...
@@ -162,7 +162,7 @@ struct _GstOggDemux
gint64
prestime
;
/* push mode seeking support */
GMutex
*
push_lock
;
/* we need the lock to protect the push mode variables */
GMutex
push_lock
;
/* we need the lock to protect the push mode variables */
gint64
push_byte_offset
;
/* where were are at in the stream, in bytes */
gint64
push_byte_length
;
/* length in bytes of the stream, -1 if unknown */
GstClockTime
push_time_length
;
/* length in time of the stream */
...
...
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