Hello,
I am attempting to update xineplug_decode_cle266 to the cvs
head of
DirectFB. Attached is my video_out_dfb patch which I
haven't tested yet
(but it builds). Some of the changes I think are related to
the recent
core API changes. Since the update xineplug_decode_cle266
no longer
compiles as well:
# make
make all-recursive
make[1]: Entering directory
`/opt/src/CVS_cle266mpegdec/xineplug_decode_cle266'
Making all in src
make[2]: Entering directory
`/opt/src/CVS_cle266mpegdec/xineplug_decode_cle266/src'
if /bin/sh ../libtool --tag=CC --mode=compile gcc
-DHAVE_CONFIG_H -I.
-I. -I.. -D_REENTRANT -I/usr/local/include/directfb
-D_GNU_SOURCE
-D_REENTRANT -I/usr/local/include/directfb-internal
-I/usr/local/include/directfb -DREENTRANT
-I/usr/local/include -g -O2
-MT xineplug_decode_cle266_la-xine_decoder.lo -MD -MP -MF
".deps/xineplug_decode_cle266_la-xine_decoder.Tpo"
-c -o
xineplug_decode_cle266_la-xine_decoder.lo `test -f
'xine_decoder.c' ||
echo './'`xine_decoder.c;
then mv -f
".deps/xineplug_decode_cle266_la-xine_decoder.Tpo"
".deps/xineplug_decode_cle266_la-xine_decoder.Plo"
; else rm -f
".deps/xineplug_decode_cle266_la-xine_decoder.Tpo"
; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_REENTRANT
-I/usr/local/include/directfb -D_GNU_SOURCE -D_REENTRANT
-I/usr/local/include/directfb-internal
-I/usr/local/include/directfb
-DREENTRANT -I/usr/local/include -g -O2 -MT
xineplug_decode_cle266_la-xine_decoder.lo -MD -MP -MF
.deps/xineplug_decode_cle266_la-xine_decoder.Tpo -c
xine_decoder.c
-fPIC -DPIC -o
.libs/xineplug_decode_cle266_la-xine_decoder.o
xine_decoder.c: In function `cle266_get_frame':
xine_decoder.c:101: warning: passing arg 1 of
`dfb_surface_hardware_lock' from incompatible pointer type
xine_decoder.c:101: warning: passing arg 2 of
`dfb_surface_hardware_lock' makes pointer from integer
without a cast
xine_decoder.c:101: error: too few arguments to function
`dfb_surface_hardware_lock'
make[2]: *** [xineplug_decode_cle266_la-xine_decoder.lo]
Error 1
make[2]: Leaving directory
`/opt/src/CVS_cle266mpegdec/xineplug_decode_cle266/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/opt/src/CVS_cle266mpegdec/xineplug_decode_cle266'
make: *** [all] Error 2
It looks like dfb_surface_hardware_lock requires a CoreDFB
object passed
to it. Can anyone tell me the best way to get that is?
You can find xineplug_decode_cle266 here:
http:/
/sourceforge.net/projects/cle266mpegdec/
http://cle266mpegdec.cvs.sourcefor
ge.net/cle266mpegdec/xineplug_decode_cle266/
Thanks,
-Rob
Index:
interfaces/IDirectFBVideoProvider/video_out_dfb/video_out_df
b.c
============================================================
=======
RCS file:
/cvs/directfb/DirectFB-extra/interfaces/IDirectFBVideoProvid
er/video_out_dfb/video_out_dfb.c,v
retrieving revision 1.37
diff -u -r1.37 video_out_dfb.c
---
interfaces/IDirectFBVideoProvider/video_out_dfb/video_out_df
b.c 13 Dec 2006 18:38:53 -0000 1.37
+++
interfaces/IDirectFBVideoProvider/video_out_dfb/video_out_df
b.c 3 Jan 2007 14:22:14 -0000
 -33,6
+33,9 
#include <idirectfb.h>
+#include <core/state.h>
+#include <core/surfaces.h>
+
#include <gfx/convert.h>
#define LOG_MODULE "video_out_dfb"
 -48,12
+51,15 
#include "video_out_dfb_mix.h"
#include "video_out_dfb_blend.h"
+#define VO_CAP_DFBV 0x00010000
+#define XINE_IMGFMT_DFBV
(('V'<<24)|('B'<<16)|('F'<<8)|'D')
+
static uint32_t
vo_dfb_get_capabilities( vo_driver_t *vo_driver )
{
dfb_driver_t *this = (dfb_driver_t*) vo_driver;
- uint32_t caps = VO_CAP_YV12 | VO_CAP_YUY2;
+ uint32_t caps = VO_CAP_YV12 | VO_CAP_YUY2 |
VO_CAP_DFBV;
if (this->ovl)
caps |= VO_CAP_UNSCALED_OVERLAY;
 -94,6
+100,27 
}
static void
+vo_dfb_duplicate_frame_data( vo_frame_t *vo_frame,
+ vo_frame_t *vo_original)
+{
+ dfb_frame_t *frame = (dfb_frame_t*) vo_frame;
+ dfb_frame_t *original = (dfb_frame_t*) vo_original;
+
+ CardState state;
+ DFBRectangle rect = { 0, 0, frame->width,
frame->height };
+ DFBRegion clip;
+
+ dfb_state_init( &state, NULL );
+ dfb_region_from_rectangle( &clip, &rect );
+ dfb_state_set_destination( &state, (CoreSurface*)
frame->surface );
+ dfb_state_set_source( &state, (CoreSurface*)
original->surface );
+ dfb_state_set_clip( &state, &clip );
+ dfb_state_set_blitting_flags( &state, DSBLIT_NOFX
);
+ dfb_gfxcard_blit( &rect, 0, 0, &state );
+ dfb_state_destroy( &state );
+}
+
+static void
vo_dfb_frame_dispose( vo_frame_t *vo_frame )
{
dfb_frame_t *frame = (dfb_frame_t*) vo_frame;
 -163,17
+190,31 
dsc.flags = DSDESC_CAPS | DSDESC_WIDTH |
DSDESC_HEIGHT |
DSDESC_PIXELFORMAT;
- dsc.caps = DSCAPS_SYSTEMONLY |
DSCAPS_INTERLACED;
dsc.width = (width + 7) & ~7;
dsc.height = (height + 1) & ~1;
dsc.pixelformat = format;
+
+ if (format == XINE_IMGFMT_DFBV) {
+ lprintf( "creating in video
memoryn" );
+ dsc.caps = DSCAPS_VIDEOONLY |
DSCAPS_INTERLACED;
+ }
+ else {
+ dsc.caps = DSCAPS_SYSTEMONLY |
DSCAPS_INTERLACED;
+ }
ret = idirectfb_singleton->CreateSurface(
idirectfb_singleton,
&dsc, &frame->surface );
+
+ if (format == XINE_IMGFMT_DFBV) {
+ frame->vo_frame.proc_duplicate_frame_data
= vo_dfb_duplicate_frame_data;
+ }
+
if (ret) {
DirectFBError(
"IDirectFB::CreateSurface()", ret );
return;
}
+
+ frame->vo_frame.accel_data =
frame->surface;
frame->surface->Lock( frame->surface,
DSLF_WRITE,
(void*)&frame->vo_frame.base[0],
_______________________________________________
directfb-dev mailing list
directfb-dev directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/
directfb-dev
|