summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c54
2 files changed, 55 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 123ca91..0ea85dd 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -45,7 +45,9 @@ Lib::Lib() {
45 } 45 }
46 m_xine = xine_init( m_videoOutput, 46// m_xine = xine_init( m_videoOutput,
47 m_audioOutput, 47// m_audioOutput,
48 m_config ); 48// m_config );
49 // test loading 49 // test loading
50 m_videoOutput = ::init_video_out_plugin( m_config, NULL ); 50 m_videoOutput = ::init_video_out_plugin( m_config, NULL );
51 m_xine = xine_init( m_videoOutput,
52 m_audioOutput, m_config );
51} 53}
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index c97800c..5224862 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -22,2 +22,5 @@ struct opie_frame_s {
22 int version; 22 int version;
23 int m_width;
24 int m_height;
25 uint8_t *chunk[3];
23 null_driver_t *output; 26 null_driver_t *output;
@@ -25,4 +28,5 @@ struct opie_frame_s {
25 28
26static uint32_t null_get_capabilities(vo_driver_t *self ){ 29static uint32_t null_get_capabilities(vo_driver_t *self ){
27 null_driver_t* this = (null_driver_t*)self; 30 null_driver_t* this = (null_driver_t*)self;
31 printf("capabilities\n");
28 return this->m_capabilities; 32 return this->m_capabilities;
@@ -31,4 +35,5 @@ static uint32_t null_get_capabilities(vo_driver_t *self ){
31/* take care of the frame*/ 35/* take care of the frame*/
32static void null_frame_dispose( vo_frame_t* vo_img){ 36static void null_frame_dispose( vo_frame_t* vo_img){
33 opie_frame_t* frame = (opie_frame_t*)vo_img; 37 opie_frame_t* frame = (opie_frame_t*)vo_img;
38 printf("frame_dispose\n");
34 free (frame); 39 free (frame);
@@ -36,2 +41,3 @@ static void null_frame_dispose( vo_frame_t* vo_img){
36static void null_frame_field( vo_frame_t* frame, int inti ){ 41static void null_frame_field( vo_frame_t* frame, int inti ){
42 printf("frame_field\n");
37 /* not needed */ 43 /* not needed */
@@ -41,3 +47,3 @@ static void null_frame_field( vo_frame_t* frame, int inti ){
41 47
42static vo_frame_t* null_alloc_frame( vo_driver_t* self ){ 48static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
43 null_driver_t* this = (null_driver_t*)self; 49 null_driver_t* this = (null_driver_t*)self;
@@ -45,2 +51,3 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
45 memset( frame, 0, sizeof( opie_frame_t) ); 51 memset( frame, 0, sizeof( opie_frame_t) );
52 printf("alloc_frame\n");
46 frame->name = "opie\0"; 53 frame->name = "opie\0";
@@ -56,2 +63,3 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
56 63
64
57 return (vo_frame_t*) frame; 65 return (vo_frame_t*) frame;
@@ -61,6 +69,41 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
61 int ratio_code, int format, int flags ){ 69 int ratio_code, int format, int flags ){
70 null_driver_t* this = (null_driver_t*) self;
71 opie_frame_t* frame = (opie_frame_t*)img;
62 /* not needed now */ 72 /* not needed now */
73 printf("update_frame_format\n");
74 printf("al crash aye?\n");
75
76 if(frame->chunk[0] ){
77 free( frame->chunk[0] );
78 frame->chunk[0] = NULL;
79 }
80 if(frame->chunk[1] ){
81 free ( frame->chunk[1] );
82 frame->chunk[1] = NULL;
83 }
84 if(frame->chunk[2] ){
85 free ( frame->chunk[2] );
86 frame->chunk[2] = NULL;
87 }
88
89
90 if( format == IMGFMT_YV12 ) {
91 int image_size = width * height; /* cast ouch*/
92 frame->frame.base[0] = xine_xmalloc_aligned(16, image_size,
93 (void **)&frame->chunk[0] );
94 frame->frame.base[1] = xine_xmalloc_aligned(16, image_size,
95 (void **)&frame->chunk[1] );
96 frame->frame.base[2] = xine_xmalloc_aligned(16, image_size,
97 (void **)&frame->chunk[2] );
98 }else{
99 int image_size = width * height; /* cast ouch*/
100 frame->frame.base[0] = xine_xmalloc_aligned(16, image_size,
101 (void **)&frame->chunk[0] );
102 frame->chunk[1] = NULL;
103 frame->chunk[2] = NULL;
104 }
105
63} 106}
64static void null_display_frame( vo_driver_t* self, vo_frame_t *frame ){ 107static void null_display_frame( vo_driver_t* self, vo_frame_t *frame ){
65 printf("display frame"); 108 printf("display frame\n");
66} 109}
@@ -72,2 +115,3 @@ static int null_get_property( vo_driver_t* self,
72 int property ){ 115 int property ){
116 printf("property get]n");
73 return 0; 117 return 0;
@@ -77,2 +121,3 @@ static int null_set_property( vo_driver_t* self,
77 int value ){ 121 int value ){
122 printf("set property\n");
78 return value; 123 return value;
@@ -82,2 +127,3 @@ static void null_get_property_min_max( vo_driver_t* self,
82 int *max ){ 127 int *max ){
128 printf("min max\n");
83 *max = 0; 129 *max = 0;