Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -Nuar -x '*.d' -x '*.xml' -x '*.xsl' mplayer-export-2012-05-05//configure mplayer-dpf//configure
- --- mplayer-export-2012-05-05//configure 2012-04-29 23:54:20.000000000 +0800
- +++ mplayer-dpf//configure 2012-05-06 10:00:19.598708948 +0800
- @@ -873,6 +873,8 @@
- def_priority="#undef CONFIG_PRIORITY"
- def_pthread_cache="#undef PTHREAD_CACHE"
- shmem=no
- +_st2205u=auto
- +_dpf=auto
- for ac_option do
- case "$ac_option" in
- --help|-help|-h)
- @@ -4341,6 +4343,49 @@
- fi
- echores "$_xv"
- +echocheck "st2205u"
- +if test "$_st2205u" = auto ; then
- + cat > $TMPC <<EOF
- +#include <st2205.h>
- +int main(void) {
- + (void) st2205_open("");
- + return 0; }
- +EOF
- + _st2205u=no
- + cc_check -lst2205 && _st2205u=yes
- +fi
- +
- +if test "$_st2205u" = yes ; then
- + def_xv='#define CONFIG_ST2205U 1'
- + libs_mplayer="$libs_mplayer -lst2205"
- + vomodules="st2205u $vomodules"
- +else
- + def_xv='#undef CONFIG_ST2205U'
- + novomodules="st2205u $_novomodules"
- +fi
- +echores "$_st2205u"
- +
- +echocheck "dpf"
- +if test "$_dpf" = auto ; then
- + cat > $TMPC <<EOF
- +#include <dpf.h>
- +int main(void) {
- + dpf_open("",NULL);
- + return 0; }
- +EOF
- + _dpf=no
- + cc_check -ldpf && _dpf=yes
- +fi
- +
- +if test "$_dpf" = yes ; then
- + def_xv='#define CONFIG_DPF 1'
- + libs_mplayer="$libs_mplayer -ldpf"
- + vomodules="dpf $vomodules"
- +else
- + def_xv='#undef CONFIG_DPF'
- + novomodules="dpf $_novomodules"
- +fi
- +echores "$_dpf"
- echocheck "XvMC"
- if test "$_xvmc" != no && test "$_xv" = yes ; then
- @@ -8035,6 +8080,7 @@
- COREAUDIO = $_coreaudio
- COREVIDEO = $_corevideo
- DART = $_dart
- +DPF = $_dpf
- DGA = $_dga
- DIRECT3D = $_direct3d
- DIRECTFB = $_directfb
- @@ -8123,6 +8169,7 @@
- S3FB = $_s3fb
- SDL = $_sdl
- SPEEX = $_speex
- +ST2205U = $_st2205u
- STREAM_CACHE = $_stream_cache
- SGIAUDIO = $_sgiaudio
- SUNAUDIO = $_sunaudio
- diff -Nuar -x '*.d' -x '*.xml' -x '*.xsl' mplayer-export-2012-05-05//libvo/video_out.c mplayer-dpf//libvo/video_out.c
- --- mplayer-export-2012-05-05//libvo/video_out.c 2012-04-01 05:03:45.000000000 +0800
- +++ mplayer-dpf//libvo/video_out.c 2012-05-06 09:50:55.454160335 +0800
- @@ -136,7 +136,8 @@
- extern const vo_functions_t video_out_pnm;
- extern const vo_functions_t video_out_md5sum;
- extern const vo_functions_t video_out_mng;
- -
- +extern const vo_functions_t video_out_st2205u;
- +extern const vo_functions_t video_out_dpf;
- /* The following declarations are _not_ const because functions pointers
- * get overloaded during (re)initialization. */
- extern vo_functions_t video_out_cvidix;
- @@ -149,6 +150,9 @@
- const vo_functions_t* const video_out_drivers[] =
- {
- +#ifdef CONFIG_DPF
- + &video_out_dpf,
- +#endif
- #ifdef CONFIG_XVR100
- &video_out_xvr100,
- #endif
- diff -Nuar -x '*.d' -x '*.xml' -x '*.xsl' mplayer-export-2012-05-05//libvo/vo_dpf.c mplayer-dpf//libvo/vo_dpf.c
- --- mplayer-export-2012-05-05//libvo/vo_dpf.c 1970-01-01 07:30:00.000000000 +0730
- +++ mplayer-dpf//libvo/vo_dpf.c 2012-05-06 18:25:23.082129967 +0800
- @@ -0,0 +1,169 @@
- +/*
- + * Video driver for dpf_U
- + * Copyright 2008 Sprite_tm <picframe@spritesmods.com>
- + * For more info, please visit http://spritesmods.com/?art=picframe
- + */
- +
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +#include <errno.h>
- +
- +#include <sys/mman.h>
- +#include <sys/ioctl.h>
- +#include <linux/fb.h>
- +
- +#include "config.h"
- +#include "video_out.h"
- +#include "video_out_internal.h"
- +#include "fastmemcpy.h"
- +#include "sub/sub.h"
- +#include "mp_msg.h"
- +
- +#include <dpf.h>
- +
- +
- +static vo_info_t info = {
- + "ax206 device",
- + "dpf",
- + "ax206term@forum.doozan.com",
- + ""
- +};
- +
- +LIBVO_EXTERN(dpf)
- +
- +static char *dpf_dev_name = NULL; // such as /dev/sda
- +static DPFHANDLE dpf_h; // handle for dpf_dev_name
- +static unsigned char *dpf_imagebuff;
- +static short rect[4];
- +
- +static int dpf_preinit(int reset)
- +{
- + static int dpf_preinit_done = 0;
- + static int dpf_err = -1;
- + int result;
- +
- + if (reset) {
- + dpf_preinit_done = 0;
- + return 0;
- + }
- +
- + if (dpf_preinit_done)
- + return dpf_err;
- +
- + dpf_preinit_done = 1;
- + printf("dpf_: preinit\n");
- + if (!dpf_dev_name)
- + dpf_dev_name = strdup("usb0");
- +
- + mp_msg(MSGT_VO, MSGL_V, "[dpf_u] Using device %s\n", dpf_dev_name);
- +
- + result=dpf_open(dpf_dev_name,&dpf_h);
- + if (dpf_h==NULL) {
- + mp_msg(MSGT_VO, MSGL_ERR, "[dpf_u] Can't open %s: %s\n", dpf_dev_name, strerror(errno));
- + goto err_out;
- + }
- + dpf_imagebuff=malloc(dpf_h->height*dpf_h->width*2);
- + rect[0]=0;
- + rect[1]=0;
- + rect[2]=dpf_h->width;
- + rect[3]=dpf_h->height;
- + dpf_err = 0;
- + printf("[dpf_u] %s opened successfully.\n", dpf_dev_name);
- + return 0;
- +err_out:
- + dpf_err = -1;
- + return -1;
- +}
- +
- +static int preinit(const char *subdevice)
- +{
- + if (subdevice)
- + {
- + if (dpf_dev_name) free(dpf_dev_name);
- + dpf_dev_name = strdup(subdevice);
- + }
- + return dpf_preinit(0);
- +}
- +
- +static void draw_osd(void) {
- + return;
- +}
- +
- +static int config(uint32_t width, uint32_t height, uint32_t d_width,
- + uint32_t d_height, uint32_t flags, char *title,
- + uint32_t format)
- +{
- + return 0;
- +}
- +
- +static int query_format(uint32_t format)
- +{
- + if (dpf_preinit(0)) return 0;
- + switch(format) {
- + case IMGFMT_BGR16:
- + return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE;
- + return 0;
- + }
- + return 0;
- +}
- +
- +
- +// all csp support stride
- +static int draw_frame(uint8_t *src[]) {
- +
- + return 1;
- +
- +}
- +
- +static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
- +{
- + char *imagebuff;
- + uint8_t *in = src[0];
- + uint8_t *dest = dpf_imagebuff + (dpf_h->width * y + x) * 2;
- + int next = dpf_h->width * 2;
- + int i,j;
- +
- + //make sure we won't cross the boundaries of dest
- + if (x>319) return 0;
- + if (y>239) return 0;
- + if (w+x>dpf_h->width) w=dpf_h->width-x;
- + if (h+x>dpf_h->height) h=dpf_h->height-x;
- +
- + for (i = 0; i < h; i++) {
- + //manually do a memcpy because the bytes
- + //should be flipped first :X
- + for (j=0; j<w; j++) {
- + dest[j*2]=in[j*2+1];
- + dest[j*2+1]=in[j*2];
- + }
- + dest += next;
- + in += stride[0];
- + }
- + return 0;
- +}
- +
- +static void check_events(void)
- +{
- +}
- +
- +static void flip_page(void)
- +{
- + //write dest to device
- + dpf_screen_blit(dpf_h,dpf_imagebuff,rect);
- +}
- +
- +static void uninit(void)
- +{
- + dpf_preinit(1); // so that later calls to preinit don't fail
- +}
- +
- +static int control(uint32_t request, void *data)
- +{
- + switch (request) {
- + case VOCTRL_QUERY_FORMAT:
- + return query_format(*((uint32_t*)data));
- + }
- + return VO_NOTIMPL;
- +}
- diff -Nuar -x '*.d' -x '*.xml' -x '*.xsl' mplayer-export-2012-05-05//libvo/vo_st2205u.c mplayer-dpf//libvo/vo_st2205u.c
- --- mplayer-export-2012-05-05//libvo/vo_st2205u.c 1970-01-01 07:30:00.000000000 +0730
- +++ mplayer-dpf//libvo/vo_st2205u.c 2012-05-05 22:11:14.545322227 +0800
- @@ -0,0 +1,158 @@
- +/*
- + * Video driver for ST2205U
- + * Copyright 2008 Sprite_tm <picframe@spritesmods.com>
- + * For more info, please visit http://spritesmods.com/?art=picframe
- + */
- +
- +#include <stdio.h>
- +#include <stdlib.h>
- +#include <string.h>
- +#include <unistd.h>
- +#include <errno.h>
- +
- +#include <sys/mman.h>
- +#include <sys/ioctl.h>
- +#include <linux/fb.h>
- +
- +#include "config.h"
- +#include "video_out.h"
- +#include "video_out_internal.h"
- +#include "fastmemcpy.h"
- +#include "sub/sub.h"
- +#include "mp_msg.h"
- +
- +#include <st2205.h>
- +
- +
- +static vo_info_t info = {
- + "st2205u device",
- + "st2205u",
- + "Jeroen Domburg <picframe@spritesmods.com>",
- + ""
- +};
- +
- +LIBVO_EXTERN(st2205u)
- +
- +static char *st_dev_name = NULL; // such as /dev/sda
- +static st2205_handle *st_h; // handle for st_dev_name
- +static char *st_imagebuff;
- +
- +static int st_preinit(int reset)
- +{
- + static int st_preinit_done = 0;
- + static int st_err = -1;
- +
- + if (reset) {
- + st_preinit_done = 0;
- + return 0;
- + }
- +
- + if (st_preinit_done)
- + return st_err;
- +
- + st_preinit_done = 1;
- + printf("st2205: preinit\n");
- + if (!st_dev_name)
- + st_dev_name = strdup("/dev/sda");
- +
- + mp_msg(MSGT_VO, MSGL_V, "[st2205u] Using device %s\n", st_dev_name);
- +
- + st_h=st2205_open(st_dev_name);
- + if (st_h==NULL) {
- + mp_msg(MSGT_VO, MSGL_ERR, "[st2205u] Can't open %s: %s\n", st_dev_name, strerror(errno));
- + goto err_out;
- + }
- + st_imagebuff=malloc(st_h->height*st_h->width*3);
- + st_err = 0;
- + printf("[st2205u] %s opened successfully.\n", st_dev_name);
- + return 0;
- +err_out:
- + st_err = -1;
- + return -1;
- +}
- +
- +static int preinit(const char *subdevice)
- +{
- + if (subdevice)
- + {
- + if (st_dev_name) free(st_dev_name);
- + st_dev_name = strdup(subdevice);
- + }
- + return st_preinit(0);
- +}
- +
- +static void draw_osd(void) {
- + return;
- +}
- +
- +static int config(uint32_t width, uint32_t height, uint32_t d_width,
- + uint32_t d_height, uint32_t flags, char *title,
- + uint32_t format)
- +{
- + return 0;
- +}
- +
- +static int query_format(uint32_t format)
- +{
- + if (st_preinit(0)) return 0;
- + if ((format & IMGFMT_RGB_MASK) == IMGFMT_RGB) {
- + if ((format & 0xff)==24) return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_ACCEPT_STRIDE;
- + }
- + return 0;
- +}
- +
- +
- +// all csp support stride
- +static int draw_frame(uint8_t *src[]) { return 1; }
- +
- +static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
- +{
- + char *imagebuff;
- + uint8_t *in = src[0];
- + uint8_t *dest = st_imagebuff + (st_h->width * y + x) * 3;
- + int next = st_h->width * 3;
- + int i,j;
- +
- + //make sure we won't cross the boundaries of dest
- + if (x>127) return 0;
- + if (y>127) return 0;
- + if (w+x>st_h->width) w=st_h->width-x;
- + if (h+x>st_h->height) h=st_h->height-x;
- +
- + for (i = 0; i < h; i++) {
- + //manually do a memcpy because the bytes
- + //should be flipped first :X
- + for (j=0; j<w; j++) {
- + dest[j*3]=in[j*3];
- + dest[j*3+1]=in[j*3+1];
- + dest[j*3+2]=in[j*3+2];
- + }
- + dest += next;
- + in += stride[0];
- + }
- + return 0;
- +}
- +
- +static void check_events(void)
- +{
- +}
- +
- +static void flip_page(void)
- +{
- + //write dest to device
- + st2205_send_data(st_h,st_imagebuff);
- +}
- +
- +static void uninit(void)
- +{
- + st_preinit(1); // so that later calls to preinit don't fail
- +}
- +
- +static int control(uint32_t request, void *data)
- +{
- + switch (request) {
- + case VOCTRL_QUERY_FORMAT:
- + return query_format(*((uint32_t*)data));
- + }
- + return VO_NOTIMPL;
- +}
- diff -Nuar -x '*.d' -x '*.xml' -x '*.xsl' mplayer-export-2012-05-05//Makefile mplayer-dpf//Makefile
- --- mplayer-export-2012-05-05//Makefile 2012-04-01 05:03:45.000000000 +0800
- +++ mplayer-dpf//Makefile 2012-05-06 09:38:43.926092789 +0800
- @@ -509,6 +509,7 @@
- SRCS_MPLAYER-$(DIRECT3D) += libvo/vo_direct3d.c libvo/w32_common.c
- SRCS_MPLAYER-$(DIRECTFB) += libvo/vo_directfb2.c libvo/vo_dfbmga.c
- SRCS_MPLAYER-$(DIRECTX) += libao2/ao_dsound.c libvo/vo_directx.c
- +SRCS_MPLAYER-$(DPF) += libvo/vo_dpf.c
- SRCS_MPLAYER-$(DXR2) += libao2/ao_dxr2.c libvo/vo_dxr2.c
- SRCS_MPLAYER-$(DXR3) += libvo/vo_dxr3.c
- SRCS_MPLAYER-$(ESD) += libao2/ao_esd.c
- @@ -592,6 +593,7 @@
- SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
- SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c libvo/sdl_common.c
- SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c
- +SRCS_MPLAYER-$(ST2205U) += libvo/vo_st2205u.c
- SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c
- SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c
- SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c
- diff -Nuar -x '*.d' -x '*.xml' -x '*.xsl' mplayer-export-2012-05-05//version.h mplayer-dpf//version.h
- --- mplayer-export-2012-05-05//version.h 1970-01-01 07:30:00.000000000 +0730
- +++ mplayer-dpf//version.h 2012-05-05 22:20:58.989984779 +0800
- @@ -0,0 +1,2 @@
- +#define VERSION "SVN-r34885-snapshot-4.4.5"
- +#define MP_TITLE "%s "VERSION" (C) 2000-2012 MPlayer Team\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement