Commit da39e2c7 authored by Thomas Vander Stichele's avatar Thomas Vander Stichele
Browse files

win32/: Visual Studio 6 project files, and a new common directory.

Original commit message from CVS:
2005-10-11  Thomas Vander Stichele  <thomas at apestaart dot org>

* win32/common/config.h:
* win32/common/dirent.c: (_topendir), (_treaddir), (_tclosedir),
(_trewinddir), (_ttelldir), (_tseekdir):
* win32/common/dirent.h:
* win32/common/gtchar.h:
* win32/common/libgstbase.def:
* win32/common/libgstreamer.def:
* win32/vs6/grammar.dsp:
* win32/vs6/gst_inspect.dsp:
* win32/vs6/gst_launch.dsp:
* win32/vs6/gstreamer.dsw:
* win32/vs6/libgstbase.dsp:
* win32/vs6/libgstelements.dsp:
* win32/vs6/libgstreamer.dsp:
Visual Studio 6 project files, and a new common directory.
Phear.
parent 7a2e55a7
2005-10-11 Thomas Vander Stichele <thomas at apestaart dot org>
* win32/common/config.h:
* win32/common/dirent.c: (_topendir), (_treaddir), (_tclosedir),
(_trewinddir), (_ttelldir), (_tseekdir):
* win32/common/dirent.h:
* win32/common/gtchar.h:
* win32/common/libgstbase.def:
* win32/common/libgstreamer.def:
* win32/vs6/grammar.dsp:
* win32/vs6/gst_inspect.dsp:
* win32/vs6/gst_launch.dsp:
* win32/vs6/gstreamer.dsw:
* win32/vs6/libgstbase.dsp:
* win32/vs6/libgstelements.dsp:
* win32/vs6/libgstreamer.dsp:
Visual Studio 6 project files, and a new common directory.
Phear.
2005-10-11 Wim Taymans <wim@fluendo.com>
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
......
/* config.h.in. Generated from configure.ac by autoheader. */
/* always defined to indicate that i18n is enabled */
/* #define ENABLE_NLS 1*/
/* gettext package name */
#define GETTEXT_PACKAGE "gstreamer-0.9"
/* Location of registry */
#define GST_CACHE_DIR "c:\\gstreamer"
/* macro to use to show function name */
/*#undef GST_FUNCTION*/
/* Default errorlevel to use */
#undef GST_LEVEL_DEFAULT
/* GStreamer license */
#define GST_LICENSE "LGPL"
/* Define the location where the catalogs will be installed */
#define LOCALEDIR GST_CACHE_DIR"\\locale"
/* package origin */
#define GST_ORIGIN "http://gstreamer.net"
/* package name in plugins */
#define GST_PACKAGE "GStreamer"
/* Define the version */
#define GST_VERSION "0.8.5"
/* Define the release version */
#define GST_VERSION_RELEASE "20040129_103536"
/* Define if atomic.h header file is available */
#undef HAVE_ATOMIC_H
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET
/* Define if the target CPU is an Alpha */
#undef HAVE_CPU_ALPHA
/* Define if the target CPU is an ARM */
#undef HAVE_CPU_ARM
/* Define if the target CPU is a HPPA */
#undef HAVE_CPU_HPPA
/* Define if the target CPU is an x86 */
#undef HAVE_CPU_I386
/* Define if the target CPU is a IA64 */
#undef HAVE_CPU_IA64
/* Define if the target CPU is a M68K */
#undef HAVE_CPU_M68K
/* Define if the target CPU is a MIPS */
#undef HAVE_CPU_MIPS
/* Define if the target CPU is a PowerPC */
#undef HAVE_CPU_PPC
/* Define if the target CPU is a S390 */
#undef HAVE_CPU_S390
/* Define if the target CPU is a SPARC */
#undef HAVE_CPU_SPARC
/* Define if the target CPU is a x86_64 */
#undef HAVE_CPU_X86_64
/* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT
/* Defined if we have dladdr () */
#undef HAVE_DLADDR
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* defined if the compiler implements __func__ */
#undef HAVE_FUNC
/* defined if the compiler implements __FUNCTION__ */
//#undef HAVE_FUNCTION
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define if libmmx is available */
#undef HAVE_LIBMMX
/* Define if libxml2 is available */
//#undef HAVE_LIBXML2
#define HAVE_LIBXML2
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* defined if we have makecontext () */
#undef HAVE_MAKECONTEXT
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Defined if we have posix_memalign () */
#undef HAVE_POSIX_MEMALIGN
/* defined if the compiler implements __PRETTY_FUNCTION__ */
#undef HAVE_PRETTY_FUNCTION
/* Defined if libpthread has pthread_attr_setstack () */
#undef HAVE_PTHREAD_ATTR_SETSTACK
/* Define if RDTSC is available */
#undef HAVE_RDTSC
/* Defined if we have sigaction () */
#undef HAVE_SIGACTION
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* defined if we have ucontext.h */
#undef HAVE_UCONTEXT_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define the uninstalled plugin directory */
#undef PLUGINS_BUILDDIR
/* Define the plugin directory */
#define PLUGINS_DIR "c:\\gstreamer"
/* Define if plugins should be loaded from the build tree - only developers
should use this */
#undef PLUGINS_USE_BUILDDIR
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if we should use i586 optimized stack functions */
#undef USE_FAST_STACK_TRASH
/* Define if we should poison deallocated memory */
#undef USE_POISONING
/* Version number of package */
#define VERSION "0.9.0.0"
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#define WORDS_BIGENDIAN 0
#define GST_MAJORMINOR "0.9"
\ No newline at end of file
/*
* dirent.c
*
* Derived from DIRLIB.C by Matt J. Weinstein
* This note appears in the DIRLIB.H
* DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89
*
* Updated by Jeremy Bettis <jeremy@hksys.com>
* Significantly revised and rewinddir, seekdir and telldir added by Colin
* Peters <colin@fu.is.saga-u.ac.jp>
*
* Resource leaks fixed by <steve.lhomme@free.fr>
*
*
* $Revision$
* $Author$
* $Date$
*
*/
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <io.h>
#include <direct.h>
#include <dirent.h>
#include <gtchar.h>
#define SUFFIX _T("*")
#define SLASH _T("\\")
#include <stdio.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h> /* for GetFileAttributes */
/*
* opendir
*
* Returns a pointer to a DIR structure appropriately filled in to begin
* searching a directory.
*/
_TDIR * _topendir (const _TCHAR * szPath)
{
_TDIR * nd;
unsigned int rc;
_TCHAR szFullPath[MAX_PATH];
errno = 0;
if (!szPath) {
errno = EFAULT;
return (_TDIR *) 0;
}
if (szPath[0] == _T ('\0')) {
errno = ENOTDIR;
return (_TDIR *) 0;
}
/* Attempt to determine if the given path really is a directory. */
rc = GetFileAttributes (szPath);
if (rc == (unsigned int) -1) {
/* call GetLastError for more error info */
errno = ENOENT;
return (_TDIR *) 0;
}
if (!(rc & FILE_ATTRIBUTE_DIRECTORY)) {
/* Error, entry exists but not a directory. */
errno = ENOTDIR;
return (_TDIR *) 0;
}
/* Make an absolute pathname. */
_tfullpath (szFullPath, szPath, MAX_PATH);
/* Allocate enough space to store DIR structure and the complete
* directory path given. */
nd =
(_TDIR *) malloc (sizeof (_TDIR) + (_tcslen (szFullPath) +
_tcslen (SLASH) + _tcslen (SUFFIX) + 1) * sizeof (_TCHAR));
if (!nd) {
/* Error, out of memory. */
errno = ENOMEM;
return (_TDIR *) 0;
}
/* Create the search expression. */
_tcscpy (nd->dd_name, szFullPath);
/* Add on a slash if the path does not end with one. */
if (nd->dd_name[0] != _T ('\0')
&& nd->dd_name[_tcslen (nd->dd_name) - 1] != _T ('/')
&& nd->dd_name[_tcslen (nd->dd_name) - 1] != _T ('\\')) {
_tcscat (nd->dd_name, SLASH);
}
/* Add on the search pattern */
_tcscat (nd->dd_name, SUFFIX);
/* Initialize handle to -1 so that a premature closedir doesn't try
* to call _findclose on it. */
nd->dd_handle = -1;
/* Initialize the status. */
nd->dd_stat = 0;
/* Initialize the dirent structure. ino and reclen are invalid under
* Win32, and name simply points at the appropriate part of the
* findfirst_t structure. */
nd->dd_dir.d_ino = 0;
nd->dd_dir.d_reclen = 0;
nd->dd_dir.d_namlen = 0;
// Added by jcsston 02/04/2004, memset was writing to a bad pointer
nd->dd_dir.d_name = malloc (FILENAME_MAX);
// End add
memset (nd->dd_dir.d_name, 0, FILENAME_MAX);
return nd;
}
/*
* readdir
*
* Return a pointer to a dirent structure filled with the information on the
* next entry in the directory.
*/
struct _tdirent *
_treaddir (_TDIR * dirp)
{
errno = 0;
/* Check for valid DIR struct. */
if (!dirp) {
errno = EFAULT;
return (struct _tdirent *) 0;
}
if (dirp->dd_stat < 0) {
/* We have already returned all files in the directory
* (or the structure has an invalid dd_stat). */
return (struct _tdirent *) 0;
} else if (dirp->dd_stat == 0) {
/* We haven't started the search yet. */
/* Start the search */
dirp->dd_handle = _tfindfirst (dirp->dd_name, &(dirp->dd_dta));
if (dirp->dd_handle == -1) {
/* Whoops! Seems there are no files in that
* directory. */
dirp->dd_stat = -1;
} else {
dirp->dd_stat = 1;
}
} else {
/* Get the next search entry. */
if (_tfindnext (dirp->dd_handle, &(dirp->dd_dta))) {
/* We are off the end or otherwise error.
_findnext sets errno to ENOENT if no more file
Undo this. */
DWORD winerr = GetLastError ();
if (winerr == ERROR_NO_MORE_FILES)
errno = 0;
_findclose (dirp->dd_handle);
dirp->dd_handle = -1;
dirp->dd_stat = -1;
} else {
/* Update the status to indicate the correct
* number. */
dirp->dd_stat++;
}
}
if (dirp->dd_stat > 0) {
/* Successfully got an entry. Everything about the file is
* already appropriately filled in except the length of the
* file name. */
dirp->dd_dir.d_namlen = _tcslen (dirp->dd_dta.name);
_tcscpy (dirp->dd_dir.d_name, dirp->dd_dta.name);
return &dirp->dd_dir;
}
return (struct _tdirent *) 0;
}
/*
* closedir
*
* Frees up resources allocated by opendir.
*/
int
_tclosedir (_TDIR * dirp)
{
int rc;
errno = 0;
rc = 0;
if (!dirp) {
errno = EFAULT;
return -1;
}
if (dirp->dd_handle != -1) {
rc = _findclose (dirp->dd_handle);
}
if (dirp->dd_dir.d_name)
free (dirp->dd_dir.d_name);
/* Delete the dir structure. */
free (dirp);
return rc;
}
/*
* rewinddir
*
* Return to the beginning of the directory "stream". We simply call findclose
* and then reset things like an opendir.
*/
void
_trewinddir (_TDIR * dirp)
{
errno = 0;
if (!dirp) {
errno = EFAULT;
return;
}
if (dirp->dd_handle != -1) {
_findclose (dirp->dd_handle);
}
dirp->dd_handle = -1;
dirp->dd_stat = 0;
}
/*
* telldir
*
* Returns the "position" in the "directory stream" which can be used with
* seekdir to go back to an old entry. We simply return the value in stat.
*/
long
_ttelldir (_TDIR * dirp)
{
errno = 0;
if (!dirp) {
errno = EFAULT;
return -1;
}
return dirp->dd_stat;
}
/*
* seekdir
*
* Seek to an entry previously returned by telldir. We rewind the directory
* and call readdir repeatedly until either dd_stat is the position number
* or -1 (off the end). This is not perfect, in that the directory may
* have changed while we weren't looking. But that is probably the case with
* any such system.
*/
void
_tseekdir (_TDIR * dirp, long lPos)
{
errno = 0;
if (!dirp) {
errno = EFAULT;
return;
}
if (lPos < -1) {
/* Seeking to an invalid position. */
errno = EINVAL;
return;
} else if (lPos == -1) {
/* Seek past end. */
if (dirp->dd_handle != -1) {
_findclose (dirp->dd_handle);
}
dirp->dd_handle = -1;
dirp->dd_stat = -1;
} else {
/* Rewind and read forward to the appropriate index. */
_trewinddir (dirp);
while ((dirp->dd_stat < lPos) && _treaddir (dirp));
}
}
/*
* DIRENT.H (formerly DIRLIB.H)
*
* by M. J. Weinstein Released to public domain 1-Jan-89
*
* Because I have heard that this feature (opendir, readdir, closedir)
* it so useful for programmers coming from UNIX or attempting to port
* UNIX code, and because it is reasonably light weight, I have included
* it in the Mingw32 package. I have also added an implementation of
* rewinddir, seekdir and telldir.
* - Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
*
* This code is distributed in the hope that is will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includeds but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision$
* $Author$
* $Date$
*
*/
#ifndef __STRICT_ANSI__
#ifndef _DIRENT_H_
#define _DIRENT_H_
/* All the headers include this file. */
/*#include <_mingw.h>*/
#include <io.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
struct dirent
{
long d_ino; /* Always zero. */
unsigned short d_reclen; /* Always zero. */
unsigned short d_namlen; /* Length of name in d_name. */
char* d_name; /* File name. */
/* NOTE: The name in the dirent structure points to the name in the
* finddata_t structure in the DIR. */
};
/*
* This is an internal data structure. Good programmers will not use it
* except as an argument to one of the functions below.
* dd_stat field is now int (was short in older versions).
*/
typedef struct
{
/* disk transfer area for this dir */
struct _finddata_t dd_dta;
/* dirent struct to return from dir (NOTE: this makes this thread
* safe as long as only one thread uses a particular DIR struct at
* a time) */
struct dirent dd_dir;
/* _findnext handle */
long dd_handle;
/*
* Status of search:
* 0 = not started yet (next entry to read is first entry)
* -1 = off the end
* positive = 0 based index of next entry
*/
int dd_stat;
/* given path for dir with search pattern (struct is extended) */
char dd_name[1];
} DIR;
DIR* opendir (const char*);
struct dirent* readdir (DIR*);
int closedir (DIR*);
void rewinddir (DIR*);
long telldir (DIR*);
void seekdir (DIR*, long);
/* wide char versions */
struct _wdirent
{
long d_ino; /* Always zero. */
unsigned short d_reclen; /* Always zero. */
unsigned short d_namlen; /* Length of name in d_name. */
wchar_t* d_name; /* File name. */
/* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */
};
/*
* This is an internal data structure. Good programmers will not use it
* except as an argument to one of the functions below.
*/
typedef struct
{
/* disk transfer area for this dir */
struct _wfinddata_t dd_dta;
/* dirent struct to return from dir (NOTE: this makes this thread
* safe as long as only one thread uses a particular DIR struct at
* a time) */
struct _wdirent dd_dir;
/* _findnext handle */
long dd_handle;
/*
* Status of search:
* 0 = not started yet (next entry to read is first entry)
* -1 = off the end
* positive = 0 based index of next entry
*/
int dd_stat;
/* given path for dir with search pattern (struct is extended) */
wchar_t dd_name[1];