mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-27 14:31:01 +00:00
gst\elements\gstfdsink.c gst\elements\gstfdsrc.c gst\elements\gstfilesrc.c gst\elements\gstpipefilter.c gst\elements\...
Original commit message from CVS: * gst\elements\gstfdsink.c * gst\elements\gstfdsrc.c * gst\elements\gstfilesrc.c * gst\elements\gstpipefilter.c * gst\elements\gstpipefilter.h * gst\gstinfo.h * win32\config.h * win32\gstenumtypes.c * win32\gstenumtypes.h compilation fixes for MSVC
This commit is contained in:
parent
c17a476bc8
commit
6520cc20be
14 changed files with 155 additions and 92 deletions
|
@ -28,6 +28,9 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
#ifdef HAVE_MMAP
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,13 @@
|
|||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -289,17 +295,26 @@ gst_pipefilter_open_file (GstPipefilter * src)
|
|||
pipe (src->fdin);
|
||||
pipe (src->fdout);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
src->childpid = 0;
|
||||
#else
|
||||
if ((src->childpid = fork ()) == -1) {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), GST_ERROR_SYSTEM);
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (src->childpid == 0) {
|
||||
close (src->fdin[1]);
|
||||
close (src->fdout[0]);
|
||||
/* child */
|
||||
#ifdef _MSC_VER
|
||||
dup2 (src->fdin[0], fileno (stdin)); /* set the childs input stream */
|
||||
dup2 (src->fdout[1], fileno (stdout)); /* set the childs output stream */
|
||||
#else
|
||||
dup2 (src->fdin[0], STDIN_FILENO); /* set the childs input stream */
|
||||
dup2 (src->fdout[1], STDOUT_FILENO); /* set the childs output stream */
|
||||
#endif
|
||||
execvp (src->command[0], &src->command[0]);
|
||||
/* will only be reached if execvp has an error */
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), GST_ERROR_SYSTEM);
|
||||
|
|
|
@ -62,7 +62,11 @@ struct _GstPipefilter {
|
|||
/* fd */
|
||||
gint fdout[2];
|
||||
gint fdin[2];
|
||||
#ifdef _MSC_VER
|
||||
int childpid;
|
||||
#else
|
||||
pid_t childpid;
|
||||
#endif
|
||||
|
||||
gulong curoffset; /* current offset in file */
|
||||
gulong bytes_per_read; /* bytes per read */
|
||||
|
|
|
@ -629,7 +629,11 @@ guint gst_debug_remove_log_function_by_data (gpointer data);
|
|||
#define gst_debug_unset_threshold_for_name(name) /* NOP */
|
||||
|
||||
#define GST_DEBUG_CATEGORY(var) /* NOP */
|
||||
#if defined(G_HAVE_ISO_VARARGS)
|
||||
#define GST_DEBUG_CATEGORY_EXTERN(var) /* NOP */
|
||||
#else
|
||||
#define GST_DEBUG_CATEGORY_EXTERN(cat) extern GstDebugCategory *cat
|
||||
#endif
|
||||
#if !defined(G_HAVE_GNUC_VARARGS) && !defined(G_HAVE_ISO_VARARGS)
|
||||
#define GST_DEBUG_CATEGORY_STATIC(var) static GstDebugCategory *var = NULL
|
||||
#else
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
#ifdef HAVE_MMAP
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,13 @@
|
|||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -289,17 +295,26 @@ gst_pipefilter_open_file (GstPipefilter * src)
|
|||
pipe (src->fdin);
|
||||
pipe (src->fdout);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
src->childpid = 0;
|
||||
#else
|
||||
if ((src->childpid = fork ()) == -1) {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), GST_ERROR_SYSTEM);
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (src->childpid == 0) {
|
||||
close (src->fdin[1]);
|
||||
close (src->fdout[0]);
|
||||
/* child */
|
||||
#ifdef _MSC_VER
|
||||
dup2 (src->fdin[0], fileno (stdin)); /* set the childs input stream */
|
||||
dup2 (src->fdout[1], fileno (stdout)); /* set the childs output stream */
|
||||
#else
|
||||
dup2 (src->fdin[0], STDIN_FILENO); /* set the childs input stream */
|
||||
dup2 (src->fdout[1], STDOUT_FILENO); /* set the childs output stream */
|
||||
#endif
|
||||
execvp (src->command[0], &src->command[0]);
|
||||
/* will only be reached if execvp has an error */
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL), GST_ERROR_SYSTEM);
|
||||
|
|
|
@ -62,7 +62,11 @@ struct _GstPipefilter {
|
|||
/* fd */
|
||||
gint fdout[2];
|
||||
gint fdin[2];
|
||||
#ifdef _MSC_VER
|
||||
int childpid;
|
||||
#else
|
||||
pid_t childpid;
|
||||
#endif
|
||||
|
||||
gulong curoffset; /* current offset in file */
|
||||
gulong bytes_per_read; /* bytes per read */
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#define GST_PACKAGE "GStreamer"
|
||||
|
||||
/* Define the version */
|
||||
#define GST_VERSION "0.8.5"
|
||||
#define GST_VERSION "0.8.11"
|
||||
|
||||
/* Define the release version */
|
||||
#define GST_VERSION_RELEASE "20040129_103536"
|
||||
|
@ -190,7 +190,7 @@
|
|||
#undef USE_POISONING
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.8.5.0"
|
||||
#define VERSION "0.8.11.0"
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
|
@ -198,3 +198,7 @@
|
|||
|
||||
#define GST_MAJORMINOR "0.8"
|
||||
|
||||
#define LIBDIR PLUGINS_DIR
|
||||
|
||||
#define HAVE_FFMPEG_UNINSTALLED
|
||||
#define HAVE_AV_CONFIG_H
|
||||
|
|
|
@ -38,6 +38,7 @@ gst_bin_flags_get_type (void)
|
|||
"flag-prefer-cothreads"},
|
||||
{GST_BIN_FLAG_FIXED_CLOCK, "GST_BIN_FLAG_FIXED_CLOCK",
|
||||
"flag-fixed-clock"},
|
||||
{GST_BIN_STATE_LOCKED, "GST_BIN_STATE_LOCKED", "state-locked"},
|
||||
{GST_BIN_FLAG_LAST, "GST_BIN_FLAG_LAST", "flag-last"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
@ -214,6 +215,7 @@ gst_element_flags_get_type (void)
|
|||
"scheduler-private2"},
|
||||
{GST_ELEMENT_LOCKED_STATE, "GST_ELEMENT_LOCKED_STATE", "locked-state"},
|
||||
{GST_ELEMENT_IN_ERROR, "GST_ELEMENT_IN_ERROR", "in-error"},
|
||||
{GST_ELEMENT_WORK_IN_PLACE, "GST_ELEMENT_WORK_IN_PLACE", "work-in-place"},
|
||||
{GST_ELEMENT_FLAG_LAST, "GST_ELEMENT_FLAG_LAST", "flag-last"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
@ -425,6 +427,23 @@ gst_seek_accuracy_get_type (void)
|
|||
return etype;
|
||||
}
|
||||
|
||||
GType
|
||||
gst_event_common_flag_get_type (void)
|
||||
{
|
||||
static GType etype = 0;
|
||||
|
||||
if (etype == 0) {
|
||||
static const GEnumValue values[] = {
|
||||
{GST_EVENT_COMMON_FLAG_NEED_RESPONSE,
|
||||
"GST_EVENT_COMMON_FLAG_NEED_RESPONSE", "need-response"},
|
||||
{GST_EVENT_COMMON_FLAG_LAST, "GST_EVENT_COMMON_FLAG_LAST", "last"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
etype = g_enum_register_static ("GstEventCommonFlag", values);
|
||||
}
|
||||
return etype;
|
||||
}
|
||||
|
||||
|
||||
/* enumerations from "gstformat.h" */
|
||||
GType
|
||||
|
@ -666,6 +685,23 @@ gst_pad_flags_get_type (void)
|
|||
return etype;
|
||||
}
|
||||
|
||||
GType
|
||||
gst_real_pad_flags_get_type (void)
|
||||
{
|
||||
static GType etype = 0;
|
||||
|
||||
if (etype == 0) {
|
||||
static const GEnumValue values[] = {
|
||||
{GST_RPAD_IN_GETFUNC, "GST_RPAD_IN_GETFUNC", "in-getfunc"},
|
||||
{GST_RPAD_IN_CHAINFUNC, "GST_RPAD_IN_CHAINFUNC", "in-chainfunc"},
|
||||
{GST_RPAD_FLAG_LAST, "GST_RPAD_FLAG_LAST", "flag-last"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
etype = g_enum_register_static ("GstRealPadFlags", values);
|
||||
}
|
||||
return etype;
|
||||
}
|
||||
|
||||
GType
|
||||
gst_pad_presence_get_type (void)
|
||||
{
|
||||
|
|
|
@ -7,248 +7,211 @@
|
|||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* enumerations from "gstobject.h" */
|
||||
GType gst_object_flags_get_type (void);
|
||||
|
||||
GType gst_object_flags_get_type (void);
|
||||
#define GST_TYPE_OBJECT_FLAGS (gst_object_flags_get_type())
|
||||
|
||||
/* enumerations from "gstbin.h" */
|
||||
|
||||
GType gst_bin_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_BIN_FLAGS (gst_bin_flags_get_type())
|
||||
|
||||
/* enumerations from "gstbuffer.h" */
|
||||
|
||||
GType gst_buffer_flag_get_type (void);
|
||||
|
||||
#define GST_TYPE_BUFFER_FLAG (gst_buffer_flag_get_type())
|
||||
|
||||
/* enumerations from "gstclock.h" */
|
||||
|
||||
GType gst_clock_entry_status_get_type (void);
|
||||
|
||||
#define GST_TYPE_CLOCK_ENTRY_STATUS (gst_clock_entry_status_get_type())
|
||||
|
||||
GType gst_clock_entry_type_get_type (void);
|
||||
|
||||
#define GST_TYPE_CLOCK_ENTRY_TYPE (gst_clock_entry_type_get_type())
|
||||
|
||||
GType gst_clock_return_get_type (void);
|
||||
|
||||
#define GST_TYPE_CLOCK_RETURN (gst_clock_return_get_type())
|
||||
|
||||
GType gst_clock_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_CLOCK_FLAGS (gst_clock_flags_get_type())
|
||||
|
||||
/* enumerations from "gstcpu.h" */
|
||||
|
||||
GType gst_cpu_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_CPU_FLAGS (gst_cpu_flags_get_type())
|
||||
|
||||
/* enumerations from "gstdata.h" */
|
||||
|
||||
GType gst_data_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_DATA_FLAGS (gst_data_flags_get_type())
|
||||
|
||||
/* enumerations from "gstelement.h" */
|
||||
|
||||
GType gst_element_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_ELEMENT_FLAGS (gst_element_flags_get_type())
|
||||
|
||||
/* enumerations from "gsterror.h" */
|
||||
|
||||
GType gst_core_error_get_type (void);
|
||||
|
||||
#define GST_TYPE_CORE_ERROR (gst_core_error_get_type())
|
||||
|
||||
GType gst_library_error_get_type (void);
|
||||
|
||||
#define GST_TYPE_LIBRARY_ERROR (gst_library_error_get_type())
|
||||
|
||||
GType gst_resource_error_get_type (void);
|
||||
|
||||
#define GST_TYPE_RESOURCE_ERROR (gst_resource_error_get_type())
|
||||
|
||||
GType gst_stream_error_get_type (void);
|
||||
|
||||
#define GST_TYPE_STREAM_ERROR (gst_stream_error_get_type())
|
||||
|
||||
/* enumerations from "gstevent.h" */
|
||||
|
||||
GType gst_event_type_get_type (void);
|
||||
|
||||
#define GST_TYPE_EVENT_TYPE (gst_event_type_get_type())
|
||||
|
||||
GType gst_event_flag_get_type (void);
|
||||
|
||||
#define GST_TYPE_EVENT_FLAG (gst_event_flag_get_type())
|
||||
|
||||
GType gst_seek_type_get_type (void);
|
||||
|
||||
#define GST_TYPE_SEEK_TYPE (gst_seek_type_get_type())
|
||||
|
||||
GType gst_seek_accuracy_get_type (void);
|
||||
|
||||
#define GST_TYPE_SEEK_ACCURACY (gst_seek_accuracy_get_type())
|
||||
|
||||
GType gst_event_common_flag_get_type (void);
|
||||
#define GST_TYPE_EVENT_COMMON_FLAG (gst_event_common_flag_get_type())
|
||||
|
||||
/* enumerations from "gstformat.h" */
|
||||
|
||||
GType gst_format_get_type (void);
|
||||
|
||||
#define GST_TYPE_FORMAT (gst_format_get_type())
|
||||
|
||||
/* enumerations from "gstindex.h" */
|
||||
|
||||
GType gst_index_certainty_get_type (void);
|
||||
|
||||
#define GST_TYPE_INDEX_CERTAINTY (gst_index_certainty_get_type())
|
||||
|
||||
GType gst_index_entry_type_get_type (void);
|
||||
|
||||
#define GST_TYPE_INDEX_ENTRY_TYPE (gst_index_entry_type_get_type())
|
||||
|
||||
GType gst_index_lookup_method_get_type (void);
|
||||
|
||||
#define GST_TYPE_INDEX_LOOKUP_METHOD (gst_index_lookup_method_get_type())
|
||||
|
||||
GType gst_assoc_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_ASSOC_FLAGS (gst_assoc_flags_get_type())
|
||||
|
||||
GType gst_index_resolver_method_get_type (void);
|
||||
|
||||
#define GST_TYPE_INDEX_RESOLVER_METHOD (gst_index_resolver_method_get_type())
|
||||
|
||||
GType gst_index_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_INDEX_FLAGS (gst_index_flags_get_type())
|
||||
|
||||
/* enumerations from "gstinfo.h" */
|
||||
|
||||
GType gst_debug_level_get_type (void);
|
||||
|
||||
#define GST_TYPE_DEBUG_LEVEL (gst_debug_level_get_type())
|
||||
|
||||
GType gst_debug_color_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_DEBUG_COLOR_FLAGS (gst_debug_color_flags_get_type())
|
||||
|
||||
/* enumerations from "gstpad.h" */
|
||||
|
||||
GType gst_pad_link_return_get_type (void);
|
||||
|
||||
#define GST_TYPE_PAD_LINK_RETURN (gst_pad_link_return_get_type())
|
||||
|
||||
GType gst_pad_direction_get_type (void);
|
||||
|
||||
#define GST_TYPE_PAD_DIRECTION (gst_pad_direction_get_type())
|
||||
|
||||
GType gst_pad_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_PAD_FLAGS (gst_pad_flags_get_type())
|
||||
|
||||
GType gst_pad_presence_get_type (void);
|
||||
GType gst_real_pad_flags_get_type (void);
|
||||
#define GST_TYPE_REAL_PAD_FLAGS (gst_real_pad_flags_get_type())
|
||||
|
||||
GType gst_pad_presence_get_type (void);
|
||||
#define GST_TYPE_PAD_PRESENCE (gst_pad_presence_get_type())
|
||||
|
||||
GType gst_pad_template_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_PAD_TEMPLATE_FLAGS (gst_pad_template_flags_get_type())
|
||||
|
||||
/* enumerations from "gstplugin.h" */
|
||||
|
||||
GType gst_plugin_error_get_type (void);
|
||||
|
||||
#define GST_TYPE_PLUGIN_ERROR (gst_plugin_error_get_type())
|
||||
|
||||
/* enumerations from "gstquery.h" */
|
||||
|
||||
GType gst_query_type_get_type (void);
|
||||
|
||||
#define GST_TYPE_QUERY_TYPE (gst_query_type_get_type())
|
||||
|
||||
/* enumerations from "gstscheduler.h" */
|
||||
|
||||
GType gst_scheduler_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_SCHEDULER_FLAGS (gst_scheduler_flags_get_type())
|
||||
|
||||
GType gst_scheduler_state_get_type (void);
|
||||
|
||||
#define GST_TYPE_SCHEDULER_STATE (gst_scheduler_state_get_type())
|
||||
|
||||
/* enumerations from "gsttag.h" */
|
||||
|
||||
GType gst_tag_merge_mode_get_type (void);
|
||||
|
||||
#define GST_TYPE_TAG_MERGE_MODE (gst_tag_merge_mode_get_type())
|
||||
|
||||
GType gst_tag_flag_get_type (void);
|
||||
|
||||
#define GST_TYPE_TAG_FLAG (gst_tag_flag_get_type())
|
||||
|
||||
/* enumerations from "gstthread.h" */
|
||||
|
||||
GType gst_thread_state_get_type (void);
|
||||
|
||||
#define GST_TYPE_THREAD_STATE (gst_thread_state_get_type())
|
||||
|
||||
/* enumerations from "gsttrace.h" */
|
||||
|
||||
GType gst_alloc_trace_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_ALLOC_TRACE_FLAGS (gst_alloc_trace_flags_get_type())
|
||||
|
||||
/* enumerations from "gsttypefind.h" */
|
||||
|
||||
GType gst_type_find_probability_get_type (void);
|
||||
|
||||
#define GST_TYPE_TYPE_FIND_PROBABILITY (gst_type_find_probability_get_type())
|
||||
|
||||
/* enumerations from "gsttypes.h" */
|
||||
|
||||
GType gst_element_state_get_type (void);
|
||||
|
||||
#define GST_TYPE_ELEMENT_STATE (gst_element_state_get_type())
|
||||
|
||||
GType gst_element_state_return_get_type (void);
|
||||
|
||||
#define GST_TYPE_ELEMENT_STATE_RETURN (gst_element_state_return_get_type())
|
||||
|
||||
GType gst_result_get_type (void);
|
||||
|
||||
#define GST_TYPE_RESULT (gst_result_get_type())
|
||||
|
||||
GType gst_rank_get_type (void);
|
||||
|
||||
#define GST_TYPE_RANK (gst_rank_get_type())
|
||||
|
||||
/* enumerations from "gsturi.h" */
|
||||
|
||||
GType gst_uri_type_get_type (void);
|
||||
|
||||
#define GST_TYPE_URI_TYPE (gst_uri_type_get_type())
|
||||
|
||||
/* enumerations from "gstregistry.h" */
|
||||
|
||||
GType gst_registry_return_get_type (void);
|
||||
|
||||
#define GST_TYPE_REGISTRY_RETURN (gst_registry_return_get_type())
|
||||
|
||||
GType gst_registry_flags_get_type (void);
|
||||
|
||||
#define GST_TYPE_REGISTRY_FLAGS (gst_registry_flags_get_type())
|
||||
|
||||
/* enumerations from "gstparse.h" */
|
||||
|
||||
GType gst_parse_error_get_type (void);
|
||||
|
||||
#define GST_TYPE_PARSE_ERROR (gst_parse_error_get_type())
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_ENUM_TYPES_H__ */
|
||||
|
||||
/* Generated data ends here */
|
||||
|
||||
|
|
Loading…
Reference in a new issue