/* Network-Integrated Multimedia Middleware (NMM)
 * http://www.motama.com/nmm.html
 *  
 * Copyright (C) 2006-2007
 * Motama GmbH, Saarbruecken, Germany
 * http://www.motama.com
 *  
 * This file is part of NMM. 
 * 
 * NMM is free software; you can redistribute it and/or modify it    
 * under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; only version 2 of the License.      
 * 
 * NMM 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 General Public 
 * License for more details.  
 * 
 * You should have received a copy of the GNU General Public License 
 * along with NMM; if not, write to the Free Software Foundation,    
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

#ifndef _NMM_OVERLAY_HPP_
#define _NMM_OVERLAY_HPP_ _NMM_OVERLAY_HPP_

#include "visibility.hpp"
#ifdef __cplusplus
extern "C" {
#endif
/**
  * overlays two rgba bitmaps
  * \param data pointer to the source bitmap
  * \param stride1 number of pixels to get into a new line of the source bitmap
  * \param w width of the source bitmap
  * \param h height of the source bitmap
  * \param pixel pointer to the destination bitmap
  * \param stride2 number of pixels to get into a new line of the destination bitmap
  */
  void DLLEXPORT RGBAoverlay( unsigned char* data, unsigned int stride1, unsigned int w, unsigned int h,
                    unsigned char* pixel, unsigned int stride2 );

  /**
  * overlays the spezified yv12a bitmap over the actual output buffer (out_buffer)
  * \param source pointer to the bitmap(yv12a format) that should be drawed over the background
  * \param xpos x coordiante of the upper left corner where the bitmap should be placed
  * \param ypos y coordiante of the upper left corner where the bitmap should be placed
  * \param w width of the source bitmap
  * \param h height of the source bitmap
  * \param destination pointer to the destination bitmap (yv12 format)
  * \param image_width width of the destination bitmap
  * \param image_height height of the destination bitmap
  */
  void DLLEXPORT YV12Aoverlay(unsigned char* source, unsigned int xpos, unsigned int ypos, unsigned int w, unsigned int h,
	            unsigned char* destination, unsigned int image_width, unsigned image_height );

 /**
  * overlays a part of the spezified yv12a bitmap over the actual output buffer (out_buffer)
  * \param source pointer to the bitmap(yv12a format) that should be drawed over the background
  * \param xpos x coordiante of the upper left corner where the bitmap should be placed
  * \param ypos y coordiante of the upper left corner where the bitmap should be placed
  * \param xstart x coordinate of the upper left corner of the source
  * \param ystart y coordinate of the upper left corner of the source
  * \param seg_width width of the source part
  * \param seg_height height of the source part
  * \param w width of the source bitmap
  * \param h height of the source bitmap
  * \param destination pointer to the destination bitmap (yv12 format)
  * \param image_width width of the destination bitmap
  * \param image_height height of the destination bitmap
  */
  void DLLEXPORT YV12Aoverlay2(unsigned char* source, unsigned int xpos, unsigned int ypos,
                     unsigned int xstart, unsigned int ystart, unsigned int seg_width, unsigned int seg_height,
                     unsigned int w, unsigned int h,
	             unsigned char* destination, unsigned int image_width, unsigned image_height);
#ifdef __cplusplus
}
#endif

#endif //_NMM_OVERLAY_HPP_
