/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: include/sgx/video/videomanager.hpp

*/

#ifndef SGX_VIDEO_MANAGER_HPP
#define SGX_VIDEO_MANAGER_HPP

class CSGXVideoManager {
public:
	CSGXVideoManager();

	// Video format managers should registerObject themselves with the manager
	// with this registerObject function.
	tBOOL	registerObject(const sgxString &id, CVideoFormatManager *pManager);
	tBOOL	unregisterObject(const sgxString &id);

	virtual CVideoFormatManager *	setDefaultManager(CVideoFormatManager *pManager);

	// Clients of the video manager should create their video
	// clips using this function
	CVideo *createVideo(const sgxString &name, const CVideo::CMovieParameters &params=CVideo::CMovieParameters());

	static	CSGXVideoManager	*get();

protected:
	static	CSGXVideoManager	*m_pSingleton;

private:
	typedef sgxMap<sgxString, CVideoFormatManager *> ProtocolMap;
	
	CVideoFormatManager *	m_pDefaultManager;    
	ProtocolMap             m_VideoProtocols;
};

#endif /* SGX_VIDEO_MANAGER_HPP */
