mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
ext/aalib/gstaasink.c: Add fixate function. (bug #131128)
Original commit message from CVS: * ext/aalib/gstaasink.c: (gst_aasink_fixate), (gst_aasink_init): Add fixate function. (bug #131128) * ext/sdl/sdlvideosink.c: (gst_sdlvideosink_init), (gst_sdlvideosink_fixate): Add fixate function. * gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_link): Fix attempt to print a non-pointer using GST_PTR_FORMAT. * gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt): Fix missing break that was causing ulaw to be interpreted as raw int.
This commit is contained in:
parent
26d730400e
commit
6c3fbe6d45
3 changed files with 40 additions and 0 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2004-03-05 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* ext/aalib/gstaasink.c: (gst_aasink_fixate), (gst_aasink_init):
|
||||||
|
Add fixate function. (bug #131128)
|
||||||
|
* ext/sdl/sdlvideosink.c: (gst_sdlvideosink_init),
|
||||||
|
(gst_sdlvideosink_fixate): Add fixate function.
|
||||||
|
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_link):
|
||||||
|
Fix attempt to print a non-pointer using GST_PTR_FORMAT.
|
||||||
|
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt):
|
||||||
|
Fix missing break that was causing ulaw to be interpreted as
|
||||||
|
raw int.
|
||||||
|
|
||||||
2004-03-05 David Schleef <ds@schleef.org>
|
2004-03-05 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice):
|
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice):
|
||||||
|
|
|
@ -239,6 +239,32 @@ gst_aasink_class_init (GstAASinkClass *klass)
|
||||||
gstelement_class->set_clock = gst_aasink_set_clock;
|
gstelement_class->set_clock = gst_aasink_set_clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GstCaps *
|
||||||
|
gst_aasink_fixate (GstPad *pad, const GstCaps *caps)
|
||||||
|
{
|
||||||
|
GstStructure *structure;
|
||||||
|
GstCaps *newcaps;
|
||||||
|
|
||||||
|
if (gst_caps_get_size (caps) > 1) return NULL;
|
||||||
|
|
||||||
|
newcaps = gst_caps_copy (caps);
|
||||||
|
structure = gst_caps_get_structure (newcaps, 0);
|
||||||
|
|
||||||
|
if (gst_caps_structure_fixate_field_nearest_int (structure, "width", 320)) {
|
||||||
|
return newcaps;
|
||||||
|
}
|
||||||
|
if (gst_caps_structure_fixate_field_nearest_int (structure, "height", 240)) {
|
||||||
|
return newcaps;
|
||||||
|
}
|
||||||
|
if (gst_caps_structure_fixate_field_nearest_double (structure, "framerate",
|
||||||
|
30.0)) {
|
||||||
|
return newcaps;
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_caps_free (newcaps);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static GstPadLinkReturn
|
static GstPadLinkReturn
|
||||||
gst_aasink_sinkconnect (GstPad *pad, const GstCaps *caps)
|
gst_aasink_sinkconnect (GstPad *pad, const GstCaps *caps)
|
||||||
{
|
{
|
||||||
|
@ -278,6 +304,7 @@ gst_aasink_init (GstAASink *aasink)
|
||||||
gst_element_add_pad (GST_ELEMENT (aasink), aasink->sinkpad);
|
gst_element_add_pad (GST_ELEMENT (aasink), aasink->sinkpad);
|
||||||
gst_pad_set_chain_function (aasink->sinkpad, gst_aasink_chain);
|
gst_pad_set_chain_function (aasink->sinkpad, gst_aasink_chain);
|
||||||
gst_pad_set_link_function (aasink->sinkpad, gst_aasink_sinkconnect);
|
gst_pad_set_link_function (aasink->sinkpad, gst_aasink_sinkconnect);
|
||||||
|
gst_pad_set_fixate_function (aasink->sinkpad, gst_aasink_fixate);
|
||||||
|
|
||||||
memcpy(&aasink->ascii_surf, &aa_defparams, sizeof (struct aa_hardware_params));
|
memcpy(&aasink->ascii_surf, &aa_defparams, sizeof (struct aa_hardware_params));
|
||||||
aasink->ascii_parms.bright = 0;
|
aasink->ascii_parms.bright = 0;
|
||||||
|
|
|
@ -610,6 +610,7 @@ gst_wavparse_parse_fmt (GstWavParse *wavparse, guint size)
|
||||||
"channels", G_TYPE_INT, wavparse->channels,
|
"channels", G_TYPE_INT, wavparse->channels,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case GST_RIFF_WAVE_FORMAT_PCM:
|
case GST_RIFF_WAVE_FORMAT_PCM:
|
||||||
caps = gst_caps_new_simple ("audio/x-raw-int",
|
caps = gst_caps_new_simple ("audio/x-raw-int",
|
||||||
|
|
Loading…
Reference in a new issue