// VideoPlayerSDK.idl : IDL source for VideoPlayerSDK.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (VideoPlayerSDK.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";

typedef [v1_enum] enum SLTMPlaybackState {
	SLTMPlaybackStopped,
	SLTMPlaybackPreparing,
	SLTMPlaybackPrepared,
	SLTMPlaybackPaused,
	SLTMPlaybackPlaying,
	SLTMPlaybackStopOnError
} SLTMPlaybackState;

typedef [v1_enum] enum SLTMPlayDataType {
	SLTMPlayImageData	= 1,
	SLTMPlayMaskData	= 2,
	SLTMPlayAudioData	= 4,
	SLTMPlayAnyImage	= 3,
	SLTMPlayAnyMovie	= 7,
	SLTMPlayUseRLECompression = 8,
	SLTMPlayFullScreen	= 16,
	SLTMPlayAllBits		= 15,
	SLTMPlayAllFullScreen = 31,
	SLTMPlayPrintReport	= 0x1000
} SLTMPlayDataType;

typedef [v1_enum] enum SLTMVideoPlayerPrepareState {
	SLTMVideoPlayerNone	= 0,
	SLTMVideoPlayerStandby,
	SLTMVideoPlayerPreparingVideo,
	SLTMVideoPlayerPreparedVideo,
	SLTMVideoPlayerWasError,
	SLTMVideoPlayerInTransition
} SLTMVideoPlayerPrepareState;

typedef [v1_enum] enum SLTMVPAudioVolumeType {
	SLTMVPAudio_OutputVolume = 0,
	SLTMVPAudio_LiveVideo1 = 1,
	SLTMVPAudio_LiveVideo2,
	SLTMVPAudio_LiveVideo3,
	SLTMVPAudio_LiveVideo4,
	SLTMVPAudio_LiveVideo5,
	SLTMVPAudio_LiveVideo6,
	SLTMVPAudio_LiveAux = 11,
	SLTMVPAudio_None = -1
} SLTMVPAudioVolumeType;

typedef [v1_enum] enum SLTMVPVideoLineType {
	SLTMVPVideo_NoLive = 0,
	SLTMVPVideo_Live1 = 1,
	SLTMVPVideo_Live2 = 2,
	SLTMVPVideo_Live3 = 3,
	SLTMVPVideo_Live4 = 4,
	SLTMVPVideo_Live5 = 5,
	SLTMVPVideo_Live6 = 6,
	SLTMVPVideo_Live4Genlock = -1,
	SLTMVPVideo_Live4Aux = -2
} SLTMVPVideoLineType;

typedef [v1_enum] enum SLTMVPAudioFileType {
	SLTMVPAudioFile_Native = 0,
	SLTMVPAudioFile_WaveFile = 1,
	SLTMVPAudioFile_A1A2WaveFiles = 2,
	SLTMVPAudioFile_A1WaveFile = 3,
	SLTMVPAudioFile_A2WaveFile = 4,
	SLTMVPAudioFile_Noninterleaved = 5,
	SLTMVPAudioFile_MultyLng = 6,
	SLTMVPAudioFile_Default = 10,
	SLTMVPAudioFile_NoAudio = -1
} SLTMVPAudioFileType;

typedef [v1_enum] enum SLTMWatchDogState {
	SLTMWatchDog_None		=	-1,
	SLTMWatchDog_Expired	=	0,
	SLTMWatchDog_Active		=	1
} SLTMWatchDogState;

	[
		object,
		uuid(5605AA0E-DDF0-4286-952A-5F15FA5698CA),
		dual,
		helpstring("ISLTMEnumVideoPlayer4TE Interface"),
		pointer_default(unique)
	]
	interface ISLTMEnumVideoPlayer4TE : IDispatch
	{
		[propget, id(1), helpstring("property Count returns number of available video players (title engines)")] HRESULT Count([out, retval] long *pVal);
		[propget, id(2), helpstring("property Name returns frendly name of title engine for video player with specified player index")] HRESULT Name([in] long nVPIndex, [out, retval] BSTR *pUserName);
		[propget, id(3), helpstring("property RegName returns unique name of title engine for video player with specified player index")] HRESULT RegName([in] long nVPIndex, [out, retval] BSTR *pRegName);
		[propget, id(4), helpstring("property Type returns type of title engine for video player with specified player index")] HRESULT Type([in] long nVPIndex, [out, retval] CLSID *pCLSID);
		[propget, id(5), helpstring("property Index returns index of title engine index for video player with specified player index")] HRESULT Index([in] long nVPIndex, [out, retval] long *pIndexTE);
	}

	[
		object,
		uuid(FE0D501B-E1AF-49c9-AD74-DB980F58D334),
		dual,
		helpstring("ISLTMVideoPlayer4 Interface"),
		pointer_default(unique)
	]
	interface ISLTMVideoPlayer4 : IDispatch
	{
		[id(1), helpstring("method GetBoardInfo returns frame dimension and frame rate")] HRESULT GetBoardInfo([out] long *width, [out] long *height, [out] double *frame_rate);
		[propget, id(2), helpstring("property AutoScaleImage returns full screen images scaling state (1-scale, 0-center)")] HRESULT AutoScaleImage([out, retval] long *pEnabled);
		[propput, id(2), helpstring("property AutoScaleImage enables/disables full screen images scaling (1-scale, 0-center)")] HRESULT AutoScaleImage([in] long bEnable);
		[propget, id(3), helpstring("property AutoScaleMovie returns full screen movies scaling state (1-scale, 0-center)")] HRESULT AutoScaleMovie([out, retval] long *pEnabled);
		[propput, id(3), helpstring("property AutoScaleMovie enables/disables full screen movies scaling (1-scale, 0-center)")] HRESULT AutoScaleMovie([in] long bEnable);
		[id(4), helpstring("method ShowLive will switch mixer at specified time to show live video (during specified crossfade)")] HRESULT ShowLive([in] double start_time, [in] double crossfade_duration);
		[id(5), helpstring("method LoadImage prepares specified image for playback")] HRESULT LoadImage([in] long image_index, [in] BSTR file_name);
		[id(6), helpstring("method ShowImage will show loaded image with specified crossfade")] HRESULT ShowImage([in] long image_index, [in] double start_time, [in] double crossfade_duration);
		[id(7), helpstring("method PrepareVideo prepares specified movie for playback")] HRESULT PrepareVideo([in] BSTR file_name, [in] double fMarkIn, [in] double fMarkOut, [in] SLTMVPAudioFileType nAudioType, [out] double *duration);
		[id(8), helpstring("method AddVideo add specified movie to the end of prepared playback list")] HRESULT AddVideo([in] BSTR file_name, [in] double fMarkIn, [in] double fMarkOut, [in] SLTMVPAudioFileType nAudioType, [out] double *duration);
		[id(9), helpstring("method ResetPrepare clear prepared data")] HRESULT ResetPrepare();
		[id(10), helpstring("method ShowPreparedVideo shows first frame of prepared movie")] HRESULT ShowPreparedVideo();
		[id(11), helpstring("method PlayVideo will start playback of prepared movie with specified crossfade")] HRESULT PlayVideo([in] double start_time, [in] double crossfade_duration);
		[id(12), helpstring("method PauseVideo pause playing movie")] HRESULT PauseVideo();
		[id(13), helpstring("method UnpauseVideo continue playback of paused movie")] HRESULT UnpauseVideo();
		[propget, id(14), helpstring("property RestDuration returns rest duration of playback current video")] HRESULT RestDuration([out] double *pEndingTime, [out, retval] double *pRestDuration);
		[propget, id(15), helpstring("property PrepareState returns current state of the player preparing part")] HRESULT PrepareState([out, retval] SLTMVideoPlayerPrepareState *pVal);
		[propget, id(16), helpstring("property ErrorDescription returns description for last preparing error")] HRESULT ErrorDescription([out, retval] BSTR *pVal);
		[propget, id(17), helpstring("property PlaybackState returns current state of the player playback part")] HRESULT PlaybackState([out, retval] SLTMPlaybackState *pVal);
		[propget, id(18), helpstring("property PlaybackErrorDescription returns description for last playing error")] HRESULT PlaybackErrorDescription([out, retval] BSTR *pVal);
		[propget, id(19), helpstring("property CurrentTime returns current time of the video player")] HRESULT CurrentTime([out, retval] double *pCurrentTime);
	};
	[
		object,
		uuid(709794AA-E399-406d-B9FD-02CA41D85164),
		dual,
		helpstring("ISLTMVideoPlayerPreparedInfo Interface"),
		pointer_default(unique)
	]
	interface ISLTMVideoPlayerPreparedInfo : IDispatch
	{
		[propget, id(1), helpstring("property PreparedItemNumber returns number of prepared movies/images")] HRESULT PreparedItemNumber([out, retval] long *pCount);
		[id(2), helpstring("property GetPreparedItemInfo returns info about prepared movie/image with specified index")] HRESULT GetPreparedItemInfo([in] long nIndex, [out] BSTR* psFileName, [out] double* pfMarkIn, [out] double* pfMarkOut, [out] long* pSLTMPlayDataTypeMask, [out] double* pfStartOffset, [out] double *pfDuration);
	};
	[
		object,
		uuid(A0AE3829-5A0E-45e8-9322-F38BD9C5AEEA),
		dual,
		helpstring("ISLTMVideoPlayer4TE Interface"),
		pointer_default(unique)
	]
	interface ISLTMVideoPlayer4TE : IDispatch
	{
		[id(1), helpstring("method Init4TitleEngine connects the video player to specified title engine")] HRESULT Init4TitleEngine([in] IUnknown *pITitleEngine, [in] long use_memory_MB);
		[id(2), helpstring("method Init4TitleCore connects the video player to specified title engine")] HRESULT Init4TitleCore([in] CLSID clsidTitleCore, [in] long nTitleIndex, [in] long use_memory_MB);
	};
	[
		object,
		uuid(8DF5B5FE-A05A-42e9-A1A4-C2FF39F91197),
		helpstring("ISLTMVideoPlayer4TEData Interface"),
		pointer_default(unique)
	]
	interface ISLTMVideoPlayer4TEData : IUnknown
	{
		[helpstring("method GetTitleEngine returns pointer to title engine")] HRESULT GetTitleEngine([out] IUnknown* *pTitleEngine);
	};
	[
		object,
		uuid(5E2501A5-ACFD-497e-84AC-5FA974401F25),
		dual,
		helpstring("ISLTMLive4VideoPlayer Interface"),
		pointer_default(unique)
	]
	interface ISLTMLive4VideoPlayer : IDispatch
	{
		[id(1), helpstring("method ResetAllSettings restore all board settings from the registry")] HRESULT ResetAllSettings();
		[id(2), helpstring("method SaveLiveSet saves into specified IPropertyBag all lives info")] HRESULT SaveLiveSet([in] IUnknown *pPropBag);
		[id(3), helpstring("method LoadLiveSet loads all lives info from specified IPropertyBag")] HRESULT LoadLiveSet([in] IUnknown *pPropBag);
		[id(4), helpstring("method ConfigureLive shows configure dialog for specified line")] HRESULT ConfigureLive([in] SLTMVPVideoLineType nLiveIndex, [in] long nHWND);
		[propget, id(5), helpstring("property Name returns frendly name of specified line")] HRESULT Name([in] SLTMVPVideoLineType nLiveIndex, [out, retval] BSTR *pName);
		[propget, id(6), helpstring("property EnableLive returns current usage of specified line")] HRESULT EnableLive([in] SLTMVPVideoLineType nLiveIndex, [out, retval] long *pEnabled);
		[propput, id(6), helpstring("property EnableLive enables/disables usage of specified line")] HRESULT EnableLive([in] SLTMVPVideoLineType nLiveIndex, [in] long bEnable);
		[id(7), helpstring("method ApplyEnables should be called after enabling/disabling lines")] HRESULT ApplyEnables();
		[id(8), helpstring("method PrepareLive prepare for showing specified line")] HRESULT PrepareLive([in] SLTMVPVideoLineType nLiveIndex);
	};
	[
		object,
		uuid(051F0264-12A9-48e2-A4C4-1D113AA23842),
		dual,
		helpstring("ISLTMLiveAudio4VideoPlayer2 Interface"),
		pointer_default(unique)
	]
	interface ISLTMLiveAudio4VideoPlayer2: IDispatch
	{
		[propget, id(1), helpstring("property LineCount returns number of audio inputs for specified video input")] HRESULT LineCount([in] SLTMVPVideoLineType nVideoLine, [out, retval] long *pnAudioLineNumber);
		[propget, id(2), helpstring("property LineName returns frendly name of specified audio input")] HRESULT LineName([in] SLTMVPVideoLineType nVideoLine, [in] long nAudioLineIndex, [out, retval] BSTR *pName);
		[propget, id(3), helpstring("property AssignedLine returns assigned audio input for specified video line")] HRESULT AssignedLine([in] SLTMVPVideoLineType nVideoLine, [out, retval] long *pnAudioLineIndex);
		[propput, id(3), helpstring("property AssignedLine connects specified audio input to specified video line")] HRESULT AssignedLine([in] SLTMVPVideoLineType nVideoLine, [in] long nAudioLineIndex);
		[id(4), helpstring("method GetLinePicks returns current picks for Left & Right channels")] HRESULT GetLinePicks([in] SLTMVPVideoLineType nVideoLine, [out] double *pLeft, [out] double *pRight);
		[propget, id(5), helpstring("property Volume returns current volume in dB")] HRESULT Volume([in] SLTMVPVideoLineType nVideoLine, [out, retval] double *pVal);
		[propput, id(5), helpstring("property Volume sets current volume (-96.0 .. 12.0)")] HRESULT Volume([in] SLTMVPVideoLineType nVideoLine, [in] double newVal);
		[propget, id(6), helpstring("property Enable returns 1 if the line is enabled")] HRESULT Enable([in] SLTMVPVideoLineType nVideoLine, [out, retval] long *pVal);
		[propput, id(6), helpstring("property Enable enables line usage")] HRESULT Enable([in] SLTMVPVideoLineType nVideoLine, [in] long newVal);
		[propget, id(7), helpstring("property Mute returns 1 if the input is muted")] HRESULT Mute([in] SLTMVPVideoLineType nVideoLine, [out, retval] long *pVal);
		[propput, id(7), helpstring("property Mute disables line (the command have more priority then Enable)")] HRESULT Mute([in] SLTMVPVideoLineType nVideoLine, [in] long newVal);
	};
	[
		object,
		uuid(E1433557-5BC5-4635-B86E-9357EFCC5481),
		dual,
		helpstring("ISLTMReadFifo Interface"),
		pointer_default(unique)
	]
	interface ISLTMReadFifo : IDispatch
	{
		[propget, id(1), helpstring("property ReadFifoMB returns size of fifo for reading data (in MB)")] HRESULT ReadFifoMB([out, retval] long *pnFifoSize_MB);
		[propput, id(1), helpstring("property ReadFifoMB sets size of fifo for reading data (in MB)")] HRESULT ReadFifoMB([in] long nFifoSize_MB);
	};
	[
		object,
		uuid(47450041-D962-4ecc-BE8D-E87C83BB9D30),
		dual,
		helpstring("ISLTMShowLastHalfShot Interface"),
		pointer_default(unique)
	]
	interface ISLTMShowLastHalfShot : IDispatch
	{
		[propget, id(1), helpstring("property ShowOneField")] HRESULT ShowOneField([out, retval] long *pboolShowOneFieldOnly);
		[propput, id(1), helpstring("property ShowOneField set one frame show mode (0=both fields, 1=last field only)")] HRESULT ShowOneField([in] long boolShowOneFieldOnly);
	};

	[
		object,
		uuid(FF394C97-EB96-4c8d-BBE5-4FAA737FB0E5),
		helpstring("ISLTMWatchDog Interface"),
		pointer_default(unique)
	]
	interface ISLTMWatchDog : IUnknown
	{
		[helpstring("method SetWatchDogTimeout change timeout counter to specified value")] HRESULT SetWatchDogTimeout([in] long nTimeoutMS);
		[helpstring("method GetWatchDogStatus returns current status of WatchDog")] HRESULT GetWatchDogStatus([out] SLTMWatchDogState* pStatus);
	};

	[
		object,
		uuid(D3DEE2AB-C630-4483-A716-DAAD9E1F550A),
		dual,
		helpstring("ISLTMAudioPlayer Interface"),
		pointer_default(unique)
	]
	interface ISLTMAudioPlayer : IDispatch
	{
		[id(1), helpstring("method AttachToVideoPlayer connects to acquired ISLTMVideoPlayer object")] HRESULT AttachToVideoPlayer([in] IUnknown *pVideoPlayer);
		[id(2), helpstring("method PrepareAudio prepares specified sound-file for playback")] HRESULT PrepareAudio([in] BSTR file_name, [out] double *duration);
		[id(3), helpstring("method PrepareAudioPart prepares specified part of sound-file for playback")] HRESULT PrepareAudioPart([in] BSTR file_name, [in] double fMarkIn, [in] double fMarkOut, [out] double *duration);
		[id(4), helpstring("method ResetPrepare clear prepared data")] HRESULT ResetPrepare();
		[id(5), helpstring("method PlayAudio will start playback of prepared audio with specified crossfade")] HRESULT PlayAudio([in] double start_time, [in] double crossfade_duration);
		[id(6), helpstring("method StopAudio will stop playing audio with specified crossfade")] HRESULT StopAudio([in] double start_time, [in] double crossfade_duration);
		[id(7), helpstring("method PauseAudio pause playing sound-file")] HRESULT PauseAudio();
		[id(8), helpstring("method UnpauseAudio continue playback of paused sound-file")] HRESULT UnpauseAudio();
		[propget, id(9), helpstring("property RestDuration returns rest duration of playback current audio")] HRESULT RestDuration([out] double *pEndingTime, [out, retval] double *pRestDuration);
		[propget, id(10), helpstring("property PrepareState returns current state of the player preparing part")] HRESULT PrepareState([out, retval] SLTMVideoPlayerPrepareState *pVal);
		[propget, id(11), helpstring("property ErrorDescription returns description for last preparing error")] HRESULT ErrorDescription([out, retval] BSTR *pVal);
		[propget, id(12), helpstring("property PlaybackState returns current state of the player playback part")] HRESULT PlaybackState([out, retval] SLTMPlaybackState *pVal);
		[propget, id(13), helpstring("property PlaybackErrorDescription returns description for last playing error")] HRESULT PlaybackErrorDescription([out, retval] BSTR *pVal);
		[propget, id(14), helpstring("property Volume returns current volume in dB")] HRESULT Volume([out, retval] double *pVal);
		[propput, id(14), helpstring("property Volume sets current volume (-96.0 .. 12.0)")] HRESULT Volume([in] double newVal);
		[propget, id(15), helpstring("property Enable returns 1 if the output is enabled")] HRESULT Enable([out, retval] long *pVal);
		[propput, id(15), helpstring("property Enable enables output usage")] HRESULT Enable([in] long newVal);
		[propget, id(16), helpstring("property Mute returns 1 if the output is muted")] HRESULT Mute([out, retval] long *pVal);
		[propput, id(16), helpstring("property Mute disables output (the command have more priority then Enable)")] HRESULT Mute([in] long newVal);
		[id(17), helpstring("method PrepareAudioPair prepares pair of sound-files for playback")] HRESULT PrepareAudioPair([in] BSTR file_nameLeft, [in] BSTR file_nameRight, [out] double *duration);
		[id(18), helpstring("method PrepareAudioPairPart prepares specified part of 2 sound-files for playback")] HRESULT PrepareAudioPairPart([in] BSTR file_nameLeft, [in] BSTR file_nameRight, [in] double fMarkIn, [in] double fMarkOut, [out] double *duration);
	};


[
	uuid(2EEA3FA5-BCF9-4ABB-BAE0-1070AF8CF4BD),
	version(1.2),
	helpstring("VideoPlayerSDK 1.2 Type Library")
]
library VIDEOPLAYERSDKLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");


	[
		uuid(FE9AF59F-516A-4e50-BF9A-9CBFD026288A),
		helpstring("SLTMEnumVideoPlayer4TE Class")
	]
	coclass SLTMEnumVideoPlayer4TE
	{
		[default] interface ISLTMEnumVideoPlayer4TE;
	};

	[
		uuid(B03EB4F6-BCA9-493d-A22D-780DA796D860),
		helpstring("SLTMVideoPlayer4TE_OEM Class")
	]
	coclass SLTMVideoPlayer4TE_OEM
	{
		[default]	interface ISLTMVideoPlayer4;
					interface ISLTMVideoPlayerPreparedInfo;
					interface ISLTMVideoPlayer4TE;
					interface ISLTMVideoPlayer4TEData;
					interface ISLTMLive4VideoPlayer;
					interface ISLTMLiveAudio4VideoPlayer2;
					interface ISLTMReadFifo;
					interface ISLTMShowLastHalfShot;
					interface ISLTMWatchDog;
					//interface ISLTMSetLogger;
	};
	[
		uuid(46B629EA-C858-40b1-9157-0EBEAF8C6348),
		helpstring("SLTMAudioPlayer4TE Class")
	]
	coclass SLTMAudioPlayer4TE
	{
		[default]	interface ISLTMAudioPlayer;
					//interface ISLTMSetLogger;
	};


	// TitleServers Implementations
	// FD422, FD322, FD842, ....
	[
		uuid(BAFE501E-4874-4EF9-8EF3-22D8F397DC82),
		helpstring("FDExtTitleTargetMgr Class -- FD422, FD322, FD842, ....")
	]
	coclass FDExtTitleTargetMgr
	{
		interface IUnknown;
	};
	// DVM6x, DVM8x, ... 
	[
		uuid(CA5260BE-10C2-438A-B5A5-94237C058317),
		helpstring("DVMTitleTargetMgr Class -- DVM6x, DVM8x, ... ")
	]
	coclass DVMTitleTargetMgr
	{
		interface IUnknown;
	};
	// DirectShow Title Server Target Manager
    [
      uuid(73DA552F-4946-4670-8484-958F97A223F2),
      helpstring("SLVideoprocessorTitleTarget Class -- DirectShow Title Server Target Manager")
    ]
    coclass SLVideoprocessorTitleTarget
	{
		interface IUnknown;
    };
};
