522 lines
19 KiB
C++
522 lines
19 KiB
C++
/*************************************************************************/
|
|
/* File : Video ParamOp.cpp */
|
|
/* */
|
|
/* Author : Leïla AIT KACI */
|
|
/* Last Modification : 28/05/03 */
|
|
/*************************************************************************/
|
|
#include "CKAll.h"
|
|
#include "CKVideo.h"
|
|
#include "CKVideoManager.h"
|
|
|
|
void RegisterVideoParamOp (CKParameterManager* pm);
|
|
void UnregisterVideoParamOp (CKParameterManager* pm);
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Defines
|
|
//////////////////////////////////////////////////////////////////////
|
|
#define GUID_GETINPUTTYPE CKGUID(0x63d02905,0x5ef14c19)
|
|
#define GUID_GETFILENAME CKGUID(0x7fe4240,0x41f75e33)
|
|
#define GUID_GETURL CKGUID(0x8ce0d74,0x609376c1)
|
|
#define GUID_GETVIDEOID CKGUID(0x7b174d09,0x2f82030b)
|
|
#define GUID_GETAUDIOID CKGUID(0x7bac2d14,0x453e096e)
|
|
#define GUID_GETOUTPUTTYPE CKGUID(0xe82d7b,0x582c04a0)
|
|
#define GUID_GETDESTINATION CKGUID(0x43c321a6,0x49dd367a)
|
|
#define GUID_GETBORDERCOLOR CKGUID(0x6b8e2911,0x683f3d)
|
|
#define GUID_GETASYNC CKGUID(0x636054d3,0xa1f36f9)
|
|
#define GUID_GETPROGRESSION CKGUID(0x66b803c6,0x366129e)
|
|
#define GUID_GETCURRENTTIME CKGUID(0x7bac3b94,0x224e28ea)
|
|
#define GUID_GETSTARTTIME CKGUID(0x33cb15bd,0x62016afe)
|
|
#define GUID_GETSTOPTIME CKGUID(0x29a47517,0x28a97ffc)
|
|
#define GUID_GETSPEED CKGUID(0x24db5471,0x2c2928ca)
|
|
#define GUID_GETENABLEAUDIO CKGUID(0x447c6877,0xf0c1113)
|
|
#define GUID_GETSTATE CKGUID(0xb5005f1,0x4274258e)
|
|
|
|
#define GUID_HASSOUND CKGUID(0x610c6d25,0x61765d14)
|
|
#define GUID_SUPPORTSEEKING CKGUID(0xf1e545f,0x30f770cb)
|
|
#define GUID_SUPPORTSPEEDCHANGE CKGUID(0x666e300d,0x2db81113)
|
|
#define GUID_SUPPORTNEGATIVESPEED CKGUID(0x4ad45673,0xa875f3f)
|
|
|
|
// The following GUIDS are identical to those found in ParameterOperations.h
|
|
#define CKOGUID_GETTEXTURE CKGUID(0x0f9e4f74,0x0d14175e)
|
|
#define CKOGUID_GETLOOP CKGUID(0x1b584b4d,0x7db27422)
|
|
#define CKOGUID_GETVOLUME CKGUID(0x144c1161,0x0ab87cb4)
|
|
#define CKOGUID_GETPAN CKGUID(0x40f22eae,0x75d53da0)
|
|
#define CKOGUID_GETSIZE CKGUID(0x54f52b51,0x564c4812)
|
|
#define CKOGUID_GETLENGTH CKGUID(0x556a69af,0x076e3f09)
|
|
|
|
// video operation
|
|
#define CKOGUID_GETVIDEOINPUTCOUNT CKGUID(0xb594143a, 0x522c1c50)
|
|
#define CKOGUID_GETVIDEOINPUTNAME CKGUID(0xb594143a, 0x522c1c51)
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Helper Methods
|
|
//////////////////////////////////////////////////////////////////////
|
|
inline CKVideo* ConvertToVideo(CKContext* context, CKParameterIn *p1)
|
|
{
|
|
CK_ID VideoID;
|
|
p1->GetValue(&VideoID);
|
|
|
|
return ( (CKVideo*) context->GetObject(VideoID) );
|
|
}
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// ParamOp Methods
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// Signature: CKVIDEOINTYPE_GUID, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetInputType(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CK_VIDEO_TYPE Type = video->GetType();
|
|
res->SetValue(&Type);
|
|
}
|
|
|
|
// Signature: CKPGUID_STRING, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetFilename(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
res->SetStringValue( video->GetFileName().Str() );
|
|
}
|
|
|
|
// Signature: CKPGUID_STRING, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetUrl(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
res->SetStringValue( video->GetUrl().Str() );
|
|
}
|
|
|
|
// Signature: CKVIDEOCAPTURE_GUID, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetVideoID(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
int VideoID = video->GetVideoInputID();
|
|
res->SetValue( &VideoID );
|
|
}
|
|
|
|
// Signature: CKAUDIOCAPTURE_GUID, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetAudioID(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
int AudioID = video->GetAudioInputID();
|
|
res->SetValue( &AudioID );
|
|
}
|
|
|
|
// Signature: CKVIDEOOUTTYPE_GUID, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetOutputType(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CK_VIDEO_DISPLAY Type = video->GetDisplayMode();
|
|
res->SetValue(&Type);
|
|
}
|
|
|
|
// Signature: CKPGUID_TEXTURE, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetTexture(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CK_ID TexID = 0;
|
|
if ( video->GetTexture() )
|
|
TexID = video->GetTexture()->GetID();
|
|
|
|
res->SetValue(&TexID);
|
|
}
|
|
|
|
// Signature: CKPGUID_RECT, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetDestination(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
VxRect Destination = video->GetDestination();
|
|
res->SetValue(&Destination);
|
|
}
|
|
|
|
// Signature: CKPGUID_COLOR, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetBorderColor(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
VxColor Color = video->GetBorderColor();
|
|
res->SetValue(&Color);
|
|
}
|
|
|
|
// Signature: CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetLoop(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CKBOOL Enable = video->GetLoop();
|
|
res->SetValue(&Enable);
|
|
}
|
|
|
|
// Signature: CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetAsync(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CKBOOL Enable = video->IsAsynchronous();
|
|
res->SetValue(&Enable);
|
|
}
|
|
|
|
// Signature: CKPGUID_PERCENTAGE, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetProgression(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
float Progression = video->GetPlayingTime(TRUE);
|
|
res->SetValue(&Progression);
|
|
}
|
|
|
|
// Signature: CKPGUID_TIME, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetCurrentTime(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
float Time = video->GetPlayingTime();
|
|
res->SetValue(&Time);
|
|
}
|
|
|
|
// Signature: CKPGUID_TIME, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetStartTime(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
float Time;
|
|
video->GetLimitTimes(&Time, NULL);
|
|
res->SetValue(&Time);
|
|
}
|
|
|
|
// Signature: CKPGUID_TIME, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetStopTime(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
float Time;
|
|
video->GetLimitTimes(NULL, &Time);
|
|
res->SetValue(&Time);
|
|
}
|
|
|
|
// Signature: CKPGUID_FLOAT, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetSpeed(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
float Speed = video->GetSpeed();
|
|
res->SetValue(&Speed);
|
|
}
|
|
|
|
// Signature: CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetAudioEnabled(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CKBOOL AudioEnabled = video->IsAudioEnabled();
|
|
res->SetValue(&AudioEnabled);
|
|
}
|
|
|
|
// Signature: CKPGUID_FLOAT, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetGain(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
float Gain = video->GetVolume();
|
|
res->SetValue(&Gain);
|
|
}
|
|
|
|
// Signature: CKPGUID_FLOAT, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetPan(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
float Pan = video->GetBalance();
|
|
res->SetValue(&Pan);
|
|
}
|
|
|
|
// Signature: CKVIDEOSTATE_GUID, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetState(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CK_VIDEO_STATE State = video->GetState();
|
|
res->SetValue(&State);
|
|
}
|
|
|
|
// Signature: CKPGUID_2DVECTOR, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetSize(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
const CKVideoInfo* VideoInfo = video->GetVideoInfo();
|
|
|
|
Vx2DVector Size(VideoInfo->m_Width, VideoInfo->m_Height);
|
|
res->SetValue(&Size);
|
|
}
|
|
|
|
// Signature: CKPGUID_TIME, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_GetDuration(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
float Duration = video->GetVideoInfo()->m_Duration;
|
|
res->SetValue(&Duration);
|
|
}
|
|
|
|
// Signature: CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_HasSound(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CKBOOL HasSound = video->GetRuntimeFlags() & CK_VIDEO_HASSOUND;
|
|
res->SetValue(&HasSound);
|
|
}
|
|
|
|
// Signature: CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_SupportSeeking(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CKBOOL CanSeek = video->GetRuntimeFlags() & CK_VIDEO_CANSEEK;
|
|
res->SetValue(&CanSeek);
|
|
}
|
|
|
|
// Signature: CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_SupportSpeedChange(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CKBOOL CanSpeed = video->GetRuntimeFlags() & CK_VIDEO_CANSPEED;
|
|
res->SetValue(&CanSpeed);
|
|
}
|
|
|
|
// Signature: CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE
|
|
void ParamOp_SupportNegativeSpeed(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
CKVideo* video = ConvertToVideo(context, p1);
|
|
if ( !video )
|
|
return;
|
|
|
|
CKBOOL CanPlayBackward = video->GetRuntimeFlags() & CK_VIDEO_CANSPEEDBACK;
|
|
res->SetValue(&CanPlayBackward);
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------------------
|
|
// Video FUNCTIONS
|
|
#define mintRead( p ) ( (_p = p->GetReadDataPtr()) ? (*(int*)_p): int_tmp)
|
|
#define mintWrite( p )( *(int *)(p->GetWriteDataPtr()) )
|
|
|
|
void CKGetVideoInputCount(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
void* _p = NULL;
|
|
|
|
CKVideoManager* vMgr = (CKVideoManager*)context->GetManagerByGuid(VIDEO_MANAGER_GUID);
|
|
CKVideoPlugin* vp = vMgr->GetActivePlugin();
|
|
if ( vp )
|
|
mintWrite(res) = vp->GetVideoInputCount();
|
|
else
|
|
mintWrite(res) = 0;
|
|
}
|
|
|
|
void CKGetVideoInputName(CKContext* context, CKParameterOut *res, CKParameterIn *p1, CKParameterIn *p2)
|
|
{
|
|
void* _p = NULL;
|
|
const int int_tmp = 0;
|
|
|
|
int i = mintRead(p1);
|
|
CKVideoManager* vMgr = (CKVideoManager*)context->GetManagerByGuid(VIDEO_MANAGER_GUID);
|
|
CKVideoPlugin* vp = vMgr->GetActivePlugin();
|
|
if ( vp && i>=0 && i<vp->GetVideoInputCount())
|
|
{
|
|
XString name;
|
|
vp->GetVideoInputName(i,name);
|
|
res->SetStringValue(name.Str());
|
|
}
|
|
else
|
|
res->SetStringValue("NA");
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Registration
|
|
//////////////////////////////////////////////////////////////////////
|
|
void
|
|
RegisterVideoParamOp(CKParameterManager* pm)
|
|
{
|
|
pm->RegisterOperationType(GUID_GETINPUTTYPE, "Get Input Type");
|
|
pm->RegisterOperationFunction(GUID_GETINPUTTYPE, CKPGUID_VIDEOINTYPE, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetInputType);
|
|
|
|
pm->RegisterOperationType(GUID_GETFILENAME, "Get Filename");
|
|
pm->RegisterOperationFunction(GUID_GETFILENAME, CKPGUID_STRING, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetFilename);
|
|
|
|
pm->RegisterOperationType(GUID_GETURL, "Get Url");
|
|
pm->RegisterOperationFunction(GUID_GETURL, CKPGUID_STRING, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetUrl);
|
|
|
|
pm->RegisterOperationType(GUID_GETVIDEOID, "Get Video ID");
|
|
pm->RegisterOperationFunction(GUID_GETVIDEOID, CKPGUID_VIDEOCAPTURE, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetVideoID);
|
|
|
|
pm->RegisterOperationType(GUID_GETAUDIOID, "Get Audio ID");
|
|
pm->RegisterOperationFunction(GUID_GETAUDIOID, CKPGUID_AUDIOCAPTURE, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetAudioID);
|
|
|
|
pm->RegisterOperationType(GUID_GETOUTPUTTYPE, "Get Output Type");
|
|
pm->RegisterOperationFunction(GUID_GETOUTPUTTYPE, CKPGUID_VIDEOOUTTYPE, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetOutputType);
|
|
|
|
pm->RegisterOperationType(GUID_GETDESTINATION, "Get Destination");
|
|
pm->RegisterOperationFunction(GUID_GETDESTINATION, CKPGUID_RECT, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetDestination);
|
|
|
|
// pm->RegisterOperationType(GUID_GETBORDERCOLOR, "Get Border Color");
|
|
// pm->RegisterOperationFunction(GUID_GETBORDERCOLOR, CKPGUID_COLOR, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetBorderColor);
|
|
|
|
// pm->RegisterOperationType(GUID_GETASYNC, "Is Asynchronous");
|
|
// pm->RegisterOperationFunction(GUID_GETASYNC, CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetAsync);
|
|
|
|
pm->RegisterOperationType(GUID_GETPROGRESSION, "Get Progression");
|
|
pm->RegisterOperationFunction(GUID_GETPROGRESSION, CKPGUID_PERCENTAGE, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetProgression);
|
|
|
|
pm->RegisterOperationType(GUID_GETCURRENTTIME, "Get Current Time");
|
|
pm->RegisterOperationFunction(GUID_GETCURRENTTIME, CKPGUID_TIME, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetCurrentTime);
|
|
|
|
pm->RegisterOperationType(GUID_GETSTARTTIME, "Get Start Time");
|
|
pm->RegisterOperationFunction(GUID_GETSTARTTIME, CKPGUID_TIME, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetStartTime);
|
|
|
|
pm->RegisterOperationType(GUID_GETSTOPTIME, "Get Stop Time");
|
|
pm->RegisterOperationFunction(GUID_GETSTOPTIME, CKPGUID_TIME, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetStopTime);
|
|
|
|
pm->RegisterOperationType(GUID_GETSPEED, "Get Speed");
|
|
pm->RegisterOperationFunction(GUID_GETSPEED, CKPGUID_FLOAT, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetSpeed);
|
|
|
|
pm->RegisterOperationType(GUID_GETENABLEAUDIO, "Is Audio Enabled");
|
|
pm->RegisterOperationFunction(GUID_GETENABLEAUDIO, CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetAudioEnabled);
|
|
|
|
pm->RegisterOperationType(GUID_GETSTATE, "Get State");
|
|
pm->RegisterOperationFunction(GUID_GETSTATE, CKPGUID_VIDEOSTATE, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetState);
|
|
|
|
pm->RegisterOperationType(GUID_HASSOUND, "Has Sound");
|
|
pm->RegisterOperationFunction(GUID_HASSOUND, CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_HasSound);
|
|
|
|
pm->RegisterOperationType(GUID_SUPPORTSEEKING, "Support Seeking");
|
|
pm->RegisterOperationFunction(GUID_SUPPORTSEEKING, CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_SupportSeeking);
|
|
|
|
pm->RegisterOperationType(GUID_SUPPORTSPEEDCHANGE, "Support Speed Change");
|
|
pm->RegisterOperationFunction(GUID_SUPPORTSPEEDCHANGE, CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_SupportSpeedChange);
|
|
|
|
pm->RegisterOperationType(GUID_SUPPORTNEGATIVESPEED, "Support Negative Speed");
|
|
pm->RegisterOperationFunction(GUID_SUPPORTNEGATIVESPEED, CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_SupportNegativeSpeed);
|
|
|
|
// The following operation types are shared with ParameterOperation.dll
|
|
// They use the sale GUID and Name
|
|
pm->RegisterOperationType(CKOGUID_GETTEXTURE, "Get Texture");
|
|
pm->RegisterOperationFunction(CKOGUID_GETTEXTURE, CKPGUID_TEXTURE, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetTexture);
|
|
|
|
pm->RegisterOperationType(CKOGUID_GETLOOP, "Is Looping");
|
|
pm->RegisterOperationFunction(CKOGUID_GETLOOP, CKPGUID_BOOL, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetLoop);
|
|
|
|
pm->RegisterOperationType(CKOGUID_GETVOLUME, "Get Gain");
|
|
pm->RegisterOperationFunction(CKOGUID_GETVOLUME, CKPGUID_FLOAT, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetGain);
|
|
|
|
pm->RegisterOperationType(CKOGUID_GETPAN, "Get Pan");
|
|
pm->RegisterOperationFunction(CKOGUID_GETPAN, CKPGUID_FLOAT, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetPan);
|
|
|
|
pm->RegisterOperationType(CKOGUID_GETSIZE, "Get Size");
|
|
pm->RegisterOperationFunction(CKOGUID_GETSIZE, CKPGUID_2DVECTOR, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetSize);
|
|
|
|
pm->RegisterOperationType(CKOGUID_GETLENGTH, "Get Length");
|
|
pm->RegisterOperationFunction(CKOGUID_GETLENGTH, CKPGUID_TIME, CKPGUID_VIDEO, CKPGUID_NONE, ParamOp_GetDuration);
|
|
|
|
pm->RegisterOperationType(CKOGUID_GETVIDEOINPUTCOUNT, "Get VideoInput Count");
|
|
pm->RegisterOperationFunction(CKOGUID_GETVIDEOINPUTCOUNT,CKPGUID_INT,CKPGUID_NONE,CKPGUID_NONE,CKGetVideoInputCount);
|
|
|
|
pm->RegisterOperationType(CKOGUID_GETVIDEOINPUTNAME, "Get VideoInput Name");
|
|
pm->RegisterOperationFunction(CKOGUID_GETVIDEOINPUTNAME,CKPGUID_STRING,CKPGUID_INT,CKPGUID_NONE,CKGetVideoInputName);
|
|
}
|
|
|
|
void
|
|
UnregisterVideoParamOp(CKParameterManager* pm)
|
|
{
|
|
pm->UnRegisterOperationType (GUID_GETINPUTTYPE );
|
|
pm->UnRegisterOperationType (GUID_GETFILENAME );
|
|
pm->UnRegisterOperationType (GUID_GETURL );
|
|
pm->UnRegisterOperationType (GUID_GETVIDEOID );
|
|
pm->UnRegisterOperationType (GUID_GETAUDIOID );
|
|
pm->UnRegisterOperationType (GUID_GETOUTPUTTYPE );
|
|
pm->UnRegisterOperationType (GUID_GETDESTINATION );
|
|
pm->UnRegisterOperationType (GUID_GETBORDERCOLOR );
|
|
pm->UnRegisterOperationType (GUID_GETASYNC );
|
|
pm->UnRegisterOperationType (GUID_GETPROGRESSION );
|
|
pm->UnRegisterOperationType (GUID_GETCURRENTTIME );
|
|
pm->UnRegisterOperationType (GUID_GETSTARTTIME );
|
|
pm->UnRegisterOperationType (GUID_GETSTOPTIME );
|
|
pm->UnRegisterOperationType (GUID_GETSPEED );
|
|
pm->UnRegisterOperationType (GUID_GETENABLEAUDIO );
|
|
pm->UnRegisterOperationType (GUID_GETSTATE );
|
|
|
|
pm->UnRegisterOperationType (GUID_HASSOUND );
|
|
pm->UnRegisterOperationType (GUID_SUPPORTSEEKING );
|
|
pm->UnRegisterOperationType (GUID_SUPPORTSPEEDCHANGE );
|
|
pm->UnRegisterOperationType (GUID_SUPPORTNEGATIVESPEED );
|
|
|
|
pm->UnRegisterOperationType (CKOGUID_GETVIDEOINPUTCOUNT );
|
|
pm->UnRegisterOperationType (CKOGUID_GETVIDEOINPUTNAME );
|
|
|
|
// Let the parameter operation DLL unregister the following shared operations
|
|
// pm->UnRegisterOperationType (CKOGUID_GETTEXTURE );
|
|
// pm->UnRegisterOperationType (CKOGUID_GETLOOP );
|
|
// pm->UnRegisterOperationType (CKOGUID_GETVOLUME );
|
|
// pm->UnRegisterOperationType (CKOGUID_GETPAN );
|
|
// pm->UnRegisterOperationType (CKOGUID_GETSIZE );
|
|
// pm->UnRegisterOperationType (CKOGUID_GETLENGTH );
|
|
}
|