package com.persagy.cameractl.service;

import com.persagy.cameractl.utils.Camera;
import com.persagy.cameractl.service.windows.DahMainWindows;
import com.persagy.cameractl.service.windows.DpsdkMainWindows;
import com.persagy.cameractl.utils.ResultClass;
import com.persagy.cameractl.utils.EnumTools.OperatingSystem;
import com.persagy.cameractl.utils.OtherTools;

/*
 * 摄像头相关调用的入口
 * */
public class PtzMain {
	/*
	 * 摄像头操作接口，包括：摄像头控制、回放
	 */
	public ResultClass ptzOper(Camera _camera, String operType) {
		OperatingSystem systemName = OtherTools.getSystemName();
		switch (systemName) {
		case windows:
			DahMainWindows dahMainWindows=new DahMainWindows(_camera);
			return operType.equals("control") ?dahMainWindows.controlMain()
				: operType.equals("playback") ? dahMainWindows.playBackMain() 
						: OtherTools.executeErr("无效的操作类型");
		default:
			return OtherTools.executeErr("不被支持的系统");
		}
	};

	/*
	 * 摄像头实时播放入口
	 */
	public ResultClass realPlay(Camera _camera) {
		return OtherTools.executeErr("暂不支持");
	};

}
