/* 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_IAVMux_HPP
#define NMM_IAVMux_HPP

#include "nmm/nmm_prefix.hpp"

#include "nmm/comm/Interface.hpp"
#include "nmm/comm/messaging/Event.hpp"
#include "nmm/comm/messaging/IllegalStateException.hpp"
#include <memory>


#include "visibility.hpp"

namespace NMM
{
  /** Audio/video mux interface. */

  class DLLEXPORT IAVMux : virtual public NMM::Interface { 
  public:
  enum Label { 
    LABEL_VIDEO = 1 , 
    LABEL_AUDIO = 2  };

    IAVMux() : NMM::Interface(IAVMux::IAVMux_type, "NMM") { };

    IAVMux(NMM::NMMObject& parent) : NMM::Interface (parent, IAVMux::IAVMux_type, "NMM") { };

    virtual ~IAVMux() {};

    static const char* IAVMux_type;

    virtual  string getInterfaceType() const { return IAVMux_type; }

    NMM::Interface* copy() const { return new IAVMux(*this); }
    static void used(); 
    static const char* setSyncMode_event;
    /**
     * Enable/disable synchronized mode.
     * Enables or disables synchronized mode.
     * In synchronized mode, buffers are sorted for increasing timestamps.
     * In normal mode, buffers are output in the order of arrival.
     * @param value true to enable synchronized mode
     */

    virtual void setSyncMode(const nmm_bool& value)
      throw(const NMM::SerializedException&);


  };

  typedef auto_ptr<IAVMux> IAVMux_var;

  DLLEXPORT NMM::OValueStream& operator<<(NMM::OValueStream& ov, const IAVMux::Label& t);
  DLLEXPORT NMM::IValueStream& operator>>(NMM::IValueStream& iv, IAVMux::Label& t);



}

#include "nmm/nmm_suffix.hpp"

#endif
