summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/nullvideo.c
Side-by-side diff
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
@@ -63,47 +63,46 @@ struct opie_frame_s {
int ideal_height;
int output_width, output_height;
uint8_t *chunk[3];
yuv2rgb_t *yuv2rgb;
uint8_t *rgb_dst;
int yuv_stride;
int stripe_height, stripe_inc;
int bytes_per_line;
uint8_t *data;
- int show_video;
+// int show_video;
null_driver_t *output;
};
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;
}
static void null_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
opie_frame_t *frame = (opie_frame_t *) vo_img ;
printf("frame copy\n");
- if(!frame->show_video ){ printf("no video\n"); return; } // no video
+ if(!frame->output->m_show_video ){ printf("no video\n"); return; } // no video
if (frame->format == IMGFMT_YV12) {
frame->yuv2rgb->yuv2rgb_fun (frame->yuv2rgb, frame->rgb_dst,
src[0], src[1], src[2]);
} else {
frame->yuv2rgb->yuy22rgb_fun (frame->yuv2rgb, frame->rgb_dst,
src[0]);
-
}
frame->rgb_dst += frame->stripe_inc;
printf("returning\n");
}
static void null_frame_field (vo_frame_t *vo_img, int which_field) {
opie_frame_t *frame = (opie_frame_t *) vo_img ;
printf("field\n\n");
switch (which_field) {
@@ -136,45 +135,45 @@ static void null_frame_dispose( vo_frame_t* vo_img){
static vo_frame_t* null_alloc_frame( vo_driver_t* self ){
null_driver_t* this = (null_driver_t*)self;
opie_frame_t* frame;
frame = (opie_frame_t*)malloc ( sizeof(opie_frame_t) );
memset( frame, 0, sizeof( opie_frame_t) );
pthread_mutex_init (&frame->frame.mutex, NULL);
printf("alloc_frame\n");
frame->name = "opie\0";
frame->version = 1;
frame->output = this;
- frame->show_video = this->m_show_video;
+// frame->show_video = this->m_show_video;
/* initialize the frame*/
frame->frame.driver = self;
/*frame.frame.free = null_frame_free;*/
frame->frame.copy = null_frame_copy;
frame->frame.field = null_frame_field;
frame->frame.dispose = null_frame_dispose;
frame->yuv2rgb = 0;
/*
* colorspace converter for this frame
*/
frame->yuv2rgb = this->yuv2rgb_factory->create_converter (this->yuv2rgb_factory);
return (vo_frame_t*) frame;
}
// size specific
static void null_compute_ideal_size (null_driver_t *this, opie_frame_t *frame) {
- if (!this->m_is_scaling || !this->m_show_video) {
+ if (!this->m_is_scaling /*|| !this->m_show_video*/) {
printf("Not scaling\n");
frame->ideal_width = frame->width;
frame->ideal_height = frame->height;
frame->ratio_factor = 1.0;
} else {
double image_ratio, desired_ratio, corr_factor;
image_ratio = (double) frame->width / (double) frame->height;
switch (frame->user_ratio) {
@@ -292,25 +291,25 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
|| (flags != frame->flags)
|| (format != frame->format)
|| (this->user_ratio != frame->user_ratio)
|| this->gui_changed ) {
frame->width = width;
frame->height = height;
frame->ratio_code = ratio_code;
frame->flags = flags;
frame->format = format;
frame->user_ratio = this->user_ratio;
this->gui_changed = 0;
- frame->show_video = this->m_show_video;
+// frame->show_video = this->m_show_video;
null_compute_ideal_size (this, frame);
null_compute_rgb_size (this, frame);
/*
* (re-) allocate
*/
if( frame->data ) {
if(frame->chunk[0] ){
free( frame->chunk[0] );
frame->chunk[0] = NULL;
@@ -346,25 +345,25 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
}
frame->format = format;
frame->width = width;
frame->height = height;
frame->stripe_height = 16 * frame->output_height / frame->height;
frame->bytes_per_line = frame->output_width * this->bytes_per_pixel;
/*
* set up colorspace converter
*/
- if(this->m_show_video ){
+ if(1 /*this->m_show_video*/ ){
printf("showing video\n");
switch (flags) {
case VO_TOP_FIELD:
case VO_BOTTOM_FIELD:
frame->yuv2rgb->configure (frame->yuv2rgb,
frame->width,
16,
frame->width*2,
frame->width,
frame->output_width,
frame->stripe_height,