Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marc-André Lureau
gst-plugins-good
Commits
a068133e
Commit
a068133e
authored
Apr 16, 2011
by
Tim-Philipp Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jack: fix unused-but-set-variable warnings with gcc-4.6
parent
9b93ae0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
32 deletions
+43
-32
ext/jack/gstjackaudiosink.c
ext/jack/gstjackaudiosink.c
+21
-17
ext/jack/gstjackaudiosrc.c
ext/jack/gstjackaudiosrc.c
+22
-15
No files found.
ext/jack/gstjackaudiosink.c
View file @
a068133e
...
...
@@ -155,12 +155,8 @@ gst_jack_ring_buffer_get_type (void)
static
void
gst_jack_ring_buffer_class_init
(
GstJackRingBufferClass
*
klass
)
{
GObjectClass
*
gobject_class
;
GstObjectClass
*
gstobject_class
;
GstRingBufferClass
*
gstringbuffer_class
;
gobject_class
=
(
GObjectClass
*
)
klass
;
gstobject_class
=
(
GstObjectClass
*
)
klass
;
gstringbuffer_class
=
(
GstRingBufferClass
*
)
klass
;
ring_parent_class
=
g_type_class_peek_parent
(
klass
);
...
...
@@ -188,14 +184,12 @@ jack_process_cb (jack_nframes_t nframes, void *arg)
{
GstJackAudioSink
*
sink
;
GstRingBuffer
*
buf
;
GstJackRingBuffer
*
abuf
;
gint
readseg
,
len
;
guint8
*
readptr
;
gint
i
,
j
,
flen
,
channels
;
sample_t
**
buffers
,
*
data
;
buf
=
GST_RING_BUFFER_CAST
(
arg
);
abuf
=
GST_JACK_RING_BUFFER_CAST
(
arg
);
sink
=
GST_JACK_AUDIO_SINK
(
GST_OBJECT_PARENT
(
buf
));
channels
=
buf
->
spec
.
channels
;
...
...
@@ -588,37 +582,49 @@ gst_jack_ring_buffer_stop (GstRingBuffer * buf)
return
TRUE
;
}
#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)
static
guint
gst_jack_ring_buffer_delay
(
GstRingBuffer
*
buf
)
{
GstJackAudioSink
*
sink
;
guint
i
,
res
=
0
;
#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)
jack_latency_range_t
range
;
#else
guint
latency
;
#endif
jack_client_t
*
client
;
sink
=
GST_JACK_AUDIO_SINK
(
GST_OBJECT_PARENT
(
buf
));
client
=
gst_jack_audio_client_get_client
(
sink
->
client
);
for
(
i
=
0
;
i
<
sink
->
port_count
;
i
++
)
{
#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)
jack_port_get_latency_range
(
sink
->
ports
[
i
],
JackPlaybackLatency
,
&
range
);
if
(
range
.
max
>
res
)
res
=
range
.
max
;
#else
}
GST_LOG_OBJECT
(
sink
,
"delay %u"
,
res
);
return
res
;
}
#else
/* !(defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)) */
static
guint
gst_jack_ring_buffer_delay
(
GstRingBuffer
*
buf
)
{
GstJackAudioSink
*
sink
;
guint
i
,
res
=
0
;
guint
latency
;
jack_client_t
*
client
;
sink
=
GST_JACK_AUDIO_SINK
(
GST_OBJECT_PARENT
(
buf
));
client
=
gst_jack_audio_client_get_client
(
sink
->
client
);
for
(
i
=
0
;
i
<
sink
->
port_count
;
i
++
)
{
latency
=
jack_port_get_total_latency
(
client
,
sink
->
ports
[
i
]);
if
(
latency
>
res
)
res
=
latency
;
#endif
}
GST_LOG_OBJECT
(
sink
,
"delay %u"
,
res
);
return
res
;
}
#endif
static
GstStaticPadTemplate
jackaudiosink_sink_factory
=
GST_STATIC_PAD_TEMPLATE
(
"sink"
,
...
...
@@ -682,12 +688,10 @@ static void
gst_jack_audio_sink_class_init
(
GstJackAudioSinkClass
*
klass
)
{
GObjectClass
*
gobject_class
;
GstElementClass
*
gstelement_class
;
GstBaseSinkClass
*
gstbasesink_class
;
GstBaseAudioSinkClass
*
gstbaseaudiosink_class
;
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasesink_class
=
(
GstBaseSinkClass
*
)
klass
;
gstbaseaudiosink_class
=
(
GstBaseAudioSinkClass
*
)
klass
;
...
...
ext/jack/gstjackaudiosrc.c
View file @
a068133e
...
...
@@ -176,12 +176,8 @@ gst_jack_ring_buffer_get_type (void)
static
void
gst_jack_ring_buffer_class_init
(
GstJackRingBufferClass
*
klass
)
{
GObjectClass
*
gobject_class
;
GstObjectClass
*
gstobject_class
;
GstRingBufferClass
*
gstringbuffer_class
;
gobject_class
=
(
GObjectClass
*
)
klass
;
gstobject_class
=
(
GstObjectClass
*
)
klass
;
gstringbuffer_class
=
(
GstRingBufferClass
*
)
klass
;
ring_parent_class
=
g_type_class_peek_parent
(
klass
);
...
...
@@ -599,37 +595,50 @@ gst_jack_ring_buffer_stop (GstRingBuffer * buf)
return
TRUE
;
}
#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)
static
guint
gst_jack_ring_buffer_delay
(
GstRingBuffer
*
buf
)
{
GstJackAudioSrc
*
src
;
guint
i
,
res
=
0
;
#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)
jack_latency_range_t
range
;
#else
guint
latency
;
#endif
jack_client_t
*
client
;
src
=
GST_JACK_AUDIO_SRC
(
GST_OBJECT_PARENT
(
buf
));
client
=
gst_jack_audio_client_get_client
(
src
->
client
);
for
(
i
=
0
;
i
<
src
->
port_count
;
i
++
)
{
#if defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)
jack_port_get_latency_range
(
src
->
ports
[
i
],
JackCaptureLatency
,
&
range
);
if
(
range
.
max
>
res
)
res
=
range
.
max
;
#else
}
GST_DEBUG_OBJECT
(
src
,
"delay %u"
,
res
);
return
res
;
}
#else
/* !(defined (HAVE_JACK_0_120_1) || defined(HAVE_JACK_1_9_7)) */
static
guint
gst_jack_ring_buffer_delay
(
GstRingBuffer
*
buf
)
{
GstJackAudioSrc
*
src
;
guint
i
,
res
=
0
;
guint
latency
;
jack_client_t
*
client
;
src
=
GST_JACK_AUDIO_SRC
(
GST_OBJECT_PARENT
(
buf
));
client
=
gst_jack_audio_client_get_client
(
src
->
client
);
for
(
i
=
0
;
i
<
src
->
port_count
;
i
++
)
{
latency
=
jack_port_get_total_latency
(
client
,
src
->
ports
[
i
]);
if
(
latency
>
res
)
res
=
latency
;
#endif
}
GST_DEBUG_OBJECT
(
src
,
"delay %u"
,
res
);
return
res
;
}
#endif
/* Audiosrc signals and args */
enum
...
...
@@ -700,12 +709,10 @@ static void
gst_jack_audio_src_class_init
(
GstJackAudioSrcClass
*
klass
)
{
GObjectClass
*
gobject_class
;
GstElementClass
*
gstelement_class
;
GstBaseSrcClass
*
gstbasesrc_class
;
GstBaseAudioSrcClass
*
gstbaseaudiosrc_class
;
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasesrc_class
=
(
GstBaseSrcClass
*
)
klass
;
gstbaseaudiosrc_class
=
(
GstBaseAudioSrcClass
*
)
klass
;
...
...
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