Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed DSNative stuff from the MPlayer patch so it compiles on OS X

  • Loading branch information...
commit 0fce2ae6eb64e0556e8691ab26db3fd671e9f3f2 1 parent d16c839
@SubJunk SubJunk authored
Showing with 1 addition and 302 deletions.
  1. +1 −302 contrib/mplayer-r34866-SB31.patch
View
303 contrib/mplayer-r34866-SB31.patch
@@ -130,109 +130,6 @@ Index: configure
#############################################################################
-Index: etc/codecs.conf
-===================================================================
---- etc/codecs.conf (revision 34866)
-+++ etc/codecs.conf (working copy)
-@@ -4081,7 +4081,98 @@
- out UYVY
- out YVU9
- out BGR32,BGR24,BGR16,BGR15
-+
-+;=============================================================================
-+; DSNATIVE VIDEO CODECS
-+;=============================================================================
-
-+videocodec dsncoreavc
-+ info "CoreAVC Video Decoder"
-+ status working
-+ fourcc H264,h264
-+ fourcc X264,x264
-+ fourcc avc1 AVC1,AVC1
-+ fourcc davc,DAVC
-+ fourcc VSSH
-+ format 0x10000005
-+ driver dsnative
-+ dll "CoreAVCDecoder.ax"
-+ guid 0x09571a4b, 0xf1fe, 0x4c60, 0x97, 0x60, 0xde, 0x6d, 0x31, 0x0c, 0x7c, 0x31
-+ out YV12,IYUV,I420,YUY2
-+
-+videocodec dsndivxh264
-+ info "DivX H.264 Decoder"
-+ status working
-+ fourcc H264,h264
-+ fourcc X264,x264
-+ fourcc avc1 AVC1,AVC1
-+ fourcc davc,DAVC
-+ fourcc VSSH
-+ format 0x10000005
-+ driver dsnative
-+ dll "DivXDecH264.ax"
-+ guid 0x6f513d27, 0x97c3, 0x453c, 0x87, 0xfe, 0xb2, 0x4a, 0xe5, 0x0b, 0x16, 0x01
-+ out YV12,IYUV,I420,YUY2
-+
-+videocodec dsnffdshow
-+ info "ffdshow Video Decoder"
-+ status working
-+ fourcc H264,h264
-+ fourcc X264,x264
-+ fourcc avc1 AVC1,AVC1
-+ fourcc davc,DAVC
-+ fourcc VSSH
-+ format 0x10000005
-+ fourcc DIVX,divx
-+ fourcc DIV1,div1 divx
-+ fourcc MP4S,mp4s ; ISO MPEG-4 Video V1
-+ fourcc M4S2,m4s2
-+ fourcc xvid,XVID,XviD,XVIX
-+ fourcc DX50,dx50,BLZ0 DX50
-+ fourcc mp4v,MP4V
-+ fourcc FVFW,fvfw
-+ driver dsnative
-+ dll "ffdshow.ax"
-+ guid 0x04fe9017, 0xf873, 0x410e, 0x87, 0x1e, 0xab, 0x91, 0x66, 0x1a, 0x4e, 0xf7
-+ out YV12,IYUV,I420,YUY2
-+
-+videocodec dsnffdshowdxva
-+ info "ffdshow DXVA Video Decoder"
-+ status buggy
-+ fourcc H264,h264
-+ fourcc X264,x264
-+ fourcc avc1 AVC1,AVC1
-+ fourcc davc,DAVC
-+ fourcc VSSH
-+ format 0x10000005
-+ driver dsnative
-+ dll "ffdshow.ax"
-+ guid 0x0b0eff97, 0xc750, 0x462c, 0x94, 0x88, 0xb1, 0x0e, 0x7d, 0x87, 0xf1, 0xa6
-+ out YV12,IYUV,I420,YUY2
-+
-+videocodec dsndiavc
-+ info "DiAVC H.264 Decoder (DiAVC)"
-+ status working
-+ fourcc H264,h264
-+ fourcc X264,x264
-+ fourcc avc1 AVC1,AVC1
-+ fourcc davc,DAVC
-+ fourcc VSSH
-+ format 0x10000005
-+ driver dsnative
-+ dll "diavc.ax"
-+ guid 0x5dfa20a4, 0xc343, 0x45df, 0xa4, 0x6e, 0xec, 0x17, 0x11, 0xe4, 0xee, 0x32
-+ out YV12,IYUV,I420,YUY2,RGB32,UYVY
-+
-+videocodec dsncineformhd
-+ info "CineForm HD"
-+ status working
-+ fourcc CFHD
-+ driver dsnative
-+ dll "CFDecode2.ax"
-+ guid 0xad83011e, 0x01d1, 0x4623, 0x91, 0xfd, 0x6b, 0x75, 0xf1, 0x83, 0xc5, 0xa9
-+ out YUY2
-+
- ;=============================================================================
- ; AUDIO CODECS
- ;=============================================================================
Index: libao2/ao_sdl.c
===================================================================
--- libao2/ao_sdl.c (revision 34866)
@@ -246,192 +143,6 @@ Index: libao2/ao_sdl.c
mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_SDL_DriverInfo, ao_subdevice);
}
-Index: libmpcodecs/vd.c
-===================================================================
---- libmpcodecs/vd.c (revision 34866)
-+++ libmpcodecs/vd.c (working copy)
-@@ -40,6 +40,7 @@
- extern const vd_functions_t mpcodecs_vd_ffmpeg;
- extern const vd_functions_t mpcodecs_vd_theora;
- extern const vd_functions_t mpcodecs_vd_dshow;
-+extern const vd_functions_t mpcodecs_vd_dsnative;
- extern const vd_functions_t mpcodecs_vd_dmo;
- extern const vd_functions_t mpcodecs_vd_vfw;
- extern const vd_functions_t mpcodecs_vd_vfwex;
-@@ -73,6 +74,7 @@
- #endif
- #ifdef CONFIG_WIN32DLL
- &mpcodecs_vd_dshow,
-+ &mpcodecs_vd_dsnative,
- &mpcodecs_vd_dmo,
- &mpcodecs_vd_vfw,
- &mpcodecs_vd_vfwex,
-Index: libmpcodecs/vd_dsnative.c
-===================================================================
---- libmpcodecs/vd_dsnative.c (revision 0)
-+++ libmpcodecs/vd_dsnative.c (working copy)
-@@ -0,0 +1,160 @@
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <stdarg.h>
-+
-+#include "config.h"
-+#include "mp_msg.h"
-+#include "help_mp.h"
-+#include "vd_internal.h"
-+
-+#include "loader/wine/winbase.h"
-+
-+#ifdef WIN32_LOADER
-+#include "loader/ldt_keeper.h"
-+#endif
-+
-+#define DSN_OK 0
-+#define DSN_API_VERSION 4
-+
-+typedef struct _DSVideoCodec DSVideoCodec;
-+typedef DSVideoCodec * (WINAPI *funcDSOpenVideoCodec)(const char *dll, const GUID guid, BITMAPINFOHEADER* bih,
-+ unsigned int outfmt, float fps, const char *filename, int *err);
-+typedef void (WINAPI *funcDSCloseVideoCodec)(DSVideoCodec *codec);
-+typedef int (WINAPI *funcDSVideoDecode)(DSVideoCodec *vcodec, const BYTE *src, int size, double pts,
-+ double *newpts, BYTE *pImage, int keyframe);
-+typedef int (WINAPI *funcDSVideoResync)(DSVideoCodec *codec, double pts);
-+typedef const char * (WINAPI *funcDSStrError)(int error);
-+typedef unsigned int (WINAPI *funcDSGetApiVersion)(void);
-+
-+static const vd_info_t info = {
-+ "DirectShow video codecs (native win32)",
-+ "dsnative",
-+ "Gianluigi Tiesi",
-+ "using dsnative external dll wrapper",
-+ "win32 codecs"
-+};
-+
-+static struct
-+{
-+ HMODULE hLib;
-+ funcDSOpenVideoCodec DSOpenVideoCodec;
-+ funcDSCloseVideoCodec DSCloseVideoCodec;
-+ funcDSVideoDecode DSVideoDecode;
-+ funcDSVideoResync DSVideoResync;
-+ funcDSStrError DSStrError;
-+ funcDSGetApiVersion DSGetApiVersion;
-+ DSVideoCodec *codec;
-+#ifdef WIN32_LOADER
-+ ldt_fs_t* ldt_fs;
-+#endif
-+} dsn;
-+
-+LIBVD_EXTERN(dsnative)
-+
-+static int control(sh_video_t *sh, int cmd, void *arg, ...)
-+{
-+ switch (cmd)
-+ {
-+ case VDCTRL_RESYNC_STREAM:
-+ dsn.DSVideoResync(dsn.codec, sh->pts);
-+ return CONTROL_TRUE;
-+ default:
-+ return CONTROL_UNKNOWN;
-+ }
-+}
-+
-+static int init(sh_video_t *sh)
-+{
-+ int err;
-+ char fname[MAX_PATH + 1] = "";
-+#ifdef WIN32_LOADER
-+ dsn.ldt_fs = Setup_LDT_Keeper();
-+#endif
-+
-+ memset(&dsn, 0, sizeof(dsn));
-+ dsn.hLib = LoadLibraryA("dsnative.dll");
-+ //dsn.hLib = LoadLibraryA("C:\\Work\\mplayer\\wip\\core\\dsnative\\Debug\\dsnative.dll");
-+
-+ if (!dsn.hLib)
-+ {
-+ mp_msg(MSGT_DECVIDEO, MSGL_ERR, "[dsnative] Cannot find dsnative dll: %ld\n", GetLastError());
-+ return 0;
-+ }
-+
-+ dsn.DSOpenVideoCodec = (funcDSOpenVideoCodec) GetProcAddress(dsn.hLib, "DSOpenVideoCodec");
-+ dsn.DSCloseVideoCodec = (funcDSCloseVideoCodec) GetProcAddress(dsn.hLib, "DSCloseVideoCodec");
-+ dsn.DSVideoDecode = (funcDSVideoDecode) GetProcAddress(dsn.hLib, "DSVideoDecode");
-+ dsn.DSVideoResync = (funcDSVideoResync) GetProcAddress(dsn.hLib, "DSVideoResync");
-+ dsn.DSStrError = (funcDSStrError) GetProcAddress(dsn.hLib, "DSStrError");
-+ dsn.DSGetApiVersion = (funcDSGetApiVersion) GetProcAddress(dsn.hLib, "DSGetApiVersion");
-+
-+ if (!(dsn.DSOpenVideoCodec && dsn.DSCloseVideoCodec && dsn.DSVideoDecode && dsn.DSVideoResync && dsn.DSStrError && dsn.DSGetApiVersion))
-+ {
-+ mp_msg(MSGT_DECVIDEO, MSGL_ERR, "[dsnative] dsnative dll symbol mismatch\n");
-+ return 0;
-+ }
-+
-+ if (dsn.DSGetApiVersion() != DSN_API_VERSION)
-+ {
-+ mp_msg(MSGT_DECVIDEO, MSGL_ERR, "[dsnative] Incompatible API version\n");
-+ return 0;
-+ }
-+
-+ if (sh->ds->demuxer->filename)
-+ GetFullPathNameA(sh->ds->demuxer->filename, MAX_PATH, fname, NULL);
-+
-+ if (!(dsn.codec = dsn.DSOpenVideoCodec(sh->codec->dll, sh->codec->guid, sh->bih,
-+ sh->codec->outfmt[sh->outfmtidx], sh->fps, fname, &err)))
-+ {
-+ mp_msg(MSGT_DECVIDEO, MSGL_ERR, "[dsnative] Codec init failed: %s\n", dsn.DSStrError(err));
-+ return 0;
-+ }
-+
-+ if (!mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, IMGFMT_YUY2))
-+ {
-+ mp_msg(MSGT_DECVIDEO, MSGL_ERR, "[dsnative] mpcodecs_config_vo() failed\n");
-+ return 0;
-+ }
-+
-+ mp_msg(MSGT_DECVIDEO, MSGL_V, "[dsnative]: Win32/DShow video codec init OK.\n");
-+ return 1;
-+}
-+
-+static void uninit(sh_video_t *sh)
-+{
-+ if (dsn.codec) dsn.DSCloseVideoCodec(dsn.codec);
-+ if (dsn.hLib) FreeLibrary(dsn.hLib);
-+#ifdef WIN32_LOADER
-+ Restore_LDT_Keeper(dsn.ldt_fs);
-+#endif
-+}
-+
-+// decode a frame
-+static mp_image_t* decode(sh_video_t *sh, void* data,int len, int flags)
-+{
-+ mp_image_t* mpi;
-+ unsigned char *planes;
-+ int err;
-+ double newpts;
-+ int keyframe;
-+
-+ if (len <= 0)
-+ return NULL; // skipped frame
-+
-+ mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_COMMON_PLANE, sh->disp_w, sh->disp_h);
-+ if (!mpi) return NULL;
-+
-+ keyframe = sh->ds->flags & 1;
-+
-+ if (!keyframe && (flags & 3))
-+ planes = NULL;
-+ else
-+ planes = mpi->planes[0];
-+
-+ err = dsn.DSVideoDecode(dsn.codec, data, len, sh->pts, &newpts, planes, keyframe);
-+ if (err == DSN_OK)
-+ sh->pts = newpts;
-+ else
-+ mp_msg(MSGT_DECVIDEO, MSGL_ERR, "[dsnative] Decoding failed: %s\n", dsn.DSStrError(err));
-+ return mpi;
-+}
-\ No newline at end of file
Index: libvo/sdl_common.c
===================================================================
--- libvo/sdl_common.c (revision 34866)
@@ -481,18 +192,6 @@ Index: libvo/vo_sdl.c
/* default to no fullscreen mode, we'll set this as soon we have the avail. modes */
priv->fullmode = -2;
-Index: Makefile
-===================================================================
---- Makefile (revision 34866)
-+++ Makefile (working copy)
-@@ -270,6 +270,7 @@
- libmpcodecs/ad_twin.c \
- libmpcodecs/vd_dmo.c \
- libmpcodecs/vd_dshow.c \
-+ libmpcodecs/vd_dsnative.c \
- libmpcodecs/vd_vfw.c \
- libmpcodecs/vd_vfwex.c \
- libmpdemux/demux_avs.c \
Index: mencoder.c
===================================================================
--- mencoder.c (revision 34866)
@@ -945,7 +644,7 @@ Index: version.sh
fi
-NEW_REVISION="#define VERSION \"${version}${extra}\""
-+NEW_REVISION="#define VERSION \"SB31\""
++NEW_REVISION="#define VERSION \"SB30\""
OLD_REVISION=$(head -n 1 version.h 2> /dev/null)
-TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2012 MPlayer Team\n"'
+TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2012 MPlayer Team\nCustom build by SubJunk, http://www.spirton.com\n\n"'
Please sign in to comment.
Something went wrong with that request. Please try again.