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
Göran Jönsson
gst-plugins-base
Commits
e6bf8ef8
Commit
e6bf8ef8
authored
Dec 21, 2003
by
David Schleef
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Global change from "caps2" to "caps"
Original commit message from CVS: Global change from "caps2" to "caps"
parent
76a6e90a
Changes
46
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
432 additions
and
432 deletions
+432
-432
examples/seeking/vorbisfile.c
examples/seeking/vorbisfile.c
+7
-7
ext/alsa/gstalsa.c
ext/alsa/gstalsa.c
+25
-25
ext/alsa/gstalsa.h
ext/alsa/gstalsa.h
+3
-3
ext/alsa/gstalsasrc.c
ext/alsa/gstalsasrc.c
+7
-7
ext/ogg/gstoggdemux.c
ext/ogg/gstoggdemux.c
+7
-7
ext/pango/gsttextoverlay.c
ext/pango/gsttextoverlay.c
+3
-3
ext/vorbis/vorbisenc.c
ext/vorbis/vorbisenc.c
+7
-7
ext/vorbis/vorbisfile.c
ext/vorbis/vorbisfile.c
+15
-15
gst-libs/gst/audio/audio.c
gst-libs/gst/audio/audio.c
+8
-8
gst-libs/gst/audio/gstaudiofilter.c
gst-libs/gst/audio/gstaudiofilter.c
+10
-10
gst-libs/gst/audio/gstaudiofilter.h
gst-libs/gst/audio/gstaudiofilter.h
+2
-2
gst-libs/gst/media-info/media-info-priv.c
gst-libs/gst/media-info/media-info-priv.c
+8
-8
gst-libs/gst/media-info/media-info-priv.h
gst-libs/gst/media-info/media-info-priv.h
+4
-4
gst-libs/gst/media-info/media-info-test.c
gst-libs/gst/media-info/media-info-test.c
+3
-3
gst-libs/gst/media-info/media-info.c
gst-libs/gst/media-info/media-info.c
+2
-2
gst-libs/gst/media-info/media-info.h
gst-libs/gst/media-info/media-info.h
+7
-7
gst-libs/gst/play/gstplay.c
gst-libs/gst/play/gstplay.c
+2
-2
gst-libs/gst/play/play.c
gst-libs/gst/play/play.c
+2
-2
gst-libs/gst/play/play.old.c
gst-libs/gst/play/play.old.c
+1
-1
gst-libs/gst/riff/riff-media.c
gst-libs/gst/riff/riff-media.c
+48
-48
gst-libs/gst/riff/riff-media.h
gst-libs/gst/riff/riff-media.h
+6
-6
gst-libs/gst/riff/riff-read.c
gst-libs/gst/riff/riff-read.c
+6
-6
gst-libs/gst/riff/riff-read.h
gst-libs/gst/riff/riff-read.h
+1
-1
gst-libs/gst/video/gstvideofilter.c
gst-libs/gst/video/gstvideofilter.c
+29
-29
gst-libs/gst/video/gstvideofilter.h
gst-libs/gst/video/gstvideofilter.h
+2
-2
gst-libs/gst/video/video.c
gst-libs/gst/video/video.c
+4
-4
gst/adder/gstadder.c
gst/adder/gstadder.c
+4
-4
gst/audioconvert/gstaudioconvert.c
gst/audioconvert/gstaudioconvert.c
+9
-9
gst/audioscale/gstaudioscale.c
gst/audioscale/gstaudioscale.c
+9
-9
gst/sine/gstsinesrc.c
gst/sine/gstsinesrc.c
+15
-15
gst/tags/gstvorbistag.c
gst/tags/gstvorbistag.c
+3
-3
gst/tcp/gsttcpsink.c
gst/tcp/gsttcpsink.c
+2
-2
gst/tcp/gsttcpsrc.c
gst/tcp/gsttcpsrc.c
+2
-2
gst/typefind/gsttypefindfunctions.c
gst/typefind/gsttypefindfunctions.c
+52
-52
gst/videoscale/gstvideoscale.c
gst/videoscale/gstvideoscale.c
+14
-14
gst/videotestsrc/gstvideotestsrc.c
gst/videotestsrc/gstvideotestsrc.c
+23
-23
gst/volume/gstvolume.c
gst/volume/gstvolume.c
+3
-3
sys/v4l/gstv4lmjpegsink.c
sys/v4l/gstv4lmjpegsink.c
+3
-3
sys/v4l/gstv4lmjpegsrc.c
sys/v4l/gstv4lmjpegsrc.c
+6
-6
sys/v4l/gstv4lsrc.c
sys/v4l/gstv4lsrc.c
+19
-19
sys/ximage/ximagesink.c
sys/ximage/ximagesink.c
+10
-10
sys/ximage/ximagesink.h
sys/ximage/ximagesink.h
+1
-1
sys/xvimage/xvimagesink.c
sys/xvimage/xvimagesink.c
+22
-22
sys/xvimage/xvimagesink.h
sys/xvimage/xvimagesink.h
+2
-2
tests/examples/seek/vorbisfile.c
tests/examples/seek/vorbisfile.c
+7
-7
tests/old/examples/seek/vorbisfile.c
tests/old/examples/seek/vorbisfile.c
+7
-7
No files found.
examples/seeking/vorbisfile.c
View file @
e6bf8ef8
...
...
@@ -12,25 +12,25 @@ struct probe_context {
gint
total_ls
;
GstCaps
2
*
metadata
;
GstCaps
2
*
streaminfo
;
GstCaps
2
*
caps
;
GstCaps
*
metadata
;
GstCaps
*
streaminfo
;
GstCaps
*
caps
;
};
static
void
print_caps
(
GstCaps
2
*
caps
)
print_caps
(
GstCaps
*
caps
)
{
char
*
s
;
s
=
gst_caps
2
_to_string
(
caps
);
s
=
gst_caps_to_string
(
caps
);
g_print
(
" %s
\n
"
,
s
);
g_free
(
s
);
}
static
void
print_format
(
GstCaps
2
*
caps
)
print_format
(
GstCaps
*
caps
)
{
char
*
s
;
s
=
gst_caps
2
_to_string
(
caps
);
s
=
gst_caps_to_string
(
caps
);
g_print
(
" format: %s
\n
"
,
s
);
g_free
(
s
);
}
...
...
ext/alsa/gstalsa.c
View file @
e6bf8ef8
...
...
@@ -431,13 +431,13 @@ gst_alsa_formats_match (GstAlsaFormat *one, GstAlsaFormat *two)
}
/* get props for a spec */
static
GstCaps
2
*
static
GstCaps
*
gst_alsa_get_caps_internal
(
snd_pcm_format_t
format
)
{
if
(
format
==
SND_PCM_FORMAT_A_LAW
)
{
return
gst_caps
2
_new_simple
(
"audio/x-alaw"
,
NULL
);
return
gst_caps_new_simple
(
"audio/x-alaw"
,
NULL
);
}
else
if
(
format
==
SND_PCM_FORMAT_MU_LAW
)
{
return
gst_caps
2
_new_simple
(
"audio/x-mulaw"
,
NULL
);
return
gst_caps_new_simple
(
"audio/x-mulaw"
,
NULL
);
}
else
if
(
snd_pcm_format_linear
(
format
))
{
/* int */
GstStructure
*
structure
=
gst_structure_new
(
"audio/x-raw-int"
,
...
...
@@ -460,13 +460,13 @@ gst_alsa_get_caps_internal (snd_pcm_format_t format)
break
;
}
}
return
gst_caps
2
_new_full
(
structure
,
NULL
);
return
gst_caps_new_full
(
structure
,
NULL
);
}
else
if
(
snd_pcm_format_float
(
format
))
{
/* no float with non-platform endianness */
if
(
!
snd_pcm_format_cpu_endian
(
format
))
return
NULL
;
return
gst_caps
2
_new_simple
(
"audio/x-raw-float"
,
return
gst_caps_new_simple
(
"audio/x-raw-float"
,
"width"
,
G_TYPE_INT
,
(
gint
)
snd_pcm_format_width
(
format
),
"endianness"
,
G_TYPE_INT
,
G_BYTE_ORDER
,
NULL
);
...
...
@@ -506,10 +506,10 @@ add_channels (GstStructure *structure, gint min_rate, gint max_rate,
* @rate: allowed rates if < 0, else desired rate
* @channels: all allowed values for channels if < 0, else desired channels
*/
GstCaps
2
*
GstCaps
*
gst_alsa_caps
(
snd_pcm_format_t
format
,
gint
rate
,
gint
channels
)
{
GstCaps
2
*
ret_caps
;
GstCaps
*
ret_caps
;
if
(
format
!=
SND_PCM_FORMAT_UNKNOWN
)
{
/* there are some caps set already */
...
...
@@ -517,22 +517,22 @@ gst_alsa_caps (snd_pcm_format_t format, gint rate, gint channels)
/* we can never use a format we can't set caps for */
g_assert
(
ret_caps
!=
NULL
);
g_assert
(
gst_caps
2
_get_
n_structures
(
ret_caps
)
==
1
);
g_assert
(
gst_caps_get_
size
(
ret_caps
)
==
1
);
add_channels
(
gst_caps
2
_get_
nth_cap
(
ret_caps
,
0
),
rate
,
-
1
,
channels
,
-
1
);
add_channels
(
gst_caps_get_
structure
(
ret_caps
,
0
),
rate
,
-
1
,
channels
,
-
1
);
}
else
{
int
i
;
GstCaps
2
*
temp
;
GstCaps
*
temp
;
ret_caps
=
gst_caps
2
_new_empty
();
ret_caps
=
gst_caps_new_empty
();
for
(
i
=
0
;
i
<=
SND_PCM_FORMAT_LAST
;
i
++
)
{
temp
=
gst_alsa_get_caps_internal
(
i
);
/* can be NULL, because not all alsa formats can be specified as caps */
if
(
temp
!=
NULL
)
{
g_assert
(
gst_caps
2
_get_
n_structures
(
temp
)
==
1
);
add_channels
(
gst_caps
2
_get_
nth_cap
(
temp
,
0
),
rate
,
-
1
,
channels
,
-
1
);
gst_caps
2
_append
(
ret_caps
,
temp
);
g_assert
(
gst_caps_get_
size
(
temp
)
==
1
);
add_channels
(
gst_caps_get_
structure
(
temp
,
0
),
rate
,
-
1
,
channels
,
-
1
);
gst_caps_append
(
ret_caps
,
temp
);
}
}
}
...
...
@@ -541,7 +541,7 @@ gst_alsa_caps (snd_pcm_format_t format, gint rate, gint channels)
}
/* Return better caps when device is open */
GstCaps
2
*
GstCaps
*
gst_alsa_get_caps
(
GstPad
*
pad
)
{
GstAlsa
*
this
;
...
...
@@ -550,7 +550,7 @@ gst_alsa_get_caps (GstPad *pad)
int
i
;
unsigned
int
min_rate
,
max_rate
;
gint
min_channels
,
max_channels
;
GstCaps
2
*
ret
=
NULL
;
GstCaps
*
ret
=
NULL
;
g_return_val_if_fail
(
pad
!=
NULL
,
NULL
);
...
...
@@ -586,12 +586,12 @@ gst_alsa_get_caps (GstPad *pad)
snd_pcm_hw_params_get_format_mask
(
hw_params
,
mask
);
for
(
i
=
0
;
i
<=
SND_PCM_FORMAT_LAST
;
i
++
)
{
if
(
snd_pcm_format_mask_test
(
mask
,
i
))
{
GstCaps
2
*
caps
=
gst_alsa_get_caps_internal
(
i
);
GstCaps
*
caps
=
gst_alsa_get_caps_internal
(
i
);
/* we can never use a format we can't set caps for */
if
(
caps
!=
NULL
)
{
g_assert
(
gst_caps
2
_get_
n_structures
(
caps
)
==
1
);
add_channels
(
gst_caps
2
_get_
nth_cap
(
caps
,
0
),
min_rate
,
max_rate
,
min_channels
,
max_channels
);
gst_caps
2
_append
(
ret
,
caps
);
g_assert
(
gst_caps_get_
size
(
caps
)
==
1
);
add_channels
(
gst_caps_get_
structure
(
caps
,
0
),
min_rate
,
max_rate
,
min_channels
,
max_channels
);
gst_caps_append
(
ret
,
caps
);
}
}
}
...
...
@@ -601,7 +601,7 @@ gst_alsa_get_caps (GstPad *pad)
/* Negotiates the caps */
GstPadLinkReturn
gst_alsa_link
(
GstPad
*
pad
,
const
GstCaps
2
*
caps
)
gst_alsa_link
(
GstPad
*
pad
,
const
GstCaps
*
caps
)
{
GstAlsa
*
this
;
GstAlsaFormat
*
format
;
...
...
@@ -616,7 +616,7 @@ gst_alsa_link (GstPad *pad, const GstCaps2 *caps)
if
(
!
gst_alsa_open_audio
(
this
))
return
GST_PAD_LINK_REFUSED
;
format
=
gst_alsa_get_format
(
gst_caps
2
_get_
nth_cap
(
caps
,
0
));
format
=
gst_alsa_get_format
(
gst_caps_get_
structure
(
caps
,
0
));
if
(
format
==
NULL
)
return
GST_PAD_LINK_REFUSED
;
...
...
@@ -643,17 +643,17 @@ gst_alsa_link (GstPad *pad, const GstCaps2 *caps)
continue
;
if
(
gst_pad_try_set_caps
(
this
->
pad
[
i
],
caps
)
==
GST_PAD_LINK_REFUSED
)
{
if
(
this
->
format
)
{
GstCaps
2
*
old
=
gst_alsa_caps
(
this
->
format
->
format
,
this
->
format
->
rate
,
this
->
format
->
channels
);
GstCaps
*
old
=
gst_alsa_caps
(
this
->
format
->
format
,
this
->
format
->
rate
,
this
->
format
->
channels
);
for
(
--
i
;
i
>=
0
;
i
--
)
{
if
(
gst_pad_try_set_caps
(
this
->
pad
[
i
],
old
)
==
GST_PAD_LINK_REFUSED
)
{
gst_element_error
(
GST_ELEMENT
(
this
),
"error resetting caps to sane value"
);
gst_caps
2
_free
(
old
);
gst_caps_free
(
old
);
break
;
}
else
{
/* FIXME: unset caps on pads somehow */
}
}
gst_caps
2
_free
(
old
);
gst_caps_free
(
old
);
ret
=
GST_PAD_LINK_REFUSED
;
goto
out
;
}
...
...
ext/alsa/gstalsa.h
View file @
e6bf8ef8
...
...
@@ -171,9 +171,9 @@ GType gst_alsa_get_type (void);
void
gst_alsa_set_eos
(
GstAlsa
*
this
);
GstPadLinkReturn
gst_alsa_link
(
GstPad
*
pad
,
const
GstCaps
2
*
caps
);
GstCaps
2
*
gst_alsa_get_caps
(
GstPad
*
pad
);
GstCaps
2
*
gst_alsa_caps
(
snd_pcm_format_t
format
,
const
GstCaps
*
caps
);
GstCaps
*
gst_alsa_get_caps
(
GstPad
*
pad
);
GstCaps
*
gst_alsa_caps
(
snd_pcm_format_t
format
,
gint
rate
,
gint
channels
);
...
...
ext/alsa/gstalsasrc.c
View file @
e6bf8ef8
...
...
@@ -239,7 +239,7 @@ gst_alsa_src_adjust_rate (gint rate, gboolean aggressive)
static
gboolean
gst_alsa_src_set_caps
(
GstAlsaSrc
*
src
,
gboolean
aggressive
)
{
GstCaps
2
*
all_caps
,
*
caps
;
GstCaps
*
all_caps
,
*
caps
;
GstStructure
*
structure
,
*
walk
;
gint
channels
,
min_channels
,
max_channels
;
gint
rate
,
min_rate
,
max_rate
;
...
...
@@ -251,7 +251,7 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
if
(
all_caps
==
NULL
)
return
FALSE
;
/* now intersect this with all caps of the peers... */
for
(
i
=
0
;
i
<
GST_ELEMENT
(
src
)
->
numpads
;
i
++
)
{
all_caps
=
gst_caps
2
_intersect
(
all_caps
,
gst_pad_get_caps
(
this
->
pad
[
i
]));
all_caps
=
gst_caps_intersect
(
all_caps
,
gst_pad_get_caps
(
this
->
pad
[
i
]));
if
(
all_caps
==
NULL
)
{
GST_DEBUG
(
"No compatible caps found in alsasrc (%s)"
,
GST_ELEMENT_NAME
(
this
));
return
FALSE
;
...
...
@@ -259,14 +259,14 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
}
/* construct caps */
caps
=
gst_caps
2
_new_simple
(
"audio/x-raw-int"
,
caps
=
gst_caps_new_simple
(
"audio/x-raw-int"
,
NULL
);
g_assert
(
gst_caps
2
_get_
n_structures
(
caps
)
==
1
);
structure
=
gst_caps
2
_get_
nth_cap
(
caps
,
0
);
g_assert
(
gst_caps_get_
size
(
caps
)
==
1
);
structure
=
gst_caps_get_
structure
(
caps
,
0
);
/* now try to find the best match */
for
(
i
=
0
;
i
<
gst_caps
2
_get_
n_structures
(
all_caps
);
i
++
)
{
walk
=
gst_caps
2
_get_
nth_cap
(
all_caps
,
i
);
for
(
i
=
0
;
i
<
gst_caps_get_
size
(
all_caps
);
i
++
)
{
walk
=
gst_caps_get_
structure
(
all_caps
,
i
);
if
(
!
(
gst_structure_get_int
(
walk
,
"signed"
,
&
sign
)
&&
gst_structure_get_int
(
walk
,
"width"
,
&
width
)
&&
gst_structure_get_int
(
walk
,
"depth"
,
&
depth
)))
{
...
...
ext/ogg/gstoggdemux.c
View file @
e6bf8ef8
...
...
@@ -87,7 +87,7 @@ GST_STATIC_PAD_TEMPLATE (
"src"
,
GST_PAD_SRC
,
GST_PAD_SOMETIMES
,
GST_STATIC_CAPS
2
_ANY
GST_STATIC_CAPS_ANY
);
static
GstStaticPadTemplate
ogg_demux_sink_template_factory
=
...
...
@@ -132,7 +132,7 @@ static void gst_ogg_demux_push (GstOggDemux * ogg,
static
void
gst_ogg_pad_push
(
GstOggDemux
*
ogg
,
GstOggPad
*
ogg_pad
);
static
GstCaps
2
*
gst_ogg_type_find
(
ogg_packet
*
packet
);
static
GstCaps
*
gst_ogg_type_find
(
ogg_packet
*
packet
);
static
GstElementClass
*
parent_class
=
NULL
;
...
...
@@ -434,7 +434,7 @@ gst_ogg_pad_push (GstOggDemux *ogg, GstOggPad *pad)
break
;
case
1
:
{
if
(
!
pad
->
pad
)
{
GstCaps
2
*
caps
=
gst_ogg_type_find
(
&
packet
);
GstCaps
*
caps
=
gst_ogg_type_find
(
&
packet
);
gchar
*
name
=
g_strdup_printf
(
"serial %d"
,
pad
->
serial
);
pad
->
pad
=
gst_pad_new_from_template
(
...
...
@@ -514,7 +514,7 @@ gst_ogg_demux_change_state (GstElement *element)
typedef
struct
{
ogg_packet
*
packet
;
guint
best_probability
;
GstCaps
2
*
caps
;
GstCaps
*
caps
;
}
OggTypeFind
;
static
guint8
*
ogg_find_peek
(
gpointer
data
,
gint64
offset
,
guint
size
)
...
...
@@ -528,16 +528,16 @@ ogg_find_peek (gpointer data, gint64 offset, guint size)
}
}
static
void
ogg_find_suggest
(
gpointer
data
,
guint
probability
,
const
GstCaps
2
*
caps
)
ogg_find_suggest
(
gpointer
data
,
guint
probability
,
const
GstCaps
*
caps
)
{
OggTypeFind
*
find
=
(
OggTypeFind
*
)
data
;
if
(
probability
>
find
->
best_probability
)
{
gst_caps
2
_replace
(
&
find
->
caps
,
gst_caps
2
_copy
(
caps
));
gst_caps_replace
(
&
find
->
caps
,
gst_caps_copy
(
caps
));
find
->
best_probability
=
probability
;
}
}
static
GstCaps
2
*
static
GstCaps
*
gst_ogg_type_find
(
ogg_packet
*
packet
)
{
GstTypeFind
gst_find
;
...
...
ext/pango/gsttextoverlay.c
View file @
e6bf8ef8
...
...
@@ -213,21 +213,21 @@ render_text(GstTextOverlay *overlay)
}
/* static GstPadLinkReturn */
/* gst_textoverlay_text_sinkconnect (GstPad *pad, GstCaps
2
*caps) */
/* gst_textoverlay_text_sinkconnect (GstPad *pad, GstCaps *caps) */
/* { */
/* return GST_PAD_LINK_DONE; */
/* } */
static
GstPadLinkReturn
gst_textoverlay_video_sinkconnect
(
GstPad
*
pad
,
const
GstCaps
2
*
caps
)
gst_textoverlay_video_sinkconnect
(
GstPad
*
pad
,
const
GstCaps
*
caps
)
{
GstTextOverlay
*
overlay
;
GstStructure
*
structure
;
overlay
=
GST_TEXTOVERLAY
(
gst_pad_get_parent
(
pad
));
structure
=
gst_caps
2
_get_
nth_cap
(
caps
,
0
);
structure
=
gst_caps_get_
structure
(
caps
,
0
);
overlay
->
width
=
overlay
->
height
=
0
;
gst_structure_get_int
(
structure
,
"width"
,
&
overlay
->
width
);
gst_structure_get_int
(
structure
,
"height"
,
&
overlay
->
height
);
...
...
ext/vorbis/vorbisenc.c
View file @
e6bf8ef8
...
...
@@ -129,17 +129,17 @@ vorbisenc_get_type (void)
return
vorbisenc_type
;
}
static
GstCaps
2
*
static
GstCaps
*
vorbis_caps_factory
(
void
)
{
return
gst_caps
2
_new_simple
(
"application/ogg"
,
NULL
);
return
gst_caps_new_simple
(
"application/ogg"
,
NULL
);
}
static
GstCaps
2
*
static
GstCaps
*
raw_caps_factory
(
void
)
{
return
gst_caps
2
_new_simple
(
"audio/x-raw-int"
,
gst_caps_new_simple
(
"audio/x-raw-int"
,
"endianness"
,
G_TYPE_INT
,
G_BYTE_ORDER
,
"signed"
,
G_TYPE_BOOLEAN
,
TRUE
,
"width"
,
G_TYPE_INT
,
16
,
...
...
@@ -153,7 +153,7 @@ static void
gst_vorbisenc_base_init
(
gpointer
g_class
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
g_class
);
GstCaps
2
*
raw_caps
,
*
vorbis_caps
;
GstCaps
*
raw_caps
,
*
vorbis_caps
;
raw_caps
=
raw_caps_factory
();
vorbis_caps
=
vorbis_caps_factory
();
...
...
@@ -213,14 +213,14 @@ gst_vorbisenc_class_init (VorbisEncClass * klass)
}
static
GstPadLinkReturn
gst_vorbisenc_sinkconnect
(
GstPad
*
pad
,
const
GstCaps
2
*
caps
)
gst_vorbisenc_sinkconnect
(
GstPad
*
pad
,
const
GstCaps
*
caps
)
{
VorbisEnc
*
vorbisenc
;
GstStructure
*
structure
;
vorbisenc
=
GST_VORBISENC
(
gst_pad_get_parent
(
pad
));
structure
=
gst_caps
2
_get_
nth_cap
(
caps
,
0
);
structure
=
gst_caps_get_
structure
(
caps
,
0
);
gst_structure_get_int
(
structure
,
"channels"
,
&
vorbisenc
->
channels
);
gst_structure_get_int
(
structure
,
"rate"
,
&
vorbisenc
->
frequency
);
...
...
ext/vorbis/vorbisfile.c
View file @
e6bf8ef8
...
...
@@ -66,8 +66,8 @@ struct _VorbisFile {
guint64
offset
;
gulong
blocksize
;
GstCaps
2
*
metadata
;
GstCaps
2
*
streaminfo
;
GstCaps
*
metadata
;
GstCaps
*
streaminfo
;
};
struct
_VorbisFileClass
{
...
...
@@ -175,16 +175,16 @@ vorbisfile_get_type (void)
return
vorbisfile_type
;
}
static
GstCaps
2
*
static
GstCaps
*
vorbis_caps_factory
(
void
)
{
return
gst_caps
2
_new_simple
(
"application/ogg"
,
NULL
);
return
gst_caps_new_simple
(
"application/ogg"
,
NULL
);
}
static
GstCaps
2
*
static
GstCaps
*
raw_caps_factory
(
void
)
{
return
gst_caps
2
_new_simple
(
"audio/x-raw-int"
,
return
gst_caps_new_simple
(
"audio/x-raw-int"
,
"endianness"
,
G_TYPE_INT
,
G_BYTE_ORDER
,
"signed"
,
G_TYPE_BOOLEAN
,
TRUE
,
"width"
,
G_TYPE_INT
,
16
,
...
...
@@ -194,10 +194,10 @@ raw_caps_factory (void)
NULL
);
}
static
GstCaps
2
*
static
GstCaps
*
raw_caps2_factory
(
void
)
{
return
gst_caps
2
_new_simple
(
"audio/x-raw-float"
,
return
gst_caps_new_simple
(
"audio/x-raw-float"
,
"width"
,
G_TYPE_INT
,
32
,
"endianness"
,
G_TYPE_INT
,
G_BYTE_ORDER
,
"rate"
,
GST_TYPE_INT_RANGE
,
11025
,
48000
,
...
...
@@ -210,7 +210,7 @@ static void
gst_vorbisfile_base_init
(
gpointer
g_class
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
g_class
);
GstCaps
2
*
raw_caps
,
*
vorbis_caps
,
*
raw_caps2
;
GstCaps
*
raw_caps
,
*
vorbis_caps
,
*
raw_caps2
;
raw_caps
=
raw_caps_factory
();
raw_caps2
=
raw_caps2_factory
();
...
...
@@ -219,7 +219,7 @@ gst_vorbisfile_base_init (gpointer g_class)
gst_vorbisdec_sink_template
=
gst_pad_template_new
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
vorbis_caps
);
gst_caps
2
_append
(
raw_caps2
,
raw_caps
);
gst_caps_append
(
raw_caps2
,
raw_caps
);
gst_vorbisdec_src_template
=
gst_pad_template_new
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
raw_caps2
);
...
...
@@ -415,7 +415,7 @@ ov_callbacks vorbisfile_ov_callbacks =
};
#if 0
/* retrieve the comment field (or tags) and put in metadata GstCaps
2
/* retrieve the comment field (or tags) and put in metadata GstCaps
* returns TRUE if caps could be set,
* FALSE if they couldn't be read somehow */
static gboolean
...
...
@@ -457,7 +457,7 @@ gst_vorbisfile_update_metadata (VorbisFile *vorbisfile, gint link)
return TRUE;
}
/* retrieve logical stream properties and put them in streaminfo GstCaps
2
/* retrieve logical stream properties and put them in streaminfo GstCaps
* returns TRUE if caps could be set,
* FALSE if they couldn't be read somehow */
static gboolean
...
...
@@ -510,13 +510,13 @@ static gboolean
gst_vorbisfile_new_link
(
VorbisFile
*
vorbisfile
,
gint
link
)
{
vorbis_info
*
vi
=
ov_info
(
&
vorbisfile
->
vf
,
link
);
GstCaps
2
*
caps
;
GstCaps
*
caps
;
gboolean
res
=
TRUE
;
/* new logical bitstream */
vorbisfile
->
current_link
=
link
;
caps
=
gst_caps
2
_new_simple
(
"audio/x-raw-int"
,
caps
=
gst_caps_new_simple
(
"audio/x-raw-int"
,
"endianness"
,
G_TYPE_INT
,
G_BYTE_ORDER
,
"signed"
,
G_TYPE_BOOLEAN
,
TRUE
,
"width"
,
G_TYPE_INT
,
16
,
...
...
@@ -528,7 +528,7 @@ gst_vorbisfile_new_link (VorbisFile *vorbisfile, gint link)
if
(
gst_pad_try_set_caps
(
vorbisfile
->
srcpad
,
caps
)
<=
0
)
{
res
=
FALSE
;
}
gst_caps
2
_free
(
caps
);
gst_caps_free
(
caps
);
return
res
;
}
...
...
gst-libs/gst/audio/audio.c
View file @
e6bf8ef8
...
...
@@ -35,7 +35,7 @@ gst_audio_frame_byte_size (GstPad* pad)
int
width
=
0
;
int
channels
=
0
;
GstCaps
2
*
caps
;
GstCaps
*
caps
;
GstStructure
*
structure
;
/* get caps of pad */
...
...
@@ -48,7 +48,7 @@ gst_audio_frame_byte_size (GstPad* pad)
return
0
;
}
structure
=
gst_caps
2
_get_
nth_cap
(
caps
,
0
);
structure
=
gst_caps_get_
structure
(
caps
,
0
);
gst_structure_get_int
(
structure
,
"width"
,
&
width
);
gst_structure_get_int
(
structure
,
"channels"
,
&
channels
);
...
...
@@ -82,7 +82,7 @@ gst_audio_frame_rate (GstPad *pad)
* returns 0 if failed, rate if success
*/
{
GstCaps
2
*
caps
=
NULL
;
GstCaps
*
caps
=
NULL
;
gint
rate
;
GstStructure
*
structure
;
...
...
@@ -96,7 +96,7 @@ gst_audio_frame_rate (GstPad *pad)
return
0
;
}
else
{
structure
=
gst_caps
2
_get_
nth_cap
(
caps
,
0
);
structure
=
gst_caps_get_
structure
(
caps
,
0
);
gst_structure_get_int
(
structure
,
"rate"
,
&
rate
);
return
rate
;
}
...
...
@@ -117,7 +117,7 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
double
length
;
GstCaps
2
*
caps
=
NULL
;
GstCaps
*
caps
=
NULL
;
GstStructure
*
structure
;
g_assert
(
GST_IS_BUFFER
(
buf
));
...
...
@@ -132,7 +132,7 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
}
else
{
structure
=
gst_caps
2
_get_
nth_cap
(
caps
,
0
);
structure
=
gst_caps_get_
structure
(
caps
,
0
);
bytes
=
GST_BUFFER_SIZE
(
buf
);
gst_structure_get_int
(
structure
,
"width"
,
&
width
);
gst_structure_get_int
(
structure
,
"channels"
,
&
channels
);
...
...
@@ -156,7 +156,7 @@ gst_audio_highest_sample_value (GstPad* pad)
{
gboolean
is_signed
=
FALSE
;
gint
width
=
0
;
GstCaps
2
*
caps
=
NULL
;
GstCaps
*
caps
=
NULL
;
GstStructure
*
structure
;
caps
=
GST_PAD_CAPS
(
pad
);
...
...
@@ -166,7 +166,7 @@ gst_audio_highest_sample_value (GstPad* pad)
GST_ELEMENT_NAME
(
gst_pad_get_parent
(
pad
)),
GST_PAD_NAME
(
pad
));
}
structure
=
gst_caps
2
_get_
nth_cap
(
caps
,
0
);
structure
=
gst_caps_get_
structure
(
caps
,
0
);
gst_structure_get_int
(
structure
,
"width"
,
&
width
);
gst_structure_get_boolean
(
structure
,
"signed"
,
&
is_signed
);
...
...
gst-libs/gst/audio/gstaudiofilter.c
View file @
e6bf8ef8
...
...
@@ -48,7 +48,7 @@ static void gst_audiofilter_set_property (GObject *object, guint prop_id, const
static
void
gst_audiofilter_get_property
(
GObject
*
object
,
guint
prop_id
,
GValue
*
value
,
GParamSpec
*
pspec
);
static
void
gst_audiofilter_chain
(
GstPad
*
pad
,
GstData
*
_data
);
GstCaps
2
*
gst_audiofilter_class_get_capslist
(
GstAudiofilterClass
*
klass
);
GstCaps
*
gst_audiofilter_class_get_capslist
(
GstAudiofilterClass
*
klass
);
static
GstElementClass
*
parent_class
=
NULL
;
...
...
@@ -105,11 +105,11 @@ static void gst_audiofilter_class_init (gpointer g_class, gpointer class_data)
gobject_class
->
get_property
=
gst_audiofilter_get_property
;
}
static
GstCaps
2
*
static
GstCaps
*
gst_audiofilter_getcaps
(
GstPad
*
pad
)
{
GstAudiofilter
*
audiofilter
;
GstCaps
2
*
othercaps
;
GstCaps
*
othercaps
;
GstAudiofilterClass
*
audiofilter_class
;
GST_DEBUG
(
"gst_audiofilter_sink_getcaps"
);
...
...
@@ -124,11 +124,11 @@ gst_audiofilter_getcaps (GstPad *pad)
othercaps
=
gst_pad_get_allowed_caps
(
audiofilter
->
srcpad
);
}
return
gst_caps
2
_intersect
(
othercaps
,
audiofilter_class
->
caps
);
return
gst_caps_intersect
(
othercaps
,
audiofilter_class
->
caps
);
}
static
GstPadLinkReturn
gst_audiofilter_link
(
GstPad
*
pad
,
const
GstCaps
2
*
caps
)
gst_audiofilter_link
(
GstPad
*
pad
,
const
GstCaps
*
caps
)
{
GstAudiofilter
*
audiofilter
;
GstPadLinkReturn
ret
;
...
...
@@ -150,7 +150,7 @@ gst_audiofilter_link (GstPad *pad, const GstCaps2 *caps)
if
(
link_ret
!=
GST_PAD_LINK_OK
)
return
link_ret
;
structure
=
gst_caps
2
_get_
nth_cap
(
caps
,
0
);
structure
=
gst_caps_get_
structure
(
caps
,
0
);
if
(
strcmp
(
gst_structure_get_name
(
structure
),
"audio/x-raw-int"
)
==
0
)
{
ret
=
gst_structure_get_int
(
structure
,
"depth"
,
&
audiofilter
->
depth
);
...
...
@@ -287,19 +287,19 @@ gst_audiofilter_get_property (GObject *object, guint prop_id, GValue *value, GPa
}
void
gst_audiofilter_class_add_pad_templates
(
GstAudiofilterClass
*
audiofilter_class
,
const
GstCaps
2
*
caps
)
GstAudiofilterClass
*
audiofilter_class
,
const
GstCaps
*
caps
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
audiofilter_class
);
audiofilter_class
->
caps
=
gst_caps
2
_copy
(
caps
);
audiofilter_class
->
caps
=
gst_caps_copy
(
caps
);
gst_element_class_add_pad_template
(
element_class
,
gst_pad_template_new
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
gst_caps
2
_copy
(
caps
)));
gst_caps_copy
(
caps
)));
gst_element_class_add_pad_template
(
element_class
,
gst_pad_template_new
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
gst_caps
2
_copy
(
caps
)));
gst_caps_copy
(
caps
)));
}
static
gboolean
...
...
gst-libs/gst/audio/gstaudiofilter.h
View file @
e6bf8ef8
...
...
@@ -68,7 +68,7 @@ struct _GstAudiofilter {
struct
_GstAudiofilterClass
{
GstElementClass
parent_class
;
GstCaps
2
*
caps
;
GstCaps
*
caps
;
GstAudiofilterSetupFunc
setup
;
GstAudiofilterInplaceFilterFunc
filter_inplace
;
GstAudiofilterFilterFunc
filter
;
...
...
@@ -76,7 +76,7 @@ struct _GstAudiofilterClass {
GType
gst_audiofilter_get_type
(
void
);