diff options
author | Jens Georg <mail@jensge.org> | 2012-01-23 19:21:33 +0100 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2012-11-03 14:49:01 +0100 |
commit | 9205531ea019da8b8670124e535918aa5fdd5235 (patch) | |
tree | a8e7b9a6d1d8421a778c4f794a17d851d0335e0e | |
parent | eadcf684ee96e5c18b2a5c1fd8a1240afbdfe512 (diff) | |
download | gupnp-dlna-9205531ea019da8b8670124e535918aa5fdd5235.tar.gz |
Port to GStreamer 1.0 API
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | libgupnp-dlna/Makefile.am | 4 | ||||
-rw-r--r-- | libgupnp-dlna/gupnp-dlna-discoverer.c | 2 | ||||
-rw-r--r-- | libgupnp-dlna/gupnp-dlna-information.c | 20 | ||||
-rw-r--r-- | libgupnp-dlna/gupnp-dlna-profile.c | 18 | ||||
-rw-r--r-- | libgupnp-dlna/profile-loading.c | 34 | ||||
-rw-r--r-- | tests/dlna-encoding.c | 4 |
7 files changed, 44 insertions, 44 deletions
diff --git a/configure.ac b/configure.ac index e82d8cc..42a98e6 100644 --- a/configure.ac +++ b/configure.ac @@ -39,9 +39,9 @@ LT_INIT([win32-dll]) PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.5.0) -GST_MAJORMINOR=0.10 -GST_REQ=0.10.29.2 -GSTPBU_REQ=0.10.32 +GST_MAJORMINOR=1.0 +GST_REQ=1.0.0 +GSTPBU_REQ=1.0.0 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ) PKG_CHECK_MODULES(GST_PBU, gstreamer-pbutils-$GST_MAJORMINOR >= $GSTPBU_REQ) diff --git a/libgupnp-dlna/Makefile.am b/libgupnp-dlna/Makefile.am index 55f4ed2..4c93cc5 100644 --- a/libgupnp-dlna/Makefile.am +++ b/libgupnp-dlna/Makefile.am @@ -65,9 +65,9 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir) if HAVE_INTROSPECTION GUPnPDLNA-1.0.gir: libgupnp-dlna-1.0.la -GUPnPDLNA_1_0_gir_INCLUDES = libxml2-2.0 GObject-2.0 GstPbutils-0.10 +GUPnPDLNA_1_0_gir_INCLUDES = libxml2-2.0 GObject-2.0 GstPbutils-1.0 GUPnPDLNA_1_0_gir_CFLAGS = $(INCLUDES) $(AM_CFLAGS) -GUPnPDLNA_1_0_gir_LIBS = libgupnp-dlna-1.0.la gstreamer-0.10 +GUPnPDLNA_1_0_gir_LIBS = libgupnp-dlna-1.0.la gstreamer-1.0 GUPnPDLNA_1_0_gir_FILES = $(introspection_sources) GUPnPDLNA_1_0_gir_NAMESPACE = GUPnPDLNA GUPnPDLNA_1_0_gir_VERSION = 1.0 diff --git a/libgupnp-dlna/gupnp-dlna-discoverer.c b/libgupnp-dlna/gupnp-dlna-discoverer.c index 986470f..4c0770f 100644 --- a/libgupnp-dlna/gupnp-dlna-discoverer.c +++ b/libgupnp-dlna/gupnp-dlna-discoverer.c @@ -224,7 +224,7 @@ gupnp_dlna_discoverer_class_init (GUPnPDLNADiscovererClass *klass) NULL, NULL, gupnp_dlna_marshal_VOID__OBJECT_BOXED, G_TYPE_NONE, 2, GUPNP_TYPE_DLNA_INFORMATION, - GST_TYPE_G_ERROR); + G_TYPE_ERROR); /* Load DLNA profiles from disk */ if (g_type_from_name ("GstElement")) { diff --git a/libgupnp-dlna/gupnp-dlna-information.c b/libgupnp-dlna/gupnp-dlna-information.c index 0ef2529..6aea2e4 100644 --- a/libgupnp-dlna/gupnp-dlna-information.c +++ b/libgupnp-dlna/gupnp-dlna-information.c @@ -76,8 +76,8 @@ gupnp_dlna_information_get_property (GObject *object, break; case PROP_DISCOVERER_INFO: - gst_value_set_mini_object (value, - GST_MINI_OBJECT(priv->info)); + g_value_set_object (value, + G_OBJECT (priv->info)); break; @@ -116,7 +116,7 @@ gupnp_dlna_information_set_property (GObject *object, if (priv->info) gst_discoverer_info_unref (priv->info); priv->info = GST_DISCOVERER_INFO - (gst_value_dup_mini_object (value)); + (g_value_dup_object (value)); break; @@ -174,13 +174,13 @@ gupnp_dlna_information_class_init (GUPnPDLNAInformationClass *klass) G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_DLNA_MIME, pspec); - pspec = gst_param_spec_mini_object ("info", - "Stream metadata", - "Metadata of the stream in a " - "GstDiscovererInfo structure", - GST_TYPE_DISCOVERER_INFO, - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT_ONLY); + pspec = g_param_spec_object ("info", + "Stream metadata", + "Metadata of the stream in a " + "GstDiscovererInfo structure", + GST_TYPE_DISCOVERER_INFO, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_DISCOVERER_INFO, pspec); diff --git a/libgupnp-dlna/gupnp-dlna-profile.c b/libgupnp-dlna/gupnp-dlna-profile.c index 38494db..ab8b42c 100644 --- a/libgupnp-dlna/gupnp-dlna-profile.c +++ b/libgupnp-dlna/gupnp-dlna-profile.c @@ -79,8 +79,8 @@ gupnp_dlna_profile_get_property (GObject *object, break; case PROP_ENCODING_PROFILE: - gst_value_set_mini_object (value, - GST_MINI_OBJECT (priv->enc_profile)); + g_value_set_object (value, + G_OBJECT (priv->enc_profile)); break; case PROP_DLNA_EXTENDED: @@ -176,13 +176,13 @@ gupnp_dlna_profile_class_init (GUPnPDLNAProfileClass *klass) G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_DLNA_MIME, pspec); - pspec = gst_param_spec_mini_object ("encoding-profile", - "Encoding Profile for the " - "DLNA Profile", - "GstEncodingProfile object" - "corresponding to the DLNA profile", - GST_TYPE_ENCODING_PROFILE, - G_PARAM_READABLE); + pspec = g_param_spec_object ("encoding-profile", + "Encoding Profile for the DLNA Profile", + "GstEncodingProfile object corresponding " + "to the DLNA profile", + GST_TYPE_ENCODING_PROFILE, + G_PARAM_READABLE); + g_object_class_install_property (object_class, PROP_ENCODING_PROFILE, pspec); diff --git a/libgupnp-dlna/profile-loading.c b/libgupnp-dlna/profile-loading.c index 58b9c7e..a186fb2 100644 --- a/libgupnp-dlna/profile-loading.c +++ b/libgupnp-dlna/profile-loading.c @@ -49,18 +49,18 @@ static GstCaps * merge_caps (GstCaps *caps1, GstCaps *caps2) { GstStructure *st1, *st2; - GstCaps *ret; + GstCaps *ret = NULL; gboolean any = FALSE; /* If one of the caps GST_CAPS_ANY, gst_caps_merge will result in a * GST_CAPS_ANY, which might not be correct for us */ if (!gst_caps_is_any (caps1) && !gst_caps_is_any (caps2)) { any = TRUE; - gst_caps_merge (caps1, gst_caps_copy (caps2)); - gst_caps_do_simplify (caps1); - } + ret = gst_caps_merge (caps1, gst_caps_ref (caps2)); + ret = gst_caps_simplify (ret); + } else + ret = gst_caps_make_writable (caps1); - ret = gst_caps_make_writable (caps1); st1 = gst_caps_get_structure (ret, 0); if (gst_caps_get_size (caps1) == 2) /* Non-merged fields were copied to a second structure in caps @@ -586,14 +586,14 @@ process_dlna_profile (xmlTextReaderPtr reader, break; if (restr->type == GST_TYPE_ENCODING_CONTAINER_PROFILE) - gst_caps_merge (temp_container, - gst_caps_copy (restr->caps)); + temp_container = gst_caps_merge (temp_container, + gst_caps_ref (restr->caps)); else if (restr->type == GST_TYPE_ENCODING_VIDEO_PROFILE) - gst_caps_merge (temp_video, - gst_caps_copy (restr->caps)); + temp_video = gst_caps_merge (temp_video, + gst_caps_ref (restr->caps)); else if (restr->type == GST_TYPE_ENCODING_AUDIO_PROFILE) - gst_caps_merge (temp_audio, - gst_caps_copy (restr->caps)); + temp_audio = gst_caps_merge (temp_audio, + gst_caps_ref (restr->caps)); else g_assert_not_reached (); @@ -636,14 +636,14 @@ process_dlna_profile (xmlTextReaderPtr reader, gupnp_dlna_profile_get_container_caps (base); if (GST_IS_CAPS (video_caps)) - gst_caps_merge (temp_video, - gst_caps_copy (video_caps)); + temp_video = gst_caps_merge (temp_video, + gst_caps_ref ((GstCaps *) video_caps)); if (GST_IS_CAPS (audio_caps)) - gst_caps_merge (temp_audio, - gst_caps_copy (audio_caps)); + temp_audio = gst_caps_merge (temp_audio, + gst_caps_ref ((GstCaps *) audio_caps)); if (GST_IS_CAPS (container_caps)) - gst_caps_merge (temp_container, - gst_caps_copy (container_caps)); + temp_container = gst_caps_merge (temp_container, + gst_caps_ref ((GstCaps *) container_caps)); } diff --git a/tests/dlna-encoding.c b/tests/dlna-encoding.c index f776077..b61cdfe 100644 --- a/tests/dlna-encoding.c +++ b/tests/dlna-encoding.c @@ -41,7 +41,7 @@ pad_added_cb (GstElement * uridecodebin, GstPad * pad, GstElement * encodebin) GstCaps *caps; /* Ask encodebin for a compatible pad */ - caps = gst_pad_get_caps (pad); + caps = gst_pad_query_caps (pad, NULL); g_signal_emit_by_name (encodebin, "request-pad", caps, &sinkpad); if (caps) gst_caps_unref (caps); @@ -104,7 +104,7 @@ transcode_file (gchar * uri, gchar * outputuri, GstEncodingProfile * prof) g_print (" Input URI : %s\n", uri); g_print (" Output URI : %s\n", outputuri); - sink = gst_element_make_from_uri (GST_URI_SINK, outputuri, "sink"); + sink = gst_element_make_from_uri (GST_URI_SINK, outputuri, "sink", NULL); if (G_UNLIKELY (sink == NULL)) { g_print ("Can't create output sink, most likely invalid output URI !\n"); return; |