+
+int my_open(char *filename)
+{
+ abort();
+ return open(filename,O_RDONLY|O_BINARY);
+}
+
+off_t my_seek(istream *infile, off_t offset, int whence)
+{
+#ifdef FILESTAR
+ return fseek(infile->InFd,offset, whence);
+#else
+ return lseek(infile->InFd,offset, whence);
+#endif
+}
+ssize_t my_read(istream *infile, void *buf, size_t count)
+{
+#ifdef FILESTAR
+ size_t r = fread(buf,1,count, infile->InFd);
+#else
+ ssize_t r = read(infile->InFd,buf,count);
+#endif
+ printf( "%d , %d\n", count , r);
+ return r;
+}
+
+int my_close(istream *infile)
+{
+#ifdef FILESTAR
+ return fclose(infile->InFd);
+#else
+ return close(infile->InFd);
+#endif
+}
+
+int my_fopenr(const char *path, const char *mode, istream *os)
+{
+ FILE *fd = fopen(path, mode);
+ if(fd)
+ {
+ os->InFd = fd;
+ return 1; /*success*/
+ }
+ else
+ os->InFd = NULL;
+ return 0;
+}
+
+int my_fopen(const char *path, const char *mode, ostream *os)
+{
+ FILE *fd = fopen(path, mode);
+ if(fd)
+ {
+ os->OutFd = fd;
+ return 1; /*success*/
+ }
+ else
+ os->OutFd = NULL;
+ return 0;
+}
+
+int my_fseek(ostream *stream, long offset, int whence)
+{
+ return fseek(stream->OutFd, offset, whence);
+}
+int my_fseekr(istream *stream, long offset, int whence)
+{
+ return fseek(stream->InFd, offset, whence);
+}
+
+size_t my_fread(void *ptr, size_t size, size_t nmemb, istream *stream)
+{
+ return fread(ptr, size, nmemb, stream->InFd);
+}
+
+size_t my_fwrite(const void *ptr, size_t size, size_t nmemb, ostream *stream)
+{
+ return fwrite(ptr, size, nmemb, stream->OutFd);
+}
+
+int my_fcloser(istream *fp)
+{
+ return fclose(fp->InFd);
+}
+int my_fclose(ostream *fp)
+{
+ return fclose(fp->OutFd);
+}
+#include <stdarg.h>
+
+int my_printf(const char *format, ...)
+{
+ va_list argptr;
+ int ret;
+
+ va_start(argptr, format);
+ ret = vprintf(format, argptr);
+ va_end(argptr);
+
+ return ret;
+}
+
+int my_sprintf(char *str, const char *format, ...)
+{
+ va_list argptr;
+ int ret;
+
+ va_start(argptr, format);
+ ret = vsprintf(str,format, argptr);
+ va_end(argptr);
+
+ return ret;
+}
+
+int my_fprintf(const char *format, ...)
+{
+ va_list argptr;
+ int ret;
+
+ va_start(argptr, format);
+ ret = vfprintf(stderr,format, argptr);
+ va_end(argptr);
+
+ return ret;
+}
+void my_exit(int status)
+{
+ exit(status);
+}
+
+
+#define GDCM_BUILD_MPEG2DEC
+
+#ifdef GDCM_BUILD_MPEG2DEC