Xine-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Original]

Re: [xine-devel] Can post plugins change frame size?


To: Jason Tackaberry <tack@xxxxxxxxx>
Subject: Re: [xine-devel] Can post plugins change frame size?
From: Thibaut Mattern <thibaut.mattern@xxxxxxxxx>
Date: Fri, 23 Sep 2005 11:02:30 +0200
Cc: xine-devel <xine-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivered-to: itdp@localhost
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OBMm3bWHiShWy0eWD1jlLWZXe/YPOe3g8qIffjDvzd5BdwYAXKkSBMB0ziymxgBnM/N3rUYfiXMQDoRhEmwVFMwJcwCRqm/uSuFZ9gygmwtBHafSlfkFruONTYokFUDN4N2G259LpTk6YjoUKYuj75B2xtv2BTfgwSCUNLpM16Y=
In-reply-to: <1127432469.20700.46.camel@draco.sault.org>
References: <1127432469.20700.46.camel@draco.sault.org>

Hi Jason,

On 9/23/05, Jason Tackaberry <tack@xxxxxxxxx> wrote:
> I'm attempting to write a scale post plugin (using MPlayer's swscaler
> that I recently ported), and I'm having a hard time making it work
> properly.
>
> The closest filter I have to look off of is the expand filter, but I'm
> not sure that's really the model I should be following.  Expand hooks
> get_frame and monkeys with the pointers to trick the decoder into
> rendering to an offset in the frame.  What I want to do, rather, is
> receive the native frame size and output a different size (with possibly
> a different aspect ratio, if the user so chooses).
>
> Let me just dump my draw function:
>
> static int scale_draw(vo_frame_t *frame, xine_stream_t *stream)
> {
>     post_video_port_t *port = (post_video_port_t *)frame->port;
>     post_scale_t *this = (post_scale_t *)port->post;
>     vo_frame_t *scaled_frame;
>     int skip;
>
>     if (frame->bad_frame) {
>         _x_post_frame_copy_down(frame, frame->next);
>         skip = frame->next->draw(frame->next, stream);
>         _x_post_frame_copy_up(frame, frame->next);
>         return skip;
>     }

IMHO, that's wrong, the bad frame has the original width and height of
the stream.
i see 2 ways to solve that
first way, just set the width and height of the bad frame before
calling the draw function. not sure if it works with xshm
second way, integrate the "if (frame->bad_frame)" into your main path,
and just skip the call to swscaler if it's a bad frame.

That should solve the psychedelic effect.

cheers,
Thibaut


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
xine-devel mailing list
xine-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xine-devel


[Prev in Thread] Current Thread [Next in Thread]