+
+int my_open(char *filename)
+{
+ return open(filename,O_RDONLY|O_BINARY);
+}
+
+off_t my_seek(int infile, off_t offset,int whence)
+{
+ return lseek(infile, offset, whence);
+}
+ssize_t my_read(int infile,void *buf,size_t count)
+{
+ return read(infile,buf,count);
+}
+int my_close(int infile)
+{
+ return close(infile);
+}
+
+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, ...)
+{
+ //return printf(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, ...)
+{
+ //return sprintf(str, 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, ...)
+{
+ //return fprintf(stderr, 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