mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-05 14:02:26 +00:00
Rename gst_caps_structure_fixate_* to gst_structure_fixate_* (#322027)
Original commit message from CVS: * ext/libvisual/visual.c: (get_buffer): * gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_fixate): * gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_fixate_caps): * gst/audioscale/gstaudioscale.c: (gst_audioscale_fixate): * gst/audiotestsrc/gstaudiotestsrc.c: (gst_audiotestsrc_src_fixate): * gst/sine/gstsinesrc.c: (gst_sinesrc_src_fixate): * gst/videorate/gstvideorate.c: (gst_videorate_setcaps): * gst/videoscale/gstvideoscale.c: (gst_videoscale_fixate_caps): * gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_src_fixate): * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_fixate): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_fixate): Rename gst_caps_structure_fixate_* to gst_structure_fixate_* (#322027)
This commit is contained in:
parent
213898e8dc
commit
1cc82e9138
12 changed files with 53 additions and 37 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
||||||
|
2005-11-21 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
|
* ext/libvisual/visual.c: (get_buffer):
|
||||||
|
* gst-libs/gst/audio/gstbaseaudiosrc.c:
|
||||||
|
(gst_base_audio_src_fixate):
|
||||||
|
* gst/audioconvert/gstaudioconvert.c:
|
||||||
|
(gst_audio_convert_fixate_caps):
|
||||||
|
* gst/audioscale/gstaudioscale.c: (gst_audioscale_fixate):
|
||||||
|
* gst/audiotestsrc/gstaudiotestsrc.c:
|
||||||
|
(gst_audiotestsrc_src_fixate):
|
||||||
|
* gst/sine/gstsinesrc.c: (gst_sinesrc_src_fixate):
|
||||||
|
* gst/videorate/gstvideorate.c: (gst_videorate_setcaps):
|
||||||
|
* gst/videoscale/gstvideoscale.c: (gst_videoscale_fixate_caps):
|
||||||
|
* gst/videotestsrc/gstvideotestsrc.c:
|
||||||
|
(gst_videotestsrc_src_fixate):
|
||||||
|
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_fixate):
|
||||||
|
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_fixate):
|
||||||
|
Rename gst_caps_structure_fixate_* to gst_structure_fixate_*
|
||||||
|
(#322027)
|
||||||
|
|
||||||
|
|
||||||
2005-11-21 Tim-Philipp Müller <tim at centricular dot net>
|
2005-11-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
|
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
|
||||||
|
|
|
@ -326,9 +326,9 @@ get_buffer (GstVisual * visual, GstBuffer ** outbuf)
|
||||||
|
|
||||||
s = gst_caps_get_structure (caps, 0);
|
s = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
gst_caps_structure_fixate_field_nearest_int (s, "width", 320);
|
gst_structure_fixate_field_nearest_int (s, "width", 320);
|
||||||
gst_caps_structure_fixate_field_nearest_int (s, "height", 240);
|
gst_structure_fixate_field_nearest_int (s, "height", 240);
|
||||||
gst_caps_structure_fixate_field_nearest_double (s, "framerate", 30.0);
|
gst_structure_fixate_field_nearest_double (s, "framerate", 30.0);
|
||||||
|
|
||||||
gst_pad_fixate_caps (visual->srcpad, caps);
|
gst_pad_fixate_caps (visual->srcpad, caps);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -207,13 +207,13 @@ gst_base_audio_src_fixate (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
s = gst_caps_get_structure (caps, 0);
|
s = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
gst_caps_structure_fixate_field_nearest_int (s, "rate", 44100);
|
gst_structure_fixate_field_nearest_int (s, "rate", 44100);
|
||||||
gst_caps_structure_fixate_field_nearest_int (s, "channels", 2);
|
gst_structure_fixate_field_nearest_int (s, "channels", 2);
|
||||||
gst_caps_structure_fixate_field_nearest_int (s, "depth", 16);
|
gst_structure_fixate_field_nearest_int (s, "depth", 16);
|
||||||
gst_caps_structure_fixate_field_nearest_int (s, "width", 16);
|
gst_structure_fixate_field_nearest_int (s, "width", 16);
|
||||||
gst_structure_set (s, "signed", G_TYPE_BOOLEAN, TRUE, NULL);
|
gst_structure_set (s, "signed", G_TYPE_BOOLEAN, TRUE, NULL);
|
||||||
if (gst_structure_has_field (s, "endianness"))
|
if (gst_structure_has_field (s, "endianness"))
|
||||||
gst_caps_structure_fixate_field_nearest_int (s, "endianness", G_BYTE_ORDER);
|
gst_structure_fixate_field_nearest_int (s, "endianness", G_BYTE_ORDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -372,23 +372,22 @@ gst_audio_convert_fixate_caps (GstBaseTransform * base,
|
||||||
|
|
||||||
if (gst_structure_get_int (ins, "channels", &channels)) {
|
if (gst_structure_get_int (ins, "channels", &channels)) {
|
||||||
if (gst_structure_has_field (outs, "channels")) {
|
if (gst_structure_has_field (outs, "channels")) {
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "channels", channels);
|
gst_structure_fixate_field_nearest_int (outs, "channels", channels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gst_structure_get_int (ins, "rate", &rate)) {
|
if (gst_structure_get_int (ins, "rate", &rate)) {
|
||||||
if (gst_structure_has_field (outs, "rate")) {
|
if (gst_structure_has_field (outs, "rate")) {
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "rate", rate);
|
gst_structure_fixate_field_nearest_int (outs, "rate", rate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gst_structure_get_int (ins, "endianness", &endianness)) {
|
if (gst_structure_get_int (ins, "endianness", &endianness)) {
|
||||||
if (gst_structure_has_field (outs, "endianness")) {
|
if (gst_structure_has_field (outs, "endianness")) {
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "endianness",
|
gst_structure_fixate_field_nearest_int (outs, "endianness", endianness);
|
||||||
endianness);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gst_structure_get_int (ins, "width", &width)) {
|
if (gst_structure_get_int (ins, "width", &width)) {
|
||||||
if (gst_structure_has_field (outs, "width")) {
|
if (gst_structure_has_field (outs, "width")) {
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "width", width);
|
gst_structure_fixate_field_nearest_int (outs, "width", width);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* this is not allowed */
|
/* this is not allowed */
|
||||||
|
@ -396,18 +395,18 @@ gst_audio_convert_fixate_caps (GstBaseTransform * base,
|
||||||
|
|
||||||
if (gst_structure_get_int (ins, "depth", &depth)) {
|
if (gst_structure_get_int (ins, "depth", &depth)) {
|
||||||
if (gst_structure_has_field (outs, "depth")) {
|
if (gst_structure_has_field (outs, "depth")) {
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "depth", depth);
|
gst_structure_fixate_field_nearest_int (outs, "depth", depth);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* set depth as width */
|
/* set depth as width */
|
||||||
if (gst_structure_has_field (outs, "depth")) {
|
if (gst_structure_has_field (outs, "depth")) {
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "depth", width);
|
gst_structure_fixate_field_nearest_int (outs, "depth", width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gst_structure_get_boolean (ins, "signed", &signedness)) {
|
if (gst_structure_get_boolean (ins, "signed", &signedness)) {
|
||||||
if (gst_structure_has_field (outs, "signed")) {
|
if (gst_structure_has_field (outs, "signed")) {
|
||||||
gst_caps_structure_fixate_field_boolean (outs, "signed", signedness);
|
gst_structure_fixate_field_boolean (outs, "signed", signedness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -256,7 +256,7 @@ gst_audioscale_fixate (GstPad * pad, const GstCaps * caps)
|
||||||
|
|
||||||
copy = gst_caps_copy (caps);
|
copy = gst_caps_copy (caps);
|
||||||
structure = gst_caps_get_structure (copy, 0);
|
structure = gst_caps_get_structure (copy, 0);
|
||||||
if (gst_caps_structure_fixate_field_nearest_int (structure, "rate", rate))
|
if (gst_structure_fixate_field_nearest_int (structure, "rate", rate))
|
||||||
return copy;
|
return copy;
|
||||||
gst_caps_free (copy);
|
gst_caps_free (copy);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -212,7 +212,7 @@ gst_audiotestsrc_src_fixate (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
gst_caps_structure_fixate_field_nearest_int (structure, "rate", 44100);
|
gst_structure_fixate_field_nearest_int (structure, "rate", 44100);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -161,7 +161,7 @@ gst_sinesrc_src_fixate (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
gst_caps_structure_fixate_field_nearest_int (structure, "rate", 44100);
|
gst_structure_fixate_field_nearest_int (structure, "rate", 44100);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -315,7 +315,7 @@ gst_videorate_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
/* and fixate */
|
/* and fixate */
|
||||||
gst_caps_structure_fixate_field_nearest_int (structure, "framerate", fps);
|
gst_structure_fixate_field_nearest_int (structure, "framerate", fps);
|
||||||
|
|
||||||
gst_structure_get_double (structure, "framerate", &fps);
|
gst_structure_get_double (structure, "framerate", &fps);
|
||||||
|
|
||||||
|
|
|
@ -536,19 +536,19 @@ gst_videoscale_fixate_caps (GstBaseTransform * base, GstPadDirection direction,
|
||||||
GST_DEBUG_OBJECT (base, "scaling to %dx%d", w, h);
|
GST_DEBUG_OBJECT (base, "scaling to %dx%d", w, h);
|
||||||
|
|
||||||
/* now fixate */
|
/* now fixate */
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "width", w);
|
gst_structure_fixate_field_nearest_int (outs, "width", w);
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "height", h);
|
gst_structure_fixate_field_nearest_int (outs, "height", h);
|
||||||
} else {
|
} else {
|
||||||
gint width, height;
|
gint width, height;
|
||||||
|
|
||||||
if (gst_structure_get_int (ins, "width", &width)) {
|
if (gst_structure_get_int (ins, "width", &width)) {
|
||||||
if (gst_structure_has_field (outs, "width")) {
|
if (gst_structure_has_field (outs, "width")) {
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "width", width);
|
gst_structure_fixate_field_nearest_int (outs, "width", width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gst_structure_get_int (ins, "height", &height)) {
|
if (gst_structure_get_int (ins, "height", &height)) {
|
||||||
if (gst_structure_has_field (outs, "height")) {
|
if (gst_structure_has_field (outs, "height")) {
|
||||||
gst_caps_structure_fixate_field_nearest_int (outs, "height", height);
|
gst_structure_fixate_field_nearest_int (outs, "height", height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,9 +176,9 @@ gst_videotestsrc_src_fixate (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
gst_caps_structure_fixate_field_nearest_int (structure, "width", 320);
|
gst_structure_fixate_field_nearest_int (structure, "width", 320);
|
||||||
gst_caps_structure_fixate_field_nearest_int (structure, "height", 240);
|
gst_structure_fixate_field_nearest_int (structure, "height", 240);
|
||||||
gst_caps_structure_fixate_field_nearest_double (structure, "framerate", 30.0);
|
gst_structure_fixate_field_nearest_double (structure, "framerate", 30.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -234,12 +234,9 @@ gst_v4lsrc_fixate (GstPad * pad, GstCaps * caps)
|
||||||
structure = gst_caps_get_structure (caps, i);
|
structure = gst_caps_get_structure (caps, i);
|
||||||
const GValue *v;
|
const GValue *v;
|
||||||
|
|
||||||
gst_caps_structure_fixate_field_nearest_int (structure, "width",
|
gst_structure_fixate_field_nearest_int (structure, "width", targetwidth);
|
||||||
targetwidth);
|
gst_structure_fixate_field_nearest_int (structure, "height", targetheight);
|
||||||
gst_caps_structure_fixate_field_nearest_int (structure, "height",
|
gst_structure_fixate_field_nearest_double (structure, "framerate", 7.5);
|
||||||
targetheight);
|
|
||||||
gst_caps_structure_fixate_field_nearest_double (structure, "framerate",
|
|
||||||
7.5);
|
|
||||||
|
|
||||||
v = gst_structure_get_value (structure, "format");
|
v = gst_structure_get_value (structure, "format");
|
||||||
if (v && G_VALUE_TYPE (v) != GST_TYPE_FOURCC) {
|
if (v && G_VALUE_TYPE (v) != GST_TYPE_FOURCC) {
|
||||||
|
|
|
@ -1240,14 +1240,13 @@ gst_xvimagesink_fixate (GstPad * pad, const GstCaps * caps)
|
||||||
newcaps = gst_caps_copy (caps);
|
newcaps = gst_caps_copy (caps);
|
||||||
structure = gst_caps_get_structure (newcaps, 0);
|
structure = gst_caps_get_structure (newcaps, 0);
|
||||||
|
|
||||||
if (gst_caps_structure_fixate_field_nearest_int (structure, "width", 320)) {
|
if (gst_structure_fixate_field_nearest_int (structure, "width", 320)) {
|
||||||
return newcaps;
|
return newcaps;
|
||||||
}
|
}
|
||||||
if (gst_caps_structure_fixate_field_nearest_int (structure, "height", 240)) {
|
if (gst_structure_fixate_field_nearest_int (structure, "height", 240)) {
|
||||||
return newcaps;
|
return newcaps;
|
||||||
}
|
}
|
||||||
if (gst_caps_structure_fixate_field_nearest_double (structure, "framerate",
|
if (gst_structure_fixate_field_nearest_double (structure, "framerate", 30.0)) {
|
||||||
30.0)) {
|
|
||||||
return newcaps;
|
return newcaps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue