Changed to the new props API

Original commit message from CVS:
Changed to the new props API
Other small tuff.
This commit is contained in:
Wim Taymans 2002-03-30 17:06:26 +00:00
parent 22fbd4120a
commit f7cf0134f4
2 changed files with 7 additions and 4 deletions

View file

@ -365,8 +365,8 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
return GST_PAD_CONNECT_REFUSED;
}
lame->samplerate = gst_caps_get_int (caps, "rate");
lame->num_channels = gst_caps_get_int (caps, "channels");
gst_caps_get_int (caps, "rate", &lame->samplerate);
gst_caps_get_int (caps, "channels", &lame->num_channels);
g_object_freeze_notify (G_OBJECT (lame));
g_object_notify (G_OBJECT (lame), "frequency");

View file

@ -63,8 +63,11 @@ main (int argc, char *argv[])
"signed", GST_PROPS_BOOLEAN (TRUE),
"channels", GST_PROPS_INT (1)
);
caps->fixed = TRUE;
g_assert (caps != NULL);
g_object_set (G_OBJECT (src), "sizetype", 3,
"filltype", 3, NULL);
gst_element_set_state (pipeline, GST_STATE_READY);
g_print ("Setting caps on fakesrc's src pad\n");
if (! (gst_pad_try_set_caps (gst_element_get_pad (src, "src"), caps)))