[longomatch] Rename errors enum to fix a weird issue on win32
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Rename errors enum to fix a weird issue on win32
- Date: Mon, 31 May 2010 21:06:10 +0000 (UTC)
commit 68f06e5d69148db7710cab757079931a0ade0dbf
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon May 31 21:48:24 2010 +0200
Rename errors enum to fix a weird issue on win32
libcesarplayer/src/bacon-video-widget-gst-0.10.c | 46 ++++++------
libcesarplayer/src/common.h | 92 +++++++++++-----------
libcesarplayer/src/gst-camera-capturer.c | 10 +-
libcesarplayer/src/gst-video-editor.c | 4 +-
4 files changed, 76 insertions(+), 76 deletions(-)
---
diff --git a/libcesarplayer/src/bacon-video-widget-gst-0.10.c b/libcesarplayer/src/bacon-video-widget-gst-0.10.c
index f7855c2..7f1f926 100644
--- a/libcesarplayer/src/bacon-video-widget-gst-0.10.c
+++ b/libcesarplayer/src/bacon-video-widget-gst-0.10.c
@@ -2850,7 +2850,7 @@ bvw_error_from_gst_error (BaconVideoWidget * bvw, GstMessage * err_msg)
(g_str_has_prefix (mrl, "dvd") ||
g_str_has_prefix (mrl, "cd") || g_str_has_prefix (mrl, "vcd")))
{
- ret = g_error_new_literal (BVW_ERROR, ERROR_INVALID_DEVICE,
+ ret = g_error_new_literal (BVW_ERROR, GST_ERROR_INVALID_DEVICE,
e->message);
}
else
@@ -2861,7 +2861,7 @@ bvw_error_from_gst_error (BaconVideoWidget * bvw, GstMessage * err_msg)
if (GST_IS_BASE_AUDIO_SINK (err_msg->src))
{
ret =
- g_error_new_literal (BVW_ERROR, ERROR_AUDIO_PLUGIN,
+ g_error_new_literal (BVW_ERROR, GST_ERROR_AUDIO_PLUGIN,
_
("The requested audio output was not found. "
"Please select another audio output in the Multimedia "
@@ -2870,13 +2870,13 @@ bvw_error_from_gst_error (BaconVideoWidget * bvw, GstMessage * err_msg)
else
{
ret =
- g_error_new_literal (BVW_ERROR, ERROR_FILE_NOT_FOUND,
+ g_error_new_literal (BVW_ERROR, GST_ERROR_FILE_NOT_FOUND,
_("Location not found."));
}
}
else
{
- ret = g_error_new_literal (BVW_ERROR, ERROR_FILE_PERMISSION,
+ ret = g_error_new_literal (BVW_ERROR, GST_ERROR_FILE_PERMISSION,
_("Could not open location; "
"you might not have permission to open the file."));
}
@@ -2890,7 +2890,7 @@ bvw_error_from_gst_error (BaconVideoWidget * bvw, GstMessage * err_msg)
{
/* a somewhat evil check, but hey.. */
ret = g_error_new_literal (BVW_ERROR,
- ERROR_VIDEO_PLUGIN,
+ GST_ERROR_VIDEO_PLUGIN,
_
("The video output is in use by another application. "
"Please close other video applications, or select "
@@ -2899,7 +2899,7 @@ bvw_error_from_gst_error (BaconVideoWidget * bvw, GstMessage * err_msg)
else if (GST_IS_BASE_AUDIO_SINK (err_msg->src))
{
ret = g_error_new_literal (BVW_ERROR,
- ERROR_AUDIO_BUSY,
+ GST_ERROR_AUDIO_BUSY,
_
("The audio output is in use by another application. "
"Please select another audio output in the Multimedia Systems Selector. "
@@ -2908,7 +2908,7 @@ bvw_error_from_gst_error (BaconVideoWidget * bvw, GstMessage * err_msg)
}
else if (e->domain == GST_RESOURCE_ERROR)
{
- ret = g_error_new_literal (BVW_ERROR, ERROR_FILE_GENERIC,
+ ret = g_error_new_literal (BVW_ERROR, GST_ERROR_FILE_GENERIC,
e->message);
}
else if (is_error (e, CORE, MISSING_PLUGIN) ||
@@ -2946,14 +2946,14 @@ bvw_error_from_gst_error (BaconVideoWidget * bvw, GstMessage * err_msg)
g_free (desc_list);
}
ret =
- g_error_new_literal (BVW_ERROR, ERROR_CODEC_NOT_HANDLED, msg);
+ g_error_new_literal (BVW_ERROR, GST_ERROR_CODEC_NOT_HANDLED, msg);
g_free (msg);
g_strfreev (descs);
}
else
{
GST_LOG ("no missing plugin messages, posting generic error");
- ret = g_error_new_literal (BVW_ERROR, ERROR_CODEC_NOT_HANDLED,
+ ret = g_error_new_literal (BVW_ERROR, GST_ERROR_CODEC_NOT_HANDLED,
e->message);
}
}
@@ -2962,26 +2962,26 @@ bvw_error_from_gst_error (BaconVideoWidget * bvw, GstMessage * err_msg)
{
if (src_typename)
{
- ret = g_error_new (BVW_ERROR, ERROR_CODEC_NOT_HANDLED, "%s: %s",
+ ret = g_error_new (BVW_ERROR, GST_ERROR_CODEC_NOT_HANDLED, "%s: %s",
src_typename, e->message);
}
else
{
- ret = g_error_new_literal (BVW_ERROR, ERROR_CODEC_NOT_HANDLED,
+ ret = g_error_new_literal (BVW_ERROR, GST_ERROR_CODEC_NOT_HANDLED,
e->message);
}
}
else if (is_error (e, STREAM, FAILED) &&
src_typename && strncmp (src_typename, "GstTypeFind", 11) == 0)
{
- ret = g_error_new_literal (BVW_ERROR, ERROR_READ_ERROR,
+ ret = g_error_new_literal (BVW_ERROR, GST_ERROR_READ_ERROR,
_("Cannot play this file over the network. "
"Try downloading it to disk first."));
}
else
{
/* generic error, no code; take message */
- ret = g_error_new_literal (BVW_ERROR, ERROR_GENERIC, e->message);
+ ret = g_error_new_literal (BVW_ERROR, GST_ERROR_GENERIC, e->message);
}
g_error_free (e);
bvw_clear_missing_plugins_messages (bvw);
@@ -3060,7 +3060,7 @@ poll_for_state_change_full (BaconVideoWidget * bvw, GstElement * element,
GError *e = NULL;
gst_message_unref (message);
- e = g_error_new_literal (BVW_ERROR, ERROR_FILE_GENERIC,
+ e = g_error_new_literal (BVW_ERROR, GST_ERROR_FILE_GENERIC,
_("Media file could not be played."));
*err_msg =
gst_message_new_error (GST_OBJECT (bvw->priv->play), e, NULL);
@@ -3222,7 +3222,7 @@ bacon_video_widget_open (BaconVideoWidget * bvw,
gchar *cur_dir = g_get_current_dir ();
if (!cur_dir)
{
- g_set_error_literal (error, BVW_ERROR, ERROR_GENERIC,
+ g_set_error_literal (error, BVW_ERROR, GST_ERROR_GENERIC,
_
("Failed to retrieve working directory"));
return FALSE;
@@ -5529,7 +5529,7 @@ bacon_video_widget_can_get_frames (BaconVideoWidget * bvw, GError ** error)
if (!g_object_class_find_property
(G_OBJECT_GET_CLASS (bvw->priv->play), "frame"))
{
- g_set_error_literal (error, BVW_ERROR, ERROR_GENERIC,
+ g_set_error_literal (error, BVW_ERROR, GST_ERROR_GENERIC,
_("Too old version of GStreamer installed."));
return FALSE;
}
@@ -5537,7 +5537,7 @@ bacon_video_widget_can_get_frames (BaconVideoWidget * bvw, GError ** error)
/* check for video */
if (!bvw->priv->media_has_video)
{
- g_set_error_literal (error, BVW_ERROR, ERROR_GENERIC,
+ g_set_error_literal (error, BVW_ERROR, GST_ERROR_GENERIC,
_("Media contains no supported video streams."));
return FALSE;
}
@@ -6003,7 +6003,7 @@ bacon_video_widget_new (int width, int height, BvwUseType type, GError ** err)
if (!bvw->priv->play)
{
- g_set_error (err, BVW_ERROR, ERROR_PLUGIN_LOAD,
+ g_set_error (err, BVW_ERROR, GST_ERROR_PLUGIN_LOAD,
_("Failed to create a GStreamer play object. "
"Please check your GStreamer installation."));
g_object_ref_sink (bvw);
@@ -6091,7 +6091,7 @@ bacon_video_widget_new (int width, int height, BvwUseType type, GError ** err)
{
g_warning
("Should have gotten an error message, please file a bug.");
- g_set_error (err, BVW_ERROR, ERROR_VIDEO_PLUGIN,
+ g_set_error (err, BVW_ERROR, GST_ERROR_VIDEO_PLUGIN,
_
("Failed to open video output. It may not be available. "
"Please select another video output in the Multimedia "
@@ -6108,7 +6108,7 @@ bacon_video_widget_new (int width, int height, BvwUseType type, GError ** err)
}
else
{
- g_set_error (err, BVW_ERROR, ERROR_VIDEO_PLUGIN,
+ g_set_error (err, BVW_ERROR, GST_ERROR_VIDEO_PLUGIN,
_("Could not find the video output. "
"You may need to install additional GStreamer plugins, "
"or select another video output in the Multimedia Systems "
@@ -6148,7 +6148,7 @@ bacon_video_widget_new (int width, int height, BvwUseType type, GError ** err)
{
g_warning
("Should have gotten an error message, please file a bug.");
- g_set_error (err, BVW_ERROR, ERROR_AUDIO_PLUGIN,
+ g_set_error (err, BVW_ERROR, GST_ERROR_AUDIO_PLUGIN,
_
("Failed to open audio output. You may not have "
"permission to open the sound device, or the sound "
@@ -6173,7 +6173,7 @@ bacon_video_widget_new (int width, int height, BvwUseType type, GError ** err)
}
else
{
- g_set_error (err, BVW_ERROR, ERROR_AUDIO_PLUGIN,
+ g_set_error (err, BVW_ERROR, GST_ERROR_AUDIO_PLUGIN,
_("Could not find the audio output. "
"You may need to install additional GStreamer plugins, or "
"select another audio output in the Multimedia Systems "
@@ -6234,7 +6234,7 @@ bacon_video_widget_new (int width, int height, BvwUseType type, GError ** err)
if (ret != GST_STATE_CHANGE_SUCCESS)
{
GST_WARNING ("Timeout setting videosink to READY");
- g_set_error (err, BVW_ERROR, ERROR_VIDEO_PLUGIN,
+ g_set_error (err, BVW_ERROR, GST_ERROR_VIDEO_PLUGIN,
_
("Failed to open video output. It may not be available. "
"Please select another video output in the Multimedia Systems Selector."));
diff --git a/libcesarplayer/src/common.h b/libcesarplayer/src/common.h
index ee446ad..cb3ed97 100644
--- a/libcesarplayer/src/common.h
+++ b/libcesarplayer/src/common.h
@@ -20,61 +20,61 @@
/**
* Error:
- * @ERROR_AUDIO_PLUGIN: Error loading audio output plugin or device.
- * @ERROR_NO_PLUGIN_FOR_FILE: A required GStreamer plugin or xine feature is missing.
- * @ERROR_VIDEO_PLUGIN: Error loading video output plugin or device.
- * @ERROR_AUDIO_BUSY: Audio output device is busy.
- * @ERROR_BROKEN_FILE: The movie file is broken and cannot be decoded.
- * @ERROR_FILE_GENERIC: A generic error for problems with movie files.
- * @ERROR_FILE_PERMISSION: Permission was refused to access the stream, or authentication was required.
- * @ERROR_FILE_ENCRYPTED: The stream is encrypted and cannot be played.
- * @ERROR_FILE_NOT_FOUND: The stream cannot be found.
- * @ERROR_DVD_ENCRYPTED: The DVD is encrypted and libdvdcss is not installed.
- * @ERROR_INVALID_DEVICE: The device given in an MRL (e.g. DVD drive or DVB tuner) did not exist.
- * @ERROR_DEVICE_BUSY: The device was busy.
- * @ERROR_UNKNOWN_HOST: The host for a given stream could not be resolved.
- * @ERROR_NETWORK_UNREACHABLE: The host for a given stream could not be reached.
- * @ERROR_CONNECTION_REFUSED: The server for a given stream refused the connection.
- * @ERROR_INVALID_LOCATION: An MRL was malformed, or CDDB playback was attempted (which is now unsupported).
- * @ERROR_GENERIC: A generic error occurred.
- * @ERROR_CODEC_NOT_HANDLED: The audio or video codec required by the stream is not supported.
- * @ERROR_AUDIO_ONLY: An audio-only stream could not be played due to missing audio output support.
- * @ERROR_CANNOT_CAPTURE: Error determining frame capture support for a video with bacon_video_widget_can_get_frames().
- * @ERROR_READ_ERROR: A generic error for problems reading streams.
- * @ERROR_PLUGIN_LOAD: A library or plugin could not be loaded.
- * @ERROR_EMPTY_FILE: A movie file was empty.
+ * @GST_ERROR_AUDIO_PLUGIN: Error loading audio output plugin or device.
+ * @GST_ERROR_NO_PLUGIN_FOR_FILE: A required GStreamer plugin or xine feature is missing.
+ * @GST_ERROR_VIDEO_PLUGIN: Error loading video output plugin or device.
+ * @GST_ERROR_AUDIO_BUSY: Audio output device is busy.
+ * @GST_ERROR_BROKEN_FILE: The movie file is broken and cannot be decoded.
+ * @GST_ERROR_FILE_GENERIC: A generic error for problems with movie files.
+ * @GST_ERROR_FILE_PERMISSION: Permission was refused to access the stream, or authentication was required.
+ * @GST_ERROR_FILE_ENCRYPTED: The stream is encrypted and cannot be played.
+ * @GST_ERROR_FILE_NOT_FOUND: The stream cannot be found.
+ * @GST_ERROR_DVD_ENCRYPTED: The DVD is encrypted and libdvdcss is not installed.
+ * @GST_ERROR_INVALID_DEVICE: The device given in an MRL (e.g. DVD drive or DVB tuner) did not exist.
+ * @GST_ERROR_DEVICE_BUSY: The device was busy.
+ * @GST_ERROR_UNKNOWN_HOST: The host for a given stream could not be resolved.
+ * @GST_ERROR_NETWORK_UNREACHABLE: The host for a given stream could not be reached.
+ * @GST_ERROR_CONNECTION_REFUSED: The server for a given stream refused the connection.
+ * @GST_ERROR_INVALID_LOCATION: An MRL was malformed, or CDDB playback was attempted (which is now unsupported).
+ * @GST_ERROR_GENERIC: A generic error occurred.
+ * @GST_ERROR_CODEC_NOT_HANDLED: The audio or video codec required by the stream is not supported.
+ * @GST_ERROR_AUDIO_ONLY: An audio-only stream could not be played due to missing audio output support.
+ * @GST_ERROR_CANNOT_CAPTURE: Error determining frame capture support for a video with bacon_video_widget_can_get_frames().
+ * @GST_ERROR_READ_ERROR: A generic error for problems reading streams.
+ * @GST_ERROR_PLUGIN_LOAD: A library or plugin could not be loaded.
+ * @GST_ERROR_EMPTY_FILE: A movie file was empty.
*
**/
typedef enum
{
/* Plugins */
- ERROR_AUDIO_PLUGIN,
- ERROR_NO_PLUGIN_FOR_FILE,
- ERROR_VIDEO_PLUGIN,
- ERROR_AUDIO_BUSY,
+ GST_ERROR_AUDIO_PLUGIN,
+ GST_ERROR_NO_PLUGIN_FOR_FILE,
+ GST_ERROR_VIDEO_PLUGIN,
+ GST_ERROR_AUDIO_BUSY,
/* File */
- ERROR_BROKEN_FILE,
- ERROR_FILE_GENERIC,
- ERROR_FILE_PERMISSION,
- ERROR_FILE_ENCRYPTED,
- ERROR_FILE_NOT_FOUND,
+ GST_ERROR_BROKEN_FILE,
+ GST_ERROR_FILE_GENERIC,
+ GST_ERROR_FILE_PERMISSION,
+ GST_ERROR_FILE_ENCRYPTED,
+ GST_ERROR_FILE_NOT_FOUND,
/* Devices */
- ERROR_DVD_ENCRYPTED,
- ERROR_INVALID_DEVICE,
- ERROR_DEVICE_BUSY,
+ GST_ERROR_DVD_ENCRYPTED,
+ GST_ERROR_INVALID_DEVICE,
+ GST_ERROR_DEVICE_BUSY,
/* Network */
- ERROR_UNKNOWN_HOST,
- ERROR_NETWORK_UNREACHABLE,
- ERROR_CONNECTION_REFUSED,
+ GST_ERROR_UNKNOWN_HOST,
+ GST_ERROR_NETWORK_UNREACHABLE,
+ GST_ERROR_CONNECTION_REFUSED,
/* Generic */
- ERROR_INVALID_LOCATION,
- ERROR_GENERIC,
- ERROR_CODEC_NOT_HANDLED,
- ERROR_AUDIO_ONLY,
- ERROR_CANNOT_CAPTURE,
- ERROR_READ_ERROR,
- ERROR_PLUGIN_LOAD,
- ERROR_EMPTY_FILE
+ GST_ERROR_INVALID_LOCATION,
+ GST_ERROR_GENERIC,
+ GST_ERROR_CODEC_NOT_HANDLED,
+ GST_ERROR_AUDIO_ONLY,
+ GST_ERROR_CANNOT_CAPTURE,
+ GST_ERROR_READ_ERROR,
+ GST_ERROR_PLUGIN_LOAD,
+ GST_ERROR_EMPTY_FILE
} Error;
diff --git a/libcesarplayer/src/gst-camera-capturer.c b/libcesarplayer/src/gst-camera-capturer.c
index c4a65b8..0795203 100644
--- a/libcesarplayer/src/gst-camera-capturer.c
+++ b/libcesarplayer/src/gst-camera-capturer.c
@@ -965,7 +965,7 @@ gst_camera_capturer_new (gchar * filename, GError ** err)
/* Missing plugin */
missing_plugin:
{
- g_set_error (err, GCC_ERROR, ERROR_PLUGIN_LOAD,
+ g_set_error (err, GCC_ERROR, GST_ERROR_PLUGIN_LOAD,
("Failed to create a GStreamer element. "
"The element \"%s\" is missing. "
"Please check your GStreamer installation."), plugin);
@@ -1054,7 +1054,7 @@ gst_camera_capturer_set_video_encoder (GstCameraCapturer * gcc,
if (!gcc->priv->videoenc) {
g_set_error (err,
GCC_ERROR,
- ERROR_PLUGIN_LOAD,
+ GST_ERROR_PLUGIN_LOAD,
"Failed to create the %s element. "
"Please check your GStreamer installation.", name);
} else {
@@ -1094,7 +1094,7 @@ gst_camera_capturer_set_audio_encoder (GstCameraCapturer * gcc,
if (!gcc->priv->audioenc) {
g_set_error (err,
GCC_ERROR,
- ERROR_PLUGIN_LOAD,
+ GST_ERROR_PLUGIN_LOAD,
"Failed to create the %s element. "
"Please check your GStreamer installation.", name);
} else {
@@ -1141,7 +1141,7 @@ gst_camera_capturer_set_video_muxer (GstCameraCapturer * gcc,
if (!gcc->priv->videomux) {
g_set_error (err,
GCC_ERROR,
- ERROR_PLUGIN_LOAD,
+ GST_ERROR_PLUGIN_LOAD,
"Failed to create the %s element. "
"Please check your GStreamer installation.", name);
} else {
@@ -1364,7 +1364,7 @@ gst_camera_capturer_can_get_frames (GstCameraCapturer * gcc, GError ** error)
/* check for video */
if (!gcc->priv->media_has_video) {
- g_set_error_literal (error, GCC_ERROR, ERROR_GENERIC,
+ g_set_error_literal (error, GCC_ERROR, GST_ERROR_GENERIC,
"Media contains no supported video streams.");
return FALSE;
}
diff --git a/libcesarplayer/src/gst-video-editor.c b/libcesarplayer/src/gst-video-editor.c
index 7737258..2492592 100644
--- a/libcesarplayer/src/gst-video-editor.c
+++ b/libcesarplayer/src/gst-video-editor.c
@@ -1363,7 +1363,7 @@ gst_video_editor_new (GError ** err)
if (!gve->priv->main_pipeline)
{
- g_set_error (err, GVC_ERROR, ERROR_PLUGIN_LOAD,
+ g_set_error (err, GVC_ERROR, GST_ERROR_PLUGIN_LOAD,
("Failed to create a GStreamer Bin. "
"Please check your GStreamer installation."));
g_object_ref_sink (gve);
@@ -1379,7 +1379,7 @@ gst_video_editor_new (GError ** err)
gst_element_factory_make ("gnlcomposition", "gnl-audio-composition");
if (!gve->priv->gnl_video_composition || !gve->priv->gnl_audio_composition)
{
- g_set_error (err, GVC_ERROR, ERROR_PLUGIN_LOAD,
+ g_set_error (err, GVC_ERROR, GST_ERROR_PLUGIN_LOAD,
("Failed to create a Gnonlin element. "
"Please check your GStreamer installation."));
g_object_ref_sink (gve);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]