[libgdata/wip/pwithnall/youtube-v3: 11/12] youtube: Port to the YouTube API version 3
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/wip/pwithnall/youtube-v3: 11/12] youtube: Port to the YouTube API version 3
- Date: Sun, 19 Apr 2015 23:19:08 +0000 (UTC)
commit a581ba449e82593cc418f4cc415e2aadaa13593a
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Apr 19 20:43:17 2015 +0100
youtube: Port to the YouTube API version 3
Deprecated API:
• GDataYouTubeQuery:format, gdata_youtube_query_get_format(),
gdata_youtube_query_set_format()
• GDataYouTubeQuery:has-location
• GDataYouTubeQuery:language, gdata_youtube_query_get_language(),
gdata_youtube_query_set_language()
• GDataYouTubeQuery:sort-order, gdata_youtube_query_get_sort_order(),
gdata_youtube_query_set_sort_order()
• GDataYouTubeQuery:uploader, gdata_youtube_query_get_uploader(),
gdata_youtube_query_set_uploader()
• GDataYouTubeSortOrder
• GDataYouTubeUploader
• GDataYouTubeContent
• GDataYouTubeFormat
• GDataYouTubeVideo:video-id, gdata_youtube_video_get_video_id()
• gdata_youtube_video_look_up_content()
(use gdata_youtube_video_get_player_uri() instead)
• GDATA_YOUTUBE_RATING_TYPE_SIMPLE
API changes:
• GDataYouTubeQuery:restriction no longer accepts IP addresses
• All GDataCommentable functionality on GDataYouTubeVideo is disabled
at runtime until the v3 YouTube API for comments is finished online
gdata/services/youtube/gdata-youtube-content.c | 15 ++-
gdata/services/youtube/gdata-youtube-content.h | 31 ++-
gdata/services/youtube/gdata-youtube-group.c | 4 +
gdata/services/youtube/gdata-youtube-query.c | 276 ++++++++++++++++++------
gdata/services/youtube/gdata-youtube-query.h | 37 +++-
gdata/services/youtube/gdata-youtube-video.c | 147 +++++++------
gdata/services/youtube/gdata-youtube-video.h | 14 +-
gdata/tests/youtube.c | 18 ++
8 files changed, 387 insertions(+), 155 deletions(-)
---
diff --git a/gdata/services/youtube/gdata-youtube-content.c b/gdata/services/youtube/gdata-youtube-content.c
index 06c0aa0..dd0de51 100644
--- a/gdata/services/youtube/gdata-youtube-content.c
+++ b/gdata/services/youtube/gdata-youtube-content.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* GData Client
- * Copyright (C) Philip Withnall 2009–2010 <philip tecnocode co uk>
+ * Copyright (C) Philip Withnall 2009–2010, 2015 <philip tecnocode co uk>
*
* GData Client is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -28,6 +28,8 @@
* online documentation</ulink>.
*
* Since: 0.4.0
+ * Deprecated: UNRELEASED: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
**/
#include <glib.h>
@@ -38,6 +40,8 @@
#include "gdata-parser.h"
#include "gdata-youtube-enums.h"
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void gdata_youtube_content_get_property (GObject *object, guint property_id, GValue *value,
GParamSpec *pspec);
static gboolean pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data,
GError **error);
static void get_namespaces (GDataParsable *parsable, GHashTable *namespaces);
@@ -75,12 +79,15 @@ gdata_youtube_content_class_init (GDataYouTubeContentClass *klass)
* YouTube documentation</ulink>.
*
* Since: 0.4.0
+ * Deprecated: UNRELEASED: Accessing YouTube video content directly is
+ * no longer supported by Google. There is no replacement.
**/
g_object_class_install_property (gobject_class, PROP_FORMAT,
g_param_spec_enum ("format",
"Format", "The video format of the video object.",
GDATA_TYPE_YOUTUBE_FORMAT,
GDATA_YOUTUBE_FORMAT_UNKNOWN,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
}
static void
@@ -137,6 +144,8 @@ get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
* Return value: the video format, or %GDATA_YOUTUBE_FORMAT_UNKNOWN
*
* Since: 0.4.0
+ * Deprecated: UNRELEASED: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
**/
GDataYouTubeFormat
gdata_youtube_content_get_format (GDataYouTubeContent *self)
@@ -144,3 +153,5 @@ gdata_youtube_content_get_format (GDataYouTubeContent *self)
g_return_val_if_fail (GDATA_IS_YOUTUBE_CONTENT (self), GDATA_YOUTUBE_FORMAT_UNKNOWN);
return self->priv->format;
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/gdata/services/youtube/gdata-youtube-content.h b/gdata/services/youtube/gdata-youtube-content.h
index dbb7216..9fb5c7b 100644
--- a/gdata/services/youtube/gdata-youtube-content.h
+++ b/gdata/services/youtube/gdata-youtube-content.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* GData Client
- * Copyright (C) Philip Withnall 2009–2010 <philip tecnocode co uk>
+ * Copyright (C) Philip Withnall 2009–2010, 2015 <philip tecnocode co uk>
*
* GData Client is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -28,6 +28,8 @@
G_BEGIN_DECLS
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+
/**
* GDataYouTubeFormat:
* @GDATA_YOUTUBE_FORMAT_UNKNOWN: retrieve videos in all formats when querying the service
@@ -39,13 +41,15 @@ G_BEGIN_DECLS
* <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#formatsp">online
documentation</ulink>.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
**/
typedef enum {
GDATA_YOUTUBE_FORMAT_UNKNOWN = 0,
GDATA_YOUTUBE_FORMAT_RTSP_H263_AMR = 1,
GDATA_YOUTUBE_FORMAT_HTTP_SWF = 5,
GDATA_YOUTUBE_FORMAT_RTSP_MPEG4_AAC = 6
-} GDataYouTubeFormat;
+} GDataYouTubeFormat G_GNUC_DEPRECATED;
#define GDATA_TYPE_YOUTUBE_CONTENT (gdata_youtube_content_get_type ())
#define GDATA_YOUTUBE_CONTENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_YOUTUBE_CONTENT,
GDataYouTubeContent))
@@ -54,7 +58,7 @@ typedef enum {
#define GDATA_IS_YOUTUBE_CONTENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_YOUTUBE_CONTENT))
#define GDATA_YOUTUBE_CONTENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_YOUTUBE_CONTENT,
GDataYouTubeContentClass))
-typedef struct _GDataYouTubeContentPrivate GDataYouTubeContentPrivate;
+typedef struct _GDataYouTubeContentPrivate GDataYouTubeContentPrivate G_GNUC_DEPRECATED;
/**
* GDataYouTubeContent:
@@ -62,11 +66,15 @@ typedef struct _GDataYouTubeContentPrivate GDataYouTubeContentPrivate;
* All the fields in the #GDataYouTubeContent structure are private and should never be accessed directly.
*
* Since: 0.4.0
+ * Deprecated: UNRELEASED: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
**/
typedef struct {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GDataMediaContent parent;
GDataYouTubeContentPrivate *priv;
-} GDataYouTubeContent;
+ G_GNUC_END_IGNORE_DEPRECATIONS
+} GDataYouTubeContent G_GNUC_DEPRECATED;
/**
* GDataYouTubeContentClass:
@@ -74,19 +82,28 @@ typedef struct {
* All the fields in the #GDataYouTubeContentClass structure are private and should never be accessed
directly.
*
* Since: 0.4.0
+ * Deprecated: UNRELEASED: Accessing YouTube video content directly is no longer
+ * supported by Google. There is no replacement.
**/
typedef struct {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/*< private >*/
GDataMediaContentClass parent;
+ G_GNUC_END_IGNORE_DEPRECATIONS
/*< private >*/
/* Padding for future expansion */
void (*_g_reserved0) (void);
void (*_g_reserved1) (void);
-} GDataYouTubeContentClass;
+} GDataYouTubeContentClass G_GNUC_DEPRECATED;
+
+GType gdata_youtube_content_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED;
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+GDataYouTubeFormat gdata_youtube_content_get_format (GDataYouTubeContent *self) G_GNUC_PURE
G_GNUC_DEPRECATED;
+G_GNUC_END_IGNORE_DEPRECATIONS
-GType gdata_youtube_content_get_type (void) G_GNUC_CONST;
-GDataYouTubeFormat gdata_youtube_content_get_format (GDataYouTubeContent *self) G_GNUC_PURE;
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
G_END_DECLS
diff --git a/gdata/services/youtube/gdata-youtube-group.c b/gdata/services/youtube/gdata-youtube-group.c
index c75b401..921fbdd 100644
--- a/gdata/services/youtube/gdata-youtube-group.c
+++ b/gdata/services/youtube/gdata-youtube-group.c
@@ -93,6 +93,8 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
gboolean success;
GDataYouTubeGroup *self = GDATA_YOUTUBE_GROUP (parsable);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
if (gdata_parser_is_namespace (node, "http://search.yahoo.com/mrss/") == TRUE &&
(gdata_parser_object_from_element_setter (node, "content", P_REQUIRED, GDATA_TYPE_YOUTUBE_CONTENT,
_gdata_media_group_add_content, self, &success, error)
== TRUE ||
@@ -124,6 +126,8 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
return GDATA_PARSABLE_CLASS (gdata_youtube_group_parent_class)->parse_xml (parsable, doc,
node, user_data, error);
}
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
return TRUE;
}
diff --git a/gdata/services/youtube/gdata-youtube-query.c b/gdata/services/youtube/gdata-youtube-query.c
index fefc8f3..f55ff86 100644
--- a/gdata/services/youtube/gdata-youtube-query.c
+++ b/gdata/services/youtube/gdata-youtube-query.c
@@ -26,8 +26,13 @@
* #GDataYouTubeQuery represents a collection of query parameters specific to the YouTube service, which go
above and beyond
* those catered for by #GDataQuery.
*
+ * With the transition to version 3 of the YouTube, the #GDataQuery:author and
+ * #GDataQuery:start-index properties are no longer supported, and their values
+ * will be ignored. Use gdata_query_next_page() instead of the
+ * #GDataQuery:start-index API.
+ *
* For more information on the custom GData query parameters supported by #GDataYouTubeQuery, see the <ulink
type="http"
- * url="http://code.google.com/apis/youtube/2.0/reference.html#Custom_parameters">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/search/list#parameters">online documentation</ulink>.
*
* Since: 0.3.0
**/
@@ -47,7 +52,12 @@ static void gdata_youtube_query_set_property (GObject *object, guint property_id
static void get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean
*params_started);
struct _GDataYouTubeQueryPrivate {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GDataYouTubeFormat format;
+ GDataYouTubeSortOrder sort_order;
+ GDataYouTubeUploader uploader;
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
gdouble latitude;
gdouble longitude;
gdouble location_radius;
@@ -56,9 +66,7 @@ struct _GDataYouTubeQueryPrivate {
gchar *order_by;
gchar *restriction;
GDataYouTubeSafeSearch safe_search;
- GDataYouTubeSortOrder sort_order;
GDataYouTubeAge age;
- GDataYouTubeUploader uploader;
gchar *license;
};
@@ -101,12 +109,15 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* retrieve videos irrespective of their format availability.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
g_object_class_install_property (gobject_class, PROP_FORMAT,
g_param_spec_enum ("format",
"Format", "Specifies that videos must be
available in a particular video format.",
GDATA_TYPE_YOUTUBE_FORMAT,
GDATA_YOUTUBE_FORMAT_UNKNOWN,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
/**
* GDataYouTubeQuery:latitude:
@@ -119,12 +130,11 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* If #GDataYouTubeQuery:location-radius is a non-<code class="literal">0</code> value, this will
define a circle from which videos should be
* found.
*
- * If #GDataYouTubeQuery:has-location is %TRUE, only videos which are associated with specific
coordinates in the search
- * circle will be returned. Otherwise, videos which have a relevant descriptive address (but no
specific coordinates) will
- * also be returned.
+ * As it is deprecated, the value of #GDataYouTubeQuery:has-location is
+ * ignored.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/youtube/2.0/reference.html#locationsp">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/search/list#location">online
documentation</ulink>.
*
* Since: 0.3.0
**/
@@ -181,12 +191,15 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* For more information, see the documentation for #GDataYouTubeQuery:latitude.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries.
**/
g_object_class_install_property (gobject_class, PROP_HAS_LOCATION,
g_param_spec_boolean ("has-location",
"Has location?", "Whether to restrict results
to videos with specific coordinates.",
FALSE,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
/**
* GDataYouTubeQuery:language:
@@ -199,12 +212,15 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* url="http://code.google.com/apis/youtube/2.0/reference.html#lrsp">online documentation</ulink>.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
g_object_class_install_property (gobject_class, PROP_LANGUAGE,
g_param_spec_string ("language",
"Language", "Restricts the search to videos
described in the given language.",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
/**
* GDataYouTubeQuery:order-by:
@@ -217,7 +233,7 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* <replaceable>languageCode</replaceable> is an ISO 639-1 language code, as used in
#GDataYouTubeQuery:language.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/youtube/2.0/reference.html#orderbysp">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/search/list#order">online documentation</ulink>.
*
* Since: 0.3.0
**/
@@ -230,18 +246,22 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
/**
* GDataYouTubeQuery:restriction:
*
- * The IP address that should be used to filter videos playable only in specific countries. This
should be the
- * IP address of the client, if different to the IP address in use by the library. Alternatively, it
can be an ISO 3166
- * two-letter country code.
+ * An ISO 3166 two-letter country code that should be used to filter
+ * videos playable only in specific countries.
+ *
+ * Previously, this property could also accept the client’s IP address
+ * for country lookup. This feature is no longer supported by Google,
+ * and will result in an error from the server if used. Use a country
+ * code instead.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/youtube/2.0/reference.html#restrictionsp">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/search/list#regionCode">online
documentation</ulink>.
*
* Since: 0.3.0
**/
g_object_class_install_property (gobject_class, PROP_RESTRICTION,
g_param_spec_string ("restriction",
- "Restriction", "The IP address to filter videos
playable only in specific countries.",
+ "Restriction", "The country code to filter
videos playable only in specific countries.",
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -251,7 +271,7 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* Whether the search results should include restricted content as well as standard content.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/youtube/2.0/reference.html#safeSearchsp">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/search/list#safeSearch">online
documentation</ulink>.
*
* Since: 0.3.0
**/
@@ -267,12 +287,15 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* Specifies the direction of sorting. To use the default sort order, set the property to
%GDATA_YOUTUBE_SORT_NONE.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
g_object_class_install_property (gobject_class, PROP_SORT_ORDER,
g_param_spec_enum ("sort-order",
"Sort order", "Specifies the direction of
sorting.",
GDATA_TYPE_YOUTUBE_SORT_ORDER,
GDATA_YOUTUBE_SORT_NONE,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
/**
* GDataYouTubeQuery:age:
@@ -295,12 +318,15 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* searches to videos from YouTube partners.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
g_object_class_install_property (gobject_class, PROP_UPLOADER,
g_param_spec_enum ("uploader",
"Uploader", "Restricts the search to videos from
the specified type of uploader.",
GDATA_TYPE_YOUTUBE_UPLOADER,
GDATA_YOUTUBE_UPLOADER_ALL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
/**
* GDataYouTubeQuery:license:
@@ -309,7 +335,7 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
* are Creative Commons licensed will be returned in search results. Set this to %NULL to return
videos under any license.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/youtube/2.0/reference.html#licensesp">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/search/list#videoLicense">online
documentation</ulink>.
*
* Since: 0.11.0
*/
@@ -403,7 +429,9 @@ gdata_youtube_query_set_property (GObject *object, guint property_id, const GVal
switch (property_id) {
case PROP_FORMAT:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdata_youtube_query_set_format (self, g_value_get_enum (value));
+ G_GNUC_END_IGNORE_DEPRECATIONS
break;
case PROP_LATITUDE:
self->priv->latitude = g_value_get_double (value);
@@ -418,7 +446,9 @@ gdata_youtube_query_set_property (GObject *object, guint property_id, const GVal
self->priv->has_location = g_value_get_boolean (value);
break;
case PROP_LANGUAGE:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdata_youtube_query_set_language (self, g_value_get_string (value));
+ G_GNUC_END_IGNORE_DEPRECATIONS
break;
case PROP_ORDER_BY:
gdata_youtube_query_set_order_by (self, g_value_get_string (value));
@@ -430,13 +460,17 @@ gdata_youtube_query_set_property (GObject *object, guint property_id, const GVal
gdata_youtube_query_set_safe_search (self, g_value_get_enum (value));
break;
case PROP_SORT_ORDER:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdata_youtube_query_set_sort_order (self, g_value_get_enum (value));
+ G_GNUC_END_IGNORE_DEPRECATIONS
break;
case PROP_AGE:
gdata_youtube_query_set_age (self, g_value_get_enum (value));
break;
case PROP_UPLOADER:
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdata_youtube_query_set_uploader (self, g_value_get_enum (value));
+ G_GNUC_END_IGNORE_DEPRECATIONS
break;
case PROP_LICENSE:
gdata_youtube_query_set_license (self, g_value_get_string (value));
@@ -448,6 +482,56 @@ gdata_youtube_query_set_property (GObject *object, guint property_id, const GVal
}
}
+/* Convert from a v2 order-by parameter value to a v3 order parameter value.
+ * Reference:
+ * v2: https://developers.google.com/youtube/2.0/developers_guide_protocol_api_query_parameters#orderbysp
+ * v3: https://developers.google.com/youtube/v3/docs/search/list#order
+ */
+static const gchar *
+get_v3_order (const gchar *v2_order_by)
+{
+ const struct {
+ const gchar *v2_order_by;
+ const gchar *v3_order;
+ } mapping[] = {
+ { "relevance", "relevance" },
+ { "published", "date" },
+ { "viewCount", "viewCount" },
+ { "rating", "rating" },
+ };
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS (mapping); i++) {
+ if (g_strcmp0 (v2_order_by, mapping[i].v2_order_by) == 0) {
+ return mapping[i].v3_order;
+ }
+ }
+
+ /* Special case for ‘relevance_lang_*’. */
+ if (g_str_has_prefix (v2_order_by, "relevance_lang_")) {
+ return "relevance";
+ }
+
+ return NULL;
+}
+
+/* Convert from a v2 license parameter value to a v3 videoLicense parameter
+ * value. Reference:
+ * v2: https://developers.google.com/youtube/2.0/developers_guide_protocol_api_query_parameters#licensesp
+ * v3: https://developers.google.com/youtube/v3/docs/search/list#videoLicense
+ */
+static const gchar *
+get_v3_video_license (const gchar *v2_license)
+{
+ if (g_strcmp0 (v2_license, "cc") == 0) {
+ return "creativeCommon";
+ } else if (g_strcmp0 (v2_license, "youtube") == 0) {
+ return "youtube";
+ } else {
+ return NULL;
+ }
+}
+
static void
get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
{
@@ -455,91 +539,127 @@ get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboo
#define APPEND_SEP g_string_append_c (query_uri, (*params_started == FALSE) ? '?' : '&');
*params_started = TRUE;
- /* Chain up to the parent class */
- GDATA_QUERY_CLASS (gdata_youtube_query_parent_class)->get_query_uri (self, feed_uri, query_uri,
params_started);
+ /* NOTE: We do not chain up because the parent class implements a lot
+ * of deprecated API. */
+
+ /* Categories */
+ if (gdata_query_get_categories (self) != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "videoCategoryId=");
+ g_string_append_uri_escaped (query_uri,
+ gdata_query_get_categories (self),
+ NULL,
+ FALSE);
+ }
- APPEND_SEP
- switch (priv->age) {
+ /* q param */
+ if (gdata_query_get_q (self) != NULL) {
+ APPEND_SEP
+ g_string_append (query_uri, "q=");
+ g_string_append_uri_escaped (query_uri,
+ gdata_query_get_q (self), NULL,
+ FALSE);
+ }
+
+ if (gdata_query_get_max_results (self) > 0) {
+ APPEND_SEP
+ g_string_append_printf (query_uri, "maxResults=%u",
+ gdata_query_get_max_results (self));
+ }
+
+ if (priv->age != GDATA_YOUTUBE_AGE_ALL_TIME) {
+ gchar *after;
+ GTimeVal tv = { 0, };
+
+ g_get_current_time (&tv);
+
+ switch (priv->age) {
case GDATA_YOUTUBE_AGE_TODAY:
- g_string_append (query_uri, "time=today");
+ tv.tv_sec -= 24 * 60 * 60;
break;
case GDATA_YOUTUBE_AGE_THIS_WEEK:
- g_string_append (query_uri, "time=this_week");
+ tv.tv_sec -= 7 * 24 * 60 * 60;
break;
case GDATA_YOUTUBE_AGE_THIS_MONTH:
- g_string_append (query_uri, "time=this_month");
+ tv.tv_sec -= 31 * 24 * 60 * 60;
break;
case GDATA_YOUTUBE_AGE_ALL_TIME:
- g_string_append (query_uri, "time=all_time");
- break;
default:
g_assert_not_reached ();
+ }
+
+ APPEND_SEP
+
+ after = g_time_val_to_iso8601 (&tv);
+ g_string_append_printf (query_uri, "publishedAfter=%s", after);
+ g_free (after);
}
- /* We don't need to use APPEND_SEP below here, as the "age" parameter is always included */
+ /* We don’t need to use APPEND_SEP below here, as this parameter is
+ * always included */
+ APPEND_SEP
switch (priv->safe_search) {
case GDATA_YOUTUBE_SAFE_SEARCH_NONE:
- g_string_append (query_uri, "&safeSearch=none");
+ g_string_append (query_uri, "safeSearch=none");
break;
case GDATA_YOUTUBE_SAFE_SEARCH_MODERATE:
- g_string_append (query_uri, "&safeSearch=moderate");
+ g_string_append (query_uri, "safeSearch=moderate");
break;
case GDATA_YOUTUBE_SAFE_SEARCH_STRICT:
- g_string_append (query_uri, "&safeSearch=strict");
+ g_string_append (query_uri, "safeSearch=strict");
break;
default:
g_assert_not_reached ();
}
- if (priv->format != GDATA_YOUTUBE_FORMAT_UNKNOWN)
- g_string_append_printf (query_uri, "&format=%u", priv->format);
-
if (priv->latitude >= -90.0 && priv->latitude <= 90.0 &&
priv->longitude >= -180.0 && priv->longitude <= 180.0) {
- gchar latitude[G_ASCII_DTOSTR_BUF_SIZE], longitude[G_ASCII_DTOSTR_BUF_SIZE];
+ gchar latitude[G_ASCII_DTOSTR_BUF_SIZE];
+ gchar longitude[G_ASCII_DTOSTR_BUF_SIZE];
- g_string_append_printf (query_uri, (priv->has_location == TRUE) ? "&location=%s,%s!" :
"&location=%s,%s",
- g_ascii_dtostr (latitude, sizeof (latitude), priv->latitude),
- g_ascii_dtostr (longitude, sizeof (longitude), priv->longitude));
+ g_string_append_printf (query_uri, "&location=%s,%s",
+ g_ascii_dtostr (latitude,
+ sizeof (latitude),
+ priv->latitude),
+ g_ascii_dtostr (longitude,
+ sizeof (longitude),
+ priv->longitude));
if (priv->location_radius >= 0.0) {
gchar radius[G_ASCII_DTOSTR_BUF_SIZE];
- g_string_append_printf (query_uri, "&location-radius=%sm", g_ascii_dtostr (radius,
sizeof (radius), priv->location_radius));
+ g_string_append_printf (query_uri, "&locationRadius=%sm",
+ g_ascii_dtostr (radius,
+ sizeof (radius),
+ priv->location_radius));
}
- } else if (priv->has_location == TRUE) {
- g_string_append (query_uri, "&location=!");
- }
-
- if (priv->language != NULL) {
- g_string_append (query_uri, "&lr=");
- g_string_append_uri_escaped (query_uri, priv->language, NULL, FALSE);
}
if (priv->order_by != NULL) {
- g_string_append (query_uri, "&orderby=");
- g_string_append_uri_escaped (query_uri, priv->order_by, NULL, FALSE);
+ const gchar *v3_order_by = get_v3_order (priv->order_by);
+
+ if (v3_order_by != NULL) {
+ g_string_append (query_uri, "&order=");
+ g_string_append_uri_escaped (query_uri, v3_order_by,
+ NULL, FALSE);
+ }
}
if (priv->restriction != NULL) {
- g_string_append (query_uri, "&restriction=");
+ g_string_append (query_uri, "®ionCode=");
g_string_append_uri_escaped (query_uri, priv->restriction, NULL, FALSE);
}
- if (priv->sort_order != GDATA_YOUTUBE_SORT_NONE) {
- if (priv->sort_order == GDATA_YOUTUBE_SORT_ASCENDING)
- g_string_append (query_uri, "&sortorder=ascending");
- else if (priv->sort_order == GDATA_YOUTUBE_SORT_DESCENDING)
- g_string_append (query_uri, "&sortorder=descending");
- else
- g_assert_not_reached ();
- }
+ if (priv->license != NULL) {
+ const gchar *v3_video_license;
- if (priv->uploader != GDATA_YOUTUBE_UPLOADER_ALL)
- g_string_append (query_uri, "&uploader=partner");
+ v3_video_license = get_v3_video_license (priv->license);
- if (priv->license != NULL) {
- g_string_append (query_uri, "&license=");
- g_string_append_uri_escaped (query_uri, priv->license, NULL, FALSE);
+ if (v3_video_license != NULL) {
+ g_string_append (query_uri, "&videoLicense=");
+ g_string_append_uri_escaped (query_uri,
+ v3_video_license, NULL,
+ FALSE);
+ }
}
}
@@ -559,6 +679,8 @@ gdata_youtube_query_new (const gchar *q)
return g_object_new (GDATA_TYPE_YOUTUBE_QUERY, "q", q, NULL);
}
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/**
* gdata_youtube_query_get_format:
* @self: a #GDataYouTubeQuery
@@ -568,6 +690,8 @@ gdata_youtube_query_new (const gchar *q)
* Return value: the format property
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
GDataYouTubeFormat
gdata_youtube_query_get_format (GDataYouTubeQuery *self)
@@ -584,6 +708,8 @@ gdata_youtube_query_get_format (GDataYouTubeQuery *self)
* Sets the #GDataYouTubeQuery:format property of the #GDataYouTubeQuery to @format.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
void
gdata_youtube_query_set_format (GDataYouTubeQuery *self, GDataYouTubeFormat format)
@@ -596,6 +722,8 @@ gdata_youtube_query_set_format (GDataYouTubeQuery *self, GDataYouTubeFormat form
gdata_query_set_etag (GDATA_QUERY (self), NULL);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
+
/**
* gdata_youtube_query_get_location:
* @self: a #GDataYouTubeQuery
@@ -668,6 +796,8 @@ gdata_youtube_query_set_location (GDataYouTubeQuery *self, gdouble latitude, gdo
* Return value: the language property, or %NULL if it is unset
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
const gchar *
gdata_youtube_query_get_language (GDataYouTubeQuery *self)
@@ -686,6 +816,8 @@ gdata_youtube_query_get_language (GDataYouTubeQuery *self)
* Set @language to %NULL to unset the property in the query URI.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
void
gdata_youtube_query_set_language (GDataYouTubeQuery *self, const gchar *language)
@@ -817,6 +949,8 @@ gdata_youtube_query_set_safe_search (GDataYouTubeQuery *self, GDataYouTubeSafeSe
gdata_query_set_etag (GDATA_QUERY (self), NULL);
}
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/**
* gdata_youtube_query_get_sort_order:
* @self: a #GDataYouTubeQuery
@@ -826,6 +960,8 @@ gdata_youtube_query_set_safe_search (GDataYouTubeQuery *self, GDataYouTubeSafeSe
* Return value: the sort order property
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
GDataYouTubeSortOrder
gdata_youtube_query_get_sort_order (GDataYouTubeQuery *self)
@@ -844,6 +980,8 @@ gdata_youtube_query_get_sort_order (GDataYouTubeQuery *self)
* Set @sort_order to %GDATA_YOUTUBE_SORT_NONE to unset the property in the query URI.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
void
gdata_youtube_query_set_sort_order (GDataYouTubeQuery *self, GDataYouTubeSortOrder sort_order)
@@ -856,6 +994,8 @@ gdata_youtube_query_set_sort_order (GDataYouTubeQuery *self, GDataYouTubeSortOrd
gdata_query_set_etag (GDATA_QUERY (self), NULL);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
+
/**
* gdata_youtube_query_get_age:
* @self: a #GDataYouTubeQuery
@@ -893,6 +1033,8 @@ gdata_youtube_query_set_age (GDataYouTubeQuery *self, GDataYouTubeAge age)
gdata_query_set_etag (GDATA_QUERY (self), NULL);
}
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/**
* gdata_youtube_query_get_uploader:
* @self: a #GDataYouTubeQuery
@@ -902,6 +1044,8 @@ gdata_youtube_query_set_age (GDataYouTubeQuery *self, GDataYouTubeAge age)
* Return value: the uploader property
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
GDataYouTubeUploader
gdata_youtube_query_get_uploader (GDataYouTubeQuery *self)
@@ -918,6 +1062,8 @@ gdata_youtube_query_get_uploader (GDataYouTubeQuery *self)
* Sets the #GDataYouTubeQuery:uploader property of the #GDataYouTubeQuery to @uploader.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. The value of
+ * this property will be unused in queries. There is no replacement.
**/
void
gdata_youtube_query_set_uploader (GDataYouTubeQuery *self, GDataYouTubeUploader uploader)
@@ -930,6 +1076,8 @@ gdata_youtube_query_set_uploader (GDataYouTubeQuery *self, GDataYouTubeUploader
gdata_query_set_etag (GDATA_QUERY (self), NULL);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
+
/**
* gdata_youtube_query_get_license:
* @self: a #GDataYouTubeQuery
diff --git a/gdata/services/youtube/gdata-youtube-query.h b/gdata/services/youtube/gdata-youtube-query.h
index c262027..ae27300 100644
--- a/gdata/services/youtube/gdata-youtube-query.h
+++ b/gdata/services/youtube/gdata-youtube-query.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* GData Client
- * Copyright (C) Philip Withnall 2009 <philip tecnocode co uk>
+ * Copyright (C) Philip Withnall 2009, 2015 <philip tecnocode co uk>
*
* GData Client is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -38,7 +38,7 @@ G_BEGIN_DECLS
* @GDATA_YOUTUBE_SAFE_SEARCH_STRICT: YouTube will try to exclude all restricted content from the search
result set
*
* Safe search levels for removing restricted entries from query results. For more information, see the
- * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#safeSearchsp">online
documentation</ulink>.
+ * <ulink type="http" url="https://developers.google.com/youtube/v3/docs/search/list#safeSearch">online
documentation</ulink>.
*
* Since: 0.3.0
**/
@@ -48,6 +48,7 @@ typedef enum {
GDATA_YOUTUBE_SAFE_SEARCH_STRICT
} GDataYouTubeSafeSearch;
+#ifndef LIBGDATA_DISABLE_DEPRECATED
/**
* GDataYouTubeSortOrder:
* @GDATA_YOUTUBE_SORT_NONE: do not explicitly sort in any sense
@@ -57,12 +58,15 @@ typedef enum {
* Sort orders for the search results from queries. They specify the order of the designated order field.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. There is no
+ * replacement.
**/
typedef enum {
GDATA_YOUTUBE_SORT_NONE = 0,
GDATA_YOUTUBE_SORT_ASCENDING,
GDATA_YOUTUBE_SORT_DESCENDING
-} GDataYouTubeSortOrder;
+} GDataYouTubeSortOrder G_GNUC_DEPRECATED;
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
/**
* GDataYouTubeAge:
@@ -82,6 +86,7 @@ typedef enum {
GDATA_YOUTUBE_AGE_THIS_MONTH
} GDataYouTubeAge;
+#ifndef LIBGDATA_DISABLE_DEPRECATED
/**
* GDataYouTubeUploader:
* @GDATA_YOUTUBE_UPLOADER_ALL: retrieve all videos, regardless of who uploaded them
@@ -90,11 +95,14 @@ typedef enum {
* Video uploaders, allowing queries to be limited to returning videos uploaded by YouTube partners.
*
* Since: 0.3.0
+ * Deprecated: UNRELEASED: No longer supported by Google. There is no
+ * replacement.
**/
typedef enum {
GDATA_YOUTUBE_UPLOADER_ALL = 0,
GDATA_YOUTUBE_UPLOADER_PARTNER
-} GDataYouTubeUploader;
+} GDataYouTubeUploader G_GNUC_DEPRECATED;
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
/**
* GDATA_YOUTUBE_LICENSE_CC:
@@ -158,27 +166,32 @@ GType gdata_youtube_query_get_type (void) G_GNUC_CONST;
GDataYouTubeQuery *gdata_youtube_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
-GDataYouTubeFormat gdata_youtube_query_get_format (GDataYouTubeQuery *self) G_GNUC_PURE;
-void gdata_youtube_query_set_format (GDataYouTubeQuery *self, GDataYouTubeFormat format);
void gdata_youtube_query_get_location (GDataYouTubeQuery *self, gdouble *latitude, gdouble *longitude,
gdouble *radius, gboolean *has_location);
void gdata_youtube_query_set_location (GDataYouTubeQuery *self, gdouble latitude, gdouble longitude, gdouble
radius, gboolean has_location);
-const gchar *gdata_youtube_query_get_language (GDataYouTubeQuery *self) G_GNUC_PURE;
-void gdata_youtube_query_set_language (GDataYouTubeQuery *self, const gchar *language);
const gchar *gdata_youtube_query_get_order_by (GDataYouTubeQuery *self) G_GNUC_PURE;
void gdata_youtube_query_set_order_by (GDataYouTubeQuery *self, const gchar *order_by);
const gchar *gdata_youtube_query_get_restriction (GDataYouTubeQuery *self) G_GNUC_PURE;
void gdata_youtube_query_set_restriction (GDataYouTubeQuery *self, const gchar *restriction);
GDataYouTubeSafeSearch gdata_youtube_query_get_safe_search (GDataYouTubeQuery *self) G_GNUC_PURE;
void gdata_youtube_query_set_safe_search (GDataYouTubeQuery *self, GDataYouTubeSafeSearch safe_search);
-GDataYouTubeSortOrder gdata_youtube_query_get_sort_order (GDataYouTubeQuery *self) G_GNUC_PURE;
-void gdata_youtube_query_set_sort_order (GDataYouTubeQuery *self, GDataYouTubeSortOrder sort_order);
GDataYouTubeAge gdata_youtube_query_get_age (GDataYouTubeQuery *self) G_GNUC_PURE;
void gdata_youtube_query_set_age (GDataYouTubeQuery *self, GDataYouTubeAge age);
-GDataYouTubeUploader gdata_youtube_query_get_uploader (GDataYouTubeQuery *self) G_GNUC_PURE;
-void gdata_youtube_query_set_uploader (GDataYouTubeQuery *self, GDataYouTubeUploader uploader);
const gchar *gdata_youtube_query_get_license (GDataYouTubeQuery *self) G_GNUC_PURE;
void gdata_youtube_query_set_license (GDataYouTubeQuery *self, const gchar *license);
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+GDataYouTubeFormat gdata_youtube_query_get_format (GDataYouTubeQuery *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+void gdata_youtube_query_set_format (GDataYouTubeQuery *self, GDataYouTubeFormat format) G_GNUC_DEPRECATED;
+const gchar *gdata_youtube_query_get_language (GDataYouTubeQuery *self) G_GNUC_PURE G_GNUC_DEPRECATED;
+void gdata_youtube_query_set_language (GDataYouTubeQuery *self, const gchar *language) G_GNUC_DEPRECATED;
+GDataYouTubeSortOrder gdata_youtube_query_get_sort_order (GDataYouTubeQuery *self) G_GNUC_PURE
G_GNUC_DEPRECATED;
+void gdata_youtube_query_set_sort_order (GDataYouTubeQuery *self, GDataYouTubeSortOrder sort_order)
G_GNUC_DEPRECATED;
+GDataYouTubeUploader gdata_youtube_query_get_uploader (GDataYouTubeQuery *self) G_GNUC_PURE
G_GNUC_DEPRECATED;
+void gdata_youtube_query_set_uploader (GDataYouTubeQuery *self, GDataYouTubeUploader uploader)
G_GNUC_DEPRECATED;
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
G_END_DECLS
#endif /* !GDATA_YOUTUBE_QUERY_H */
diff --git a/gdata/services/youtube/gdata-youtube-video.c b/gdata/services/youtube/gdata-youtube-video.c
index e93751d..b491a6d 100644
--- a/gdata/services/youtube/gdata-youtube-video.c
+++ b/gdata/services/youtube/gdata-youtube-video.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* GData Client
- * Copyright (C) Philip Withnall 2008–2010 <philip tecnocode co uk>
+ * Copyright (C) Philip Withnall 2008–2010, 2015 <philip tecnocode co uk>
*
* GData Client is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -43,20 +43,13 @@
*
* video = gdata_youtube_service_query_single_video (service, NULL, "R-9gzmQHoe0", NULL, NULL);
*
- * video_id = gdata_youtube_video_get_video_id (video); /<!-- -->* e.g. "R-9gzmQHoe0" *<!-- -->/
+ * video_id = gdata_entry_get_id (GDATA_ENTRY (video)); /<!-- -->* e.g. "R-9gzmQHoe0" *<!-- -->/
* title = gdata_entry_get_title (GDATA_ENTRY (video)); /<!-- -->* e.g. "Korpiklaani Vodka (official
video 2009)" *<!-- -->/
* player_uri = gdata_youtube_video_get_player_uri (video); /<!-- -->* e.g.
"http://www.youtube.com/watch?v=ZTUVgYoeN_b" *<!-- -->/
* description = gdata_youtube_video_get_description (video); /<!-- -->* e.g. "Vodka is the first single
from the album..." *<!-- -->/
* published = gdata_entry_get_published (GDATA_ENTRY (video)); /<!-- -->* Date and time the video was
originally published *<!-- -->/
* updated = gdata_entry_get_updated (GDATA_ENTRY (video)); /<!-- -->* When the video was most recently
updated by the author *<!-- -->/
*
- * /<!-- -->* Retrieve a specific encoding of the video in GDataMediaContent format *<!-- -->/
- * content = gdata_youtube_video_look_up_content (video, "video/3gpp");
- * if (content != NULL)
- * video_uri = gdata_media_content_get_uri (content); /<!-- -->* the URI for the direct 3GP
version of the video *<!-- -->/
- * else
- * /<!-- -->* Fall back and try a different video encoding? SWF
("application/x-shockwave-flash") is always present. *<!-- -->/
- *
* /<!-- -->* Get a list of GDataMediaThumbnail<!-- -->s for the video *<!-- -->/
* for (thumbnails = gdata_youtube_video_get_thumbnails (video); thumbnails != NULL; thumbnails =
thumbnails->next)
* download_and_do_something_with_thumbnail (gdata_media_thumbnail_get_uri (thumbnail));
@@ -189,7 +182,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The number of times the video has been viewed.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:statistics">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.viewCount">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_VIEW_COUNT,
g_param_spec_uint ("view-count",
@@ -203,7 +196,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The number of users who have added the video to their favorites.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:statistics">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.favoriteCount">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_FAVORITE_COUNT,
g_param_spec_uint ("favorite-count",
@@ -217,7 +210,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* Descriptive text about the location where the video was taken.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:location">online
documentation</ulink>.
+ *
url="https://developers.google.com/youtube/v3/docs/videos#recordingDetails.locationDescription">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_LOCATION,
g_param_spec_string ("location",
@@ -231,7 +224,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The minimum allowed rating for the video.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdRating">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.likeCount">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_MIN_RATING,
g_param_spec_uint ("min-rating",
@@ -245,7 +238,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The maximum allowed rating for the video.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdRating">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.likeCount">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_MAX_RATING,
g_param_spec_uint ("max-rating",
@@ -259,7 +252,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The number of times the video has been rated.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdRating">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.likeCount">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_RATING_COUNT,
g_param_spec_uint ("rating-count",
@@ -273,7 +266,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The average rating of the video, over all the ratings it's received.
*
* For more information, see the <ulink type="http"
- * url="http://code.google.com/apis/gdata/docs/2.0/elements.html#gdRating">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#statistics.likeCount">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_AVERAGE_RATING,
g_param_spec_double ("average-rating",
@@ -299,9 +292,6 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* GDataYouTubeVideo:player-uri:
*
* A URI for a browser-based media player for the full-length video (i.e. the video's page on
YouTube).
- *
- * For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:player">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_PLAYER_URI,
g_param_spec_string ("player-uri",
@@ -343,7 +333,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* A summary or description of the video.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_media:description">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#snippet.description">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_DESCRIPTION,
g_param_spec_string ("description",
@@ -357,7 +347,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The duration of the video in seconds.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:duration">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#contentDetails.duration">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_DURATION,
g_param_spec_uint ("duration",
@@ -371,7 +361,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* Indicates whether the video is private, meaning that it will not be publicly visible on YouTube's
website.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:private">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#status.privacyStatus">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_IS_PRIVATE,
g_param_spec_boolean ("is-private",
@@ -385,7 +375,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* Specifies the time the video was originally uploaded to YouTube.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:uploaded">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#snippet.publishedAt">online
documentation</ulink>.
**/
g_object_class_install_property (gobject_class, PROP_UPLOADED,
g_param_spec_int64 ("uploaded",
@@ -399,13 +389,16 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* Specifies a unique ID which YouTube uses to identify the video. For example:
<literal>qz8EfkS4KK0</literal>.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:videoid">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#id">online documentation</ulink>.
+ *
+ * Deprecated: UNRELEASED: This is now equal to #GDataEntry:id.
**/
g_object_class_install_property (gobject_class, PROP_VIDEO_ID,
g_param_spec_string ("video-id",
"Video ID", "Specifies a unique ID which
YouTube uses to identify the video.",
NULL,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED));
/**
* GDataYouTubeVideo:is-draft:
@@ -442,7 +435,7 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* Specifies the time the video was originally recorded.
*
* For more information, see the <ulink type="http"
- *
url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:recorded">online
documentation</ulink>.
+ * url="https://developers.google.com/youtube/v3/docs/videos#recordingDetails.recordingDate">online
documentation</ulink>.
*
* Since: 0.3.0
**/
@@ -475,8 +468,9 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The location as a latitude coordinate associated with this video. Valid latitudes range from <code
class="literal">-90.0</code>
* to <code class="literal">90.0</code> inclusive.
*
- * For more information, see the <ulink type="http"
url="http://code.google.com/apis/youtube/2.0/reference.html#GeoRSS_elements_reference">
- * GeoRSS specification</ulink>.
+ * For more information, see the
+ * <ulink type="http"
url="https://developers.google.com/youtube/v3/docs/videos#recordingDetails.location.latitude">
+ * online documentation</ulink>.
*
* Since: 0.8.0
**/
@@ -492,8 +486,9 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
* The location as a longitude coordinate associated with this video. Valid longitudes range from
<code class="literal">-180.0</code>
* to <code class="literal">180.0</code> inclusive.
*
- * For more information, see the <ulink type="http"
url="http://code.google.com/apis/youtube/2.0/reference.html#GeoRSS_elements_reference">
- * GeoRSS specification</ulink>.
+ * For more information, see the
+ * <ulink type="http"
url="https://developers.google.com/youtube/v3/docs/videos#recordingDetails.location.longitude">
+ * online documentation</ulink>.
*
* Since: 0.8.0
**/
@@ -515,25 +510,12 @@ gdata_youtube_video_commentable_init (GDataCommentableInterface *iface)
}
static void
-notify_title_cb (GDataYouTubeVideo *self, GParamSpec *pspec, gpointer user_data)
-{
- /* Update our media:group title */
- if (self->priv->media_group != NULL)
- gdata_media_group_set_title (self->priv->media_group, gdata_entry_get_title (GDATA_ENTRY
(self)));
-}
-
-static void
gdata_youtube_video_init (GDataYouTubeVideo *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_VIDEO, GDataYouTubeVideoPrivate);
self->priv->recorded = -1;
self->priv->access_controls = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)
g_free, NULL);
self->priv->georss_where = g_object_new (GDATA_TYPE_GEORSS_WHERE, NULL);
-
- /* The video's title is duplicated between atom:title and media:group/media:title, so listen for
change notifications on atom:title
- * and propagate them to media:group/media:title accordingly. Since the media group isn't publically
accessible, we don't need to
- * listen for notifications from it. */
- g_signal_connect (GDATA_ENTRY (self), "notify::title", G_CALLBACK (notify_title_cb), NULL);
}
static GObject *
@@ -984,35 +966,24 @@ get_authorization_domain (GDataCommentable *self)
static gchar *
get_query_comments_uri (GDataCommentable *self)
{
- GDataGDFeedLink *feed_link;
-
- feed_link = GDATA_YOUTUBE_VIDEO (self)->priv->comments_feed_link;
-
- if (feed_link == NULL) {
- return NULL;
- }
-
- return _gdata_service_fix_uri_scheme (gdata_gd_feed_link_get_uri (feed_link));
+ /* FIXME: Currently unsupported:
+ * https://developers.google.com/youtube/v3/migration-guide#to_be_migrated */
+ return NULL;
}
static gchar *
get_insert_comment_uri (GDataCommentable *self, GDataComment *comment_)
{
- GDataGDFeedLink *feed_link;
-
- feed_link = GDATA_YOUTUBE_VIDEO (self)->priv->comments_feed_link;
-
- if (feed_link == NULL) {
- return NULL;
- }
-
- return _gdata_service_fix_uri_scheme (gdata_gd_feed_link_get_uri (feed_link));
+ /* FIXME: Currently unsupported:
+ * https://developers.google.com/youtube/v3/migration-guide#to_be_migrated */
+ return NULL;
}
static gboolean
is_comment_deletable (GDataCommentable *self, GDataComment *comment_)
{
- /* Deletion of comments is unsupported. */
+ /* FIXME: Currently unsupported:
+ * https://developers.google.com/youtube/v3/migration-guide#to_be_migrated */
return FALSE;
}
@@ -1211,8 +1182,20 @@ gdata_youtube_video_set_keywords (GDataYouTubeVideo *self, const gchar * const *
const gchar *
gdata_youtube_video_get_player_uri (GDataYouTubeVideo *self)
{
+ GDataYouTubeVideoPrivate *priv;
+
g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
- return gdata_media_group_get_player_uri (self->priv->media_group);
+
+ priv = self->priv;
+
+ /* Generate and cache the player URI. */
+ if (priv->player_uri == NULL) {
+ priv->player_uri = g_strconcat ("https://www.youtube.com/watch?v=",
+ gdata_entry_get_id (GDATA_ENTRY (self)),
+ NULL);
+ }
+
+ return priv->player_uri;
}
/**
@@ -1244,7 +1227,7 @@ gdata_youtube_video_is_restricted_in_country (GDataYouTubeVideo *self, const gch
* Returns the rating of the given type for the video, if one exists. For example, this could be a film
rating awarded by the MPAA; or a simple
* rating specifying whether the video contains adult content.
*
- * The valid values for @rating_type are: %GDATA_YOUTUBE_RATING_TYPE_SIMPLE, %GDATA_YOUTUBE_RATING_TYPE_MPAA
and %GDATA_YOUTUBE_RATING_TYPE_V_CHIP.
+ * The valid values for @rating_type are: %GDATA_YOUTUBE_RATING_TYPE_MPAA and
%GDATA_YOUTUBE_RATING_TYPE_V_CHIP.
* Further values may be added in future; if an unknown rating type is passed to the function, %NULL will be
returned.
*
* The possible return values depend on what's passed to @rating_type. Valid values for each rating type are
listed in the documentation for the
@@ -1257,10 +1240,31 @@ gdata_youtube_video_is_restricted_in_country (GDataYouTubeVideo *self, const gch
const gchar *
gdata_youtube_video_get_media_rating (GDataYouTubeVideo *self, const gchar *rating_type)
{
+ const gchar *rating;
+
g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
g_return_val_if_fail (rating_type != NULL && *rating_type != '\0', NULL);
- return gdata_media_group_get_media_rating (self->priv->media_group, rating_type);
+ /* All ratings are unknown. */
+ if (self->priv->content_ratings == NULL) {
+ return NULL;
+ }
+
+ /* Compatibility with the old API. */
+ if (g_strcmp0 (rating_type, "simple") == 0) {
+ /* Not supported any more. */
+ return NULL;
+ } else if (g_strcmp0 (rating_type, "mpaa") == 0) {
+ rating = g_hash_table_lookup (self->priv->content_ratings,
+ "mpaaRating");
+ return convert_mpaa_rating (rating);
+ } else if (g_strcmp0 (rating_type, "v-chip") == 0) {
+ rating = g_hash_table_lookup (self->priv->content_ratings,
+ "tvpgRating");
+ return convert_tvpg_rating (rating);
+ }
+
+ return g_hash_table_lookup (self->priv->content_ratings, rating_type);
}
/**
@@ -1346,6 +1350,8 @@ gdata_youtube_video_set_description (GDataYouTubeVideo *self, const gchar *descr
g_object_notify (G_OBJECT (self), "description");
}
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/**
* gdata_youtube_video_look_up_content:
* @self: a #GDataYouTubeVideo
@@ -1355,6 +1361,9 @@ gdata_youtube_video_set_description (GDataYouTubeVideo *self, const gchar *descr
* a list of URIs to various formats of the video itself, such as its SWF URI or RTSP stream.
*
* Return value: (transfer none): a #GDataYouTubeContent matching @type, or %NULL
+ * Deprecated: UNRELEASED: This is no longer supported by Google, and will
+ * always return %NULL. To view a video, open the URI returned by
+ * gdata_youtube_video_get_player_uri() in a web browser.
**/
GDataYouTubeContent *
gdata_youtube_video_look_up_content (GDataYouTubeVideo *self, const gchar *type)
@@ -1362,9 +1371,12 @@ gdata_youtube_video_look_up_content (GDataYouTubeVideo *self, const gchar *type)
g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
g_return_val_if_fail (type != NULL, NULL);
- return GDATA_YOUTUBE_CONTENT (gdata_media_group_look_up_content (self->priv->media_group, type));
+ /* Not supported in the v3 API. */
+ return NULL;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
+
/**
* gdata_youtube_video_get_thumbnails:
* @self: a #GDataYouTubeVideo
@@ -1447,12 +1459,13 @@ gdata_youtube_video_get_uploaded (GDataYouTubeVideo *self)
* Gets the #GDataYouTubeVideo:video-id property.
*
* Return value: the video's unique and permanent ID
+ * Deprecated: UNRELEASED: This is now equal to #GDataEntry:id.
**/
const gchar *
gdata_youtube_video_get_video_id (GDataYouTubeVideo *self)
{
g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
- return gdata_youtube_group_get_video_id (GDATA_YOUTUBE_GROUP (self->priv->media_group));
+ return gdata_entry_get_id (GDATA_ENTRY (self));
}
/**
diff --git a/gdata/services/youtube/gdata-youtube-video.h b/gdata/services/youtube/gdata-youtube-video.h
index 8fc5ce5..bb2c829 100644
--- a/gdata/services/youtube/gdata-youtube-video.h
+++ b/gdata/services/youtube/gdata-youtube-video.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* GData Client
- * Copyright (C) Philip Withnall 2008-2009 <philip tecnocode co uk>
+ * Copyright (C) Philip Withnall 2008-2009, 2015 <philip tecnocode co uk>
*
* GData Client is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -97,6 +97,7 @@ G_BEGIN_DECLS
**/
#define GDATA_YOUTUBE_ACTION_SYNDICATE "syndicate"
+#ifndef LIBGDATA_DISABLE_DEPRECATED
/**
* GDATA_YOUTUBE_RATING_TYPE_SIMPLE:
*
@@ -104,8 +105,12 @@ G_BEGIN_DECLS
* <code class="literal">adult</code> and <code class="literal">nonadult</code>.
*
* Since: 0.10.0
+ * Deprecated: UNRELEASED: No longer supported by Google. Calling
+ * gdata_youtube_video_get_media_rating() with this rating type will always
+ * return %NULL.
*/
#define GDATA_YOUTUBE_RATING_TYPE_SIMPLE "simple"
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
/**
* GDATA_YOUTUBE_RATING_TYPE_MPAA:
@@ -204,13 +209,11 @@ void gdata_youtube_video_set_category (GDataYouTubeVideo *self, GDataMediaCatego
GDataYouTubeCredit *gdata_youtube_video_get_credit (GDataYouTubeVideo *self) G_GNUC_PURE;
const gchar *gdata_youtube_video_get_description (GDataYouTubeVideo *self) G_GNUC_PURE;
void gdata_youtube_video_set_description (GDataYouTubeVideo *self, const gchar *description);
-GDataYouTubeContent *gdata_youtube_video_look_up_content (GDataYouTubeVideo *self, const gchar *type)
G_GNUC_PURE;
GList *gdata_youtube_video_get_thumbnails (GDataYouTubeVideo *self) G_GNUC_PURE;
guint gdata_youtube_video_get_duration (GDataYouTubeVideo *self) G_GNUC_PURE;
gboolean gdata_youtube_video_is_private (GDataYouTubeVideo *self) G_GNUC_PURE;
void gdata_youtube_video_set_is_private (GDataYouTubeVideo *self, gboolean is_private);
gint64 gdata_youtube_video_get_uploaded (GDataYouTubeVideo *self);
-const gchar *gdata_youtube_video_get_video_id (GDataYouTubeVideo *self) G_GNUC_PURE;
gboolean gdata_youtube_video_is_draft (GDataYouTubeVideo *self) G_GNUC_PURE;
void gdata_youtube_video_set_is_draft (GDataYouTubeVideo *self, gboolean is_draft);
GDataYouTubeState *gdata_youtube_video_get_state (GDataYouTubeVideo *self) G_GNUC_PURE;
@@ -223,6 +226,11 @@ void gdata_youtube_video_set_coordinates (GDataYouTubeVideo *self, gdouble latit
gchar *gdata_youtube_video_get_video_id_from_uri (const gchar *video_uri) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_MALLOC;
+#ifndef LIBGDATA_DISABLE_DEPRECATED
+const gchar *gdata_youtube_video_get_video_id (GDataYouTubeVideo *self) G_GNUC_PURE
G_GNUC_DEPRECATED_FOR(gdata_entry_get_id);
+GDataYouTubeContent *gdata_youtube_video_look_up_content (GDataYouTubeVideo *self, const gchar *type)
G_GNUC_PURE G_GNUC_DEPRECATED_FOR(gdata_youtube_video_get_player_uri);
+#endif /* !LIBGDATA_DISABLE_DEPRECATED */
+
G_END_DECLS
#endif /* !GDATA_YOUTUBE_VIDEO_H */
diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c
index 1195bc3..545ca8b 100644
--- a/gdata/tests/youtube.c
+++ b/gdata/tests/youtube.c
@@ -343,6 +343,8 @@ test_query_standard_feed_with_query (gconstpointer service)
GDataFeed *feed;
GError *error = NULL;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
gdata_test_mock_server_start_trace (mock_server, "query-standard-feed-with-query");
query = gdata_youtube_query_new (NULL);
@@ -359,6 +361,8 @@ test_query_standard_feed_with_query (gconstpointer service)
g_object_unref (feed);
uhm_server_end_trace (mock_server);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
/* HTTP message responses and the expected associated GData error domain/code. */
@@ -1599,6 +1603,8 @@ test_query_uri (void)
gchar *query_uri;
GDataYouTubeQuery *query = gdata_youtube_query_new ("q");
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
gdata_youtube_query_set_format (query, GDATA_YOUTUBE_FORMAT_RTSP_H263_AMR);
g_assert_cmpuint (gdata_youtube_query_get_format (query), ==, 1);
@@ -1671,6 +1677,8 @@ test_query_uri (void)
g_free (query_uri);
g_object_unref (query);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
static void
@@ -1681,6 +1689,8 @@ test_query_etag (void)
/* Test that setting any property will unset the ETag */
g_test_bug ("613529");
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
#define CHECK_ETAG(C) \
gdata_query_set_etag (GDATA_QUERY (query), "foobar"); \
(C); \
@@ -1700,6 +1710,8 @@ test_query_etag (void)
#undef CHECK_ETAG
g_object_unref (query);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
static void
@@ -1718,8 +1730,12 @@ test_query_single (gconstpointer service)
g_assert_no_error (error);
g_assert (video != NULL);
g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_assert_cmpstr (gdata_youtube_video_get_video_id (video), ==, "_LeQuMpwbW4");
g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (video)), ==,
"tag:youtube.com,2008:video:_LeQuMpwbW4");
+ G_GNUC_END_IGNORE_DEPRECATIONS
+
g_clear_error (&error);
g_object_unref (video);
@@ -1739,9 +1755,11 @@ G_STMT_START {
video = GDATA_YOUTUBE_VIDEO (gdata_service_query_single_entry_finish (GDATA_SERVICE (obj),
async_result, &error));
if (error == NULL) {
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_assert (GDATA_IS_YOUTUBE_VIDEO (video));
g_assert_cmpstr (gdata_youtube_video_get_video_id (video), ==, "_LeQuMpwbW4");
g_assert_cmpstr (gdata_entry_get_id (GDATA_ENTRY (video)), ==,
"tag:youtube.com,2008:video:_LeQuMpwbW4");
+ G_GNUC_END_IGNORE_DEPRECATIONS
g_object_unref (video);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]