#ifndef __PHSTBDFB_ENCODER_H__    /* Multi-include protection.   <FILENAME>_H */
#define __PHSTBDFB_ENCODER_H__
/*****************************************************************************/
/* Copyright (c) 2008 NXP B.V.                                               */
/*                                                                           */
/* This library is free software; you can redistribute it and/or             */
/* modify it under the terms of the GNU Lesser General Public                */
/* License as published by the Free Software Foundation, using               */
/* version 2.1 of the License.                                               */
/*                                                                           */
/* This library is distributed in the hope that it will be useful,           */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of            */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          */
/* Lesser General Public License for more details.                           */
/*                                                                           */
/* You should have received a copy of the GNU Lesser General Public          */
/* License along with this library; if not, write to the Free Software       */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA   */
/*                                                                           */
/*****************************************************************************/
/*
   NXP STB22X Driver

   Code is derived from TI Davinci driver.

   TI Davinci driver

   (c) Copyright 2007  Telio AG

   Written by Denis Oliver Kropp <dok@directfb.org>

   Code is derived from VMWare driver.

   (c) Copyright 2001-2007  The DirectFB Organization (directfb.org)
   (c) Copyright 2000-2004  Convergence (integrated media) GmbH

   All rights reserved.

   Written by Denis Oliver Kropp <dok@directfb.org>,
              Andreas Hundt <andi@fischlustig.de>,
              Sven Neumann <neo@directfb.org>,
              Ville Syrjälä <syrjala@sci.fi> and
              Claudio Ciccani <klan@users.sf.net>.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the
   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.
*//**
    @file   phStbDFB_encoder.h
    @brief  Header File supporting encoder implementation.

@b  Component:  phStbDFB.

*//*

Rev Date        Author      Comments
--------------------------------------------------------------------------------
  1 20080103    laird       New version for DirectFB 1.1.1
  2 20080902    laird       Update Copyright headers.
--------------------------------------------------------------------------------
    For consistency and standardisation retain the Section Separators.
*/

/*******************
* INCLUDE FILES    *
********************/
#include "phStbDFB_internal.h"

/**************************************************************************
* EXPORTED MACROS                               PH_STBDFB_<_WORD>+        *
***************************************************************************/

/*********************************************************************
* EXPORTED TYPEDEFS                           [p]phStbDfb_<Word>+_t  *
**********************************************************************/

/**
 * @brief Describe the Encoder(stb225) capabilities.
 */
#define PH_STBDFB_MAIN_SCREEN_ENCODER_CAPABILITIES    ( DSECAPS_TV_STANDARDS | \
                                                        DSECAPS_CONNECTORS |   \
                                                        DSECAPS_SLOW_BLANKING |\
                                                        DSECAPS_OUT_SIGNALS |\
                                                        DSECAPS_RESOLUTION |\
                                                        DSECAPS_MACROVISION |\
                                                        DSECAPS_CGMS |\
                                                        DSECAPS_WSS )

/**
 * @brief Describe the encoder config flags that are supported by stb225.
 */
#define PH_STBDFB_MAIN_SCREEN_ENCODER_CONFIGFLAGS     ( DSECONF_TV_STANDARD  | \
                                                        DSECONF_CONNECTORS   | \
                                                        DSECONF_OUT_SIGNALS  | \
                                                        DSECONF_SLOW_BLANKING | \
                                                        DSECONF_RESOLUTION   | \
                                                        DSECONF_FREQUENCY    | \
                                                        DSECONF_SCANMODE     | \
                                                        DSECONF_ADJUSTMENT   | \
                                                        DSECONF_MACROVISION  | \
                                                        DSECONF_CGMS         | \
                                                        DSECONF_WSS)

/**************************************************************************
* EXPORTED DATA                          g[k|p|kp|pk|kpk]phStbDfb_<Word>+ *
***************************************************************************/

/****************************************************************************
* EXPORTED FUNCTION PROTOTYPES                         phStbDfb[_<Word>+]   *
*****************************************************************************/

/******************************************************************************/
extern DFBResult phStbDFB_InitEncoder(
    CoreScreen *screen,
    void                         *driver_data,
    void                         *screen_data,
    int                           encoder,
    DFBScreenEncoderDescription  *description,
    DFBScreenEncoderConfig       *config );

/******************************************************************************/

extern DFBResult phStbDFB_TestEncoderConfig(
    CoreScreen                   *screen,
    void                         *driver_data,
    void                         *screen_data,
    int                           encoder,
    const DFBScreenEncoderConfig *config,
    DFBScreenEncoderConfigFlags  *failed);

/******************************************************************************/
extern DFBResult phStbDFB_SetEncoderConfig(
    CoreScreen                   *screen,
    void                         *driver_data,
    void                         *screen_data,
    int                           encoder,
    const DFBScreenEncoderConfig *config);

#endif //__PHSTBDFB_ENCODER_H__
