summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/nullvideo.c
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/nullvideo.c') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index f356e76..63d5752 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -69,35 +69,34 @@ struct opie_frame_s {
69 int yuv_stride; 69 int yuv_stride;
70 int stripe_height, stripe_inc; 70 int stripe_height, stripe_inc;
71 71
72 int bytes_per_line; 72 int bytes_per_line;
73 uint8_t *data; 73 uint8_t *data;
74 74
75 int show_video; 75// int show_video;
76 null_driver_t *output; 76 null_driver_t *output;
77}; 77};
78 78
79static uint32_t null_get_capabilities(vo_driver_t *self ){ 79static uint32_t null_get_capabilities(vo_driver_t *self ){
80 null_driver_t* this = (null_driver_t*)self; 80 null_driver_t* this = (null_driver_t*)self;
81 printf("capabilities\n"); 81 printf("capabilities\n");
82 return this->m_capabilities; 82 return this->m_capabilities;
83} 83}
84 84
85static void null_frame_copy (vo_frame_t *vo_img, uint8_t **src) { 85static void null_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
86 opie_frame_t *frame = (opie_frame_t *) vo_img ; 86 opie_frame_t *frame = (opie_frame_t *) vo_img ;
87 printf("frame copy\n"); 87 printf("frame copy\n");
88 if(!frame->show_video ){ printf("no video\n"); return; } // no video 88 if(!frame->output->m_show_video ){ printf("no video\n"); return; } // no video
89 89
90 if (frame->format == IMGFMT_YV12) { 90 if (frame->format == IMGFMT_YV12) {
91 frame->yuv2rgb->yuv2rgb_fun (frame->yuv2rgb, frame->rgb_dst, 91 frame->yuv2rgb->yuv2rgb_fun (frame->yuv2rgb, frame->rgb_dst,
92 src[0], src[1], src[2]); 92 src[0], src[1], src[2]);
93 } else { 93 } else {
94 94
95 frame->yuv2rgb->yuy22rgb_fun (frame->yuv2rgb, frame->rgb_dst, 95 frame->yuv2rgb->yuy22rgb_fun (frame->yuv2rgb, frame->rgb_dst,
96 src[0]); 96 src[0]);
97
98 } 97 }
99 98
100 frame->rgb_dst += frame->stripe_inc; 99 frame->rgb_dst += frame->stripe_inc;
101 printf("returning\n"); 100 printf("returning\n");
102} 101}
103 102
@@ -142,13 +141,13 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
142 pthread_mutex_init (&frame->frame.mutex, NULL); 141 pthread_mutex_init (&frame->frame.mutex, NULL);
143 142
144 printf("alloc_frame\n"); 143 printf("alloc_frame\n");
145 frame->name = "opie\0"; 144 frame->name = "opie\0";
146 frame->version = 1; 145 frame->version = 1;
147 frame->output = this; 146 frame->output = this;
148 frame->show_video = this->m_show_video; 147// frame->show_video = this->m_show_video;
149 /* initialize the frame*/ 148 /* initialize the frame*/
150 frame->frame.driver = self; 149 frame->frame.driver = self;
151 /*frame.frame.free = null_frame_free;*/ 150 /*frame.frame.free = null_frame_free;*/
152 frame->frame.copy = null_frame_copy; 151 frame->frame.copy = null_frame_copy;
153 frame->frame.field = null_frame_field; 152 frame->frame.field = null_frame_field;
154 frame->frame.dispose = null_frame_dispose; 153 frame->frame.dispose = null_frame_dispose;
@@ -162,13 +161,13 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
162 return (vo_frame_t*) frame; 161 return (vo_frame_t*) frame;
163} 162}
164 163
165// size specific 164// size specific
166static void null_compute_ideal_size (null_driver_t *this, opie_frame_t *frame) { 165static void null_compute_ideal_size (null_driver_t *this, opie_frame_t *frame) {
167 166
168 if (!this->m_is_scaling || !this->m_show_video) { 167 if (!this->m_is_scaling /*|| !this->m_show_video*/) {
169 printf("Not scaling\n"); 168 printf("Not scaling\n");
170 frame->ideal_width = frame->width; 169 frame->ideal_width = frame->width;
171 frame->ideal_height = frame->height; 170 frame->ideal_height = frame->height;
172 frame->ratio_factor = 1.0; 171 frame->ratio_factor = 1.0;
173 172
174 } else { 173 } else {
@@ -298,13 +297,13 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
298 frame->height = height; 297 frame->height = height;
299 frame->ratio_code = ratio_code; 298 frame->ratio_code = ratio_code;
300 frame->flags = flags; 299 frame->flags = flags;
301 frame->format = format; 300 frame->format = format;
302 frame->user_ratio = this->user_ratio; 301 frame->user_ratio = this->user_ratio;
303 this->gui_changed = 0; 302 this->gui_changed = 0;
304 frame->show_video = this->m_show_video; 303 //frame->show_video = this->m_show_video;
305 304
306 305
307 null_compute_ideal_size (this, frame); 306 null_compute_ideal_size (this, frame);
308 null_compute_rgb_size (this, frame); 307 null_compute_rgb_size (this, frame);
309 308
310 /* 309 /*
@@ -352,13 +351,13 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
352 frame->stripe_height = 16 * frame->output_height / frame->height; 351 frame->stripe_height = 16 * frame->output_height / frame->height;
353 frame->bytes_per_line = frame->output_width * this->bytes_per_pixel; 352 frame->bytes_per_line = frame->output_width * this->bytes_per_pixel;
354 353
355 /* 354 /*
356 * set up colorspace converter 355 * set up colorspace converter
357 */ 356 */
358 if(this->m_show_video ){ 357 if(1 /*this->m_show_video*/ ){
359 printf("showing video\n"); 358 printf("showing video\n");
360 359
361 switch (flags) { 360 switch (flags) {
362 case VO_TOP_FIELD: 361 case VO_TOP_FIELD:
363 case VO_BOTTOM_FIELD: 362 case VO_BOTTOM_FIELD:
364 frame->yuv2rgb->configure (frame->yuv2rgb, 363 frame->yuv2rgb->configure (frame->yuv2rgb,