diff options
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | gst-libs/gst/floatcast/floatcast.h | 4 | ||||
-rw-r--r-- | gst-libs/gst/play/play.c | 66 | ||||
-rw-r--r-- | gst/audioconvert/gstaudioconvert.c | 2 | ||||
-rw-r--r-- | gst/typefind/gsttypefindfunctions.c | 2 | ||||
-rw-r--r-- | pkgconfig/gstreamer-gconf-uninstalled.pc.in | 2 | ||||
-rw-r--r-- | pkgconfig/gstreamer-gconf.pc.in | 2 | ||||
-rw-r--r-- | pkgconfig/gstreamer-play.pc.in | 2 |
8 files changed, 96 insertions, 7 deletions
@@ -1,3 +1,26 @@ +2004-03-05 David Schleef <ds@schleef.org> + + * ext/faad/gstfaad.c: (gst_faad_init), (gst_faad_srcgetcaps), + (gst_faad_chain): Fix negotiation. + * ext/librfb/gstrfbsrc.c: (gst_rfbsrc_handle_src_event): Add + key and button events. + * gst-libs/gst/floatcast/floatcast.h: Fix a minor bug in this + dung heap of code. + * gst-libs/gst/gconf/gstreamer-gconf-uninstalled.pc.in: gstgconf + depends on gconf + * gst-libs/gst/gconf/gstreamer-gconf.pc.in: same + * gst-libs/gst/play/play.c: (gst_play_pipeline_setup), + (gst_play_video_fixate), (gst_play_audio_fixate): Add a fixate + function to encourage better negotiation, particularly between + audioconvert and osssink. + * gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_chain): + * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): Make some debugging + more important. + * gst/typefind/gsttypefindfunctions.c: Fix mistake in flash + typefinding. + * gst/vbidec/vbiscreen.c: Add glib header + * pkgconfig/gstreamer-play.pc.in: Depends on gst-interfaces. + 2004-03-06 Christophe Fergeau <teuf@users.sourceforge.net> * ext/mad/gstmad.c: Fix detection of Xing headers diff --git a/gst-libs/gst/floatcast/floatcast.h b/gst-libs/gst/floatcast/floatcast.h index 99577d91f..ae87a43fb 100644 --- a/gst-libs/gst/floatcast/floatcast.h +++ b/gst-libs/gst/floatcast/floatcast.h @@ -52,8 +52,8 @@ G_BEGIN_DECLS #else /* use a standard c cast, but do rounding correctly */ - #define gst_cast_float(x) ((x)>=0?(gint)((x)+0.5):(gint)((x)-0.5)) - #define gst_cast_double(x) ((x)>=0?(gint)((x)+0.5):(gint)((x)-0.5)) + #define gst_cast_float(x) ((gint)floor((x)+0.5)) + #define gst_cast_double(x) ((gint)floor((x)+0.5)) #endif diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c index 081af9941..f46fbabc7 100644 --- a/gst-libs/gst/play/play.c +++ b/gst-libs/gst/play/play.c @@ -67,6 +67,9 @@ static GstPipelineClass *parent_class = NULL; /* */ /* ======================================================= */ +static GstCaps * gst_play_video_fixate (GstPad *pad, const GstCaps *caps, gpointer user_data); +static GstCaps * gst_play_audio_fixate (GstPad *pad, const GstCaps *caps, gpointer user_data); + static GQuark gst_play_error_quark (void) { @@ -275,6 +278,8 @@ gst_play_pipeline_setup (GstPlay *play, GError **error) /* Software scaling of video stream */ GST_PLAY_MAKE_OR_ERROR (video_scaler, "videoscale", "video_scaler", error); g_hash_table_insert (play->priv->elements, "video_scaler", video_scaler); + g_signal_connect (gst_element_get_pad(video_scaler, "src"), "fixate", + G_CALLBACK (gst_play_video_fixate), play); /* Placeholder for future video sink bin */ GST_PLAY_MAKE_OR_ERROR (video_sink, "fakesink", "video_sink", error); @@ -315,6 +320,8 @@ gst_play_pipeline_setup (GstPlay *play, GError **error) /* Volume control */ GST_PLAY_MAKE_OR_ERROR (volume, "volume", "volume", error); g_hash_table_insert (play->priv->elements, "volume", volume); + g_signal_connect (gst_element_get_pad(volume, "src"), "fixate", + G_CALLBACK (gst_play_audio_fixate), play); /* Placeholder for future audio sink bin */ GST_PLAY_MAKE_OR_ERROR (audio_sink, "fakesink", "audio_sink", error); @@ -434,6 +441,65 @@ gst_play_get_length_callback (GstPlay *play) return TRUE; } +static GstCaps * +gst_play_video_fixate (GstPad *pad, const GstCaps *caps, gpointer user_data) +{ + GstStructure *structure; + GstCaps *newcaps; + + GST_DEBUG ("video fixate %p %" GST_PTR_FORMAT, pad, caps); + + 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; + } + + /* failed to fixate */ + gst_caps_free (newcaps); + return NULL; +} + +static GstCaps * +gst_play_audio_fixate (GstPad *pad, const GstCaps *caps, gpointer user_data) +{ + GstCaps *newcaps; + GstStructure *structure; + + GST_DEBUG ("audio fixate %p %" GST_PTR_FORMAT, pad, caps); + + newcaps = gst_caps_new_full (gst_structure_copy ( + gst_caps_get_structure (caps, 0)), NULL); + structure = gst_caps_get_structure (newcaps, 0); + + if (gst_caps_structure_fixate_field_nearest_int (structure, "rate", 44100)) { + return newcaps; + } + if (gst_caps_structure_fixate_field_nearest_int (structure, "depth", 16)) { + return newcaps; + } + if (gst_caps_structure_fixate_field_nearest_int (structure, "width", 16)) { + return newcaps; + } + if (gst_caps_structure_fixate_field_nearest_int (structure, "channels", 2)) { + return newcaps; + } + + gst_caps_free (newcaps); + + return NULL; +} + static void gst_play_state_change (GstElement *element, GstElementState old, GstElementState state) diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index d057d665e..81a7109bd 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -240,7 +240,7 @@ gst_audio_convert_chain (GstPad *pad, GstData *data) if (!gst_pad_is_negotiated (this->sink)) { - GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL, + GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, (NULL), ("Sink pad not negotiated before chain function")); return; } diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 5cf281d38..7dae45ef7 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -894,7 +894,7 @@ mod_type_find (GstTypeFind *tf, gpointer unused) /*** application/x-shockwave-flash ********************************************/ -static GstStaticCaps swf_caps = GST_STATIC_CAPS ("audio/x-shockwave-flash"); +static GstStaticCaps swf_caps = GST_STATIC_CAPS ("application/x-shockwave-flash"); #define SWF_CAPS (gst_static_caps_get(&swf_caps)) static void swf_type_find (GstTypeFind *tf, gpointer unused) diff --git a/pkgconfig/gstreamer-gconf-uninstalled.pc.in b/pkgconfig/gstreamer-gconf-uninstalled.pc.in index 1255a6bfc..0d4d5cb33 100644 --- a/pkgconfig/gstreamer-gconf-uninstalled.pc.in +++ b/pkgconfig/gstreamer-gconf-uninstalled.pc.in @@ -6,7 +6,7 @@ includedir=${pcfiledir}/../gst-libs Name: GStreamer GConf Library, uninstalled Description: Streaming media framework, GConf support library, not installed -Requires: gstreamer-@GST_MAJORMINOR@ >= @VERSION@ +Requires: gstreamer-@GST_MAJORMINOR@ >= @VERSION@ gconf-2.0 Version: @VERSION@ Libs: ${libdir}/libgstgconf-@GST_MAJORMINOR@.la diff --git a/pkgconfig/gstreamer-gconf.pc.in b/pkgconfig/gstreamer-gconf.pc.in index 2cbf8075a..e1801c517 100644 --- a/pkgconfig/gstreamer-gconf.pc.in +++ b/pkgconfig/gstreamer-gconf.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@/gstreamer-@GST_MAJORMINOR@ Name: GStreamer GConf Library Description: Streaming media framework, GConf support library -Requires: gstreamer-@GST_MAJORMINOR@ +Requires: gstreamer-@GST_MAJORMINOR@ gconf-2.0 Version: @VERSION@ Libs: -L${libdir} -lgstgconf-@GST_MAJORMINOR@ diff --git a/pkgconfig/gstreamer-play.pc.in b/pkgconfig/gstreamer-play.pc.in index 99dc6e7d1..9d6a20203 100644 --- a/pkgconfig/gstreamer-play.pc.in +++ b/pkgconfig/gstreamer-play.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@/gstreamer-@GST_MAJORMINOR@ Name: GStreamer Play Library Description: Streaming-media framework, play libraries -Requires: gstreamer-@GST_MAJORMINOR@ +Requires: gstreamer-@GST_MAJORMINOR@ gstreamer-interfaces-@GST_MAJORMINOR@ Version: @VERSION@ Libs: -L${libdir} -lgstplay-@GST_MAJORMINOR@ -lgstcontrol-@GST_MAJORMINOR@ |