Diffstat (limited to 'noncore/multimedia/opieplayer2/nullvideo.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 17 |
1 files changed, 8 insertions, 9 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 | |||
@@ -71,9 +71,9 @@ struct opie_frame_s { | |||
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 | ||
79 | static uint32_t null_get_capabilities(vo_driver_t *self ){ | 79 | static uint32_t null_get_capabilities(vo_driver_t *self ){ |
@@ -84,18 +84,17 @@ static uint32_t null_get_capabilities(vo_driver_t *self ){ | |||
84 | 84 | ||
85 | static void null_frame_copy (vo_frame_t *vo_img, uint8_t **src) { | 85 | static 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"); |
@@ -144,9 +143,9 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){ | |||
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; |
@@ -164,9 +163,9 @@ static vo_frame_t* null_alloc_frame( vo_driver_t* self ){ | |||
164 | 163 | ||
165 | // size specific | 164 | // size specific |
166 | static void null_compute_ideal_size (null_driver_t *this, opie_frame_t *frame) { | 165 | static 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; |
@@ -300,9 +299,9 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img, | |||
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); |
@@ -354,9 +353,9 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img, | |||
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: |
@@ -413,17 +412,17 @@ static void null_display_frame( vo_driver_t* self, vo_frame_t *frame_gen ){ | |||
413 | opie_frame_t* frame = (opie_frame_t*)frame_gen; | 412 | opie_frame_t* frame = (opie_frame_t*)frame_gen; |
414 | display_xine_frame_t display = this->frameDis; | 413 | display_xine_frame_t display = this->frameDis; |
415 | 414 | ||
416 | printf("display frame\n"); | 415 | printf("display frame\n"); |
417 | // if( this->m_show_video ) { // return if not displaying | 416 | // if( this->m_show_video ) { // return if not displaying |
418 | printf("calling home aye\n" ); | 417 | printf("calling home aye\n" ); |
419 | if( display != NULL ) { | 418 | if( display != NULL ) { |
420 | (*display)(this->caller, frame->data, | 419 | (*display)(this->caller, frame->data, |
421 | frame->output_width, frame->output_height, | 420 | frame->output_width, frame->output_height, |
422 | frame->bytes_per_line ); | 421 | frame->bytes_per_line ); |
423 | printf("display done hope you enyoyed the frame"); | 422 | printf("display done hope you enyoyed the frame"); |
424 | } | 423 | } |
425 | // } | 424 | // } |
426 | 425 | ||
427 | frame->frame.displayed (&frame->frame); | 426 | frame->frame.displayed (&frame->frame); |
428 | } | 427 | } |
429 | 428 | ||