summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c48
2 files changed, 52 insertions, 4 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() {
}
- m_xine = xine_init( m_videoOutput,
- m_audioOutput,
- m_config );
+// m_xine = xine_init( m_videoOutput,
+// m_audioOutput,
+// m_config );
// test loading
m_videoOutput = ::init_video_out_plugin( m_config, NULL );
+ m_xine = xine_init( m_videoOutput,
+ m_audioOutput, m_config );
}
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 {
int version;
+ int m_width;
+ int m_height;
+ uint8_t *chunk[3];
null_driver_t *output;
@@ -27,2 +30,3 @@ static uint32_t null_get_capabilities(vo_driver_t *self ){
null_driver_t* this = (null_driver_t*)self;
+ printf("capabilities\n");
return this->m_capabilities;
@@ -33,2 +37,3 @@ static void null_frame_dispose( vo_frame_t* vo_img){
opie_frame_t* frame = (opie_frame_t*)vo_img;
+ printf("frame_dispose\n");
free (frame);
@@ -36,2 +41,3 @@ static void null_frame_dispose( vo_frame_t* vo_img){
static void null_frame_field( vo_frame_t* frame, int inti ){
+ printf("frame_field\n");
/* not needed */
@@ -45,2 +51,3 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
memset( frame, 0, sizeof( opie_frame_t) );
+ printf("alloc_frame\n");
frame->name = "opie\0";
@@ -56,2 +63,3 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
+
return (vo_frame_t*) frame;
@@ -61,6 +69,41 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
int ratio_code, int format, int flags ){
+ null_driver_t* this = (null_driver_t*) self;
+ opie_frame_t* frame = (opie_frame_t*)img;
/* not needed now */
+ printf("update_frame_format\n");
+ printf("al crash aye?\n");
+
+ if(frame->chunk[0] ){
+ free( frame->chunk[0] );
+ frame->chunk[0] = NULL;
+ }
+ if(frame->chunk[1] ){
+ free ( frame->chunk[1] );
+ frame->chunk[1] = NULL;
+ }
+ if(frame->chunk[2] ){
+ free ( frame->chunk[2] );
+ frame->chunk[2] = NULL;
+ }
+
+
+ if( format == IMGFMT_YV12 ) {
+ int image_size = width * height; /* cast ouch*/
+ frame->frame.base[0] = xine_xmalloc_aligned(16, image_size,
+ (void **)&frame->chunk[0] );
+ frame->frame.base[1] = xine_xmalloc_aligned(16, image_size,
+ (void **)&frame->chunk[1] );
+ frame->frame.base[2] = xine_xmalloc_aligned(16, image_size,
+ (void **)&frame->chunk[2] );
+ }else{
+ int image_size = width * height; /* cast ouch*/
+ frame->frame.base[0] = xine_xmalloc_aligned(16, image_size,
+ (void **)&frame->chunk[0] );
+ frame->chunk[1] = NULL;
+ frame->chunk[2] = NULL;
+ }
+
}
static void null_display_frame( vo_driver_t* self, vo_frame_t *frame ){
- printf("display frame");
+ printf("display frame\n");
}
@@ -72,2 +115,3 @@ static int null_get_property( vo_driver_t* self,
int property ){
+ printf("property get]n");
return 0;
@@ -77,2 +121,3 @@ static int null_set_property( vo_driver_t* self,
int value ){
+ printf("set property\n");
return value;
@@ -82,2 +127,3 @@ static void null_get_property_min_max( vo_driver_t* self,
int *max ){
+ printf("min max\n");
*max = 0;