mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-09 07:52:36 +00:00
gst-libs/gst/rtsp/gstrtspdefs.c: Use WSAGetLastError() rather than errno/h_errno on win32.
Original commit message from CVS: * gst-libs/gst/rtsp/gstrtspdefs.c: Use WSAGetLastError() rather than errno/h_errno on win32.
This commit is contained in:
parent
eabff64640
commit
4f04294e45
2 changed files with 15 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-11-20 Michael Smith <msmith@songbirdnest.com>
|
||||||
|
|
||||||
|
* gst-libs/gst/rtsp/gstrtspdefs.c:
|
||||||
|
Use WSAGetLastError() rather than errno/h_errno on win32.
|
||||||
|
|
||||||
2008-11-20 Michael Smith <msmith@songbirdnest.com>
|
2008-11-20 Michael Smith <msmith@songbirdnest.com>
|
||||||
|
|
||||||
* gst-libs/gst/riff/riff-media.c:
|
* gst-libs/gst/riff/riff-media.c:
|
||||||
|
|
|
@ -60,7 +60,9 @@ extern int h_errno;
|
||||||
|
|
||||||
#include "gstrtspdefs.h"
|
#include "gstrtspdefs.h"
|
||||||
|
|
||||||
#ifndef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -243,16 +245,18 @@ gst_rtsp_strresult (GstRTSPResult result)
|
||||||
idx = CLAMP (idx, 0, -GST_RTSP_ELAST);
|
idx = CLAMP (idx, 0, -GST_RTSP_ELAST);
|
||||||
|
|
||||||
switch (idx) {
|
switch (idx) {
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
case -GST_RTSP_ESYS:
|
||||||
|
case -GST_RTSP_ENET:
|
||||||
|
gchar * msg = g_win32_error_message (WSAGetLastError ());
|
||||||
|
res = g_strdup_printf (rtsp_results[idx], msg);
|
||||||
|
g_free (msg);
|
||||||
|
#else
|
||||||
case -GST_RTSP_ESYS:
|
case -GST_RTSP_ESYS:
|
||||||
res = g_strdup_printf (rtsp_results[idx], g_strerror (errno));
|
res = g_strdup_printf (rtsp_results[idx], g_strerror (errno));
|
||||||
break;
|
break;
|
||||||
case -GST_RTSP_ENET:
|
case -GST_RTSP_ENET:
|
||||||
#ifndef G_OS_WIN32
|
|
||||||
res = g_strdup_printf (rtsp_results[idx], hstrerror (h_errno));
|
res = g_strdup_printf (rtsp_results[idx], hstrerror (h_errno));
|
||||||
#else
|
|
||||||
res =
|
|
||||||
g_strdup
|
|
||||||
("not supported on win32, implement me in a different way ??");
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case -GST_RTSP_ELAST:
|
case -GST_RTSP_ELAST:
|
||||||
|
|
Loading…
Reference in a new issue