/* 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.
 *
 */

module NMM {
  
  /** Video mux  interface */
  interface IVideoMux {
    
    enum Alignment { NONE = 0, TOP_LEFT = 1, BOTTOM_RIGHT = 2 };

    /**
     * Returns the current sync_time of the latest timestamp in the media stream
     */
    Time getCurrentSyncTime();

    /**
     * Sets x and y position for specified input
     */
    void setPosition(in string input_jack_tag, in nmm_int32 x, in nmm_int32 y);

    /**
     * Sets start/end time and start/end value for x position for specified input
     */
    void setXPositionControl(in string input_jack_tag, in Time start_time, in Time end_time, in nmm_int32 start_x, in nmm_int32 end_x);

    /**
     * Sets start/end time and start/end value for y position for specified input
     */
    void setYPositionControl(in string input_jack_tag, in Time start_time, in Time end_time, in nmm_int32 start_y, in nmm_int32 end_y);

    /**
     * Sets size for specified input
     */
    void setSize(in string input_jack_tag, in nmm_int32 size_x, in nmm_int32 size_y);

    /**
     * Sets start/end time and start/end values for width for specified input
     */
    void setWidthControl(in string input_jack_tag, in Time start_time, in Time end_time, in nmm_int32 start_width, in nmm_int32 end_width, in IVideoMux::Alignment align);

    /**
     * Sets start/end time and start/end values for height for specified input
     */
    void setHeightControl(in string input_jack_tag, in Time start_time, in Time end_time, in nmm_int32 start_height, in nmm_int32 end_height, in IVideoMux::Alignment align);

    /**
     * Enables/disables the coupling of width and height for the
     * specified input. If enabled, only one of width or height needs
     * to be controlled, the other dimension is updated automatically
     * according to the aspect ratio.
     */
    void setWidthHeightCouplingEnabled(in string input_jack_tag, in nmm_bool enable);

    /**
     * Get the width of specified input
     */
    nmm_int32 getWidth(in string input_jack_tag);

    /**
     * Get the height of specified input
     */
    nmm_int32 getHeight(in string input_jack_tag);

    /**
     * Get the x position of specified input
     */
    nmm_int32 getXPos(in string input_jack_tag);

    /**
     * Get the y position of specified input
     */
    nmm_int32 getYPos(in string input_jack_tag);

  };
    
}
