List Info

Thread: updating xineplug_decode_cle266 and video_out_dfb.patch




updating xineplug_decode_cle266 and video_out_dfb.patch
user name
2007-01-03 14:23:56
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-devdirectfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/
directfb-dev
updating xineplug_decode_cle266 and video_out_dfb.patch
user name
2007-01-03 14:55:00
Hi Rob,

I'm just working on this myself.  A new version of
xineplug_decode_cle266 and its associated patches will be in
SourceForge CVS within the hour.

The new one will build with latest DirectFB and
DirectFB-extra.

Mark

_______________________________________________
directfb-dev mailing list
directfb-devdirectfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/
directfb-dev
updating xineplug_decode_cle266 and video_out_dfb.patch
user name
2007-01-03 15:02:59
Mark Adams wrote:
> Hi Rob,

Hi Mark,


> I'm just working on this myself.  A new version of
> xineplug_decode_cle266 and its associated patches will
be in
> SourceForge CVS within the hour.
> 
> The new one will build with latest DirectFB and
DirectFB-extra.

Heh.  Maybe I should have sent an email before I started
tinkering.  Oh 
well, it was a fun evening.   Thanks
for your work!

-Rob



_______________________________________________
directfb-dev mailing list
directfb-devdirectfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/
directfb-dev
updating xineplug_decode_cle266 and video_out_dfb.patch
user name
2007-01-03 15:50:03
Mark Adams wrote:
> The new one will build with latest DirectFB and
DirectFB-extra.

Got it, thanks!

How can I test that it is working?  Do I have to do anything
to turn it 
on?  I am using df_xine as a client to VDR using xinelibout
(xvdr):

df_xine -a 4:3 -R --layer=1 --buffermode=double 
"xvdr:tcp://172.16.1.7:37890#nocache;demux:mpeg_block&q
uot;

My CPU usage is about 35% and I think that is the same as
before I 
started using the decoder.

Thanks,
Rob

_______________________________________________
directfb-dev mailing list
directfb-devdirectfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/
directfb-dev
updating xineplug_decode_cle266 and video_out_dfb.patch
user name
2007-01-03 16:13:32
Rob Shortt wrote:
> My CPU usage is about 35% and I think that is the same
as before I 
> started using the decoder.

OK, after more tests I guess I lied, without the plugin the
CPU usage is 
anywhere from 45%-60%.

Thanks,
-Rob


_______________________________________________
directfb-dev mailing list
directfb-devdirectfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/
directfb-dev
updating xineplug_decode_cle266 and video_out_dfb.patch
user name
2007-01-03 16:57:18
On 03/01/07, Rob Shortt <robtvcentric.com> wrote:
> Rob Shortt wrote:
> > My CPU usage is about 35% and I think that is the
same as before I
> > started using the decoder.
>
> OK, after more tests I guess I lied, without the plugin
the CPU usage is
> anywhere from 45%-60%.

Great.  You can quickly toggle between the two by editing
the
engine.decoder_priorities.mpeg2 value in ~/.xine/config.  If
you set
it to 9, it is then a higher priority than the CLE266
plug-in and
you'll be using software decoding.  Set it to 0 and you'll
have
hardware decoding.

Mark

_______________________________________________
directfb-dev mailing list
directfb-devdirectfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/
directfb-dev
[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )