Exemple #1
0
/*****************************************************************************
 * QNXDestroyWnd: unrealize and destroy the main window
 *****************************************************************************/
static int QNXDestroyWnd( vout_thread_t * p_vout )
{
    /* destroy the window widget */
    PtUnrealizeWidget( p_vout->p_sys->p_window );
//    PtDestroyWidget( p_vout->p_sys->p_window );

    /* destroy video channel */
    if( p_vout->p_sys->i_mode == MODE_VIDEO_OVERLAY )
    {
        PgDestroyVideoChannel( p_vout->p_sys->p_channel );
    }

    return( 0 );
}
Exemple #2
0
void ph_FreeYUVOverlay(_THIS, SDL_Overlay *overlay)
{
    SDL_Rect backrect;

    if (overlay == NULL)
    {
        return;
    }

    if (overlay->hwdata == NULL)
    {
        return;
    }

    current_overlay=NULL;

    /* restore screen behind the overlay/chroma color. */
    backrect.x=overlay->hwdata->CurrentViewPort.pos.x;
    backrect.y=overlay->hwdata->CurrentViewPort.pos.y;
    backrect.w=overlay->hwdata->CurrentViewPort.size.w;
    backrect.h=overlay->hwdata->CurrentViewPort.size.h;
    this->UpdateRects(this, 1, &backrect);

    /* it is need for some buggy drivers, that can't hide overlay before */
    /* freeing buffer, so we got trash on the srceen                     */
    overlay->hwdata->props.flags &= ~Pg_SCALER_PROP_SCALER_ENABLE;
    PgConfigScalerChannel(overlay->hwdata->channel, &(overlay->hwdata->props));

    overlay->hwdata->scaler_on = 0;
    overlay->hwdata->State = OVERLAY_STATE_UNINIT;

    if (overlay->hwdata->channel != NULL)
    {
        PgDestroyVideoChannel(overlay->hwdata->channel);
        overlay->hwdata->channel = NULL;
        return;
    }	

    overlay->hwdata->CurrentFrameData = NULL;  
	
    SDL_free(overlay->hwdata->FrameData0);
    SDL_free(overlay->hwdata->FrameData1);
    overlay->hwdata->FrameData0 = NULL;
    overlay->hwdata->FrameData1 = NULL;
    SDL_free(overlay->hwdata);
}