Watermark Master SDK

This documentation describes the Watermark Master Software Development Kit (SDK).


About the Watermark Master SDK

The Watermark Master Software Development Kit (SDK) enables developers to create applications that

This SDK also provides support for


Overview of the Watermark Master SDK

Overview of the Watermark Master SDK 1.0

WatermarkMaster SDK is a software based on COM technology: any programming language, supporting COM, for example C++, Visual Basic, JScript, Java, C## etc can be used.

All functionalities of Watermark Master program are available in WatermarkMaster SDK. More over it has an additional features - supports user's effects, watermarks etc, enables to process video files more flexibly, for example to SPLIT video files which aren't included in WM.

WatermarkMaster SDK contains full documentation with examples on several programming languages, step by step description of basic functionalities usage and other helpful information.

Every WatermarkMaster SDK license gives free Watermark Master license. It is done for more handy work with WMMSDK: you can upload configuration, previously made using Watermark Master program interface, and then simply call methods for adding initial files and launch the program.

List of available WatermarkMaster SDK basic functionalities:

  1. Cutting files on parts within given time or on several equal parts.

  2. Making Thumbnails for each created file or for set frames when working with video files.

  3. Drawing of watermarks such as text, graphical file and other graphical figures using the following effects: Stroke, DropShadow, Bevel and Emmbos etc.

  4. Making of dynamic watermarks - watermarks, that change while video file reproduction. In particular, applying of dynamic effects, animated images as watermark, video files and also creeping line.

  5. Video files conversion from one format to another with support of any conversion parameters, such as Frame Rate, Frame Size, Bitrate etc.

  6. Graphical files conversion from one format to another.

  7. Removing static objects from an image.

  8. Blurring areas of an image.

  9. Catalogs with files processing.

  10. Extracting of scenes from video film.

  11. Making of subtitles for video file from SRT files or for DVD - DVD subtitles.

  12. Enables to operate with DVD.

  13. Laying a sound-track on creating video. Volume manipulation.

  14. Different filters applying when operating with an image: de-intrelace - for DVD, clarity, blur, Crop, brightness, scaling filters using modern algorithms etc.

Addition:

WatermarkMaster SDK is oriented on sequence of files operating, for that purposes dynamic variables, contained indices of operated or created files are added. Watermark position can be set relatively to 9 points on the screen that enables to draw watermarks in wanted place of the screen independently of frame size for processed file.

For montage there is Source scene: it's always substituted for current processing video file. Also there is an ability to operate with file folders.

In other words, using SDK it is possible easily and quickly to tune in the processing of big number of files, without extra logic on processing of every file separately.


Field of use

For the last time video sites like YouTube become more and more popular. At the same time for many owners of such sites the task doesn't limits on posting video files, they also want to edit them before posting - to extract some scene, change format, make Thumbnails, and at last, protect them, using personal logotype, so-called watermark.

There are many programs for that purposes, in particular such our programs as VideoCharge and Watermark Master almost completely satisfy all requirements. However there are cases, mainly related to video files processing in a stream, when using external programs is undesirable and you want to create your own product, which automatically would solve all problems mentioned above. Exactly for that Watermark Master SDK programming complex is developed.

Based on COM technology, well documented, with examples - it enables to create own logic on video content or graphical files processing simply and quickly. At the same time you can add your personal filters, watermarks etc.

If you have ideas on creation of a program on video or graphical files processing, you can use WatermarkMaster SDK, that will enables you to concentrate on your ideas and not to west the time on making programming complex on video or graphical files editing. WatermarkMaster SDK has all abilities of Watermark Master and even extra ones, in other words, using WatermarkMaster SDK you can create your own Watermark Master or VideoCharge!

Present functionality requires special licensing.

WatermarkMaster doesn't include function on split files; with WatermarkMaster SDK it's possible to realize such functionality using programming methods. So, WatermarkMaster SDK can be helpful for people to automatize process on creation of video galleries.


Programming Guide

The Programming Guide is intended to help you learn how to use the Watermark Master Software Development Kit (SDK) to build applications.


Getting Started

Present manual contains examples of code, written on Microsoft® Visual C++® version 7.0.

All examples are simplified to the maximum and cover all basic applications of WMSDK.

For other programming languages the manual doesn't have special examples, but as in the base is a work with COM objects, all example can be easy carried on any language which supports COM technologies.

Getting started

To start work you need to link up Watermark SDK to your application.

It can be done by including header file in your application:

#include "WatermarkMasterSDK.h"

Notice that you should include directories for library and headers of WatermarkMaster SDK.

By default directories are the following:

Include files "c:\Program Files\VideoCharge Software\Watermark Master\SDK\include"

Library files "c:\Program Files\VideoCharge Software\Watermark Master\SDK\lib"

(if you installed program to another directory, make ccorresponding changes)

Before using any WMSDK interface COM should be initialized with a call to Coinitialize or CoinitializeEx.

Then, you need to create IWMSDKProject object:

It can be done by calling CoCreateInstance function

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

After IWMSDKProject interface had been created, select all necessary settings

and call method Run from IWMSDKProject interface to run process.

Next step - to register application by specifying serial number:

SetSerialNumber(sn, ak)

where sn - is your serial number,

ak - activation key - that parameter might be empty, in that case WMSDK will try to get activation key itself from our site.

You can contact us to get version without limitations in activetions.

You can don't call that function, if on the computer, where application based on WMSDK is running, Watermark Master is already installed and registered with a serial number for WMSDK.

We recommend to read the following articles before start in order to get information about basic principles of work with WMSDK.

  1. Loading Config File - article about how to use configuration file, previously created by WatermarkMaster application. Contains description of basic principles of work with WMSDK.

You can also see an example of application - Examples/LoadConfig

  2. Files Processing - article which describes how to add files for further processing. Has basic principles of work with files, getting metadata from files.

You can also see an example of application - Examples/ProcessingFiles

  3. Output format setting - article which describes work with WMSDK without using or joint using configuration file. Contains basic principles on setting format, name for resulting file, folder etc.

You can also see an example of application - Examples/LoadConfig

  4. Setting Crop And Resize - article about how to set frame size for creating video or graphical file (width and height), aplly Crop function, filters etc. Includes basic principles of work with IWMSDKFrame interface.

You can also see an example of application - Examples/CropAndResize

  5. Setting Timelines - article describing how to set Timeline while video files processing. Contains basic principles of operation with IWMSDKTimelines interface.

You can also see an example of application - Examples/Timeline

  6. Using Callback function - article about how to use Callback function in WMSDK. Contains description of operating with functions: setting video/audio codec and callback function that returns information about status of a process.

  7. Adding Watermarks - article describing how to draw watermarks using WMSDK. Gives basic example on operating with watermarks, adding effects.

You can also see an example of application - Examples/Watermark

  8. Applying Dynamic Effects - article discribing how to make dynamic effects for watermarks. Contains basic example on adding dynamic effect Fade - which adds smooth appearance to watermark while playing file.

  9. Thumbnails creation - article which describes algorithm of making Thumbnails for video file. Contains basic example on operating with IWMSDKGrabber interface.

You can also see an example of application - Examples/Grabber

  10. Applay Custom Filters - article discribing how to set user's function for frame processing before saving into the file. Contains basic principles of adding user's function.

You can also see an example of application - Examples/CustomFilter

We also recommend to read article on WMSDK examples.


Using the Code Examples

WatermarkMaster SDK presents range of examples, that are located in "c:\Program Files\VideoCharge Software\Watermark Master\SDK\Examples" directory

  1. LoadConfig

  2. OutputFormat

  3. ProcessingFiles

  4. Timeline

  5. Watermark

  6. Grabber

  7. CustomFilter

  8. CropAndResize

These example are written on C++ programming language using Microsoft® Visual C++® version 7.0.

Have only basic principles of operating with WMSDK, describe work with basic interfaces.

Examples can include references to hard-defined paths to files, for example:

hr = pProject->Load(L"c:\\Config.wcf");

example won't be launched if there isn't proper configuration file. Set path to your configuration file.

Examples also can call video or graphical files that don't exist on your computer. See the following example:

hr = pFiles->AddFile(L"c:\\File.jpg", WMSDK_TYPE_FILE, 1);

Set path to your existing file.

Creating files will be saved in c:\\res

hr = pOutput->SetDestinationFolder(L"c:\\res");

directory

The last remark is for all examples where IWMSDKOutput interface is applied. Otherwise when using configuration file all files will be saved in the directory, specified in config or by default - in the directory for processing file.


Load Config File

Loading Config File

To load config, previously created by WatermarkMaster application, you should call method Load of IWMSDKProject interface, setting path to that configuration file.

To run execution of file call method Run of IWMSDKProject interface.

Attention!

The following example will process only files included in config.

See section "Files processing" about adding files and processing them by config.

Example:

int _tmain(int argc, _TCHAR* argv[])

{

CoInitialize(0);

//creating project

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

//loading config, previously created by Watermark Master

hr = pProject->Load(L"c:\\Config.wcf");

if(FAILED(hr))

{

printf("Unknown configuration file. Set path to the configuration file, previously saved by Watermark Master program.);

return -1;

}

//run execution

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

return 0;

}


Files Processing

For video or graphical files processing IWMSDKFiles is used.

It can be gotten by GetFiles method of IWMSDKProject interface.

Example:

CoInitialize(0);

//creating project

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

//loading configuration previously created by Watermark Master

hr = pProject->Load(L"c:\\Config.wcf");

if(FAILED(hr))

{

printf("Unknown file configuration. Set path to the configuration file, previously saved by Watermark Master program.");

return -1;

}

CComPtr<IWMSDKFiles> pFiles;

hr = pProject->GetFiles(&pFiles);

if(FAILED(hr))

{

return -1;

}

//In current example method Load, which loads configuration is used.

//Notice that if configuration already has some file, it will be processed too. To avoid that, delete all files before adding:

while(1)

{

int nCount;

pFiles->Count(&nCount);

if(!nCount) break;

pFiles->Delete(0);

}

CComPtr<IWMSDKFile> pFile;

//add file which should be processed

hr = pFiles->AddFile(L"c:\\File.jpg", WMSDK_TYPE_FILE, 1, &pFile);

if(FAILED(hr))

{

printf("File could not be added. Probably such file already exists.");

return -1;

}

//You can also get all metadata from a file, for example frame width and height:

//For that use IWMSDKFile interface

//getting frame width

CComVariant varW;

pFile->GetProperty(L"Width", &varW);

//getting frame height

CComVariant varH;

pFile->GetProperty(L"Height", &varH);

//or playing time, if it is a video file

//getting frame height

CComVariant varDuration;

pFile->GetProperty(L"DurationByS", &varDuration);

//value returns as a double in seconds

//run execution

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

You can add any number of files at once, call method AddFile several times, how to add DVD disc or folder with files read in documentation on that method. Method Run processes all added files at one time, in order as they were added.

It's also possible to apply your own logic to any added file, setting Timelines, using Crop.


Output Format Setting

To set output format without using config file, select IWMSDKProfile interface.

To get that interface, use GetProfiles method of IWMSDKProject:

CComPtr<IWMSDKProfiles> pProfiles;

hr = pProject->GetProfiles(&pProfiles);

CComPtr<IWMSDKProfile> pProfile;

//adding new profile

hr = pProfiles->New(&pProfile);

Notice: you can create several profiles in order to play at once files with different size, bitrate etc. At that after Run is called all created profiles will be processed in turn.

Also you can execute method Run only for definite profile.

After IWMSDKProfile interface is gotten, it requires initialization:

First, set name of resulting file and directory:

CComPtr<IWMSDKOutput> pOutput;

hr = pProfile->GetOutput(&pOutput);

if(FAILED(hr))

{

return -1;

}

//Sets destination folder

hr = pOutput->SetDestinationFolder(L"c:\\res");

if(FAILED(hr))

{

return -1;

}

//sets name

hr = pOutput->SetFilenamePattern(L"new_name.jpg");

if(FAILED(hr))

{

return -1;

}

To replace creating file in case if file with such name already exists, call:

hr = pOutput->SetIsOverwrite(1);

Set also format in which file should be saved. For that use IWMSDKFormat interface

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

//setting output format to WMV (Windows Media Video)

hr = pFormat->SetOutputFormatID(WMSDK_FORMAT_BMP);

Below there is a full example, you can also see C++ version - Example/OutputFormat

Example:

int _tmain(int argc, _TCHAR* argv[])

{

CoInitialize(0);

//creating project

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfiles> pProfiles;

hr = pProject->GetProfiles(&pProfiles);

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfile> pProfile;

//adding new profile

hr = pProfiles->New(&pProfile);

if(FAILED(hr))

{

return -1;

}

//setting catalogue and name of saving file

CComPtr<IWMSDKOutput> pOutput;

hr = pProfile->GetOutput(&pOutput);

if(FAILED(hr))

{

return -1;

}

hr = pOutput->SetDestinationFolder(L"c:\\res");

if(FAILED(hr))

{

return -1;

}

hr = pOutput->SetFilenamePattern(L"new_name.jpg");

if(FAILED(hr))

{

return -1;

}

//getting interface to profile's format object

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

hr = pFormat->SetOutputFormatID(WMSDK_FORMAT_BMP);

CComPtr<IWMSDKFiles> pFiles;

hr = pProject->GetFiles(&pFiles);

if(FAILED(hr))

{

return -1;

}

//add file which should be processed

hr = pFiles->AddFile(L"c:\\image.jpg", WMSDK_TYPE_FILE, 1);

if(FAILED(hr))

{

printf("File could not be added. Probably such file already exists.");

return -1;

}

//Run execution

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

return 0;

}

That example shows how don't use config file, and define all settings by programming way. However you can combine both methods. For example, to define in config settings all options on saving in format, as in general case they can be numerous; options of file name, and catalogue in which files will be saved by programming way.


Crop and Resize

To apply Crop or Resize and also range of filters, use IWMSDKFrame interface

To Crop select SetCrop function, for example:

CComPtr<IWMSDKFrame> pFrame;

pProfile->GetFrame(&pFrame);

if(FAILED(hr))

{

return -1;

}

pFrame->SetCrop(10, 10, 10, 10);

at that, in resulting files strips 10 pixels wide will be cut out from the top, bottom and on each side. To Resize image you need to set new size, it can be done with SetImageSize.

pFrame->SetImageSize(L"100x100");

also you can choose Resambling type

pFrame->SetResampling(WMSDK_RESAMPLING_BILINEAR);

values could be as the following:

WMSDK_RESAMPLING_NEAREST

WMSDK_RESAMPLING_BILINEAR

WMSDK_RESAMPLING_BICUBIC

WMSDK_RESAMPLING_LANCZOS3

WMSDK_RESAMPLING_HANN

WMSDK_RESAMPLING_LANCZOS8

These values determine what Resampling will be like: use WMSDK_RESAMPLING_NEAREST only if changes in a scale of an image are minor, otherwise we recommend to choose more "difficult", but more qualitative algorithm of resize.

If you want to Crop with proportion conservation, use method

pFrame->SetResizeType(WMSDK_RESIZE_PRESERVE_ASPECT_RATIO);

Below there is a full example, also you can see C++ version - Example/CropAndResize

int _tmain(int argc, _TCHAR* argv[])

{

CoInitialize(0);

//creating project

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfiles> pProfiles;

hr = pProject->GetProfiles(&pProfiles);

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfile> pProfile;

//adding new profile

hr = pProfiles->New(&pProfile);

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKFrame> pFrame;

pProfile->GetFrame(&pFrame);

if(FAILED(hr))

{

return -1;

}

//set Crop - removes strip 10 pixels wide from each side

pFrame->SetCrop(10, 10, 10, 10);

//set size 100 × 100 to creating file

pFrame->SetImageSize(L"100x100");

//set type Resampling

pFrame->SetResampling(WMSDK_RESAMPLING_BILINEAR);

//Set type Resize with proportion conservation

pFrame->SetResizeType(WMSDK_RESIZE_PRESERVE_ASPECT_RATIO);

//setting catalogue and name of saving file

CComPtr<IWMSDKOutput> pOutput;

hr = pProfile->GetOutput(&pOutput);

if(FAILED(hr))

{

return -1;

}

//set name of folder in which file will be saved

hr = pOutput->SetDestinationFolder(L"c:\\res");

if(FAILED(hr))

{

return -1;

}

//set name of creating file - the same as of processing one

hr = pOutput->SetFilenamePattern(L"%s.jpg");

if(FAILED(hr))

{

return -1;

}

//if such file exists - replace it

hr = pOutput->SetIsOverwrite(1);

if(FAILED(hr))

{

return -1;

}

//getting interface to profile's format object

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

//setting output format to WMV (Windows Media Video)

hr = pFormat->SetOutputFormatID(WMSDK_FORMAT_JPEG);

CComPtr<IWMSDKFiles> pFiles;

hr = pProject->GetFiles(&pFiles);

if(FAILED(hr))

{

return -1;

}

//add file which should be processed

hr = pFiles->AddFile(L"c:\\image.jpg", WMSDK_TYPE_FILE, 1);

if(FAILED(hr))

{

printf("File could not be added. Probably such file does not exist.");

return -1;

}

//run execution

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

return 0;

}

Read documentation on IWMSDKFrame interface for getting information about all abilities of WMSDK on image editing. You can also write your own code on image processing, see section Applay Custom Filters.


Setting Timelines

Operating with video files you can set Timelines - time spans within which video will be created,

or on the contrary, which will be removed from video.

Timeline can be set both for all added files at once and for each file separately.

You can add it by apllying IWMSDKTimelines interface, which can be gotten using IWMSDKProfile and IWMSDKFile interfaces.

//get Timelines

CComPtr<IWMSDKTimelines> ptrTimelines;

hr = pProfile->GetTimelines(&ptrTimelines);

if(FAILED(hr))

{

return -1;

}

//Video will be created only from tenth to fifteenth second.

hr = ptrTimelines->AddTimeline(10.0, 15.0, 0);

if(FAILED(hr))

{

return -1;

}

Also every creating Timeline can be set relatively to the end of a file, start can be relative to the end and otherwise. To edit these properties you should get IWMSDKTimeline object, for that

CComPtr<IWMSDKTimeline> ptrTimeline;

//Video will be created only from tenth to fifteenth second

hr = ptrTimelines->AddTimeline(10.0, 15.0, 0, &ptrTimeline);

Below there is an example, also you can see C++ version - Example/Timeline

int _tmain(int argc, _TCHAR* argv[])

{

CoInitialize(0);

//creating projet

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfiles> pProfiles;

hr = pProject->GetProfiles(&pProfiles);

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfile> pProfile;

//adding new profile

hr = pProfiles->New(&pProfile);

if(FAILED(hr))

{

return -1;

}

//Set

CComPtr<IWMSDKTimelines> ptrTimelines;

hr = pProfile->GetTimelines(&ptrTimelines);

if(FAILED(hr))

{

return -1;

}

//Video will be created only from tenth to fifteenth second

hr = ptrTimelines->AddTimeline(10.0, 15.0, 0);

if(FAILED(hr))

{

return -1;

}

//setting catalogue and name of saving file

CComPtr<IWMSDKOutput> pOutput;

hr = pProfile->GetOutput(&pOutput);

if(FAILED(hr))

{

return -1;

}

//Set name of the folder in which file will be saved

hr = pOutput->SetDestinationFolder(L"c:\\res");

if(FAILED(hr))

{

return -1;

}

//Set name of creating file

hr = pOutput->SetFilenamePattern(L"new_name.wmv");

if(FAILED(hr))

{

return -1;

}

//If such file exists - replace it

hr = pOutput->SetIsOverwrite(1);

if(FAILED(hr))

{

return -1;

}

//getting interface to profile's format object

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

//setting output format to WMV (Windows Media Video)

hr = pFormat->SetOutputFormatID(WMSDK_FORMAT_WMV);

CComPtr<IWMSDKFiles> pFiles;

hr = pProject->GetFiles(&pFiles);

if(FAILED(hr))

{

return -1;

}

//add file which should be processed

hr = pFiles->AddFile(L"c:\\clip.wmv", WMSDK_TYPE_FILE, 1);

if(FAILED(hr))

{

printf("File could not be added. Probably such file already exists.");

return -1;

}

//run execution

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

return 0;

}

If it needs to divide file into parts by equal time spans, you should set Timeline for each part and call method Run. All operations should be in a loop.


Using Callback Function

Getting list of available Video/Audio codecs

When saving into video format like AVI, MOV, WMV, external codecs, which your system has can be applied.

Using method EnumerateCodecs of IWMSDKFormat interface you can get list of codecs that are set on your computer:

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

//enumeration of WMV video codecs

hr = pFormat->EnumerateCodecs(WMSDK_CODEC_WMV_VIDEO, (int*)CodecVideoCallback, this);

where CodecVideoCallback - is some your function of the following format:

static HRESULT CodecVideoCallback(IUnknown* pCodec, int count, int* pData)

{

CComPtr<IWMSDKCodecWMVVideo> pWMV = (IWMSDKCodecWMVVideo*)pCodec;

WCHAR name[512];

int id;

HRESULT hr = pWMV->GetName(name);

hr = pWMV->GetID(&id);

print ("Codec Name: %ls", name);

return hr;

}

list of codecs can be gotten for:

WMSDK_CODEC_WMV_VIDEO - lists all codecs for Video WMV files

WMSDK_CODEC_WMV_AUDIO - lists all codecs for Audio WMV files

WMSDK_CODEC_AVI_VIDEO - lists all codecs for Video AVI files

WMSDK_CODEC_AVI_AUDIO - lists all codecs for Audio AVI files

WMSDK_CODEC_MOV_VIDEO - lists all codecs for Video MOV files

WMSDK_CODEC_MOV_AUDIO - lists all codecs for Audio MOV files

after getting list of availiable codecs call method SetVideoCodec to select codec.

CComPtr<IWMSDKFormatWMV> pWMV;

hr = pFormat->GetFormatWMV(&pWMV);

//getting video codec's name

WCHAR name[512];

theApp.m_codecsWMVVideo[0]->GetName(name);

//setting video codec

hr = pWMV->SetVideoCodec(name);

where the App.m_codecsWMVVideo[0] - is a list of codecs previously returned by CodecVideoCallback function.

Getting information about status of a process

Video files processing can take much time, so you can use Callback function to get information about status of a process:

Call method AddCallback of IWMSDKProject interface.

hr = pProject->AddCallback((int*)WMSDKCallback, (int*)&theApp);

where WMSDKCallback is a function of the following type:

static HRESULT WMSDKCallback(int wholePercent, int curPercent, LPSTR processingFile, LPSTR msg, int* pData)

{

print("Total %d, Current: %d", wholePercent, process_cur);

return S_OK;

}

where

wholePercent - value that varies form 0 to 100, gives completion rate of a whole process;

curPercent - value that varies form 0 to 100, gives completion rate of processing video file;

processingFile - gives name of processing file;

msg - additional text message.

How to use the third Callback function of WMSDK, which enables to edit image before saving into the file, read in the article "Applying Custom Filters".


Adding Watermarks

To add watermark select IWMSDKWatermarks interface. You can get it using method GetWatermarks of IWMSDKProfile interface.

CComPtr<IWMSDKWatermarks> pWatermarks;

hr = pProfile->GetWatermarks(&pWatermarks);

Adding a text watermark itself:

CComPtr<IWMSDKWatermarkText> pWMText;

hr = pWatermarks->AddWatermark(WMSDK_WATERMARK_TEXT, (IUnknown**)&pWMText);

You can add any watermark which Watermark Master supports, see Watermark Master

Spesify text you need to display:

hr = pWMText->SetText(L"www.YOUR.site.com");

Set color to a text

hr = pWMText->SetColor(RGB(255, 255, 255));

Set position in the frame

hr = pWMText->SetPosition(50, 50);

Notice: position is set relatively to 9 determined points, by default in that example watermark will be displayed relatively to top left corner with 50 pixels displacement from the top and bottom.

You can select SetPositionType function to set another relative point. To add an effect, shadow to a text, for example, it needs to use IWMSDKEffects interface:

CComPtr<IWMSDKEffects> pEffects;

hr = pWMText->GetEffects(&pEffects);

//getting interface to 3D effect object

CComPtr<IWMSDKEffectDropShadow> pEffect3D;

hr = pEffects->GetEffect(WMSDK_EFFECT_DROPSHADOW, (IUnknown**)&pEffect3D);

//turning 3D effect on!

hr = pEffect3D->TurnOn(1);

You can also apply Timeline, if you want to display your watermark only within definite time range. For that get IWMSDKTimeline interface for added watermark using GetTimeline method. Below there is a full example, also you can see C++ version - Example/Watermark

int _tmain(int argc, _TCHAR* argv[])

{

CoInitialize(0);

//project creation

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfiles> pProfiles;

hr = pProject->GetProfiles(&pProfiles);

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfile> pProfile;

//adding new profile

hr = pProfiles->New(&pProfile);

if(FAILED(hr))

{

return -1;

}

//Set

CComPtr<IWMSDKTimelines> ptrTimelines;

hr = pProfile->GetTimelines(&ptrTimelines);

if(FAILED(hr))

{

return -1;

}

//Video will be created only from tenth to fifteenth second

hr = ptrTimelines->AddTimeline(10.0, 15.0, 0);

if(FAILED(hr))

{

return -1;

}

//setting catalogue and name of saving file

CComPtr<IWMSDKOutput> pOutput;

hr = pProfile->GetOutput(&pOutput);

if(FAILED(hr))

{

return -1;

}

//Set name of the folder in which file will be saved

hr = pOutput->SetDestinationFolder(L"c:\\res");

if(FAILED(hr))

{

return -1;

}

//Set name of creating file

hr = pOutput->SetFilenamePattern(L"new_name.wmv");

if(FAILED(hr))

{

return -1;

}

//If such file exists, - replace it

hr = pOutput->SetIsOverwrite(1);

if(FAILED(hr))

{

return -1;

}

//getting interface to profile's format object

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

//setting output format to WMV (Windows Media Video)

hr = pFormat->SetOutputFormatID(WMSDK_FORMAT_WMV);

CComPtr<IWMSDKFiles> pFiles;

hr = pProject->GetFiles(&pFiles);

if(FAILED(hr))

{

return -1;

}

//Add file which should be processed

hr = pFiles->AddFile(L"c:\\clip.wmv", WMSDK_TYPE_FILE, 1);

if(FAILED(hr))

{

printf("File could not be added. Probably such file already exists.");

return -1;

}

//Run execution

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

return 0;

}

You can also apply dynamic effects, such as Fade, Key Point, Motion etc to modify watermark while displaying. About dynamic effects read in the article "Applying Dynamic Effects".

For video montage there is an ability to apply personal watermarks to every added scene.


Thumbnails Creation

To make Thumbnails it is enough to set output format as a graphical file, using SetOutputFormatID function with one of the following values:

WMSDK_FORMAT_BMP - creating file in BMP format

WMSDK_FORMAT_GIF - creating file in GIF format

WMSDK_FORMAT_JPEG - creating file in JPEG format

WMSDK_FORMAT_PNG - creating file in PNG format

WMSDK_FORMAT_TIFF - creating file in TIFF format

At that if video files are processed, by default Thumbnails will be made using the first frame.

If you want to make several Thumbnails, using different frames of a video, you should select IWMSDKGrabber interface.

You can set time span or specify how many frames you want to create for that video.

Below there is a full example, also you can see C++ version - Example/Thumbnail

int _tmain(int argc, _TCHAR* argv[])

{

CoInitialize(0);

//creating project

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfiles> pProfiles;

hr = pProject->GetProfiles(&pProfiles);

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfile> pProfile;

//adding new profile

hr = pProfiles->New(&pProfile);

if(FAILED(hr))

{

return -1;

}

//getting IWMSDKGrabber interface

CComPtr<IWMSDKGrabber> pGrabber;

hr = pProfile->GetGrabber(&pGrabber);

if(FAILED(hr))

{

return -1;

}

bool bGrabByTime = 0;

if(bGrabByTime)

{

//images are created by the time

pGrabber->SetGrabberType(WMSDK_GRABBER_TYPE_BY_TIME);

//parting occurs every 10th second

pGrabber->SetStep(10, WMSDK_GRABBER_STEP_SECONDS);

}

else

{

//defined number of images is being created

pGrabber->SetGrabberType(WMSDK_GRABBER_TYPE_BY_PARTS);

//6 images will be created using frames having equal position in the video

pGrabber->SetFrameCount(6);

}

//setting catalogue and name of saving file

CComPtr<IWMSDKOutput> pOutput;

hr = pProfile->GetOutput(&pOutput);

if(FAILED(hr))

{

return -1;

}

//Set name of a folder in which file will be saved

hr = pOutput->SetDestinationFolder(L"c:\\res");

if(FAILED(hr))

{

return -1;

}

//Set name of creating file

//You can use variables, for example %s - name of initial file, %r - index of creating file

hr = pOutput->SetFilenamePattern(L"%s_%r.jpg");

if(FAILED(hr))

{

return -1;

}

//If such file exists - replace it

hr = pOutput->SetIsOverwrite(1);

if(FAILED(hr))

{

return -1;

}

//getting interface to profile's format object

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

//setting output format to WMV (Windows Media Video)

hr = pFormat->SetOutputFormatID(WMSDK_FORMAT_JPEG);

CComPtr<IWMSDKFiles> pFiles;

hr = pProject->GetFiles(&pFiles);

if(FAILED(hr))

{

return -1;

}

//Add file which should be processed

hr = pFiles->AddFile(L"c:\\clip.wmv", WMSDK_TYPE_FILE, 1);

if(FAILED(hr))

{

printf("File could not be added. Probably such file already exists.");

return -1;

}

//Run execution

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

return 0;

}

When creating video galleries, it needs not only to prepare video for review, but also to make Thumbnails for them. You can execute both operations at one time by calling Run function, creating several profiles, one of which gives logic on processing and creating video files, another - on making Thumbnails for each processing file.


Applying Dynamic Effects

To apply dynamic effect it needs to get IWMSDKEffects interface, using method GetEffects from watermark's interface.

CComPtr<IWMSDKEffects> pEffects;

hr = pWMText->GetEffects(&pEffects);

add that effect:

//adding dynamic effect Fade

hr = pEffects->AddDynamicEffect(WMSDK_DYNAMIC_EFFECT_FADE, &pos);

You can add 4 types of dynamic effects

WMSDK_DYNAMIC_EFFECT_FADE - gives smooth appearance and disappearance of watermark

WMSDK_DYNAMIC_EFFECT_PARAM_CHANGE - gives logic on changing of parameter of watermark drawing

WMSDK_DYNAMIC_EFFECT_MOTION - moves watermark

WMSDK_DYNAMIC_EFFECT_KEYPOINT - sets key point for watermark

Set time of applying an effect:

CComQIPtr<IWMSDKStream> pFadeStream(pFade);

ATLASSERT(pFadeStream);

//that effect will be applied from beginning to end of the file, if the second patameter is non-negative,

//set time of ending an effect

hr = pFadeStream->SetTime(0, -1, WMSDK_TIME_ABSOLUTE);

In present case watermark will be dysplayed from beginning to end, and at that the second parameter -1 guarantees that dynamic watermark will be applied completely, independently of file length.

Example:

int _tmain(int argc, _TCHAR* argv[])

{

CoInitialize(0);

//creating project

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfiles> pProfiles;

hr = pProject->GetProfiles(&pProfiles);

if(FAILED(hr))

{

return -1;

}

//adding new profile

hr = pProfiles->New(&pos);

if(FAILED(hr))

{

return -1;

}

//getting interface to added profile's object

CComPtr<IWMSDKProfile> pProfile;

hr = pProfiles->Item(pos, &pProfile);

if(FAILED(hr))

{

return -1;

}

//Set

CComPtr<IWMSDKTimelines> ptrTimelines;

hr = pProfile->GetTimelines(&ptrTimelines);

if(FAILED(hr))

{

return -1;

}

//Video will be created from tenth to fifteenth second

hr = ptrTimelines->AddTimeline(10.0, 15.0, 0, &pos);

if(FAILED(hr))

{

return -1;

}

//setting catalogue and name of saving file

CComPtr<IWMSDKOutput> pOutput;

hr = pProfile->GetOutput(&pOutput);

if(FAILED(hr))

{

return -1;

}

//Set name of the folder in which file will be saved

hr = pOutput->SetDestinationFolder(L"c:\\res");

if(FAILED(hr))

{

return -1;

}

//Set name of creating file

hr = pOutput->SetFilenamePattern(L"new_name.wmv");

if(FAILED(hr))

{

return -1;

}

//if such file exists - replace it

hr = pOutput->SetIsOverwrite(1);

if(FAILED(hr))

{

return -1;

}

//getting interface to profile's format object

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

//setting output format to WMV (Windows Media Video)

hr = pFormat->SetOutputFormatID(WMSDK_FORMAT_WMV);

//Adding watermark

CComPtr<IWMSDKWatermarks> pWatermarks;

hr = pProfile->GetWatermarks(&pWatermarks);

if(FAILED(hr))

{

return -1;

}

//Adding text watermark

hr = pWatermarks->AddWatermark(WMSDK_WATERMARK_TEXT, &pos);

//getting interface to added text watermark object

CComPtr<IWMSDKWatermarkText> pWMText;

hr = pWatermarks->Item(pos, (IUnknown**)&pWMText);

//Set text

hr = pWMText->SetText(L"www.YOUR.site.com");

//Set color for a text

hr = pWMText->SetColor(RGB(255, 0, 255));

//Set position in the frame

hr = pWMText->SetPosition(50, 50);

//getting IWMSDKEffects

CComPtr<IWMSDKEffects> pEffects;

hr = pWMText->GetEffects(&pEffects);

//adding dynamic effect Fade

hr = pEffects->AddDynamicEffect(WMSDK_DYNAMIC_EFFECT_FADE, &pos);

//getting effect

CComPtr<IUnknown> pFade;

pEffects->GetDynamicEffect(pos, &pFade);

//getting IWMSDKStream interface for setting time

CComQIPtr<IWMSDKStream> pFadeStream(pFade);

ATLASSERT(pFadeStream);

//that effect will be applied from beginning to end of the file, if the second patameter is non-negative,

//set time of ending an effect

hr = pFadeStream->SetTime(0, -1, WMSDK_TIME_ABSOLUTE);

//Adding watermark

CComPtr<IWMSDKFiles> pFiles;

hr = pProject->GetFiles(&pFiles);

if(FAILED(hr))

{

return -1;

}

//Add file which should be processed

hr = pFiles->AddFile(L"C:\\video.wmv", WMSDK_TYPE_FILE, 1, &pos);

//Run execution

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

return 0;

}

You can use several dynamic effects at one time. In that case they will be applied in parallel, what enables to make different complicated effects. For example, applying Fade and Motion effect it's possible to get smooth appearance and motion for a text while playing video file.


Applying Custom Filters

Creating video or graphical file you can edit every frame before coding and saving it, what enables to apply personal filters, effects, draw watermarks etc.

For that you need to get pointer at IWMSDKFrame interface, see example "Setting Crop And Resize".

//setting callback function

pFrame->SetFrameCallback((int*)CustomCallback, NULL);

Call SetFrameCallback function, the first its parameter is a pointer at static function with realization of logic on RGB buffer processing:

static HRESULT CustomCallback(IUnknown* pFile,

LONGLONG rtTime,

BYTE** pFrame,

DWORD* pdwFrameSize,

BYTE** pFormat,

DWORD* pdwFormatSize,

void* pOwner)

{

/*

IUnknown* pFile - pointer at object

LONGLONG rtTime - frame time

BYTE** pFrame - RGB buffer with data

DWORD* pdwFrameSize - buffer size

BYTE** pFormat - buffer format in the BITMAPINFOHEADER format

DWORD* pdwFormatSize - format size

void* pOwner - pointer at user's class

*/

//Add pFrame logic on RGB buffer processing, it has format determined by pFormat parameter

return S_OK;

}

In present function you can change passed buffer or return your own, using pFrame.

Attention!

If you change buffer format, for example while cropping, you must return correct buffer in parameter BYTE** pFormat

Below there is an example, you can also see C++ version - Example/CustomFilter

static HRESULT CustomCallback(IUnknown* pFile,

LONGLONG rtTime,

BYTE** pFrame,

DWORD* pdwFrameSize,

BYTE** pFormat,

DWORD* pdwFormatSize,

void* pOwner)

{

/*

IUnknown* pFile - pointer at object

LONGLONG rtTime - frame time

BYTE** pFrame - RGB buffer with data

DWORD* pdwFrameSize - buffer size

BYTE** pFormat - buffer format in the BITMAPINFOHEADER format

DWORD* pdwFormatSize - format size

void* pOwner - pointer at user's size

*/

BITMAPINFOHEADER* p = (BITMAPINFOHEADER*)(pFormat);

return S_OK;

}

int _tmain(int argc, _TCHAR* argv[])

{

CoInitialize(0);

//creating project

CComPtr<IWMSDKProject> pProject;

HRESULT hr = pProject.CoCreateInstance(L"WMSDK.WMSDKProject");

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfiles> pProfiles;

hr = pProject->GetProfiles(&pProfiles);

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKProfile> pProfile;

//adding new profile

hr = pProfiles->New(&pProfile);

if(FAILED(hr))

{

return -1;

}

CComPtr<IWMSDKOutput> pOutput;

hr = pProfile->GetOutput(&pOutput);

if(FAILED(hr))

{

return -1;

}

hr = pOutput->SetDestinationFolder(L"c:\\res");

if(FAILED(hr))

{

return -1;

}

hr = pOutput->SetFilenamePattern(L"new_name.jpg");

if(FAILED(hr))

{

return -1;

}

//getting interface to profile's format object

CComPtr<IWMSDKFormat> pFormat;

hr = pProfile->GetFormat(&pFormat);

hr = pFormat->SetOutputFormatID(WMSDK_FORMAT_BMP);

CComPtr<IWMSDKFiles> pFiles;

hr = pProject->GetFiles(&pFiles);

if(FAILED(hr))

{

return -1;

}

//setting Custom Callback function

CComPtr<IWMSDKFrame> pFrame;

pProfile->GetFrame(&pFrame);

if(FAILED(hr))

{

return -1;

}

//setting callback function

pFrame->SetFrameCallback((int*)CustomCallback, NULL);

hr = pFiles->AddFile(L"c:\\Home\\Nic\\Imag\\002.jpg", WMSDK_TYPE_FILE, 1);

if(FAILED(hr))

{

printf("File cannot be added. Probably such file already exists.");

return -1;

}

hr = pProject->Run(NULL, -1, -1);

if(FAILED(hr))

{

return -1;

}

return 0;

}.

One parameter of that function is a frame time LONGLONG rtTime, you can use it to make your personal dynamic effects.


Programming Reference

The Watermark Master Software Development Kit (SDK) supports a range of objects, interfaces, independent functions, structures, enumeration types, attributes, and so on. The following sections document these in detail.


Interfaces

The following tables describe the interfaces supported by this SDK and show their relationship to objects and other interfaces.

Interface | Description
IWMSDKProject |
IWMSDKProfile |


IWMSDKProject Interface

The IWMSDKProject interface creates a project.

The IWMSDKProject interface exposes the following methods.

Method | Description
GetFiles | Returns the collection of source files.
GetProfiles | Returns the collection of profiles.
Run | Starts the processing.
AddCallback | Adds the pointer to a callback function.
RemoveCallback | Removes the pointer to a callback function.
RemoveAllCallbacks | Removes all pointers to callback functions.
Load | Loads a project from the file.
Save | Saves a project to the file.


IWMSDKProject::GetFiles

The GetFiles method retrieves a pointer to the IWMSDKFiles interface.

Syntax

HRESULT GetFiles(

IWMSDKFiles** pFiles

);

Parameters

pFiles

[out] A pointer to the IWMSDKFiles interface.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.


IWMSDKProject::GetProfiles

The GetProfiles method retrieves a pointer to the IWMSDKProfiles interface.

Syntax

HRESULT GetProfiles(

IWMSDKProfiles** pProfiles

);

Parameters

pProfiles

[out] A pointer to the IWMSDKProfiles interface.


IWMSDKProject::Run

The Run method starts the processing.

Syntax

HRESULT Run(

HWND hwnd,

int profile,

int file

);

Parameters

hwnd

[in] Handle of the parent window.

profile

[in] Profile number. If equal to -1, then all profiles in the project will be processed.

file

[in] File number. If equal to -1, then all files will be processed.


IWMSDKProject::AddCallback

The AddCallback method adds a pointer to a callback function used to handle events of the main process.

Syntax

HRESULT AddCallback(

int* pCallback,

int* pData

);

Parameters

pCallback

[in] A pointer to a callback function. The function has format HRESULT CallbackFunction(int percentWhole, int percentCurrent, LPCSTR processFilePath, LPCSTR message, int* pData).

pData

[in] A pointer to arbitrary user's data.


IWMSDKProject::RemoveCallback

The RemoveCallback method removes a pointer from the list of pointers to callback functions.

Syntax

HRESULT RemoveCallback(

int* pCallback

);

Parameters

pCallback

[in] A pointer to a callback function.


IWMSDKProject::RemoveAllCallbacks

The RemoveAllCallbacks method removes all pointers from the list of pointers to callback functions.

Syntax

HRESULT RemoveAllCallbacks();


IWMSDKProject::Load

The Load method loads a project from the specified file.

Syntax

HRESULT Load(

LPCWSTR path

);

Parameters

path

[in] Path to the file.


IWMSDKProject::Save

The Save method saves a project to the specified file.

Syntax

HRESULT Save(

LPCWSTR path

);

Parameters

path

[in] Path to the file.


IWMSDKProfile Interface

The IWMSDKProfile interface creates a profile.

The IWMSDKProfile interface exposes the following methods.

Method | Description
GetName | Gets the profile name.
SetName | Sets the profile name.
GetCopyright | Gets the copyright.
SetCopyright | Sets the copyright.
GetCopyrightName | Gets the copyright name.
SetCopyrightName | Sets the copyright name.
GetCopyrightAuthor | Gets the copyright author.
SetCopyrightAuthor | Sets the copyright author.
GetOutput | Retrieves a pointer to the IWMSDKOutput interface.
GetFrame | Retrieves a pointer to the IWMSDKFrame interface.
GetGrabber | Retrieves a pointer to the IWMSDKGrabber interface.
GetFormat | Retrieves a pointer to the IWMSDKFormat interface.
GetTimelines | Retrieves a pointer to the IWMSDKTimelines interface.
GetWatermarks | Retrieves a pointer to the IWMSDKWatermarks interface.


IWMSDKProfile::GetName

The GetName method gets the profile name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Profile name.


IWMSDKProfile::SetName

The SetName method sets the profile name.

Syntax

HRESULT SetName(

LPCWSTR name

);

Parameters

name

[in] Profile name.


IWMSDKProfile::GetCopyright

The GetCopyright method gets the copyright.

Syntax

HRESULT GetCopyright(

LPWSTR copyright

);

Parameters

copyright

[out] Copyright.


IWMSDKProfile::SetCopyright

The SetCopyright method sets the copyright.

Syntax

HRESULT SetCopyright(

LPCWSTR copyright

);

Parameters

copyright

[in] Copyright.


IWMSDKProfile::GetCopyrightName

The GetCopyrightName method gets the copyright name.

Syntax

HRESULT GetCopyrightName(

LPWSTR name

);

Parameters

name

[out] Copyright name.


IWMSDKProfile::SetCopyrightName

The SetCopyrightName method sets the copyright name.

Syntax

HRESULT SetCopyrightName(

LPCWSTR name

);

Parameters

name

[in] Copyright name.


IWMSDKProfile::GetCopyrightAuthor

The GetCopyrightAuthor method gets the copyright author.

Syntax

HRESULT GetCopyrightAuthor(

LPWSTR author

);

Parameters

author

[out] Copyright author.


IWMSDKProfile::SetCopyrightAuthor

The SetCopyrightAuthor method sets the copyright author.

Syntax

HRESULT SetCopyrightAuthor(

LPCWSTR author

);

Parameters

author

[in] Copyright author.


IWMSDKProfile::GetOutput

The GetOutput method retrieves a pointer to the IWMSDKOutput interface.

Syntax

HRESULT GetOutput(

IWMSDKOutput** pOutput

);

Parameters

pOutput

[out] A pointer to the IWMSDKOutput interface.


IWMSDKProfile::GetFrame

The GetFrame method retrieves a pointer to the IWMSDKFrame interface.

Syntax

HRESULT GetFrame(

IWMSDKFrame** pFrame

);

Parameters

pFrame

[out] A pointer to the IWMSDKFrame interface.


IWMSDKProfile::GetGrabber

The GetGrabber method retrieves a pointer to the IWMSDKGrabber interface.

Syntax

HRESULT GetGrabber(

IWMSDKGrabber** pGrabber

);

Parameters

pGrabber

[out] A pointer to the IWMSDKGrabber interface.


IWMSDKProfile::GetFormat

The GetFormat method retrieves a pointer to the IWMSDKFormat interface.

Syntax

HRESULT GetFormat(

IWMSDKFormat** pFormat

);

Parameters

pFormat

[out] A pointer to the IWMSDKFormat interface.


IWMSDKProfile::GetTimelines

The GetTimelines method retrieves a pointer to the IWMSDKTimelines interface.

Syntax

HRESULT GetTimelines(

IWMSDKTimelines** pTimelines

);

Parameters

pTimelines

[out] A pointer to the IWMSDKTimelines interface.


IWMSDKProfile::GetWatermarks

The GetWatermarks method retrieves a pointer to the IWMSDKWatermarks interface.

Syntax

HRESULT GetWatermarks(

IWMSDKWatermarks** pWatermarks

);

Parameters

pWatermarks

[out] A pointer to the IWMSDKWatermarks interface.


IWMSDKOutput Interface

The IWMSDKOutput interface includes methods and properties that define the rules for saving the produced files.

The IWMSDKOutput interface exposes the following methods.

Method | Description
GetDestinationFolder | Gets the destination folder for the produced files.
SetDestinationFolder | Sets the destination folder for the produced files.
GetFilenamePattern | Gets the names of the produced files.
SetFilenamePattern | Sets the names of the produced files.
GetDublicateNameFormat | Gets the format for the duplicate filenames.
SetDublicateNameFormat | Sets the format for the duplicate filenames.
GetFilenameNumberFormat | Gets the numeric format of the filename index.
SetFilenameNumberFormat | Sets the numeric format of the filename index.
GetIsWebSafe | Gets a boolean value that indicates whether the conversion of the names of the produced files into web safe ones is enabled.
SetIsWebSafe | Sets a boolean value that indicates whether the conversion of the names of the produced files into web safe ones is enabled.
GetLetterCase | Gets the value of the case of the produced file name.
SetLetterCase | Sets the value of the case of the produced file name.
GetUseFormatExtension | Gets a boolean value that indicates whether the assignment of the format-dependent extension to the produced files is enabled.
SetUseFormatExtension | Sets a boolean value that indicates whether the assignment of the format-dependent extension to the produced files is enabled.
GetIsOverwrite | Gets a boolean value that indicates whether the overwriting of the existing files is enabled.
SetIsOverwrite | Sets a boolean value that indicates whether the overwriting of the existing files is enabled.
GetIsRemoveOriginal | Gets a boolean value that indicates whether the removal of the source files on the process completion is enabled.
SetIsRemoveOriginal | Sets a boolean value that indicates whether the removal of the source files on the process completion is enabled.


IWMSDKOutput::GetDestinationFolder

The GetDestinationFolder method gets the path to the folder all the generated files will be saved in.

Syntax

HRESULT GetDestinationFolder(

LPWSTR path

);

Parameters

path

[out] Path to the destination folder.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

If path is equal to a null string, the generated files will be saved in the folder where the source files are (therein after called "source folder").


IWMSDKOutput::SetDestinationFolder

The SetDestinationFolder method sets the path to the folder all the generated files will be saved in.

Syntax

HRESULT SetDestinationFolder(

LPCWSTR path

);

Parameters

path

[in] Path to the destination folder.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The path can be set directly or relatively to the source folder.

If path is equal to a null string, the generated files will be saved in the source folder.


IWMSDKOutput::GetFilenamePattern

The GetFilenamePattern method gets the names of the produced files.

Syntax

HRESULT GetFilenamePattern(

LPWSTR pattern

);

Parameters

pattern

[out] The name of a produced file.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The names of the produces files can include the following dynamic variables:

%i - Source File Index

%a - Absolute File Index

%r - Relative File Index

%s - Source File Name

%e - Source File Extension

%p - Source File Parent Directory.


IWMSDKOutput::SetFilenamePattern

The SetFilenamePattern method sets the names of the produced files.

Syntax

HRESULT SetFilenamePattern(

LPCWSTR pattern

);

Parameters

pattern

[in] The name of a produced file.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The names of the produces files can include the following dynamic variables:

%i - Source File Index

%a - Absolute File Index

%r - Relative File Index

%s - Source File Name

%e - Source File Extension

%p - Source File Parent Directory.


IWMSDKOutput::GetDublicateNameFormat

The GetDublicateNameFormat method gets the format for the duplicate filenames.

Syntax

HRESULT GetDublicateNameFormat(

LPWSTR format

);

Parameters

format

[out] Format for the duplicate filenames.


IWMSDKOutput::SetDublicateNameFormat

The SetDublicateNameFormat method sets the notation format for the duplicate filenames.

Syntax

HRESULT SetDublicateNameFormat(

LPCWSTR format

);

Parameters

format

[in] Notation format for the duplicate filenames.


IWMSDKOutput::GetFilenameNumberFormat

The GetFilenameNumberFormat method gets the numeric format of the filename index.

Syntax

HRESULT GetFilenameNumberFormat(

LPWSTR format,

int* seed,

int* increment

);

Parameters

format

[out] The numeric format of the filename index.

seed

[out] A starting value.

increment

[out] An increment.


IWMSDKOutput::SetFilenameNumberFormat

The SetFilenameNumberFormat method sets the numeric format of the filename index.

Syntax

HRESULT SetFilenameNumberFormat(

LPCWSTR format,

int seed,

int increment

);

Parameters

format

[in] The numeric format of the filename index.

seed

[in] A starting value.

increment

[in] An increment.


IWMSDKOutput::GetIsWebSafe

The GetIsWebSafe method gets a boolean value that indicates whether the conversion of the names of the produced files into web safe ones is enabled.

Syntax

HRESULT GetIsWebSafe(

int* safe

);

Parameters

safe

[out] A boolean value that indicates whether the conversion of the names of the produced files into web safe ones is enabled.


IWMSDKOutput::SetIsWebSafe

The SetIsWebSafe method sets a boolean value that indicates whether the conversion of the names of the produced files into web safe ones is enabled.

Syntax

HRESULT SetIsWebSafe(

int safe

);

Parameters

safe

[in] A boolean value that indicates whether the conversion of the names of the produced files into web safe ones is enabled.


IWMSDKOutput::GetLetterCase

The GetLetterCase method gets the value of the case of the produced file name.

Syntax

HRESULT GetLetterCase(

int* nameCase,

int* extensionCase

);

Parameters

nameCase

[out] The case of the name of the produced file. This parameter can take one of the following values:

WMSDK_LETTER_CASE_ASIS

WMSDK_LETTER_CASE_LOWER

WMSDK_LETTER_CASE_UPPER

extensionCase

[out] The case of the extension of the produced file. This parameter can take the following values:

WMSDK_LETTER_CASE_ASIS

WMSDK_LETTER_CASE_LOWER

WMSDK_LETTER_CASE_UPPER


IWMSDKOutput::SetLetterCase

The SetLetterCase method sets the value of the case of the produced file name.

Syntax

HRESULT SetLetterCase(

int nameCase,

int extensionCase

);

Parameters

nameCase

[in] The case of the name of the produced file. This parameter can take one of the following values:

WMSDK_LETTER_CASE_ASIS

WMSDK_LETTER_CASE_LOWER

WMSDK_LETTER_CASE_UPPER

extensionCase

[in] The case of the extension of the produced file. This parameter can take the following values:

WMSDK_LETTER_CASE_ASIS

WMSDK_LETTER_CASE_LOWER

WMSDK_LETTER_CASE_UPPER


IWMSDKOutput::GetUseFormatExtension

The GetUseFormatExtension method gets a boolean value that indicates whether the assignment of the format-dependent extension to the produced files is enabled.

Syntax

HRESULT GetUseFormatExtension(

int* useFormat

);

Parameters

useFormat

[out] A value that indicates whether the assignment of the format-dependent extension to the produced files is enabled.


IWMSDKOutput::SetUseFormatExtension

The SetUseFormatExtension method sets a boolean value that indicates whether the assignment of the format-dependent extension to the produced files is enabled.

Syntax

HRESULT SetUseFormatExtension(

int useFormat

);

Parameters

useFormat

[in] A value that indicates whether the assignment of the format-dependent extension to the produced files is enabled.


IWMSDKOutput::GetIsOverwrite

The GetIsOverwrite method gets a boolean value that indicates whether the overwriting of the existing files is enabled.

Syntax

HRESULT GetIsOverwrite(

int* overwrite

);

Parameters

overwrite

[out] A boolean value that indicates whether the overwriting of the existing files is enabled.


IWMSDKOutput::SetIsOverwrite

The SetIsOverwrite method sets a boolean value that indicates whether the overwriting of the existing files is enabled.

Syntax

HRESULT SetIsOverwrite(

int overwrite

);

Parameters

overwrite

[in] A boolean value that indicates whether the overwriting of the existing files is enabled.


IWMSDKOutput::GetIsRemoveOriginal

The GetIsRemoveOriginal method gets a boolean value that indicates whether the removal of the source files on the process completion is enabled.

Syntax

HRESULT GetIsRemoveOriginal(

int* removeOriginal

);

Parameters

removeOriginal

[out] A boolean value that indicates whether the removal of the source files on the process completion is enabled.


IWMSDKOutput::SetIsRemoveOriginal

The SetIsRemoveOriginal method sets a boolean value that indicates whether the removal of the source files on the process completion is enabled.

Syntax

HRESULT SetIsRemoveOriginal(

int removeOriginal

);

Parameters

removeOriginal

[in] A boolean value that indicates whether the removal of the source files on the process completion is enabled.


IWMSDKFrame Interface

The IWMSDKFrame interface includes methods and properties that define rules for saving the produced files.

The IWMSDKFrame interface exposes the following methods.

Method | Description
GetImageSize | Gets the frame size of the produced files.
SetImageSize | Sets the frame size of the produced files.
GetResampling | Gets the resampling algorithm.
SetResampling | Sets the resampling algorithm for the resize operation.
GetResizeType | Gets the type of the resize operation.
SetResizeType | Sets the type of the resize operation.
GetIsImageGrayscale | Gets a boolean value that indicates whether the application of the Grayscale filter to the produced files is enabled.
SetIsImageGrayscale | Sets a boolean value that indicates whether the application of the Grayscale filter to the produced files is enabled.
GetIsImageNegative | Gets a boolean value that indicates whether the application of the Invert Color filter to the produced files is enabled.
SetIsImageNegative | Sets a boolean value that indicates whether the application of the Invert Color filter to the produced files is enabled.
GetRotationAngle | Gets the rotation angle of the frames of the produced files.
SetRotationAngle | Sets the rotation angle of the frames of the produced files.
GetFlip | Gets a value that indicates whether the application of the horizontal and vertical flip to the produced files is enabled.
SetFlip | Sets a value that indicates whether the application of the horizontal and vertical flip to the produced files is enabled.
GetImageSharpen | Gets a value that indicates whether the application of the Sharpen or Soften filters to the produced files is enabled.
SetImageSharpen | Sets a value that indicates whether the application of the Sharpen or Soften filters to the produced files is enabled.
GetIsDeinterlaced | Gets a boolean value that indicates whether the application of the Deinterlace filter to the produced files is enabled.
SetIsDeinterlaced | Sets a boolean value that indicates whether the application of the Deinterlace filter to the produced files is enabled.
GetLetterboxColor | Gets the letter-box color.
SetLetterboxColor | Sets the letter-box color.
GetCreateLetterbox | Gets a boolean value that indicates whether the creation of a letter-box is enabled.
SetCreateLetterbox | Sets a boolean value that indicates whether the creation of a letter-box is enabled.
GetAspectRatio | Gets the aspect ratio.
SetAspectRatio | Sets the aspect ratio.
GetImageRGB | Gets the value of color adjustment in RGB mode.
SetImageRGB | Sets the value of color adjustment in RGB mode.
GetImageHSL | Gets the value of color adjustment in HSL mode.
SetImageHSL | Sets the value of color adjustment in HSL mode.
GetImageBCG | Gets the value of color adjustment in BCG mode.
SetImageBCG | Sets the value of color adjustment in BCG mode.
GetCrop | Gets the coordinates of the borders of the area to be cropped.
SetCrop | Sets the coordinates of the borders of the area to be cropped.
SetFrameCallback |


IWMSDKFrame::GetImageSize

The GetImageSize method gets the frame size of the produced files.

Syntax

HRESULT GetImageSize(

LPWSTR size

);

Parameters

size

[out] The frame size. This parameter can take one of the following string values:

"100 x 75"

"140 x 105"

"160 x 120"

"176 x 112"

"180 x 135"

"192 x 144"

"320 x 200"

"320 x 240"

"352 x 240"

"352 x 248"

"352 x 288"

"480 x 360"

"480 x 480"

"480 x 576"

"640 x 480"

"704 x 480"

"720 x 480"

"720 x 576"

"1200 x 800"

"1500 x 1000"

Besides it can take any string value of the following formats:

"<width> x <height>"

"<percent>%"


IWMSDKFrame::SetImageSize

The SetImageSize method sets the frame size of the produced files.

Syntax

HRESULT SetImageSize(

LPCWSTR size

);

Parameters

size

[in] The frame size. This parameter can take one of the following string values:

"100 x 75"

"140 x 105"

"160 x 120"

"176 x 112"

"180 x 135"

"192 x 144"

"320 x 200"

"320 x 240"

"352 x 240"

"352 x 248"

"352 x 288"

"480 x 360"

"480 x 480"

"480 x 576"

"640 x 480"

"704 x 480"

"720 x 480"

"720 x 576"

"1200 x 800"

"1500 x 1000"

Besides it can take any string value of the following formats:

"<width> x <height>"

"<percent>%"


IWMSDKFrame::GetResampling

The GetResampling method gets the resampling algorithm used in the course of the resize operation.

Syntax

HRESULT GetResampling(

int* resampling

);

Parameters

resampling

[out] The resampling algorithm. This parameter can take one of the following values:

WMSDK_RESAMPLING_NEAREST

WMSDK_RESAMPLING_BILINEAR

WMSDK_RESAMPLING_BICUBIC

WMSDK_RESAMPLING_LANCZOS3

WMSDK_RESAMPLING_HANN

WMSDK_RESAMPLING_LANCZOS8


IWMSDKFrame::SetResampling

The SetResampling method sets the resampling algorithm used in the course of the resize operation.

Syntax

HRESULT SetResampling(

int resampling

);

Parameters

resampling

[in] The resampling algorithm. This parameter can take one of the following values:

WMSDK_RESAMPLING_NEAREST

WMSDK_RESAMPLING_BILINEAR

WMSDK_RESAMPLING_BICUBIC

WMSDK_RESAMPLING_LANCZOS3

WMSDK_RESAMPLING_HANN

WMSDK_RESAMPLING_LANCZOS8


IWMSDKFrame::GetResizeType

The GetResizeType method gets the type of the resize operation.

Syntax

HRESULT GetResizeType(

int* type

);

Parameters

type

[out] The type of the resize operation. This parameter can take one of the following values:

WMSDK_RESIZE_STRETCH

WMSDK_RESIZE_CROP

WMSDK_RESIZE_PRESERVE_ASPECT_RATIO

WMSDK_RESIZE_PRESPECT_NOLITERBOX


IWMSDKFrame::SetResizeType

The SetResizeType method sets the type of the resize operation.

Syntax

HRESULT SetResizeType(

int type

);

Parameters

type

[in] The type of the resize operation. This parameter can take one of the following values:

WMSDK_RESIZE_STRETCH

WMSDK_RESIZE_CROP

WMSDK_RESIZE_PRESERVE_ASPECT_RATIO

WMSDK_RESIZE_PRESPECT_NOLITERBOX


IWMSDKFrame::GetIsImageGrayscale

The GetIsImageGrayscale method gets a boolean value that indicates whether the application of the Grayscale filter to the produced files is enabled.

Syntax

HRESULT GetIsImageGrayscale(

int* isGrayscale

);

Parameters

isGrayscale

[out] A boolean value that indicates whether the application of the Grayscale filter to a produced file is enabled.


IWMSDKFrame::SetIsImageGrayscale

The SetIsImageGrayscale method sets a boolean value that indicates whether the application of the Grayscale filter to the produced files is enabled.

Syntax

HRESULT SetIsImageGrayscale(

int isGrayscale

);

Parameters

isGrayscale

[in] A boolean value that indicates whether the application of the Grayscale filter to a produced file is enabled.


IWMSDKFrame::GetIsImageNegative

The GetIsImageNegative method gets a boolean value that indicates whether the application of the Invert Color filter to the produced files is enabled.

Syntax

HRESULT GetIsImageNegative(

int* isNegative

);

Parameters

isNegative

[out] A boolean value that indicates whether the application of the Invert Color filter to a produced file is enabled.


IWMSDKFrame::SetIsImageNegative

The SetIsImageNegative method sets a boolean value that indicates whether the application of the Invert Color filter to the produced files is enabled.

Syntax

HRESULT SetIsImageNegative(

int isNegative

);

Parameters

isNegative

[in] A boolean value that indicates whether the application of the Invert Color filter to a produced file is enabled.


IWMSDKFrame::GetRotationAngle

The GetRotationAngle method gets the rotation angle of the frames of the produced files.

Syntax

HRESULT GetRotationAngle(

int* angle

);

Parameters

angle

[out] The rotation angle.


IWMSDKFrame::SetRotationAngle

The SetRotationAngle method sets the rotation angle of the frames of the produced files.

Syntax

HRESULT SetRotationAngle(

int angle

);

Parameters

angle

[in] The rotation angle.


IWMSDKFrame::GetFlip

The GetFlip method gets a value that indicates whether the application of the horizontal and vertical flip to the produced files is enabled.

Syntax

HRESULT GetFlip(

int* flipH,

int* flipV

);

Parameters

flipH

[out] A value that indicates whether the application of the horizontal flip to a produced file is enabled.

flipV

[out] A value that indicates whether the application of the vertical flip to a produced file is enabled.


IWMSDKFrame::SetFlip

The SetFlip method sets a value that indicates whether the application of the horizontal and vertical flip to the produced files is enabled.

Syntax

HRESULT SetFlip(

int flipH,

int flipV

);

Parameters

flipH

[in] A value that indicates whether the application of the horizontal flip to a produced file is enabled.

flipV

[in] A value that indicates whether the application of the vertical flip to a produced file is enabled.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code


IWMSDKFrame::GetImageSharpen

The GetImageSharpen method gets a value that indicates whether the application of the Sharpen or Soften filters to the produced files is enabled.

Syntax

HRESULT GetImageSharpen(

int* sharpen

);

Parameters

sharpen

[out] A value that indicates whether the application of the Sharpen or Soften filters to a produced file is enabled. It can take the following values:

0 - both filters are disabled

1 - the Sharpen filter is enabled

2 - the Soften filter is enabled


IWMSDKFrame::SetImageSharpen

The SetImageSharpen method sets a value that indicates whether the application of the Sharpen or Soften filters to the produced files is enabled.

Syntax

HRESULT SetImageSharpen(

int sharpen

);

Parameters

sharpen

[in] A value that indicates whether the application of the Sharpen or Soften filters to a produced file is enabled. It can take the following values:

0 - both filters are disabled

1 - the Sharpen filter is enabled

2 - the Soften filter is enabled


IWMSDKFrame::GetIsDeinterlaced

The GetIsDeinterlaced method gets a boolean value that indicates whether the application of the Deinterlace filter to the produced files is enabled.

Syntax

HRESULT GetIsDeinterlaced(

int* isDeinterlaced

);

Parameters

isDeinterlaced

[out] A boolean value that indicates whether the application of the Deinterlace filter to a produced file is enabled.


IWMSDKFrame::SetIsDeinterlaced

The SetIsDeinterlaced method sets a boolean value that indicates whether the application of the Deinterlace filter to the produced files is enabled.

Syntax

HRESULT SetIsDeinterlaced(

int isDeinterlaced

);

Parameters

isDeinterlaced

[in] A boolean value that indicates whether the application of the Deinterlace filter to a produced file is enabled.


IWMSDKFrame::GetLetterboxColor

The GetLetterboxColor method gets the color of a letter-box created in the produced files.

Syntax

HRESULT GetLetterboxColor(

DWORD* crLetterbox

);

Parameters

crLetterbox

[out] The color of a letter-box.


IWMSDKFrame::SetLetterboxColor

The SetLetterboxColor method sets the color of a letter-box created in the produced files.

Syntax

HRESULT SetLetterboxColor(

DWORD crLetterbox

);

Parameters

crLetterbox

[in] The color of a letter-box.


IWMSDKFrame::GetCreateLetterbox

The GetCreateLetterbox method gets a boolean value that indicates whether the creation of a letter-box in the produced files is enabled.

Syntax

HRESULT GetCreateLetterbox(

int* isCreate

);

Parameters

isCreate

[out] A boolean value that indicates whether the creation of a letter-box in a produced file is enabled.


IWMSDKFrame::SetCreateLetterbox

The SetCreateLetterbox method sets a boolean value that indicates whether the creation of a letter-box in the produced files is enabled.

Syntax

HRESULT SetCreateLetterbox(

int isCreate

);

Parameters

isCreate

[in] A boolean value that indicates whether the creation of a letter-box in a produced file is enabled.


IWMSDKFrame::GetAspectRatio

The GetAspectRatio method gets the aspect ratio value used in the course of the resize operation.

Syntax

HRESULT GetAspectRatio(

int* ratio

);

Parameters

ratio

[out] The aspect ratio value. This parameter can take one of the following values:

WMSDK_ASPECT_RATIO_SOURCE

WMSDK_ASPECT_RATIO_1_1

WMSDK_ASPECT_RATIO_4_3

WMSDK_ASPECT_RATIO_16_9

WMSDK_ASPECT_RATIO_2_12_1


IWMSDKFrame::SetAspectRatio

The SetAspectRatio method sets the aspect ratio value used in the course of the resize operation.

Syntax

HRESULT SetAspectRatio(

int ratio

);

Parameters

ratio

[in] The aspect ratio value. This parameter can take one of the following values:

WMSDK_ASPECT_RATIO_SOURCE

WMSDK_ASPECT_RATIO_1_1

WMSDK_ASPECT_RATIO_4_3

WMSDK_ASPECT_RATIO_16_9

WMSDK_ASPECT_RATIO_2_12_1


IWMSDKFrame::GetImageRGB

The GetImageRGB method gets the value of color adjustment in RGB mode.

Syntax

HRESULT GetImageRGB(

int* r,

int* g,

int* b

);

Parameters

r

[out] The red color correction value.

g

[out] The green color correction value.

b

[out] The blue color correction value.


IWMSDKFrame::SetImageRGB

The SetImageRGB method sets the value of color adjustment in RGB mode.

Syntax

HRESULT SetImageRGB(

int r,

int g,

int b

);

Parameters

r

[in] The red color correction value.

g

[in] The green color correction value.

b

[in] The blue color correction value.


IWMSDKFrame::GetImageHSL

The GetImageHSL method gets the value of color adjustment in HSL mode.

Syntax

HRESULT GetImageHSL(

int* h,

int* s,

int* l

);

Parameters

h

[out] The hue correction value.

s

[out] The saturation correction value.

l

[out] The gamma correction value.


IWMSDKFrame::SetImageHSL

The SetImageHSL method sets the value of color adjustment in HSL mode.

Syntax

HRESULT SetImageHSL(

int h,

int s,

int l

);

Parameters

h

[in] The hue correction value.

s

[in] The saturation correction value.

l

[in] The gamma correction value.


IWMSDKFrame::GetImageBCG

The GetImageBCG method gets the value of color adjustment in BCG mode.

Syntax

HRESULT GetImageBCG(

int* b,

int* c,

int* g

);

Parameters

b

[out] The brightness correction value.

c

[out] The contrast correction value.

g

[out] The gamma correction value.


IWMSDKFrame::SetImageBCG

The SetImageBCG method sets the value of color adjustment in BCG mode.

Syntax

HRESULT SetImageBCG(

int b,

int c,

int g

);

Parameters

b

[in] The brightness correction value.

c

[in] The contrast correction value.

g

[in] The gamma correction value.


IWMSDKFrame::GetCrop

The GetCrop method gets the coordinates of the borders of the area to be cropped.

Syntax

HRESULT GetCrop(

int* left,

int* right,

int* top,

int* bottom

);

Parameters

left

[out] The coordinate of the left border.

right

[out] The coordinate of the right border.

top

[out] The coordinate of the top border.

bottom

[out] The coordinate of the bottom border.


IWMSDKFrame::SetCrop

The SetCrop method sets the coordinates of the borders of the area to be cropped.

Syntax

HRESULT SetCrop(

int left,

int right,

int top,

int bottom

);

Parameters

left

[in] The coordinate of the left border.

right

[in] The coordinate of the right border.

top

[in] The coordinate of the top border.

bottom

[in] The coordinate of the bottom border.


IWMSDKGrabber Interface

The IWMSDKGrabber interface includes methods and properties that manage extraction of video frames for further creation of graphics files.

The IWMSDKGrabber interface exposes the following methods.

Method | Description
GetGrabberType | Gets the mode of graphics files generation.
SetGrabberType | Sets the mode of graphics files generation.
GetStartWith | Gets the start point for graphics files generation.
SetStartWith | Sets the start point for graphics files generation.
GetStep | Gets the interval at the end of which the next graphics file is created.
SetStep | Sets the interval at the end of which the next graphics file is created.
GetFrameCount | Gets the number of graphics files to be generated regularly.
SetFrameCount | Sets the number of graphics files to be generated regularly.


IWMSDKGrabber::GetGrabberType

The GetGrabberType method gets the mode of graphics files generation.

Syntax

HRESULT GetGrabberType(

int* type

);

Parameters

type

[out] The mode of graphics files generation. This parameter can take one of the following values:

WMSDK_GRABBER_TYPE_FIRST_FRAME

WMSDK_GRABBER_TYPE_BY_TIME

WMSDK_GRABBER_TYPE_BY_PARTS


IWMSDKGrabber::SetGrabberType

The SetGrabberType method sets the mode of graphics files generation.

Syntax

HRESULT SetGrabberType(

int type

);

Parameters

type

[in] The mode of graphics files generation. This parameter can take one of the following values:

WMSDK_GRABBER_TYPE_FIRST_FRAME

WMSDK_GRABBER_TYPE_BY_TIME

WMSDK_GRABBER_TYPE_BY_PARTS

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The following values can be assigned to type parameter:

WMSDK_GRABBER_TYPE_FIRST_FRAME

WMSDK_GRABBER_TYPE_BY_TIME

WMSDK_GRABBER_TYPE_BY_PARTS


IWMSDKGrabber::GetStartWith

The GetStartWith method gets the start point for graphics files generation.

Syntax

HRESULT GetStartWith(

int* startWith,

int* startWithType

);

Parameters

startWith

[out] The value of the start point.

startWithType

[out] The unit of measure of the above-mentioned value. This parameter can take one of the following values:

WMSDK_GRABBER_STEP_SECONDS

WMSDK_GRABBER_STEP_FRAMES


IWMSDKGrabber::SetStartWith

The SetStartWith method sets the start point for graphics files generation.

Syntax

HRESULT SetStartWith(

int startWith,

int startWithType

);

Parameters

startWith

[in] The value of the start point.

startWithType

[in] The unit of measure of the above-mentioned value. This parameter can take one of the following values:

WMSDK_GRABBER_STEP_SECONDS

WMSDK_GRABBER_STEP_FRAMES


IWMSDKGrabber::GetStep

The GetStep method gets the interval at the end of which the next graphics file is created.

Syntax

HRESULT GetStep(

int* step,

int* stepType

);

Parameters

step

[out] The value of the interval.

stepType

[out] The unit of measure of the above-mentioned value. This parameter can take one of the following values:

WMSDK_GRABBER_STEP_SECONDS

WMSDK_GRABBER_STEP_FRAMES


IWMSDKGrabber::SetStep

The SetStep method sets the interval at the end of which the next graphics file is created.

Syntax

HRESULT SetStep(

int step,

int stepType

);

Parameters

step

[in] The value of the interval.

stepType

[in] The unit of measure of the above-mentioned value. This parameter can take one of the following values:

WMSDK_GRABBER_STEP_SECONDS

WMSDK_GRABBER_STEP_FRAMES


IWMSDKGrabber::GetFrameCount

The GetFrameCount method gets the number of graphics files to be generated regularly.

Syntax

HRESULT GetFrameCount(

int* count

);

Parameters

count

[out] The number of graphics files to be generated regularly.


IWMSDKGrabber::SetFrameCount

The SetFrameCount method sets the number of graphics files to be generated regularly.

Syntax

HRESULT SetFrameCount(

int count

);

Parameters

count

[in] The number of graphics files to be generated regularly.


IWMSDKFormat interface

The IWMSDKFormat interface includes methods and properties that define format of the generated files.

The IWMSDKFormat interface exposes the following methods.

Method | Description
GetOutputFormatID | Gets the output format ID.
SetOutputFormatID | Sets the output format ID.
GetIncludeAudioStream | Gets a boolean value that indicates whether the audio stream of a processed file is included in processing.
SetIncludeAudioStream | Sets a boolean value that indicates whether the audio stream of a processed file is included in processing.
GetRecompressAudio | Gets a boolean value that indicates whether the re-compression of the audio stream of a processed file is enabled.
SetRecompressAudio | Sets a boolean value that indicates whether the re-compression of the audio stream of a processed file is enabled.
GetFrameRate | Gets a frame rate
SetFrameRate | Sets a frame rate
GetFrameRateUserDefined | Gets a user-defined frame rate.
SetFrameRateUserDefined | Sets a user-defined frame rate.
GetFormatAVI | Retrieves a pointer to the IWMSDKFormatAVI interface.
GetFormatMPEG | Retrieves a pointer to the IWMSDKFormaMPEGI interface.
GetFormatMOV | Retrieves a pointer to the IWMSDKFormatMOV interface.
GetFormatFLV | Retrieves a pointer to the IWMSDKFormaFLVI interface.
GetFormatSWF | Retrieves a pointer to the IWMSDKFormatSWF interface.
GetFormatWMV | Retrieves a pointer to the IWMSDKFormatWMV interface.
GetFormatImage | Retrieves a pointer to the IWMSDKFormatImage interface.
EnumerateCodecs | Enumerates the preset codes.


IWMSDKFormat::GetOutputFormatID

The GetOutputFormatID method gets the output format ID.

Syntax

HRESULT GetOutputFormatID(

int* id

);

Parameters

id

[out] The output format ID. This parameter can take one of the following values:

WMSDK_FORMAT_AVI

WMSDK_FORMAT_WMV

WMSDK_FORMAT_MPEG

WMSDK_FORMAT_MOV

WMSDK_FORMAT_FLV

WMSDK_FORMAT_SWF

WMSDK_FORMAT_BMP

WMSDK_FORMAT_GIF

WMSDK_FORMAT_JPEG

WMSDK_FORMAT_PNG

WMSDK_FORMAT_TIFF


IWMSDKFormat::SetOutputFormatID

The SetOutputFormatID method gets the output format ID.

Syntax

HRESULT SetOutputFormatID(

int id

);

Parameters

id

[in] The output format ID. This parameter can take one of the following values:

WMSDK_FORMAT_AVI

WMSDK_FORMAT_WMV

WMSDK_FORMAT_MPEG

WMSDK_FORMAT_MOV

WMSDK_FORMAT_FLV

WMSDK_FORMAT_SWF

WMSDK_FORMAT_BMP

WMSDK_FORMAT_GIF

WMSDK_FORMAT_JPEG

WMSDK_FORMAT_PNG

WMSDK_FORMAT_TIFF


IWMSDKFormat::GetIncludeAudioStream

The GetIncludeAudioStream method gets a boolean value that indicates whether the audio stream of a processed file is included in processing.

Syntax

HRESULT GetIncludeAudioStream(

int* isInclude

);

Parameters

isInclude

[out] A boolean value that indicates whether the audio stream of a processed file is included in processing.


IWMSDKFormat::SetIncludeAudioStream

The SetIncludeAudioStream method gets a boolean value that indicates whether the audio stream of a processed file is included in processing.

Syntax

HRESULT SetIncludeAudioStream(

int isInclude

);

Parameters

isInclude

[in] A boolean value that indicates whether the audio stream of a processed file is included in processing.


IWMSDKFormat::GetRecompressAudio

The GetRecompressAudio method gets a boolean value that indicates whether the re-compression of the audio stream of a processed file is enabled.

Syntax

HRESULT GetRecompressAudio(

int* isRecompress

);

Parameters

isRecompress

[out] A boolean value that indicates whether the re-compression of the audio stream of a processed file is enabled.


IWMSDKFormat::SetRecompressAudio

The SetRecompressAudio method sets a boolean value that indicates whether the re-compression of the audio stream of a processed file is enabled.

Syntax

HRESULT SetRecompressAudio(

int isRecompress

);

Parameters

isRecompress

[in] A boolean value that indicates whether the re-compression of the audio stream of a processed file is enabled.


IWMSDKFormat::GetFrameRate

The GetFrameRate method gets a frame rate.

Syntax

HRESULT GetFrameRate(

double* rate

);

Parameters

rate

[out] A frame rate. This parameter can take one of the following values:

WMSDK_FRAME_RATE_AVI_STANDARD

WMSDK_FRAME_RATE_AVI_NTSC_FILM

WMSDK_FRAME_RATE_AVI_FILM

WMSDK_FRAME_RATE_AVI_PAL

WMSDK_FRAME_RATE_AVI_NTSC29_97

WMSDK_FRAME_RATE_AVI_NTSC30

Besides it can take any double value equal or greater than 0. If equal to 0, than an original frame rate will be used.


IWMSDKFormat::SetFrameRate

The SetFrameRate method sets a frame rate.

Syntax

HRESULT SetFrameRate(

double rate

);

Parameters

rate

[in] A frame rate. This parameter can take one of the following values:

WMSDK_FRAME_RATE_AVI_STANDARD

WMSDK_FRAME_RATE_AVI_NTSC_FILM

WMSDK_FRAME_RATE_AVI_FILM

WMSDK_FRAME_RATE_AVI_PAL

WMSDK_FRAME_RATE_AVI_NTSC29_97

WMSDK_FRAME_RATE_AVI_NTSC30

Besides it can take any double value equal or greater than 0. If equal to 0, than an original frame rate will be used.


IWMSDKFormat::GetFrameRateUserDefined

The GetFrameRateUserDefined method gets a user-defined frame rate.

Syntax

HRESULT GetFrameRateUserDefined(

float* rate

);

Parameters

rate

[out] A user-defined frame rate.


IWMSDKFormat::SetFrameRateUserDefined

The SetFrameRateUserDefined method sets a user-defined frame rate.

Syntax

HRESULT SetFrameRateUserDefined(

float rate

);

Parameters

rate

[in] A user-defined frame rate.


IWMSDKFormat::GetFormatAVI

The GetFormatAVI method retrieves a pointer to the IWMSDKFormatAVI interface.

Syntax

HRESULT GetFormatAVI(

IWMSDKFormatAVI** pAVI

);

Parameters

pAVI

[out] A pointer to the IWMSDKFormatAVI interface.


IWMSDKFormat::GetFormatMPEG

The GetFormatMPEG method retrieves a pointer to the IWMSDKFormatMPEG interface.

Syntax

HRESULT GetFormatMPEG(

IWMSDKFormatMPEG** pMPEG

);

Parameters

pMPEG

[out] A pointer to the IWMSDKFormatMPEG interface.


IWMSDKFormat::GetFormatMOV

The GetFormatMOV method retrieves a pointer to the IWMSDKFormatMOV interface.

Syntax

HRESULT GetFormatMOV(

IWMSDKFormatMOV** pMOV

);

Parameters

pMOV

[out] A pointer to the IWMSDKFormatMOV interface.


IWMSDKFormat::GetFormatFLV

The GetFormatFLV method retrieves a pointer to the IWMSDKFormatFLV interface.

Syntax

HRESULT GetFormatFLV(

IWMSDKFormatFLV** pFLV

);

Parameters

pFLV

[out] A pointer to the IWMSDKFormatFLV interface.


IWMSDKFormat::GetFormatSWF

The GetFormatSWF method retrieves a pointer to the IWMSDKFormatSWF interface.

Syntax

HRESULT GetFormatSWF(

IWMSDKFormatSWF** pSWF

);

Parameters

pSWF

[out] A pointer to the IWMSDKFormatSWF interface.


IWMSDKFormat::GetFormatWMV

The GetFormatWMV method retrieves a pointer to the IWMSDKFormatWMV interface.

Syntax

HRESULT GetFormatWMV(

IWMSDKFormatWMV** pWMV

);

Parameters

pWMV

[out] A pointer to the IWMSDKFormatWMV interface.


IWMSDKFormat::GetFormatImage

The GetFormatImage method retrieves a pointer to the IWMSDKFormatImage interface.

Syntax

HRESULT GetFormatImage(

IWMSDKFormatImage** pImage

);

Parameters

pImage

[out] A pointer to the IWMSDKFormatImage interface.


IWMSDKFormat::EnumerateCodecs

The EnumerateCodecs method enumerates the preset codes that can be used for audio and video streams encoding.

Syntax

HRESULT EnumerateCodecs(

int format,

int* pCallback,

int* pData

);

Parameters

format

[in] The codec format. This parameter can take one of the following values:

WMSDK_CODEC_AVI_VIDEO

WMSDK_CODEC_AVI_AUDIO

WMSDK_CODEC_WMV_VIDEO

WMSDK_CODEC_WMV_AUDIO

WMSDK_CODEC_MOV_VIDEO

WMSDK_CODEC_MOV_AUDIO

pCallback

[in] A pointer to a callback function. The function has format HRESULT CallbackFunction(IUnknown* pCodec, int count, int* pData).

pData

[in] A pointer to arbitrary user's data.


IWMSDKFile Interface

The IWMSDKFile interface includes information about source files.

The IWMSDKFile interface exposes the following methods.

Method | Description
Parse | Executes parsing of a file.
GetPath | Gets the file path.
SetPath | Sets the file path.
GetType | Gets the file type.
SetType | Sets the file type.
GetCrop | Gets the crop area.
SetCrop | Sets the crop area.
GetTimelines | Retrieves a pointer to the IWMSDKTimelines interface.
GetWatermarks | Retrieves a pointer to the IWMSDKWatermarks interface.
GetVideoStreamID | Gets the video stream ID.
SetVideoStreamID | Sets the video stream ID.
GetAudioStreamID | Gets the audio stream ID.
SetAudioStreamID | Sets the audio stream ID.
GetDVDGroupMode | Gets the mode of DVD chapters processing.
SetDVDGroupMode | Sets the mode of DVD chapters processing.
GetFolderIncludeFilesMask | Gets the file mask for the files to be included (when processing folders only).
SetFolderIncludeFilesMask | Sets the file mask for the files to be included (when processing folders only).
GetFolderExcludeFilesMask | Gets the file mask for the files to be excluded (when processing folders only).
SetFolderExcludeFilesMask | Sets the file mask for the files to be excluded (when processing folders only).
GetFolderRecursive | Gets a boolean value that indicates whether recursive processing of subfolders is enabled (when processing folders only).
SetFolderRecursive | Sets a boolean value that indicates whether recursive processing of subfolders is enabled (when processing folders only).
GetFolderOnFlow | Gets a boolean value that indicates whether "on flow" processing of files is enabled (when processing folders only).
SetFolderOnFlow | Sets a boolean value that indicates whether "on flow" processing of files is enabled (when processing folders only).
GetProperty | Gets information about the file property.


IWMSDKFile::Parse

The Parse method executes parsing of a source file.

Syntax

HRESULT Parse();


IWMSDKFile::GetPath

The GetPath method gets the path to a source file.

Syntax

HRESULT GetPath(

LPWSTR path

);

Parameters

path

[out] The path to a source file.


IWMSDKFile::SetPath

The SetPath method sets the path to a source file.

Syntax

HRESULT SetPath(

LPCWSTR path

);

Parameters

path

[in] The path to a source file.


IWMSDKFile::GetType

The GetType method gets the type of a source file.

Syntax

HRESULT GetType(

int* type

);

Parameters

type

[out] The type of a source file. This parameter can take one of the following values:

WMSDK_TYPE_FILE

WMSDK_TYPE_FOLDER

WMSDK_TYPE_DVD


IWMSDKFile::SetType

The SetType method sets the type of a source file.

Syntax

HRESULT SetType(

int type

);

Parameters

type

[in] The type of a source file. This parameter can take one of the following values:

WMSDK_TYPE_FILE

WMSDK_TYPE_FOLDER

WMSDK_TYPE_DVD


IWMSDKFile::GetCrop

The GetCrop method gets the coordinates of the borders of an area to be cropped.

Syntax

HRESULT GetCrop(

int* left,

int* right,

int* top,

int* bottom

);

Parameters

left

[out] The coordinate of the left border.

right

[out] The coordinate of the right border.

top

[out] The coordinate of the top border.

bottom

[out] The coordinate of the bottom border.


IWMSDKFile::SetCrop

The SetCrop method sets the coordinates of the borders of the area to be cropped.

Syntax

HRESULT SetCrop(

int left,

int right,

int top,

int bottom

);

Parameters

left

[in] The coordinate of the left border.

right

[in] The coordinate of the right border.

top

[in] The coordinate of the top border.

bottom

[in] The coordinate of the bottom border.


IWMSDKFile::GetTimelines

The GetTimelines method retrieves a pointer to the IWMSDKTimelines interface.

Syntax

HRESULT GetTimelines(

IWMSDKTimelines** pTimelines

);

Parameters

pTimelines

[out] A pointer to the IWMSDKTimelines interface.


IWMSDKFile::GetWatermarks

The GetWatermarks method retrieves a pointer to the IWMSDKWatermarks interface.

Syntax

HRESULT GetWatermarks(

IWMSDKWatermarks** pWatermarks

);

Parameters

pWatermarks

[out] A pointer to the IWMSDKWatermarks interface.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

When a file has no watermarks collection, the returned value is S_FALSE and pWatermarks is undefined.


IWMSDKFile::GetVideoStreamID

The GetVideoStreamID method gets the video stream ID.

Syntax

HRESULT GetVideoStreamID(

int* id

);

Parameters

id

[out] The video stream ID.


IWMSDKFile::SetVideoStreamID

The SetVideoStreamID method sets the video stream ID.

Syntax

HRESULT SetVideoStreamID(

int id

);

Parameters

id

[in] The video stream ID.


IWMSDKFile::GetAudioStreamID

The GetAudioStreamID method gets the audio stream ID.

Syntax

HRESULT GetAudioStreamID(

int* id

);

Parameters

id

[out] The audio stream ID.


IWMSDKFile::SetAudioStreamID

The SetAudioStreamID method sets the audio stream ID.

Syntax

HRESULT SetAudioStreamID(

int id

);

Parameters

id

[in] The audio stream ID.


IWMSDKFile::GetDVDGroupMode

The GetDVDGroupMode method gets the mode of DVD chapters processing.

Syntax

HRESULT GetDVDGroupMode(

int* mode

);

Parameters

mode

[out] The mode of DVD chapters processing. This parameter can take one of the following values:

WMSDK_DVD_GROUP_BY_VOB_ONLY

WMSDK_DVD_GROUP_BY_VOB_AND_CELL


IWMSDKFile::SetDVDGroupMode

The SetDVDGroupMode method gets the mode of DVD chapters processing.

Syntax

HRESULT SetDVDGroupMode(

int mode

);

Parameters

mode

[in] This parameter can take one of the following values:

WMSDK_DVD_GROUP_BY_VOB_ONLY

WMSDK_DVD_GROUP_BY_VOB_AND_CELL


IWMSDKFile::GetFolderIncludeFilesMask

The GetFolderIncludeFilesMask method gets the file mask for the source files to be included in processing (when processing folders only).

Syntax

HRESULT GetFolderIncludeFilesMask(

LPWSTR mask

);

Parameters

mask

[out] The file mask for the source files to be included in processing.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The file mask can be complex, that is include several masks separated from each other by commas or semicolons.


IWMSDKFile::SetFolderIncludeFilesMask

The SetFolderIncludeFilesMask method sets the file mask for the source files to be included in processing (when processing folders only).

Syntax

HRESULT SetFolderIncludeFilesMask(

LPCWSTR mask

);

Parameters

mask

[in] The file mask for the source files to be included in processing.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The file mask can be complex, that is include several masks separated from each other by commas or semicolons.


IWMSDKFile::GetFolderExcludeFilesMask

The GetFolderExcludeFilesMask method gets the file mask for the source files to be excluded from processing (when processing folders only).

Syntax

HRESULT GetFolderExcludeFilesMask(

LPWSTR mask

);

Parameters

mask

[out] The file mask for the source files to be excluded from processing.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The file mask can be complex, that is include several masks separated from each other by commas or semicolons.


IWMSDKFile::SetFolderExcludeFilesMask

The SetFolderExcludeFilesMask method sets the file mask for the source files to be excluded from processing (when processing folders only).

Syntax

HRESULT SetFolderExcludeFilesMask(

LPCWSTR mask

);

Parameters

mask

[in] The file mask for the source files to be excluded from processing.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The file mask can be complex, that is include several masks separated from each other by commas or semicolons.


IWMSDKFile::GetFolderRecursive

The GetFolderRecursive method gets a boolean value that indicates whether recursive processing of subfolders is enabled (when processing folders only).

Syntax

HRESULT GetFolderRecursive(

int* isRecursive

);

Parameters

isRecursive

[out] A boolean value that indicates whether recursive processing of subfolders is enabled.


IWMSDKFile::SetFolderRecursive

The SetFolderRecursive method sets a boolean value that indicates whether recursive processing of subfolders is enabled (when processing folders only).

Syntax

HRESULT SetFolderRecursive(

int isRecursive

);

Parameters

isRecursive

[in] A boolean value that indicates whether recursive processing of subfolders is enabled.


IWMSDKFile::GetFolderOnFlow

The GetFolderOnFlow method gets a boolean value that indicates whether "on flow" processing of the source files is enabled (when processing folders only).

Syntax

HRESULT GetFolderOnFlow(

int* isOnFlow

);

Parameters

isOnFlow

[out] A boolean value that indicates whether "on flow" processing of the source files is enabled.


IWMSDKFile::SetFolderOnFlow

The SetFolderOnFlow method sets a boolean value that indicates whether "on flow" processing of the source files is enabled (when processing folders only).

Syntax

HRESULT SetFolderOnFlow(

int isOnFlow

);

Parameters

isOnFlow

[in] A boolean value that indicates whether "on flow" processing of the source files is enabled.


IWMSDKFile::GetProperty

The GetProperty method gets information about the requested property of a source file.

Syntax

HRESULT GetProperty(

LPCWSTR propName,

VARIANT* pVar

);

Parameters

propName

[in] The name of the requested property.

pVar

[out] Information about the requested property.


IWMSDKProfiles Interface

The IWMSDKProfiles interface provides methods and properties for work with collection of profiles.

The IWMSDKProfiles interface exposes the following methods.

Method | Description
Count | Gets the number of profiles.
Item | Retrieves a pointer to the IWMSDKProfile interface as provided by index.
New | Creates a new profile.
Delete | Deletes a profile.


IWMSDKProfiles::Count

The Count method gets the number of profiles.

Syntax

HRESULT Count(

int* count

);

Parameters

count

[out] The number of profiles.


IWMSDKProfiles::Item

The Item method retrieves a pointer to the IWMSDKProfile interface as provided by index.

Syntax

HRESULT Item(

int n,

IWMSDKProfile** item

);

Parameters

n

[in] Profile number.

item

[out] A pointer to the IWMSDKProfile interface.


IWMSDKProfiles::New

The New method creates a new profile.

Syntax

HRESULT New(

IWMSDKProfile** pProfile = NULL

);

Parameters

pProfile

[out] A pointer to a profile object; NULL if not needed.


IWMSDKProfiles::Delete

The Delete method deletes a profile.

Syntax

HRESULT Delete(

int n

);

Parameters

n

[in] Profile number.


IWMSDKTimeline interface

The IWMSDKTimeline interface defines the range of a timeline (time interval).

The IWMSDKTimeline interface exposes the following methods.

Method | Description
GetStartTime | Gets the start point of a timeline.
SetStartTime | Sets the start point of a timeline.
GetEndTime | Gets the end point of a timeline.
SetEndTime | Sets the end point of a timeline.
GetRelative | Gets a value that indicates whether the start and end points of a timeline are set relatively or absolutely.
SetRelative | Sets a value that indicates whether the start and end points of a timeline are set relatively or absolutely.


IWMSDKTimeline::GetStartTime

The GetStartTime method gets the start point of a timeline.

Syntax

HRESULT GetStartTime(

float* startTime

);

Parameters

startTime

[out] The start point of a timeline.


IWMSDKTimeline::SetStartTime

The SetStartTime method sets the start point of a timeline.

Syntax

HRESULT SetStartTime(

float startTime

);

Parameters

startTime

[in] The start point of a timeline.


IWMSDKTimeline::GetEndTime

The GetEndTime method gets the end point of a timeline.

Syntax

HRESULT GetEndTime(

float* endTime

);

Parameters

endTime

[out] The end point of a timeline. If < 0, than the end of file is the end point.


IWMSDKTimeline::SetEndTime

The SetEndTime method sets the end point of a timeline.

Syntax

HRESULT SetEndTime(

float endTime

);

Parameters

endTime

[in] The end point of a timeline.


IWMSDKTimeline::GetRelative

The GetRelative method gets a value that indicates whether the start and end points of a timeline are set relatively or absolutely.

Syntax

HRESULT GetRelative(

int* relative

);

Parameters

relative

[out] A value that indicates whether the start and end points of a timeline are set relatively or absolutely. This parameter can take one of the following values:

WMSDK_TIME_ABSOLUTE

WMSDK_TIME_RELATIVE_TO_START - the end point is set relative to the start point

WMSDK_TIME_RELATIVE_TO_END - the start point is set relative to the end point


IWMSDKTimeline::SetRelative

The SetRelative method sets a value that indicates whether the start and end points of a timeline are set relatively or absolutely.

Syntax

HRESULT SetRelative(

int relative

);

Parameters

relative

[in] A value that indicates whether the start and end points of a timeline are set relatively or absolutely. This parameter can take one of the following values:

WMSDK_TIME_ABSOLUTE

WMSDK_TIME_RELATIVE_TO_START - the end point is set relative to the start point

WMSDK_TIME_RELATIVE_TO_END - the start point is set relative to the end point


IWMSDKTimelines Interface

The IWMSDKTimelines interface provides methods and properties for work with collection of timelines (time intervals).

The IWMSDKTimelines interface exposes the following methods.

Method | Description
Count | Gets the number of timelines.
Item | Retrieves a pointer to the IWMSDKTimeline interface as provided by index.
AddTimeline | Adds a new timeline.
Delete | Delete a timeline.
GetTimelineOrder | Gets the order of processing of timelines.
SetTimelineOrder | Sets the order of processing of timelines.


IWMSDKTimelines::Count

The Count method gets the number of timelines.

Syntax

HRESULT Count(

int* count

);

Parameters

count

[out] The number of timelines.


IWMSDKTimelines::Item

The Item method retrieves a pointer to the IWMSDKTimeline interface as provided by index.

Syntax

HRESULT Item(

int n,

IWMSDKTimeline** item

);

Parameters

n

[in] Timeline number.

item

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKTimelines::AddTimeline

The AddTimeline method adds a new timeline.

Syntax

HRESULT AddTimeline(

float startTime,

float endTime,

int relative,

IWMSDKTimeline** pTimeline = NULL

);

Parameters

startTime

[in] The start point of timeline.

endTime

[in] The end point of timeline. If < 0, than the end of file is the end point.

relative

[in] A value that indicates whether the time is set relatively or absolutely. This parameter can take one of the following values:

WMSDK_TIME_ABSOLUTE

WMSDK_TIME_RELATIVE_TO_START

WMSDK_TIME_RELATIVE_TO_END

pTimeline

[out] A pointer to a timeline object; NULL if not needed.


IWMSDKTimelines::Delete

The Delete method deletes a timeline.

Syntax

HRESULT Delete(

int n

);

Parameters

n

[in] Timeline number.


IWMSDKTimelines::SetTimelineOrder

The SetTimelineOrder method sets the order of processing of timelines.

Syntax

HRESULT SetTimelineOrder(

int order

);

Parameters

order

[in] The order of processing of timelines. This parameter can take one of the following values:

WMSDK_TIMELINE_ORDER_BY_TIME

WMSDK_TIMELINE_ORDER_NONE


IWMSDKTimelines::GetTimelineOrder

The GetTimelineOrder method gets the order of processing of timelines.

Syntax

HRESULT GetTimelineOrder(

int* order

);

Parameters

order

[out] The order of processing of timelines. This parameter can take one of the following values:

WMSDK_TIMELINE_ORDER_BY_TIME

WMSDK_TIMELINE_ORDER_NONE


IWMSDKFiles Interface

The IWMSDKFiles interface provides methods and properties for work with collection of source files.

The IWMSDKFiles interface exposes the following methods.

Method | Description
Count | Gets the number of files.
Item | Retrieves a pointer to the IWMSDKFile interface as provided by index.
AddFile | Adds a file.
Delete | Deletes a file


IWMSDKFiles::Count

The Count method gets the number of source files.

Syntax

HRESULT Count(

int* count

);

Parameters

count

[out] The number of source files.


IWMSDKFiles::Item

The Item method retrieves a pointer to the IWMSDKFile interface as provided by index.

Syntax

HRESULT Item(

int n,

IWMSDKFile** item

);

Parameters

n

[in] File number.

item

[out] A pointer to the IWMSDKFile interface.


IWMSDKFiles::AddFile

The AddFile method adds a source file.

AddFile(LPCWSTR path, int type, int parse, [out] IWMSDKFile** pFile = NULL);

pFile - file object, NULL if not needed (by default)

Syntax

HRESULT AddFile(

LPCWSTR path,

int type,

int parse,

IWMSDKFile** pFile = NULL

);

Parameters

path

[in] Path to a source file.

type

[in] The type of a source file. This parameter can take one of the following values:

WMSDK_TYPE_FILE

WMSDK_TYPE_FOLDER

WMSDK_TYPE_DVD

parse

[in] A boolean value that indicates whether a source file should be parsed when being added.

pFile

[out] A pointer to a file object; NULL if not needed.


IWMSDKFiles::Delete

The Delete method deletes a source file.

Syntax

HRESULT Delete(

int n

);

Parameters

n

[in] File number.


IWMSDKDynamicEffectFade Interface

The IWMSDKDynamicEffectFade interface includes methods and properties that configure the parameters of applying the Fade dynamic effect to watermarks.

The IWMSDKDynamicEffectFade interface exposes the following methods.

Method | Description
GetDirection | Gets the direction of action for the Fade dynamic effect.
SetDirection | Sets the direction of action for the Fade dynamic effect.
GetMinMaxFade | Gets the minimal and maximal values of transparency for the Fade dynamic effect.
SetMinMaxFade | Sets the minimal and maximal values of transparency for the Fade dynamic effect.


IWMSDKDynamicEffectFade::GetDirection

The GetDirection method gets the direction of action for the Fade dynamic effect.

Syntax

HRESULT GetDirection(

int* dir

);

Parameters

dir

[out] The direction of action. This parameter can take one of the following values:

WMSDK_DYNAMIC_EFFECT_DIRECTION_IN

WMSDK_DYNAMIC_EFFECT_DIRECTION_OUT


IWMSDKDynamicEffectFade::SetDirection

The SetDirection method sets the direction of action for the Fade dynamic effect.

Syntax

HRESULT SetDirection(

int dir

);

Parameters

dir

[in] The direction of action. This parameter can take one of the following values:

WMSDK_DYNAMIC_EFFECT_DIRECTION_IN

WMSDK_DYNAMIC_EFFECT_DIRECTION_OUT


IWMSDKDynamicEffectFade::GetMinMaxFade

The GetMinMaxFade method gets the minimal and maximal values of transparency for the Fade dynamic effect..

Syntax

HRESULT GetMinMaxFade(

int* minFade,

int* maxFade

);

Parameters

minFade

[out] The minimal value of transparency.

maxFade

[out] The maximal value of transparency.


IWMSDKDynamicEffectFade::SetMinMaxFade

The SetMinMaxFade method sets the minimal and maximal values of transparency for the Fade dynamic effect.

Syntax

HRESULT SetMinMaxFade(

int minFade,

int maxFade

);

Parameters

minFade

[in] The minimal value of transparency.

maxFade

[in] The maximal value of transparency.


IWMSDKDynamicEffectParamChange Interface

The IWMSDKDynamicEffectParamChange interface includes methods and properties that configure the parameters of applying the Parameter dynamic effect to watermarks.

The IWMSDKDynamicEffectParamChange interface exposes the following methods.

Method | Description
GetMode | Gets the mode for the Parameter dynamic effect.
SetMode | Sets the mode for the Parameter dynamic effect.
GetDuration | Gets the time taken by one cycle of the Parameter dynamic effect.
SetDuration | Sets the time taken by one cycle of the Parameter dynamic effect.
GetPulsing | Gets a boolean value that indicates whether reflective behavior of the Parameter dynamic effect is enabled.
SetPulsing | Sets a boolean value that indicates whether reflective behavior of the Parameter dynamic effect is enabled.
GetParameterToChange | Gets a watermark parameter to be affected by the Parameter dynamic effect.
SetParameterToChange | Sets a watermark parameter to be affected by the Parameter dynamic effect.
GetDirection | Gets the direction of action for the Parameter dynamic effect.
SetDirection | Sets the direction of action for the Parameter dynamic effect.
GetAngle | Gets the minimal and maximal values of a watermark's rotation angle to be applied by the Parameter dynamic effect.
SetAngle | Sets the minimal and maximal values of a watermark's rotation angle to be applied by the Parameter dynamic effect.
GetResize | Gets the minimal and maximal values of a watermark's zoom factor to be applied by the Parameter dynamic effect.
SetResize | Sets the minimal and maximal values of a watermark's zoom factor to be applied by the Parameter dynamic effect.
GetValue | Gets the minimal and maximal values of a watermark's parameter to be affected by the Parameter dynamic effect.
SetValue | Sets the minimal and maximal values of a watermark's parameter to be affected by the Parameter dynamic effect.


IWMSDKDynamicEffectParamChange::GetMode

The GetMode method gets the mode for the Parameter dynamic effect.

Syntax

HRESULT GetMode(

int* mode

);

Parameters

mode

[out] The mode. This parameter can take one of the following values:

WMSDK_DYNAMIC_WHOLE_TIMELINE

WMSDK_DYNAMIC_SET_DURATION


IWMSDKDynamicEffectParamChange::SetMode

The SetMode method sets the mode for the Parameter dynamic effect.

Syntax

HRESULT SetMode(

int mode

);

Parameters

mode

[in] The mode. This parameter can take one of the following values:

WMSDK_DYNAMIC_WHOLE_TIMELINE

WMSDK_DYNAMIC_SET_DURATION


IWMSDKDynamicEffectParamChange::GetDuration

The GetDuration method gets the time taken by one cycle of the Parameter dynamic effect.

Syntax

HRESULT GetDuration(

double* duration

);

Parameters

duration

[out] The time taken by one cycle of the Parameter dynamic effect.


IWMSDKDynamicEffectParamChange::SetDuration

The SetDuration method sets the time taken by one cycle of the Parameter dynamic effect.

Syntax

HRESULT SetDuration(

double duration

);

Parameters

duration

[in] The time taken by one cycle of the Parameter dynamic effect.


IWMSDKDynamicEffectParamChange::GetPulsing

The GetPulsing method gets a boolean value that indicates whether reflective behavior of the Parameter dynamic effect is enabled.

Syntax

HRESULT GetPulsing(

int* pulse

);

Parameters

pulse

[out] A boolean value that indicates whether reflective behavior of the Parameter dynamic effect is enabled.


IWMSDKDynamicEffectParamChange::SetPulsing

The SetPulsing method sets a boolean value that indicates whether reflective behavior of the Parameter dynamic effect is enabled.

Syntax

HRESULT SetPulsing(

int pulse

);

Parameters

pulse

[in] A boolean value that indicates whether reflective behavior of the Parameter dynamic effect is enabled.


IWMSDKDynamicEffectParamChange::GetParameterToChange

The GetParameterToChange method gets a watermark parameter to be affected by the Parameter dynamic effect.

Syntax

HRESULT GetParameterToChange(

int* p

);

Parameters

p

[out] A watermark parameter. This parameter can take one of the following values:

WMSDK_PARAMETER_ANGLE

WMSDK_PARAMETER_RESIZE

WMSDK_PARAMETER_STROKE_WIDTH

WMSDK_PARAMETER_STROKE_OPACITY

WMSDK_PARAMETER_DROPDOWN_OPACITY

WMSDK_PARAMETER_DROPDOWN_ANGLE

WMSDK_PARAMETER_DROPDOWN_DISTANCE

WMSDK_PARAMETER_DROPDOWN_SIZE

WMSDK_PARAMETER_DROPDOWN_SPREAD

WMSDK_PARAMETER_3D_OPACITY

WMSDK_PARAMETER_3D_WIDTH

WMSDK_PARAMETER_3D_ANGLE

WMSDK_PARAMETER_ROTATE_X

WMSDK_PARAMETER_ROTATE_Y

WMSDK_PARAMETER_CURVATURE_STRETCH

WMSDK_PARAMETER_CURVATURE_BALANCE

WMSDK_PARAMETER_RADIUS

WMSDK_PARAMETER_WIDTH

WMSDK_PARAMETER_HEIGHT

WMSDK_PARAMETER_BORDER_WIDTH

WMSDK_PARAMETER_TOLERANCE

WMSDK_PARAMETER_TILE_XOFFSET

WMSDK_PARAMETER_TILE_YOFFSET

WMSDK_PARAMETER_PATTERN_XOFFSET

WMSDK_PARAMETER_PATTERN_YOFFSET

WMSDK_PARAMETER_PATTERN_ANGLE


IWMSDKDynamicEffectParamChange::SetParameterToChange

The SetParameterToChange method sets a watermark parameter to be affected by the Parameter dynamic effect.

Syntax

HRESULT SetParameterToChange(

int p

);

Parameters

p

[in] A watermark parameter. This parameter can take one of the following values:

WMSDK_PARAMETER_ANGLE

WMSDK_PARAMETER_RESIZE

WMSDK_PARAMETER_STROKE_WIDTH

WMSDK_PARAMETER_STROKE_OPACITY

WMSDK_PARAMETER_DROPDOWN_OPACITY

WMSDK_PARAMETER_DROPDOWN_ANGLE

WMSDK_PARAMETER_DROPDOWN_DISTANCE

WMSDK_PARAMETER_DROPDOWN_SIZE

WMSDK_PARAMETER_DROPDOWN_SPREAD

WMSDK_PARAMETER_3D_OPACITY

WMSDK_PARAMETER_3D_WIDTH

WMSDK_PARAMETER_3D_ANGLE

WMSDK_PARAMETER_ROTATE_X

WMSDK_PARAMETER_ROTATE_Y

WMSDK_PARAMETER_CURVATURE_STRETCH

WMSDK_PARAMETER_CURVATURE_BALANCE

WMSDK_PARAMETER_RADIUS

WMSDK_PARAMETER_WIDTH

WMSDK_PARAMETER_HEIGHT

WMSDK_PARAMETER_BORDER_WIDTH

WMSDK_PARAMETER_TOLERANCE

WMSDK_PARAMETER_TILE_XOFFSET

WMSDK_PARAMETER_TILE_YOFFSET

WMSDK_PARAMETER_PATTERN_XOFFSET

WMSDK_PARAMETER_PATTERN_YOFFSET

WMSDK_PARAMETER_PATTERN_ANGLE


IWMSDKDynamicEffectParamChange::GetDirection

The GetDirection method gets the direction of action for the Parameter dynamic effect.

Syntax

HRESULT GetDirection(

int* dir

);

Parameters

dir

[out] The direction of action. This parameter can take one of the following values:

WMSDK_DYNAMIC_EFFECT_DIRECTION_IN

WMSDK_DYNAMIC_EFFECT_DIRECTION_OUT


IWMSDKDynamicEffectParamChange::SetDirection

The SetDirection method sets the direction of action for the Parameter dynamic effect.

Syntax

HRESULT SetDirection(

int dir

);

Parameters

dir

[in] The direction of action. This parameter can take one of the following values:

WMSDK_DYNAMIC_EFFECT_DIRECTION_IN

WMSDK_DYNAMIC_EFFECT_DIRECTION_OUT


IWMSDKDynamicEffectParamChange::GetAngle

The GetAngle method gets the minimal and maximal values of a watermark's rotation angle to be applied by the Parameter dynamic effect.

Syntax

HRESULT GetAngle(

int* angleStart,

int* angleEnd

);

Parameters

angleStart

[out] The minimal value of a watermark's rotation angle.

angleEnd

[out] The maximal value of a watermark's rotation angle.


IWMSDKDynamicEffectParamChange::SetAngle

The SetAngle method sets the minimal and maximal values of a watermark's rotation angle to be applied by the Parameter dynamic effect.

Syntax

HRESULT SetAngle(

int angleStart,

int angleEnd

);

Parameters

angleStart

[in] The minimal value of a watermark's rotation angle.

angleEnd

[in] The maximal value of a watermark's rotation angle.


IWMSDKDynamicEffectParamChange::GetResize

The GetResize method gets the minimal and maximal values of a watermark's zoom factor to be applied by the Parameter dynamic effect.

Syntax

HRESULT GetResize(

int* resizeStart,

int* resizeEnd

);

Parameters

resizeStart

[out] The minimal value of a watermark's zoom factor.

resizeEnd

[out] The maximal value of a watermark's zoom factor.


IWMSDKDynamicEffectParamChange::SetResize

The SetResize method sets the minimal and maximal values of a watermark's zoom factor to be applied by the Parameter dynamic effect.

Syntax

HRESULT SetResize(

int resizeStart,

int resizeEnd

);

Parameters

resizeStart

[in] The minimal value of a watermark's zoom factor.

resizeEnd

[in] The maximal value of a watermark's zoom factor.


IWMSDKDynamicEffectParamChange::GetValue

The GetValue method gets the minimal and maximal values of a watermark's parameter to be applied by the Parameter dynamic effect.

Syntax

HRESULT GetValue(

int* valueStart,

int* valueEnd

);

Parameters

valueStart

[out] The minimal value of a watermark's parameter.

valueEnd

[out] The maximal value of a watermark's parameter.


IWMSDKDynamicEffectParamChange::SetValue

The SetValue method sets the minimal and maximal values of a watermark's parameter to be applied by the Parameter dynamic effect.

Syntax

HRESULT SetValue(

int valueStart,

int valueEnd

);

Parameters

valueStart

[in] The minimal value of a watermark's parameter.

valueEnd

[in] The maximal value of a watermark's parameter.


IWMSDKDynamicEffectMotion Interface

The IWMSDKDynamicEffectMotion interface includes methods and properties that configure the parameters of applying the Motion dynamic effect to watermarks.

The IWMSDKDynamicEffectMotion interface exposes the following methods.

Method | Description
GetMode | Gets the mode for the Motion dynamic effect.
SetMode | Sets the mode for the Motion dynamic effect.
GetDuration | Gets the time taken by one cycle of the Motion dynamic effect.
SetDuration | Sets the time taken by one cycle of the Motion dynamic effect.
GetPulsing | Gets a boolean value that indicates whether reflective behavior of the Motion dynamic effect is enabled.
SetPulsing | Sets a boolean value that indicates whether reflective behavior of the Motion dynamic effect is enabled.
GetEndPosition | Gets the target position of a watermark to be reached under the action of the Motion dynamic effect.
SetEndPosition | Sets the target position of a watermark to be reached under the action of the Motion dynamic effect.


IWMSDKDynamicEffectMotion::GetMode

The GetMode method gets the mode for the Motion dynamic effect.

Syntax

HRESULT GetMode(

int* mode

);

Parameters

mode

[out] The mode. This parameter can take one of the following values:

WMSDK_DYNAMIC_WHOLE_TIMELINE

WMSDK_DYNAMIC_SET_DURATION


IWMSDKDynamicEffectMotion::SetMode

The SetMode method sets the mode for the Motion dynamic effect.

Syntax

HRESULT SetMode(

int mode

);

Parameters

mode

[in] The mode. This parameter can take one of the following values:

WMSDK_DYNAMIC_WHOLE_TIMELINE

WMSDK_DYNAMIC_SET_DURATION


IWMSDKDynamicEffectMotion::GetDuration

The GetDuration method gets the time taken by one cycle of the Motion dynamic effect.

Syntax

HRESULT GetDuration(

double* duration

);

Parameters

duration

[out] The time taken by one cycle of the Parameter dynamic effect.


IWMSDKDynamicEffectMotion::SetDuration

The SetDuration method sets the time taken by one cycle of the Motion dynamic effect.

Syntax

HRESULT SetDuration(

double duration

);

Parameters

duration

[in] The time taken by one cycle of the Parameter dynamic effect.


IWMSDKDynamicEffectMotion::GetPulsing

The GetPulsing method gets a boolean value that indicates whether reflective behavior of the Motion dynamic effect is enabled.

Syntax

HRESULT GetPulsing(

int* pulse

);

Parameters

pulse

[out] A boolean value that indicates whether reflective behavior of the Motion dynamic effect is enabled.


IWMSDKDynamicEffectMotion::SetPulsing

The SetPulsing method sets a boolean value that indicates whether reflective behavior of the Motion dynamic effect is enabled.

Syntax

HRESULT SetPulsing(

int pulse

);

Parameters

pulse

[in] A boolean value that indicates whether reflective behavior of the Motion dynamic effect is enabled.


IWMSDKDynamicEffectMotion::GetEndPosition

The GetEndPosition method gets the target position of a watermark to be reached under the action of the Motion dynamic effect.

Syntax

HRESULT GetEndPosition(

int* posX,

int* posY,

int* posType

);

Parameters

posX

[out] X-offset relative to a point specified by posType parameter.

posY

[out] Y-offset relative to a point specified by posType parameter.

posType

[out] A point relative to which posX and posY parameters are specified. This parameter can take one of the following values:

WMSDK_TOP_LEFT

WMSDK_TOP_CENTER

WMSDK_TOP_RIGHT

WMSDK_CENTER_LEFT

WMSDK_CENTER_CENTER

WMSDK_CENTER_RIGHT

WMSDK_BOTTOM_LEFT

WMSDK_BOTTOM_CENTER

WMSDK_BOTTOM_RIGHT


IWMSDKDynamicEffectMotion::SetEndPosition

The SetEndPosition method sets the target position of a watermark to be reached under the action of the Motion dynamic effect.

Syntax

HRESULT SetEndPosition(

int posX,

int posY,

int posType

);

Parameters

posX

[in] X-offset relative to a point specified by posType parameter.

posY

[in] Y-offset relative to a point specified by posType parameter.

posType

[in] A point relative to which posX and posY parameters are specified. This parameter can take one of the following values:

WMSDK_TOP_LEFT

WMSDK_TOP_CENTER

WMSDK_TOP_RIGHT

WMSDK_CENTER_LEFT

WMSDK_CENTER_CENTER

WMSDK_CENTER_RIGHT

WMSDK_BOTTOM_LEFT

WMSDK_BOTTOM_CENTER

WMSDK_BOTTOM_RIGHT


IWMSDKDynamicEffectKeypoint Interface

The IWMSDKDynamicEffectKeypoint interface includes methods and properties that configure the parameters of applying the Key Point dynamic effect to watermarks.

The IWMSDKDynamicEffectKeypoint interface exposes the following methods.

Method | Description
GetMode | Gets the mode for the Key Point dynamic effect.
SetMode | Sets the mode for the Key Point dynamic effect.
GetDuration | Gets the time taken by one cycle of the Key Point dynamic effect.
SetDuration | Sets the time taken by one cycle of the Key Point dynamic effect.
GetPulsing | Gets a boolean value that indicates whether reflective behavior of the Key Point dynamic effect is enabled.
SetPulsing | Sets a boolean value that indicates whether reflective behavior of the Key Point dynamic effect is enabled.
GetWatermark | Retrieves a pointer to a watermark object used to represent appearance of a watermark starting from the key point.
SetWatermark | Creates a copy of a watermark for the Key Point dynamic effect.


IWMSDKDynamicEffectKeypoint::GetMode

The GetMode method gets the mode for the Key Point dynamic effect.

Syntax

HRESULT GetMode(

int* mode

);

Parameters

mode

[out] The mode. This parameter can take one of the following values:

WMSDK_DYNAMIC_WHOLE_TIMELINE

WMSDK_DYNAMIC_SET_DURATION


IWMSDKDynamicEffectKeypoint::SetMode

The SetMode method sets the mode for the Key Point dynamic effect.

Syntax

HRESULT SetMode(

int mode

);

Parameters

mode

[in] The mode. This parameter can take one of the following values:

WMSDK_DYNAMIC_WHOLE_TIMELINE

WMSDK_DYNAMIC_SET_DURATION


IWMSDKDynamicEffectKeypoint::GetDuration

The GetDuration method gets the time taken by one cycle of the Key Point dynamic effect.

Syntax

HRESULT GetDuration(

double* duration

);

Parameters

duration

[out] The time taken by one cycle of the Parameter dynamic effect.


IWMSDKDynamicEffectKeypoint::SetDuration

The SetDuration method sets the time taken by one cycle of the Key Point dynamic effect.

Syntax

HRESULT SetDuration(

double duration

);

Parameters

duration

[in] The time taken by one cycle of the Parameter dynamic effect.


IWMSDKDynamicEffectKeypoint::GetPulsing

The GetPulsing method gets a boolean value that indicates whether reflective behavior of the Key Point dynamic effect is enabled.

Syntax

HRESULT GetPulsing(

int* pulse

);

Parameters

pulse

[out] A boolean value that indicates whether reflective behavior of the Key Point dynamic effect is enabled.


IWMSDKDynamicEffectKeypoint::SetPulsing

The SetPulsing method sets a boolean value that indicates whether reflective behavior of the Key Point dynamic effect is enabled.

Syntax

HRESULT SetPulsing(

int pulse

);

Parameters

pulse

[in] A boolean value that indicates whether reflective behavior of the Key Point dynamic effect is enabled.


IWMSDKDynamicEffectKeypoint::GetWatermark

The GetWatermark method retrieves a pointer to a watermark object used to represent appearance of a watermark starting from the key point.

Syntax

HRESULT GetWatermark(

IUnknown** pWatermark

);

pWatermark

[out] A pointer to a watermark object.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

To get know the type of a watermark you need to use QueryInterface function for querying IWMSDKWatermark interface on pWatermark, where you can get the type and then cast pWatermark to this type.


IWMSDKDynamicEffectKeypoint::SetWatermark

The SetWatermark method creates a copy of a watermark for the Key Point dynamic effect.

Syntax

HRESULT SetWatermark(

IUnknown* pWatermark

);

pWatermark

[out] A pointer to a watermark object.


IWMSDKEffects Interface

The IWMSDKEffects interface provides methods and properties for work with collection of effects.

The IWMSDKEffects interface exposes the following methods.

Method | Description
GetEffect | Gets the effect ID.
GetDynamicEffect | Gets a dynamic effect. ???
GetDynamicEffectCount | Gets the number of dynamic effects.
AddDynamicEffect | Adds a dynamic effect.
DeleteDynamicEffect | Deletes a dynamic effect.


IWMSDKEffects::GetEffect

The GetEffect method gets the effect ID ???.

Syntax

HRESULT GetEffect(

int effectID,

IUnknown** pEffect

);

Parameters

effectID

[in] The effect ID ???. This parameter can take one of the following values:

WMSDK_EFFECT_STROKE

WMSDK_EFFECT_DROPSHADOW

WMSDK_EFFECT_BEVEL_AND_EMBOSS

WMSDK_EFFECT_3D

WMSDK_EFFECT_ROTATION

WMSDK_EFFECT_CURVATURE

pEffect

[out] A pointer to ???.


IWMSDKEffects::GetDynamicEffect

The GetDynamicEffect method gets a dynamic effect. ???

Syntax

HRESULT GetDynamicEffect(

int n,

IUnknown** pEffect

);

Parameters

n

[in] Dynamic effect number.

pEffect

[out] A pointer to dynamic effect object; in order to get know the type of the effect, it is necessary to use QueryInterface function for querying IWMSDKStream interface on pEffect, where it is possible to get the type and then cast pEffect to this type. ???


IWMSDKEffects::GetDynamicEffectCount

The GetDynamicEffectCount method gets the number of dynamic effects.

Syntax

HRESULT GetDynamicEffectCount(

int* count

);

Parameters

count

[out] The number of dynamic effects.


IWMSDKEffects::AddDynamicEffect

The AddDynamicEffect method adds a dynamic effect.

Syntax

HRESULT AddDynamicEffect(

int type,

IUnknown** pEffect = NULL

);

Parameters

type

[in] The type of a dynamic effect. This parameter can take one of the following values:

WMSDK_DYNAMIC_EFFECT_FADE

WMSDK_DYNAMIC_EFFECT_PARAM_CHANGE

WMSDK_DYNAMIC_EFFECT_MOTION

WMSDK_DYNAMIC_EFFECT_KEYPOINT

pEffect

[out] A pointer to an effect object; NULL if not needed.


IWMSDKEffects::DeleteDynamicEffect

The DeleteDynamicEffect method deletes a dynamic effect.

Syntax

HRESULT DeleteDynamicEffect(

int n

);

Parameters

n

[in] Dynamic effect number.


IWMSDKFormatAVI Interface

The IWMSDKFormatAVI interface includes methods and properties that define the parameters of generation of AVI files.

The IWMSDKFormatAVI interface exposes the following methods.

Method | Description
GetVideoCodec | Gets a video codec.
SetVideoCodec | Sets a video codec.
GetVideoIsTryUseSourceCodec | Gets a boolean value that indicates whether trying to use the source video codec is enabled.
SetVideoIsTryUseSourceCodec | Sets a boolean value that indicates whether trying to use the source video codec is enabled.
GetVideoPassCount | Gets the number of passes for video encoding.
SetVideoPassCount | Sets the number of passes for video encoding.
GetVideoKeyFrameRate | Gets the key frame rate for video encoding.
SetVideoKeyFrameRate | Sets the key frame rate for video encoding.
GetVideoQuality | Gets the quality of video encoding.
SetVideoQuality | Sets the quality of video encoding.
GetVideoBitrate | Gets the bitrate for video encoding.
SetVideoBitrate | Sets the bitrate for video encoding.
GetAudioCodec | Gets an audio codec.
SetAudioCodec | Sets an audio codec.
GetAudioSamplingRate | Gets the sampling rate for audio encoding.
SetAudioSamplingRate | Sets the sampling rate for audio encoding.
GetAudioChannel | Gets an audio channel.
SetAudioChannel | Sets an audio channel.
GetAudioPrecision | Gets the precision for audio encoding.
SetAudioPrecision | Sets the precision for audio encoding.
GetAudioIsTryUseSourceCodec | Gets a boolean value that indicates whether trying to use the source audio codec is enabled
SetAudioIsTryUseSourceCodec | Sets a boolean value that indicates whether trying to use the source audio codec is enabled
GetAudioCodecFormat | Gets the format of an audio codec.
SetAudioCodecFormat | Sets the format of an audio codec.
GetAudioSamplingRateMP3 | Gets the sampling rate for encoding audio to MP3 format.
SetAudioSamplingRateMP3 | Sets the sampling rate for encoding audio to MP3 format.
GetAudioChannelModeMP3 | Gets the audio channel mode for encoding audio to MP3 format.
SetAudioChannelModeMP3 | Sets the audio channel mode for encoding audio to MP3 format.
GetAudioBitrateMP3 | Gets the bitrate for encoding audio to MP3 format.
SetAudioBitrateMP3 | Sets the bitrate for encoding audio to MP3 format.


IWMSDKFormatAVI::GetVideoCodec

The GetVideoCodec method gets a video codec.

Syntax

HRESULT GetVideoCodec(

LPWSTR codec

);

Parameters

codec

[out] A video codec.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKFormat::EnumerateCodecs method to enumerate the preset codecs.


IWMSDKFormatAVI::SetVideoCodec

The SetVideoCodec method sets a video codec.

Syntax

HRESULT SetVideoCodec(

LPCWSTR codec

);

Parameters

codec

[in] A video codec.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKFormat::EnumerateCodecs method to enumerate the preset codecs.


IWMSDKFormatAVI::GetVideoIsTryUseSourceCodec

The GetVideoIsTryUseSourceCodec method gets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT GetVideoIsTryUseSourceCodec(

int* isTry

);

Parameters

isTry

[out] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatAVI::SetVideoIsTryUseSourceCodec

The SetVideoIsTryUseSourceCodec method sets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT SetVideoIsTryUseSourceCodec(

int isTry

);

Parameters

isTry

[in] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatAVI::GetVideoPassCount

The GetVideoPassCount method gets the number of passes for video encoding.

Syntax

HRESULT GetVideoPassCount(

int* count

);

Parameters

count

[out] The number of passes.


IWMSDKFormatAVI::SetVideoPassCount

The SetVideoPassCount method sets the number of passes for video encoding.

Syntax

HRESULT SetVideoPassCount(

int count

);

Parameters

count

[in] The number of passes.


IWMSDKFormatAVI::GetVideoKeyFrameRate

The GetVideoKeyFrameRate method gets the key frame rate for video encoding.

Syntax

HRESULT GetVideoKeyFrameRate(

int* rate

);

Parameters

rate

[out] The key frame rate.


IWMSDKFormatAVI::SetVideoKeyFrameRate

The SetVideoKeyFrameRate method sets the key frame rate for video encoding.

Syntax

HRESULT SetVideoKeyFrameRate(

int rate

);

Parameters

rate

[in] The key frame rate.


IWMSDKFormatAVI::GetVideoQuality

The GetVideoPassCount method gets the quality of video encoding.

Syntax

HRESULT GetVideoQuality(

int* quality

);

Parameters

quality

[out] The quality.


IWMSDKFormatAVI::SetVideoQuality

The SetVideoPassCount method sets the quality of video encoding.

Syntax

HRESULT SetVideoQuality(

int quality

);

Parameters

quality

[in] The quality.


IWMSDKFormatAVI::GetVideoBitrate

The GetVideoBitrate method gets the bitrate for video encoding.

Syntax

HRESULT GetVideoBitrate(

int* bitrate

);

Parameters

bitrate

[out] The bitrate.


IWMSDKFormatAVI::SetVideoBitrate

The SetVideoBitrate method sets the bitrate for video encoding.

Syntax

HRESULT SetVideoBitrate(

int bitrate

);

Parameters

bitrate

[in] The bitrate.


IWMSDKFormatAVI::GetAudioCodec

The GetAudioCodec method gets an audio codec.

Syntax

HRESULT GetAudioCodec(

LPWSTR codec

);

Parameters

codec

[out] An audio codec.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKFormat::EnumerateCodecs method to enumerate the preset codecs.


IWMSDKFormatAVI::SetAudioCodec

The SetAudioCodec method sets an audio codec.

Syntax

HRESULT SetAudioCodec(

LPCWSTR codec

);

Parameters

codec

[in] An audio codec.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKFormat::EnumerateCodecs method to enumerate the preset codecs.


IWMSDKFormatAVI::GetAudioSamplingRate

The GetAudioSamplingRate method gets the sampling rate for audio encoding.

Syntax

HRESULT GetAudioSamplingRate(

int* rate

);

Parameters

rate

[out] The sampling rate. This parameter can take one of the following values:

0 - original frame rate

48000

44100

32000

24000

22050

11025

8000


IWMSDKFormatAVI::SetAudioSamplingRate

The SetAudioSamplingRate method sets the sampling rate for audio encoding.

Syntax

HRESULT SetAudioSamplingRate(

int rate

);

Parameters

rate

[in] The sampling rate. This parameter can take one of the following values:

0 - original frame rate

48000

44100

32000

24000

22050

11025

8000


IWMSDKFormatAVI::GetAudioChannel

The GetAudioChannel method gets an audio channel.

Syntax

HRESULT GetAudioChannel(

int* channel

);

Parameters

channel

[out] An audio channel. This parameter can take one of the following values:

0 - original audio channel

2

1


IWMSDKFormatAVI::SetAudioChannel

The SetAudioChannel method sets an audio channel.

Syntax

HRESULT SetAudioChannel(

int channel

);

Parameters

channel

[in] An audio channel. This parameter can take one of the following values:

0 - original audio channel

2

1


IWMSDKFormatAVI::GetAudioPrecision

The GetAudioPrecision method gets the precision for audio encoding.

Syntax

HRESULT GetAudioPrecision(

int* precision

);

Parameters

precision

[out] The precision. This parameter can take one of the following values:

0 - original precision

16

8


IWMSDKFormatAVI::SetAudioPrecision

The SetAudioPrecision method sets the precision for audio encoding.

Syntax

HRESULT SetAudioPrecision(

int precision

);

Parameters

precision

[in] The precision. This parameter can take one of the following values:

0 - original precision

16

8


IWMSDKFormatAVI::GetAudioIsTryUseSourceCodec

The GetAudioTryUseSourceCodec method gets a boolean value that indicates whether trying to use the source audio codec is enabled.

Syntax

HRESULT GetAudioIsTryUseSourceCodec(

int* isTry

);

Parameters

isTry

[out] A boolean value that indicates whether trying to use the source audio codec is enabled.


IWMSDKFormatAVI::SetAudioIsTryUseSourceCodec

The SetAudioTryUseSourceCodec method sets a boolean value that indicates whether trying to use the source audio codec is enabled.

Syntax

HRESULT SetAudioIsTryUseSourceCodec(

int isTry

);

Parameters

isTry

[in] A boolean value that indicates whether trying to use the source audio codec is enabled.


IWMSDKFormatAVI::GetAudioCodecFormat

The GetAudioCodecFormat method gets the format of an audio codec.

Syntax

HRESULT GetAudioCodecFormat(

LPWSTR format

);

Parameters

format

[out] The audio codec format.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKCodecAVIAudio::EnumAudioFormats method to enumerate the preset formats.


IWMSDKFormatAVI::SetAudioCodecFormat

The SetAudioCodecFormat method sets the format of an audio codec.

Syntax

HRESULT SetAudioCodecFormat(

LPCWSTR format

);

Parameters

format

[in] The audio codec format.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKCodecAVIAudio::EnumAudioFormats method to enumerate the preset formats.


IWMSDKFormatAVI::GetAudioChannelModeMP3

The GetAudioChannelModeMP3 method gets the audio channel mode for encoding audio to MP3 format.

Syntax

HRESULT GetAudioChannelModeMP3(

int* mode

);

Parameters

mode

[out] The audio channel mode.


IWMSDKFormatAVI::SetAudioChannelModeMP3

The SetAudioChannelModeMP3 method sets the audio channel mode for encoding audio to MP3 format.

Syntax

HRESULT SetAudioChannelModeMP3(

int mode

);

Parameters

mode

[in] The audio channel mode.


IWMSDKFormatAVI::GetAudioBitrateMP3

The GetAudioBitrateMP3 method gets the bitrate for encoding audio to MP3 format.

Syntax

HRESULT GetAudioBitrateMP3(

int* bitrate

);

Parameters

bitrate

[out] The bitrate.


IWMSDKFormatAVI::SetAudioBitrateMP3

The SetAudioBitrateMP3 method sets the bitrate for encoding audio to MP3 format.

Syntax

HRESULT SetAudioBitrateMP3(

int bitrate

);

Parameters

bitrate

[in] The bitrate.


IWMSDKFormatFLV Interface

The IWMSDKFormatFLV interface includes methods and properties that define the parameters of generation of AVI files.

The IWMSDKFormatFLV interface exposes the following methods.

Method | Description
GetVideoCodec | Gets a video codec.
SetVideoCodec | Sets a video codec.
GetVideoBitrate | Gets the bitrate for video encoding.
SetVideoBitrate | Sets the bitrate for video encoding.
GetVideoTryUseSourceCodec | Gets a boolean value that indicates whether trying to use the source video codec is enabled.
SetVideoTryUseSourceCodec | Sets a boolean value that indicates whether trying to use the source video codec is enabled.
GetAudioCodec | Gets an audio codec.
SetAudioCodec | Sets an audio codec.
GetAudioSamplingRate | Gets the sampling rate for audio encoding.
SetAudioSamplingRate | Sets the sampling rate for audio encoding.
GetAudioChannelMode | Gets the audio channel mode for audio encoding.
SetAudioChannelMode | Sets the audio channel mode for audio encoding.
GetAudioBitrate | Gets the bitrate for audio encoding.
SetAudioBitrate | Sets the bitrate for audio encoding.


IWMSDKFormatFLV::GetVideoCodec

The GetVideoCodec method gets a video codec.

Syntax

HRESULT GetVideoCodec(

int* codec

);

Parameters

codec

[out] A video codec. This parameter can take one of the following values:

WMSDK_FLASH_VIDEO_CODEC_SORENSON_H_263

WMSDK_FLASH_VIDEO_CODEC_SCREEN_VIDEO

WMSDK_FLASH_VIDEO_CODEC_ON2_VP6


IWMSDKFormatFLV::SetVideoCodec

The SetVideoCodec method sets a video codec.

Syntax

HRESULT SetVideoCodec(

int codec

);

Parameters

codec

[in] A video codec. This parameter can take one of the following values:

WMSDK_FLASH_VIDEO_CODEC_SORENSON_H_263

WMSDK_FLASH_VIDEO_CODEC_SCREEN_VIDEO

WMSDK_FLASH_VIDEO_CODEC_ON2_VP6


IWMSDKFormatFLV::GetVideoBitrate

The GetVideoBitrate method gets the bitrate for video encoding.

Syntax

HRESULT GetVideoBitrate(

int* bitrate

);

Parameters

bitrate

[out] The bitrate.


IWMSDKFormatFLV::SetVideoBitrate

The SetVideoBitrate method sets the bitrate for video encoding.

Syntax

HRESULT SetVideoBitrate(

int bitrate

);

Parameters

bitrate

[in] The bitrate.


IWMSDKFormatFLV::GetVideoTryUseSourceCodec

IWMSDKFormatAVI::GetVideoTryUseSourceCodec

The GetVideoTryUseSourceCodec method gets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT GetVideoTryUseSourceCodec(

int* isTry

);

Parameters

isTry

[out] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatFLV::SetVideoTryUseSourceCodec

IWMSDKFormatAVI::SetVideoTryUseSourceCodec

The SetVideoTryUseSourceCodec method sets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT SetVideoTryUseSourceCodec(

int isTry

);

Parameters

isTry

[in] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatFLV::GetAudioCodec

The GetAudioCodec method gets an audio codec.

Syntax

HRESULT GetAudioCodec(

int* codec

);

Parameters

codec

[out] An audio codec. This parameter can take one of the following values:

WMSDK_FLASH_AUDIO_CODEC_MP3


IWMSDKFormatFLV::SetAudioCodec

The SetAudioCodec method sets an audio codec.

Syntax

HRESULT SetAudioCodec(

int codec

);

Parameters

codec

[in] An audio codec. This parameter can take one of the following values:

WMSDK_FLASH_AUDIO_CODEC_MP3


IWMSDKFormatFLV::GetAudioSamplingRate

The GetAudioSamplingRate method gets the sampling rate for audio encoding.

Syntax

HRESULT GetAudioSamplingRate(

int* rate

);

Parameters

rate

[out] The sampling rate. This parameter can take one of the following values:

44100

22050

11025


IWMSDKFormatFLV::SetAudioSamplingRate

The SetAudioSamplingRate method sets the sampling rate for audio encoding.

Syntax

HRESULT SetAudioSamplingRate(

int rate

);

Parameters

rate

[in] The sampling rate. This parameter can take one of the following values:

44100

22050

11025


IWMSDKFormatFLV::GetAudioChannelMode

The GetAudioChannelMode method gets the audio channel mode for audio encoding.

Syntax

HRESULT GetAudioChannelMode(

int* mode

);

Parameters

mode

[out] The audio channel mode. This parameter can take one of the following values:

0 - original channel mode

2

1


IWMSDKFormatFLV::SetAudioChannelMode

The SetAudioChannelMode method sets the audio channel mode for audio encoding.

Syntax

HRESULT SetAudioChannelMode(

int mode

);

Parameters

mode

[in] The audio channel mode. This parameter can take one of the following values:

0 - original channel mode

2

1


IWMSDKFormatFLV::GetAudioBitrate

The GetAudioBitrate method gets the bitrate for audio encoding.

Syntax

HRESULT GetAudioBitrate(

int* bitrate

);

Parameters

bitrate

[out] The bitrate. If sampling rate is equal to 44100, this parameter can take one of the following values:

48

56

64

80

96

128

160

192

224

256

320

Otherwise it can take one of the following values:

16

32

40

48

56

64

80

96

112

128

144

160


IWMSDKFormatFLV::SetAudioBitrate

The SetAudioBitrate method sets the bitrate for audio encoding.

Syntax

HRESULT SetAudioBitrate(

int bitrate

);

Parameters

bitrate

[in] The bitrate. If sampling rate is equal to 44100, this parameter can take one of the following values:

48

56

64

80

96

128

160

192

224

256

320

Otherwise it can take one of the following values:

16

32

40

48

56

64

80

96

112

128

144

160


IWMSDKFormatImage Interface

The IWMSDKFormatImage interface includes methods and properties that define the parameters of generation of graphics files.

The IWMSDKFormatImage interface exposes the following methods.

Method | Description
GetBMPColorDepth | Gets the color depth for creation of BMP files.
SetBMPColorDepth | Sets the color depth for creation of BMP files.
GetGIFColors | Gets the number of colors for creation of GIF files.
SetGIFColors | Sets the number of colors for creation of GIF files.
GetJPEGQuality | Gets the quality for creation of JPEG files.
SetJPEGQuality | Sets the quality for creation of JPEG files.


IWMSDKFormatImage::GetBMPColorDepth

The GetBMPColorDepth method gets the color depth for creation of BMP files.

Syntax

HRESULT GetBMPColorDepth(

int* depth

);

Parameters

depth

[out] The color depth. This parameter can take one of the following values:

0 - original color depth

32

24

8


IWMSDKFormatImage::SetBMPColorDepth

The SetBMPColorDepth method sets the color depth for creation of BMP files.

Syntax

HRESULT SetBMPColorDepth(

int depth

);

Parameters

depth

[in] The color depth. This parameter can take one of the following values:

0 - original color depth

32

24

8


IWMSDKFormatImage::GetGIFColors

The GetGIFColors method gets the number of colors for creation of GIF files.

Syntax

HRESULT GetGIFColors(

int* colors

);

Parameters

colors

[out] The number of colors. This parameter can take one of the following values:

256

128

64

32

16

8

4

2


IWMSDKFormatImage::SetGIFColors

The SetGIFColors method sets the number of colors for creation of GIF files.

Syntax

HRESULT SetGIFColors(

int colors

);

Parameters

colors

[in] The number of colors. This parameter can take one of the following values:

256

128

64

32

16

8

4

2


IWMSDKFormatImage::GetJPEGQuality

The GetJPEGQuality method gets the quality for creation of JPEG files.

Syntax

HRESULT GetJPEGQuality(

int* quality

);

Parameters

quality

[out] The quality.


IWMSDKFormatImage::SetJPEGQuality

The SetJPEGQuality method sets the quality for creation of JPEG files.

Syntax

HRESULT SetJPEGQuality(

int quality

);

Parameters

quality

[in] The quality.


IWMSDKFormatMOV Interface

The IWMSDKFormatMOV interface includes methods and properties that define the parameters of generation of MOV files.

The IWMSDKFormatMOV interface exposes the following methods.

Method | Description
GetVideoCodec | Gets a video codec.
SetVideoCodec | Sets a video codec.
GetVideoFastStream | Gets a boolean value that indicates whether preparing the produced file for fast streaming is enabled.
SetVideoFastStream | Sets a boolean value that indicates whether preparing the produced file for fast streaming is enabled.
GetVideoTryUseSourceCodec | Gets a boolean value that indicates whether trying to use the source video codec is enabled.
SetVideoTryUseSourceCodec | Sets a boolean value that indicates whether trying to use the source video codec is enabled.
GetVideoKeyFrameRate | Gets the key frame rate for video encoding.
SetVideoKeyFrameRate | Sets the key frame rate for video encoding.
GetVideoMaxDataRate | Gets the maximum data rate for video encoding.
SetVideoMaxDataRate | Sets the maximum data rate for video encoding.
GetVideoQuality | Gets the quality for video encoding.
SetVideoQuality | Sets the quality for video encoding.
GetVideoColorDepth | Gets the color depth for video encoding.
SetVideoColorDepth | Sets the color depth for video encoding.
GetAudioCodec | Gets an audio codec.
SetAudioCodec | Sets an audio codec.
GetAudioTryUseSourceCodec | Gets a boolean value that indicates whether trying to use the source audio codec is enabled.
SetAudioTryUseSourceCodec | Sets a boolean value that indicates whether trying to use the source audio codec is enabled.
GetAudioSamplingRate | Gets the sampling rate for audio encoding.
SetAudioSamplingRate | Sets the sampling rate for audio encoding.
GetAudioChannel | Gets an audio channel.
SetAudioChannel | Sets an audio channel.
GetAudioPrecision | Gets the precision for audio encoding.
SetAudioPrecision | Sets the precision for audio encoding.
EnumVideoQuality | Enumerates the values of quality for video encoding.
EnumVideoColorDepth | Enumerates the values of color depth for video encoding.


IWMSDKFormatMOV::GetVideoCodec

The GetVideoCodec method gets a video codec.

Syntax

HRESULT GetVideoCodec(

LPWSTR codec

);

Parameters

codec

[out] A video codec.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKFormat::EnumerateCodecs method to enumerate the preset codecs.


IWMSDKFormatMOV::SetVideoCodec

The SetVideoCodec method sets a video codec.

Syntax

HRESULT SetVideoCodec(

LPCWSTR codec

);

Parameters

codec

[in] A video codec.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKFormat::EnumerateCodecs method to enumerate the preset codecs.


IWMSDKFormatMOV::GetVideoFastStream

The GetVideoFastStream method gets a boolean value that indicates whether preparing the produced MOV file for fast streaming via the Internet is enabled.

Syntax

HRESULT GetVideoFastStream(

int* isFast

);

Parameters

isFast

[out] A boolean value that indicates whether preparing the produced MOV file for fast streaming via the Internet is enabled.


IWMSDKFormatMOV::SetVideoFastStream

The SetVideoFastStream method sets a boolean value that indicates whether preparing the produced MOV file for fast streaming via the Internet is enabled.

Syntax

HRESULT SetVideoFastStream(

int isFast

);

Parameters

isFast

[in] A boolean value that indicates whether preparing the produced MOV file for fast streaming via the Internet is enabled.


IWMSDKFormatMOV::GetVideoTryUseSourceCodec

The GetVideoTryUseSourceCodec method gets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT GetVideoTryUseSourceCodec(

int* isTry

);

Parameters

isTry

[out] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatMOV::SetVideoTryUseSourceCodec

The SetVideoTryUseSourceCodec method sets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT SetVideoTryUseSourceCodec(

int isTry

);

Parameters

isTry

[in] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatMOV::GetVideoKeyFrameRate

The GetVideoKeyFrameRate method gets the key frame rate for video encoding.

Syntax

HRESULT GetVideoKeyFrameRate(

int* rate

);

Parameters

rate

[out] The key frame rate.


IWMSDKFormatMOV::SetVideoKeyFrameRate

The SetVideoKeyFrameRate method sets the key frame rate for video encoding.

Syntax

HRESULT SetVideoKeyFrameRate(

int rate

);

Parameters

rate

[in] The key frame rate.


IWMSDKFormatMOV::GetVideoMaxDataRate

The GetVideoMaxDataRate method gets the maximum data rate for video encoding.

Syntax

HRESULT GetVideoMaxDataRate(

int* rate

);

Parameters

rate

[out] The maximum data rate.


IWMSDKFormatMOV::SetVideoMaxDataRate

The SetVideoMaxDataRate method sets the maximum data rate for video encoding.

Syntax

HRESULT SetVideoMaxDataRate(

int rate

);

Parameters

rate

[in] The maximum data rate.


IWMSDKFormatMOV::GetVideoQuality

The GetVideoQuality method gets the quality for video encoding.

Syntax

HRESULT GetVideoQuality(

int* quality

);

Parameters

quality

[out] The quality.


IWMSDKFormatMOV::SetVideoQuality

The SetVideoQuality method sets the quality for video encoding.

Syntax

HRESULT SetVideoQuality(

int quality

);

Parameters

quality

[in] The quality.


IWMSDKFormatMOV::GetVideoColorDepth

The GetVideoColorDepth method gets the color depth for video encoding.

Syntax

HRESULT GetVideoColorDepth(

int* depth

);

Parameters

depth

[out] The color depth.


IWMSDKFormatMOV::SetVideoColorDepth

The SetVideoColorDepth method sets the color depth for video encoding.

Syntax

HRESULT SetVideoColorDepth(

int depth

);

Parameters

depth

[in] The color depth.


IWMSDKFormatMOV::GetAudioCodec

The GetAudioCodec method gets an audio codec.

Syntax

HRESULT GetAudioCodec(

LPWSTR codec

);

Parameters

codec

[out] An audio codec.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKFormat::EnumerateCodecs method to enumerate the preset codecs.


IWMSDKFormatMOV::SetAudioCodec

The SetAudioCodec method sets an audio codec.

Syntax

HRESULT SetAudioCodec(

LPCWSTR codec

);

Parameters

codec

[in] An audio codec.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Use the IWMSDKFormat::EnumerateCodecs method to enumerate the preset codecs.


IWMSDKFormatMOV::GetAudioTryUseSourceCodec

The GetAudioTryUseSourceCodec method gets a boolean value that indicates whether trying to use the source audio codec is enabled.

Syntax

HRESULT GetAudioTryUseSourceCodec(

int* isTry

);

Parameters

isTry

[out] A boolean value that indicates whether trying to use the source audio codec is enabled.


IWMSDKFormatMOV::SetAudioTryUseSourceCodec

The SetAudioTryUseSourceCodec method sets a boolean value that indicates whether trying to use the source audio codec is enabled.

Syntax

HRESULT SetAudioTryUseSourceCodec(

int isTry

);

Parameters

isTry

[in] A boolean value that indicates whether trying to use the source audio codec is enabled.


IWMSDKFormatMOV::GetAudioSamplingRate

The GetAudioSamplingRate method gets the sampling rate for audio encoding.

Syntax

HRESULT GetAudioSamplingRate(

int* rate

);

Parameters

rate

[out] The sampling rate. This parameter can take one of the following values:

48000

44100

32000

24000

22050

11025

8000


IWMSDKFormatMOV::SetAudioSamplingRate

The SetAudioSamplingRate method sets the sampling rate for audio encoding.

Syntax

HRESULT SetAudioSamplingRate(

int rate

);

Parameters

rate

[in] The sampling rate. This parameter can take one of the following values:

48000

44100

32000

24000

22050

11025

8000


IWMSDKFormatMOV::GetAudioChannel

The GetAudioChannel method gets an audio channel.

Syntax

HRESULT GetAudioChannel(

int* channel

);

Parameters

channel

[out] An audio channel. This parameter can take one of the following values:

2

1


IWMSDKFormatMOV::SetAudioChannel

The SetAudioChannel method sets an audio channel.

Syntax

HRESULT SetAudioChannel(

int channel

);

Parameters

channel

[in] An audio channel. This parameter can take one of the following values:

2

1


IWMSDKFormatMOV::GetAudioPrecision

The GetAudioPrecision method gets the precision for audio encoding.

Syntax

HRESULT GetAudioPrecision(

int* precision

);

Parameters

precision

[out] The precision. This parameter can take one of the following values:

16

8


IWMSDKFormatMOV::SetAudioPrecision

The SetAudioPrecision method sets the precision for audio encoding.

Syntax

HRESULT SetAudioPrecision(

int precision

);

Parameters

precision

[in] The precision. This parameter can take one of the following values:

16

8


IWMSDKFormatMOV::EnumVideoQuality

The EnumVideoQuality method enumerates the values of quality for video encoding.

Syntax

HRESULT EnumVideoQuality(

int* pCallback,

int* pData

);

Parameters

pCallback

[out] A pointer to a callback function. The function has format HRESULT CallbackFunction(LPCSTR name, int id, int count, int* pData).

pData

[out] A pointer to arbitrary user's data.


IWMSDKFormatMOV::EnumVideoColorDepth

The EnumVideoColorDepth method enumerates the values of color depth for video encoding.

Syntax

HRESULT EnumVideoColorDepth(

int* pCallback,

int* pData

);

Parameters

pCallback

[out] A pointer to a callback function. The function has format HRESULT CallbackFunction(LPCSTR name, int id, int count, int* pData).

pData

[out] A pointer to arbitrary user's data.


IWMSDKFormatMPEG Interface

The IWMSDKFormatMPEG interface includes methods and properties that define the parameters of generation of MPEG files.

The IWMSDKFormatMPEG interface exposes the following methods.

Method | Description
GetVideoCodec | Gets a video codec.
SetVideoCodec | Sets a video codec.
GetVideoBitrate | Gets the bitrate for video encoding.
SetVideoBitrate | Sets the bitrate for video encoding.
GetVideoMotionSearchPrecision | Gets the motion search precision for video encoding.
SetVideoMotionSearchPrecision | Sets the motion search precision for video encoding.
GetVideoSearchType | Gets the type of video search.
SetVideoSearchType | Sets the type of video search.
GetVideoEncodingMode | Gets the video encoding mode.
SetVideoEncodingMode | Sets the video encoding mode.
GetVideoFormat | Gets the video format.
SetVideoFormat | Sets the video format.
GetVideoOutputYUV | Gets the YUV color components for video encoding.
SetVideoOutputYUV | Sets the YUV color components for video encoding.
GetVideoQuantizationMatrix | Gets the quantization matrix for video encoding.
SetVideoQuantizationMatrix | Sets the quantization matrix for video encoding.
GetVideoYUVFormat | Gets the YUV format for video encoding.
SetVideoYUVFormat | Sets the YUV format for video encoding.
GetVideoDCComponentPrecision | Gets the DCC component precision for video encoding.
SetVideoDCComponentPrecision | Sets the DCC component precision for video encoding.
GetAudioCodec | Gets an audio codec.
SetAudioCodec | Sets an audio codec.
GetAudioSamplingRate | Gets the sampling rate for audio encoding.
SetAudioSamplingRate | Sets the sampling rate for audio encoding.
GetAudioChannelMode | Gets the audio channel mode for audio encoding.
SetAudioChannelMode | Sets the audio channel mode for audio encoding.
GetAudioBitrate | Gets the bitrate for audio encoding.
SetAudioBitrate | Sets the bitrate for audio encoding.
GetAudioDeEmphasis | Gets the value of deemphasis for audio encoding.
SetAudioDeEmphasis | Sets the value of deemphasis for audio encoding.
GetAudioFlags | Gets the audio flags.
SetAudioFlags | Sets the audio flags.


IWMSDKFormatMPEG::GetVideoCodec

The GetVideoCodec method gets a video codec.

Syntax

HRESULT GetVideoCodec(

int* codec

);

Parameters

codec

[out] A video codec. This parameter can take one of the following values:

WMSDK_MPEG_VIDEO_CODEC_1

WMSDK_MPEG_VIDEO_CODEC_2


IWMSDKFormatMPEG::SetVideoCodec

The SetVideoCodec method sets a video codec.

Syntax

HRESULT SetVideoCodec(

int codec

);

Parameters

codec

[in] A video codec. This parameter can take one of the following values:

WMSDK_MPEG_VIDEO_CODEC_1

WMSDK_MPEG_VIDEO_CODEC_2


IWMSDKFormatMPEG::GetVideoBitrate

IWMSDKFormateMPEG::GetVideoBitrate

The GetVideoBitrate method gets the bitrate for video encoding.

Syntax

HRESULT GetVideoBitrate(

int* bitrate

);

Parameters

bitrate

[out] The bitrate.


IWMSDKFormatMPEG::SetVideoBitrate

IWMSDKFormateMPEG::SetVideoBitrate

The SetVideoBitrate method sets the bitrate for video encoding.

Syntax

HRESULT SetVideoBitrate(

int bitrate

);

Parameters

bitrate

[in] The bitrate.


IWMSDKFormatMPEG::GetVideoMotionSearchPrecision

The GetVideoMotionSearchPrecision method gets the motion search precision for video encoding.

Syntax

HRESULT GetVideoMotionSearchPrecisionl(

int* precision

);

Parameters

precision

[out] The motion search precision for video encoding. This parameter can take one of the following values:

WMSDK_MPEG_SEARCH_PRECISION_LOWEST_QUALITY

WMSDK_MPEG_SEARCH_PRECISION_LOW_QUALITY

WMSDK_MPEG_SEARCH_PRECISION_NORMAL_QUALITY

WMSDK_MPEG_SEARCH_PRECISION_HIGH_QUALITY

WMSDK_MPEG_SEARCH_PRECISION_HIGHEST_QUALITY


IWMSDKFormatMPEG::SetVideoMotionSearchPrecision

The SetVideoMotionSearchPrecision method sets the motion search precision for video encoding.

Syntax

HRESULT SetVideoMotionSearchPrecisionl(

int precision

);

Parameters

precision

[in] The motion search precision for video encoding. This parameter can take one of the following values:

WMSDK_MPEG_SEARCH_PRECISION_LOWEST_QUALITY

WMSDK_MPEG_SEARCH_PRECISION_LOW_QUALITY

WMSDK_MPEG_SEARCH_PRECISION_NORMAL_QUALITY

WMSDK_MPEG_SEARCH_PRECISION_HIGH_QUALITY

WMSDK_MPEG_SEARCH_PRECISION_HIGHEST_QUALITY


IWMSDKFormatMPEG::GetVideoSearchType

IWMSDKFormatMPE::GetVideoSearchType

The GetVideoSearchType method gets the type of video search.

Syntax

HRESULT GetVideoSearchType(

int* type

);

Parameters

type

[out] The type of video search. This parameter can take one of the following values:

WMSDK_MPEG_SEARCH_TYPE_ESTIMATE

WMSDK_MPEG_SEARCH_TYPE_FULL


IWMSDKFormatMPEG::SetVideoSearchType

IWMSDKFormatMPE::SetVideoSearchType

The SetVideoSearchType method sets the type of video search.

Syntax

HRESULT SetVideoSearchType(

int type

);

Parameters

type

[in] The type of video search. This parameter can take one of the following values:

WMSDK_MPEG_SEARCH_TYPE_ESTIMATE

WMSDK_MPEG_SEARCH_TYPE_FULL


IWMSDKFormatMPEG::GetVideoEncodingMode

The GetVideoEncodingMode method gets the video encoding mode.

Syntax

HRESULT GetVideoEncodingMode(

int* mode

);

Parameters

mode

[out] The video encoding mode. This parameter can take one of the following values:

WMSDK_MPEG_ENCODING_MODE_NON_INTERLACED

WMSDK_MPEG_ENCODING_MODE_INTERLACED

WMSDK_MPEG_ENCODING_MODE_TOP_FIELD

WMSDK_MPEG_ENCODING_MODE_BOTTOM_FIELD


IWMSDKFormatMPEG::SetVideoEncodingMode

The SetVideoEncodingMode method sets the video encoding mode.

Syntax

HRESULT SetVideoEncodingMode(

int mode

);

Parameters

mode

[in] The video encoding mode. This parameter can take one of the following values:

WMSDK_MPEG_ENCODING_MODE_NON_INTERLACED

WMSDK_MPEG_ENCODING_MODE_INTERLACED

WMSDK_MPEG_ENCODING_MODE_TOP_FIELD

WMSDK_MPEG_ENCODING_MODE_BOTTOM_FIELD


IWMSDKFormatMPEG::GetVideoFormat

The GetVideoFormat method gets the video format.

Syntax

HRESULT GetVideoFormat(

int* format

);

Parameters

format

[out] The video format. This parameter can take one of the following values:

WMSDK_MPEG_VIDEO_FORMAT_COMPONENT

WMSDK_MPEG_VIDEO_FORMAT_PAL

WMSDK_MPEG_VIDEO_FORMAT_NTSC

WMSDK_MPEG_VIDEO_FORMAT_SECAM

WMSDK_MPEG_VIDEO_FORMAT_MAC

WMSDK_MPEG_VIDEO_FORMAT_UNSPECIFIED


IWMSDKFormatMPEG::SetVideoFormat

The SetVideoFormat method sets the video format.

Syntax

HRESULT SetVideoFormat(

int format

);

Parameters

format

[in] The video format. This parameter can take one of the following values:

WMSDK_MPEG_VIDEO_FORMAT_COMPONENT

WMSDK_MPEG_VIDEO_FORMAT_PAL

WMSDK_MPEG_VIDEO_FORMAT_NTSC

WMSDK_MPEG_VIDEO_FORMAT_SECAM

WMSDK_MPEG_VIDEO_FORMAT_MAC

WMSDK_MPEG_VIDEO_FORMAT_UNSPECIFIED


IWMSDKFormatMPEG::GetVideoOutputYUV

The GetVideoOutputYUV method gets the YUV color components for video encoding.

Syntax

HRESULT GetVideoOutputYUV(

int* yuv

);

Parameters

yuv

[out] The YUV color components for video encoding. This parameter can take one of the following values:

WMSDK_MPEG_YUV_YCBCR

WMSDK_MPEG_YUV_CCIR601


IWMSDKFormatMPEG::SetVideoOutputYUV

The SetVideoOutputYUV method sets the YUV color components for video encoding.

Syntax

HRESULT SetVideoOutputYUV(

int yuv

);

Parameters

yuv

[in] The YUV color components for video encoding. This parameter can take one of the following values:

WMSDK_MPEG_YUV_YCBCR

WMSDK_MPEG_YUV_CCIR601


IWMSDKFormatMPEG::GetVideoQuantizationMatrix

The GetVideoQuantizationMatrix method gets the quantization matrix for video encoding.

Syntax

HRESULT GetVideoQuantizationMatrix(

int* matrix

);

Parameters

matrix

[out] The quantization matrix. This parameter can take one of the following values:

WMSDK_MPEG_QMATRIX_DEFAULT

WMSDK_MPEG_QMATRIX_STANDARD

WMSDK_MPEG_QMATRIX_CG_ANIMATION


IWMSDKFormatMPEG::SetVideoQuantizationMatrix

The SetVideoQuantizationMatrix method sets the quantization matrix for video encoding.

Syntax

HRESULT SetVideoQuantizationMatrix(

int matrix

);

Parameters

matrix

[in] The quantization matrix. This parameter can take one of the following values:

WMSDK_MPEG_QMATRIX_DEFAULT

WMSDK_MPEG_QMATRIX_STANDARD

WMSDK_MPEG_QMATRIX_CG_ANIMATION


IWMSDKFormatMPEG::GetVideoYUVFormat

The GetVideoYUVFormat method gets the YUV format for video encoding.

Syntax

HRESULT GetVideoYUVFormat(

int* yuvFormat

);

Parameters

yuvFormat

[out] The YUV format for video encoding. This parameter can take one of the following values:

WMSDK_MPEG_YUV_FORMAT_4_2_0

WMSDK_MPEG_YUV_FORMAT_4_2_2

WMSDK_MPEG_YUV_FORMAT_4_4_4


IWMSDKFormatMPEG::SetVideoYUVFormat

The SetVideoYUVFormat method sets the YUV format for video encoding.

Syntax

HRESULT SetVideoYUVFormat(

int yuvFormat

);

Parameters

yuvFormat

[in] The YUV format for video encoding. This parameter can take one of the following values:

WMSDK_MPEG_YUV_FORMAT_4_2_0

WMSDK_MPEG_YUV_FORMAT_4_2_2

WMSDK_MPEG_YUV_FORMAT_4_4_4


IWMSDKFormatMPEG::GetVideoDCComponentPrecision

The GetVideoDCComponentPrecision method gets the DCC component precision for video encoding.

Syntax

HRESULT GetVideoDCComponentPrecision(

int* precision

);

Parameters

precision

[out] The DCC component precision. This parameter can take one of the following values:

WMSDK_MPEG_DC_COMPONENT_PRECISION_8BITS

WMSDK_MPEG_DC_COMPONENT_PRECISION_9BITS

WMSDK_MPEG_DC_COMPONENT_PRECISION_10BITS

WMSDK_MPEG_DC_COMPONENT_PRECISION_11BITS


IWMSDKFormatMPEG::SetVideoDCComponentPrecision

The SetVideoDCComponentPrecision method sets the DCC component precision for video encoding.

Syntax

HRESULT SetVideoDCComponentPrecision(

int precision

);

Parameters

precision

[in] The DCC component precision. This parameter can take one of the following values:

WMSDK_MPEG_DC_COMPONENT_PRECISION_8BITS

WMSDK_MPEG_DC_COMPONENT_PRECISION_9BITS

WMSDK_MPEG_DC_COMPONENT_PRECISION_10BITS

WMSDK_MPEG_DC_COMPONENT_PRECISION_11BITS


IWMSDKFormatMPEG::GetAudioCodec

The GetAudioCodec method gets an audio codec.

Syntax

HRESULT GetAudioCodec(

int* codec

);

Parameters

codec

[out] An audio codec. This parameter can take one of the following values:

WMSDK_MPEG_AUDIO_CODEC_LAYER_1

WMSDK_MPEG_AUDIO_CODEC_LAYER_2


IWMSDKFormatMPEG::SetAudioCodec

The SetAudioCodec method sets an audio codec.

Syntax

HRESULT SetAudioCodec(

int codec

);

Parameters

codec

[in] An audio codec. This parameter can take one of the following values:

WMSDK_MPEG_AUDIO_CODEC_LAYER_1

WMSDK_MPEG_AUDIO_CODEC_LAYER_2


IWMSDKFormatMPEG::GetAudioSamplingRate

The GetAudioSamplingRate method gets the sampling rate for audio encoding.

Syntax

HRESULT GetAudioSamplingRate(

int* rate

);

Parameters

rate

[out] The sampling rate. This parameter can take one of the following values:

32000

44100

48000


IWMSDKFormatMPEG::SetAudioSamplingRate

The SetAudioSamplingRate method sets the sampling rate for audio encoding.

Syntax

HRESULT SetAudioSamplingRate(

int rate

);

Parameters

rate

[in] The sampling rate. This parameter can take one of the following values:

32000

44100

48000


IWMSDKFormatMPEG::GetAudioChannelMode

The GetAudioChannelMode method gets the audio channel mode for audio encoding.

Syntax

HRESULT GetAudioChannelMode(

int* mode

);

Parameters

mode

[out] The audio channel mode. This parameter can take one of the following values:

WMSDK_MPEG_CHANNEL_MODE_MONO

WMSDK_MPEG_CHANNEL_MODE_JOIN_STEREO

WMSDK_MPEG_CHANNEL_MODE_DUAL_CHANNEL

WMSDK_MPEG_CHANNEL_MODE_STEREO


IWMSDKFormatMPEG::SetAudioChannelMode

The SetAudioChannelMode method sets the audio channel mode for audio encoding.

Syntax

HRESULT SetAudioChannelMode(

int mode

);

Parameters

mode

[in] The audio channel mode. This parameter can take one of the following values:

WMSDK_MPEG_CHANNEL_MODE_MONO

WMSDK_MPEG_CHANNEL_MODE_JOIN_STEREO

WMSDK_MPEG_CHANNEL_MODE_DUAL_CHANNEL

WMSDK_MPEG_CHANNEL_MODE_STEREO


IWMSDKFormatMPEG::GetAudioBitrate

The GetAudioBitrate method gets the bitrate for video encoding.

Syntax

HRESULT GetAudioBitrate(

int* bitrate

);

Parameters

bitrate

[out] The bitrate.


IWMSDKFormatMPEG::SetAudioBitrate

The SetAudioBitrate method sets the bitrate for video encoding.

Syntax

HRESULT SetAudioBitrate(

int bitrate

);

Parameters

bitrate

[in] The bitrate.


IWMSDKFormatMPEG::GetAudioDeEmphasis

The GetAudioDeEmphasis method gets the value of deemphasis for audio encoding.

Syntax

HRESULT GetAudioDeEmphasis(

int* deEmphasis

);

Parameters

deEmphasis

[out] The value of deemphasis. This parameter can take one of the following values:

WMSDK_MPEG_DE_EMPHASIS_NONE

WMSDK_MPEG_DE_EMPHASIS_50_15_MS

WMSDK_MPEG_DE_EMPHASIS_CCITT_J_17


IWMSDKFormatMPEG::SetAudioDeEmphasis

The SetAudioDeEmphasis method sets the value of deemphasis for audio encoding.

Syntax

HRESULT SetAudioDeEmphasis(

int deEmphasis

);

Parameters

deEmphasis

[in] The value of deemphasis. This parameter can take one of the following values:

WMSDK_MPEG_DE_EMPHASIS_NONE

WMSDK_MPEG_DE_EMPHASIS_50_15_MS

WMSDK_MPEG_DE_EMPHASIS_CCITT_J_17


IWMSDKFormatMPEG::GetAudioFlags

The GetAudioFlags method gets the audio flags.

Syntax

HRESULT GetAudioFlags(

int* flags

);

Parameters

flags

[out] The audio flags. This parameter can take one or a combination of the following values:

WMSDK_MPEG_AUDIO_ERROR_PROTECTION

WMSDK_MPEG_AUDIO_ORIGINAL

WMSDK_MPEG_AUDIO_COPYRIGHT

WMSDK_MPEG_AUDIO_PRIVATE


IWMSDKFormatMPEG::SetAudioFlags

The SetAudioFlags method sets the audio flags.

Syntax

HRESULT SetAudioFlags(

int flags

);

Parameters

flags

[in] The audio flags. This parameter can take one or a combination of the following values:

WMSDK_MPEG_AUDIO_ERROR_PROTECTION

WMSDK_MPEG_AUDIO_ORIGINAL

WMSDK_MPEG_AUDIO_COPYRIGHT

WMSDK_MPEG_AUDIO_PRIVATE


IWMSDKFormatSWF Interface

The IWMSDKFormatSWF interface includes methods and properties that define the parameters of generation of SWF files.

The IWMSDKFormatSWF interface exposes the following methods.

Method | Description
GetVideoCodec | Gets a video codec.
SetVideoCodec | Sets a video codec.
GetVideoBitrate | Gets the bitrate for video encoding.
SetVideoBitrate | Sets the bitrate for video encoding.
GetVideoTryUseSourceCodec | Gets a boolean value that indicates whether trying to use the source video codec is enabled.
SetVideoTryUseSourceCodec | Sets a boolean value that indicates whether trying to use the source video codec is enabled.
GetAudioCodec | Gets an audio codec.
SetAudioCodec | Sets a video codec.
GetAudioSamplingRate | Gets the sampling rate for audio encoding.
SetAudioSamplingRate | Sets the sampling rate for audio encoding.
GetAudioChannelMode | Gets the audio channel mode for audio encoding.
SetAudioChannelMode | Sets the audio channel mode for audio encoding.
GetAudioBitrate | Gets the bitrate for audio encoding.
SetAudioBitrate | Sets the bitrate for audio encoding.


IWMSDKFormatSWF::GetVideoCodec

The GetVideoCodec method gets a video codec.

Syntax

HRESULT GetVideoCodec(

int* codec

);

Parameters

codec

[out] A video codec. This parameter can take one of the following values:

WMSDK_FLASH_VIDEO_CODEC_SORENSON_H_263

WMSDK_FLASH_VIDEO_CODEC_SCREEN_VIDEO

WMSDK_FLASH_VIDEO_CODEC_ON2_VP6


IWMSDKFormatSWF::SetVideoCodec

The SetVideoCodec method sets a video codec.

Syntax

HRESULT SetVideoCodec(

int codec

);

Parameters

codec

[in] A video codec. This parameter can take one of the following values:

WMSDK_FLASH_VIDEO_CODEC_SORENSON_H_263

WMSDK_FLASH_VIDEO_CODEC_SCREEN_VIDEO

WMSDK_FLASH_VIDEO_CODEC_ON2_VP6


IWMSDKFormatSWF::GetVideoBitrate

The GetVideoBitrate method gets the bitrate for video encoding.

Syntax

HRESULT GetVideoBitrate(

int* bitrate

);

Parameters

bitrate

[out] The bitrate.


IWMSDKFormatSWF::SetVideoBitrate

The SetVideoBitrate method sets the bitrate for video encoding.

Syntax

HRESULT SetVideoBitrate(

int bitrate

);

Parameters

bitrate

[in] The bitrate.


IWMSDKFormatSWF::GetVideoTryUseSourceCodec

The GetVideoIsTryUseSourceCodec method gets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT GetVideoTryUseSourceCodec(

int* isTry

);

Parameters

isTry

[out] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatSWF::SetVideoTryUseSourceCodec

The SetVideoIsTryUseSourceCodec method sets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT SetVideoTryUseSourceCodec(

int isTry

);

Parameters

isTry

[in] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatSWF::GetAudioCodec

The GetAudioCodec method gets an audio codec.

Syntax

HRESULT GetAudioCodec(

int* codec

);

Parameters

codec

[out] An audio codec. This parameter can take one of the following values:

WMSDK_FLASH_AUDIO_CODEC_MP3


IWMSDKFormatSWF::SetAudioCodec

The SetAudioCodec method sets an audio codec.

Syntax

HRESULT SetAudioCodec(

int codec

);

Parameters

codec

[in] An audio codec. This parameter can take one of the following values:

WMSDK_FLASH_AUDIO_CODEC_MP3


IWMSDKFormatSWF::GetAudioSamplingRate

The GetAudioSamplingRate method gets the sampling rate for audio encoding.

Syntax

HRESULT GetAudioSamplingRate(

int* rate

);

Parameters

rate

[out] The sampling rate. This parameter can take one of the following values:

44100

22050

11025


IWMSDKFormatSWF::SetAudioSamplingRate

The SetAudioSamplingRate method sets the sampling rate for audio encoding.

Syntax

HRESULT SetAudioSamplingRate(

int rate

);

Parameters

rate

[in] The sampling rate. This parameter can take one of the following values:

44100

22050

11025


IWMSDKFormatSWF::GetAudioChannelMode

The GetAudioChannelMode method gets the audio channel mode for audio encoding.

Syntax

HRESULT GetAudioChannelMode(

int* mode

);

Parameters

mode

[out] The audio channel mode. This parameter can take one of the following values:

0 - original channel mode

2

1


IWMSDKFormatSWF::SetAudioChannelMode

The SetAudioChannelMode method sets the audio channel mode for audio encoding.

Syntax

HRESULT SetAudioChannelMode(

int mode

);

Parameters

mode

[in] The audio channel mode. This parameter can take one of the following values:

0 - original channel mode

2

1


IWMSDKFormatSWF::GetAudioBitrate

The GetAudioBitrate method gets the bitrate for audio encoding.

Syntax

HRESULT GetAudioBitrate(

int* bitrate

);

Parameters

bitrate

[out] The bitrate.


IWMSDKFormatSWF::SetAudioBitrate

The SetAudioBitrate method sets the bitrate for audio encoding.

Syntax

HRESULT SetAudioBitrate(

int bitrate

);

Parameters

bitrate

[in] The bitrate.


IWMSDKFormatWMV Interface

The IWMSDKFormatWMV interface includes methods and properties that define the parameters of generation of WMV files.

The IWMSDKFormatWMV interface exposes the following methods.

Method | Description
GetVideoCodec | Gets a video codec.
SetVideoCodec | Sets a video codec.
GetVideoTryUseSourceCodec | Gets a boolean value that indicates whether trying to use the source video codec is enabled.
SetVideoTryUseSourceCodec | Sets a boolean value that indicates whether trying to use the source video codec is enabled.
GetVideoEncodingMode | Gets the video encoding mode.
SetVideoEncodingMode | Sets the video encoding mode.
GetVideoBitrate | Gets the bitrate for video encoding.
SetVideoBitrate | Sets the bitrate for video encoding.
GetVideoKeyFrameRate | Gets the key frame rate for video encoding.
SetVideoKeyFrameRate | Sets the key frame rate for video encoding.
GetVideoTwoPassEncoding | Gets a boolean value that indicates whether two-pass encoding is enabled.
SetVideoTwoPassEncoding | Sets a boolean value that indicates whether two-pass encoding is enabled.
GetVideoVBRQuality | Gets the quality for VBR video encoding.
SetVideoVBRQuality | Sets the quality for VBR video encoding.
GetVideoMBRBitrate | Gets the bitrate for MBR video encoding.
SetVideoMBRBitrate | Sets the bitrate for MBR video encoding.
GetAudioCodec | Gets an audio codec.
SetAudioCodec | Sets an audio codec.
GetAudioTryUseSourceCodec | Gets a boolean value that indicates whether trying to use the source audio codec is enabled.
SetAudioTryUseSourceCodec | Sets a boolean value that indicates whether trying to use the source audio codec is enabled.
GetAudioFormat | Gets the format for audio encoding
SetAudioFormat | Sets the format for audio encoding


IWMSDKFormatWMV::GetVideoTryUseSourceCodec

The GetVideoTryUseSourceCodec method gets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT GetVideoTryUseSourceCodec(

int* isTry

);

Parameters

isTry

[out] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatWMV::SetVideoTryUseSourceCodec

The SetVideoTryUseSourceCodec method sets a boolean value that indicates whether trying to use the source video codec is enabled.

Syntax

HRESULT SetVideoTryUseSourceCodec(

int isTry

);

Parameters

isTry

[in] A boolean value that indicates whether trying to use the source video codec is enabled.


IWMSDKFormatWMV::GetVideoEncodingMode

The GetVideoEncodingMode method gets the video encoding mode.

Syntax

HRESULT GetVideoEncodingMode(

int* mode

);

Parameters

mode

[out] The video encoding mode. This parameter can take one of the following values:

WMSDK_WMV_ENCODING_MODE_CBR

WMSDK_WMV_ENCODING_MODE_QUALITY_VBR

WMSDK_WMV_ENCODING_MODE_UNCONSTRAINED_VBR

WMSDK_WMV_ENCODING_MODE_CONSTRAINED_VBR

WMSDK_WMV_ENCODING_MODE_MBR


IWMSDKFormatWMV::SetVideoEncodingMode

The SetVideoEncodingMode method sets the video encoding mode.

Syntax

HRESULT SetVideoEncodingMode(

int mode

);

Parameters

mode

[in] The video encoding mode. This parameter can take one of the following values:

WMSDK_WMV_ENCODING_MODE_CBR

WMSDK_WMV_ENCODING_MODE_QUALITY_VBR

WMSDK_WMV_ENCODING_MODE_UNCONSTRAINED_VBR

WMSDK_WMV_ENCODING_MODE_CONSTRAINED_VBR

WMSDK_WMV_ENCODING_MODE_MBR


IWMSDKFormatWMV::GetVideoCodec

Syntax

HRESULT GetVideoCodec(

LPWSTR codec

);

Parameters

codec

[out]

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

.


IWMSDKFormatWMV::SetVideoCodec

Syntax

HRESULT SetVideoCodec(

LPCWSTR codec

);

Parameters

codec

[in]


IWMSDKFormatWMV::GetVideoBitrate

The GetVideoBitrate method gets the bitrate for video encoding.

Syntax

HRESULT GetVideoBitrate(

int* bitrate

);

Parameters

bitrate

[out] The bitrate.


IWMSDKFormatWMV::SetVideoBitrate

The SetVideoBitrate method sets the bitrate for video encoding.

Syntax

HRESULT SetVideoBitrate(

int bitrate

);

Parameters

bitrate

[in] The bitrate.


IWMSDKFormatWMV::GetVideoKeyFrameRate

The GetVideoKeyFrameRate method gets the key frame rate for video encoding.

Syntax

HRESULT GetVideoKeyFrameRate(

int* rate

);

Parameters

rate

[out] The key frame rate.


IWMSDKFormatWMV::SetVideoKeyFrameRate

The SetVideoKeyFrameRate method sets the key frame rate for video encoding.

Syntax

HRESULT SetVideoKeyFrameRate(

int rate

);

Parameters

rate

[in] The key frame rate.


IWMSDKFormatWMV::GetVideoTwoPassEncoding

The GetVideoTwoPassEncoding method gets a boolean value that indicates whether two-pass encoding is enabled.

Syntax

HRESULT GetVideoTwoPassEncoding(

int* isTwoPass

);

Parameters

isTwoPass

[out] A boolean value that indicates whether two-pass encoding is enabled.


IWMSDKFormatWMV::SetVideoTwoPassEncoding

The SetVideoTwoPassEncoding method sets a boolean value that indicates whether two-pass encoding is enabled.

Syntax

HRESULT SetVideoTwoPassEncoding(

int isTwoPass

);

Parameters

isTwoPass

[in] A boolean value that indicates whether two-pass encoding is enabled.


IWMSDKFormatWMV::GetVideoVBRQuality

The GetVideoVBRQuality method gets the quality for VBR video encoding.

Syntax

HRESULT GetVideoVBRQuality(

int* quality

);

Parameters

quality

[out] The quality.


IWMSDKFormatWMV::SetVideoVBRQuality

The SetVideoVBRQuality method sets the quality for VBR video encoding.

Syntax

HRESULT SetVideoVBRQuality(

int quality

);

Parameters

quality

[in] The quality.


IWMSDKFormatWMV::GetVideoMBRBitrate

The GetVideoMBRBitrate method gets the bitrate for MBR video encoding.

Syntax

HRESULT GetVideoMBRBitrate(

LPWSTR bitrate

);

Parameters

quality

[out] The bitrate.


IWMSDKFormatWMV::SetVideoMBRBitrate

The SetVideoMBRBitrate method sets the bitrate for MBR video encoding.

Syntax

HRESULT SetVideoMBRBitrate(

LPCWSTR bitrate

);

Parameters

quality

[in] The bitrate.


IWMSDKFormatWMV::GetAudioCodec

Syntax

HRESULT GetAudioCodec(

LPWSTR codec

);

Parameters

codec

[out]


IWMSDKFormatWMV::SetAudioCodec

Syntax

HRESULT SetAudioCodec(

LPCWSTR codec

);

Parameters

codec

[in]


IWMSDKFormatWMV::GetAudioTryUseSourceCodec

The GetAudioTryUseSourceCodec method gets a boolean value that indicates whether trying to use the source audio codec is enabled.

Syntax

HRESULT GetAudioTryUseSourceCodec(

int* isTry

);

Parameters

isTry

[out] A boolean value that indicates whether trying to use the source audio codec is enabled.


IWMSDKFormatWMV::SetAudioTryUseSourceCodec

The SetAudioTryUseSourceCodec method sets a boolean value that indicates whether trying to use the source audio codec is enabled.

Syntax

HRESULT SetAudioTryUseSourceCodec(

int isTry

);

Parameters

isTry

[in] A boolean value that indicates whether trying to use the source audio codec is enabled.


IWMSDKFormatWMV::GetAudioFormat

Syntax

HRESULT GetAudioFormat(

LPWSTR format

);

Parameters

format

[out]


IWMSDKFormatWMV::SetAudioFormat

Syntax

HRESULT SetAudioFormat(

LPCWSTR format

);

Parameters

format

[in]


IWMSDKCodecAVIAudio Interface

The IWMSDKCodecAVIAudio interface includes methods and properties that define the parameters of audio stream encoding for AVI files.

The IWMSDKCodecAVIAudio interface exposes the following methods.

Method | Description
GetName | Gets the audio codec name.
GetID | Gets the audio codec ID.
IsWaveFormat | Gets a boolean value that indicates whether the codec has Wave format. ???
IsExtCodec | Gets a boolean value that indicates whether the codec has extended format. ???
EnumFormats | Enumerates the preset formats.


IWMSDKCodecAVIAudio::GetName

The GetName method gets the audio codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Audio codec name.


IWMSDKCodecAVIAudio::GetID

The GetID method gets the audio codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Audio codec ID.


IWMSDKCodecAVIAudio::IsWaveFormat

The IsWaveFormat method gets a boolean value that indicates whether the codec has Wave format. ???

Syntax

HRESULT IsWaveFormat();


IWMSDKCodecAVIAudio::IsExtCodec

The IsExtCodec method.

Syntax

HRESULT IsExtCodec();


IWMSDKCodecAVIAudio::EnumFormats

The EnumFormats method enumerates the preset formats.

Syntax

HRESULT EnumFormats(

int* pCallback,

int* pData

);

Parameters

pCallback

[out] A pointer to a callback function. The function has format HRESULT CallbackFunction(LPCSTR name, int count, int* pData).

pData

[out] A pointer to arbitrary user's data.


IWMSDKCodecAVIVideo Interface

The IWMSDKCodecAVIVideo interface includes methods and properties that define the parameters of video stream encoding for AVI files.

The IWMSDKCodecAVIVideo interface exposes the following methods.

Method | Description
GetName | Gets the video codec name.
GetID | Gets the audio codec ID.
IsAdv | Gets a boolean value that indicates whether ???
IsMultyPass | Gets a boolean value that indicates whether ???
IsKeyFrame | Gets a boolean value that indicates whether ???
IsQuality | Gets a boolean value that indicates whether ???
IsBitrate | Gets a boolean value that indicates whether ???
ShowDialog | Shows the codec settings dialog.


IWMSDKCodecAVIVideo::GetName

The GetName method gets the video codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Video codec name.


IWMSDKCodecAVIVideo::GetID

The GetID method gets the video codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Video codec ID.


IWMSDKCodecAVIVideo::IsAdv

Syntax

HRESULT IsAdv();


IWMSDKCodecAVIVideo::IsMultyPass

Syntax

HRESULT IsMultyPass();


IWMSDKCodecAVIVideo::IsKeyFrame

Syntax

HRESULT IsKeyFrame();


IWMSDKCodecAVIVideo::IsQuality

Syntax

HRESULT IsQuality();


IWMSDKCodecAVIVideo::IsBitrate

Syntax

HRESULT IsBitrate();


IWMSDKCodecAVIVideo::ShowDialog

The ShowDialog method shows the codec settings dialog.

Syntax

HRESULT ShowDialog();


IWMSDKCodecFLVAudio Interface

The IWMSDKCodecFLVAudio interface includes methods and properties that define the parameters of audio stream encoding for FLV files.

The IWMSDKCodecFLVAudio interface exposes the following methods.

Method | Description
GetName | Gets the audio codec name.
GetID | Gets the audio codec ID.


IWMSDKCodecFLVAudio::GetName

The GetName method gets the audio codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Audio codec name.


IWMSDKCodecFLVAudio::GetID

The GetID method gets the audio codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Audio codec ID.


IWMSDKCodecFLVVideo Interface

The IWMSDKCodecFLVVideo interface includes methods and properties that define the parameters of video stream encoding for FLV files.

The IWMSDKCodecFLVVideo interface exposes the following methods.

Method | Description
GetName | Gets the video codec name.
GetID | Gets the video codec ID.


IWMSDKCodecFLVVideo::GetName

The GetName method gets the video codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Video codec name.


IWMSDKCodecFLVVideo::GetID

The GetID method gets the video codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Video codec ID.


IWMSDKCodecMOVAudio Interface

The IWMSDKCodecMOVAudio interface includes methods and properties that define the parameters of audio stream encoding for MOV files.

The IWMSDKCodecMOVAudio interface exposes the following methods.

Method | Description
GetName | Gets the audio codec name.
GetID | Gets the audio codec ID.
ShowDialog | Shows the codec settings dialog.
IsDialog |


IWMSDKCodecMOVAudio::GetName

The GetName method gets the audio codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Audio codec name.


IWMSDKCodecMOVAudio::GetID

The GetID method gets the audio codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Audio codec ID.


IWMSDKCodecMOVAudio::ShowDialog

The ShowDialog method shows the codec settings dialog.

Syntax

HRESULT ShowDialog();


IWMSDKCodecMOVAudio::IsDialog

Syntax

HRESULT IsDialog();


IWMSDKCodecMOVVideo Interface

The IWMSDKCodecMOVVideo interface includes methods and properties that define the parameters of video stream encoding for MOV files.

The IWMSDKCodecMOVVideo interface exposes the following methods.

Method | Description
GetName | Gets the video codec name.
GetID | Gets the video codec ID.


IWMSDKCodecMOVVideo::GetName

The GetName method gets the video codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Video codec name.


IWMSDKCodecMOVVideo::GetID

The GetID method gets the video codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Video codec ID.


IWMSDKCodecMPEGAudio Interface

The IWMSDKCodecMPEGAudio interface includes methods and properties that define the parameters of audio stream encoding for MPEG files.

The IWMSDKCodecMPEGAudio interface exposes the following methods.

Method | Description
GetName | Gets the audio codec name.
GetID | Gets the audio codec ID.


IWMSDKCodecMPEGAudio::GetName

The GetName method gets the audio codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Audio codec name.


IWMSDKCodecMPEGAudio::GetID

The GetID method gets the audio codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Audio codec ID.


IWMSDKCodecMPEGVideo Interface

The IWMSDKCodecMPEGVideo interface includes methods and properties that define the parameters of video stream encoding for MPEG files.

The IWMSDKCodecMPEGVideo interface exposes the following methods.

Method | Description
GetName | Gets the video codec name.
GetID | Gets the video codec ID.


IWMSDKCodecMPEGVideo::GetName

The GetName method gets the video codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Video codec name.


IWMSDKCodecMPEGVideo::GetID

The GetID method gets the video codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Video codec ID.


IWMSDKCodecSWFAudio Interface

The IWMSDKCodecSWFAudio interface includes methods and properties that define the parameters of audio stream encoding for SWF files.

The IWMSDKCodecSWFAudio interface exposes the following methods.

Method | Description
GetName | Gets the audio codec name.
GetID | Gets the audio codec ID.


IWMSDKCodecSWFAudio::GetName

The GetName method gets the audio codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Audio codec name.


IWMSDKCodecSWFAudio::GetID

The GetID method gets the audio codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Audio codec ID.


IWMSDKCodecSWFVideo Interface

The IWMSDKCodecSWFVideo interface includes methods and properties that define the parameters of video stream encoding for SWF files.

The IWMSDKCodecSWFVideo interface exposes the following methods.

Method | Description
GetName | Gets the video codec name.
GetID | Gets the video codec ID.


IWMSDKCodecSWFVideo::GetName

The GetName method gets the video codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Video codec name.


IWMSDKCodecSWFVideo::GetID

The GetID method gets the video codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Video codec ID.


IWMSDKCodecWMVAudio Interface

The IWMSDKCodecWMVAudio interface includes methods and properties that define the parameters of audio stream encoding for WMV files.

The IWMSDKCodecWMVAudio interface exposes the following methods.

Method | Description
GetName | Gets the audio codec name.
GetID | Gets the audio codec ID.
EnumFormats | Enumerates the preset formats.


IWMSDKCodecWMVAudio::GetName

The GetName method gets the audio codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Audio codec name.


IWMSDKCodecWMVAudio::GetID

The GetID method gets the audio codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Audio codec ID.


IWMSDKCodecWMVAudio::EnumFormats

The EnumFormats method enumerates the preset formats.

Syntax

HRESULT EnumFormats(

int* pCallback

int* pData

);

Parameters

pCallback

[out] A pointer to a callback function. The function has format HRESULT CallbackFunction(LPCSTR name, int count, int* pData).

pData

[out] A pointer to arbitrary user's data.


IWMSDKCodecWMVVideo Interface

The IWMSDKCodecWMVVideo interface includes methods and properties that define the parameters of video stream encoding for WMV files.

The IWMSDKCodecWMVVideo interface exposes the following methods.

Method | Description
GetName | Gets the video codec name.
GetID | Gets the video codec ID.


IWMSDKCodecWMVVideo::GetName

The GetName method gets the video codec name.

Syntax

HRESULT GetName(

LPWSTR name

);

Parameters

name

[out] Video codec name.


IWMSDKCodecWMVVideo::GetID

The GetID method gets the video codec ID.

Syntax

HRESULT GetID(

int* id

);

Parameters

id

[out] Video codec ID.


IWMSDKStream Interface

The IWMSDKStream interface is an aggregate interface for all dynamic effects.

The IWMSDKStream interface exposes the following methods.

Method | Description
GetType | Gets the type of a dynamic effect.
GetTime | Gets the action time for a dynamic effect.
SetTime | Sets the action time for a dynamic effect.


IWMSDKStream::GetTime

The GetTime method gets the action time for a dynamic effect.

Syntax

HRESULT GetTime(

float* startTime,

float* endTime,

int* relative

);

Parameters

startTime

[out] The start point of the action time.

endTime

[out] The end point of the action time.

relative

[out] A value that indicates whether the start and end points of the action time are set relatively or absolutely. This parameter can take one of the following values:

WMSDK_TIME_ABSOLUTE

WMSDK_TIME_RELATIVE_TO_START - the end point is set relative to the start point

WMSDK_TIME_RELATIVE_TO_END - the start point is set relative to the end point


IWMSDKStream::SetTime

The SetTime method sets the action time for a dynamic effect.

Syntax

HRESULT SetTime(

float startTime,

float endTime,

int relative

);

Parameters

startTime

[in] The start point of the action time.

endTime

[in] The end point of the action time.

relative

[in] A value that indicates whether the start and end points of the action time are set relatively or absolutely. This parameter can take one of the following values:

WMSDK_TIME_ABSOLUTE

WMSDK_TIME_RELATIVE_TO_START - the end point is set relative to the start point

WMSDK_TIME_RELATIVE_TO_END - the start point is set relative to the end point


IWMSDKStream::GetType

The GetType method gets the type of a dynamic effect.

Syntax

HRESULT GetType(

int* type

);

Parameters

type

[out] The type of a dynamic effect. This parameter can take one of the following values:

WMSDK_DYNAMIC_EFFECT_FADE

WMSDK_DYNAMIC_EFFECT_PARAM_CHANGE

WMSDK_DYNAMIC_EFFECT_MOTION

WMSDK_DYNAMIC_EFFECT_KEYPOINT


IWMSDKWatermarks Interface

The IWMSDKWatermarks interface provides methods and properties for work with collection of watermarks.

The IWMSDKWatermarks interface exposes the following methods.

Method | Description
Count | Gets the number of watermarks.
Item | Retrieves a pointer to the ??? as provided by index.
AddWatermark | Adds a watermark.
Delete | Deletes a watermark.


IWMSDKWatermarks::Count

The Count method gets the number of watermarks.

Syntax

HRESULT Count(

int* count

);

Parameters

count

[out] The number of watermarks.


IWMSDKWatermarks::Item

The Item method retrieves a pointer to ??? as provided by index.

Syntax

HRESULT Item(

int n,

IUnknown** item

);

Parameters

n

[in] Watermark number.

item

[out] A pointer to ???.


IWMSDKWatermarks::AddWatermark

The AddWatermark method adds a watermark.

Syntax

HRESULT AddWatermark(

int type,

IUnknown** pWatermark = NULL

);

Parameters

A pointer to a file object; NULL if not needed.

type

[in] The type of a watermark. This parameter can take one of the following values:

WMSDK_WATERMARK_IMAGE

WMSDK_WATERMARK_TEXT

WMSDK_WATERMARK_RECT

WMSDK_WATERMARK_BLUR_AREA

WMSDK_WATERMARK_VIDEO

WMSDK_WATERMARK_CLEAN

WMSDK_WATERMARK_CREEPING_LINE

WMSDK_WATERMARK_AUDIO

WMSDK_WATERMARK_ELLIPSE

WMSDK_WATERMARK_DVD_SUBTITLE

pWatermark

[out] A pointer to a watermark object; NULL if not needed.


IWMSDKWatermarks::Delete

The Delete method deletes a watermark.

Syntax

HRESULT Delete(

int n

);

Parameters

n

[in] Watermark number.


IWMSDKWatermarkAudio Interface

The IWMSDKWatermarkAudio interface includes methods and properties that configure the parameters of putting audio files onto the audio stream.

The IWMSDKWatermarkAudio interface exposes the following methods.

Method | Description
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetPath | Gets the path to an audio file.
SetPath | Sets the path to an audio file.
GetRepeatMode | Gets the repetition mode for an audio watermark.
SetRepeatMode | Sets the repetition mode for an audio watermark.
GetVolume | Gets the volume for an audio watermark.
SetVolume | Sets the volume for an audio watermark.


IWMSDKWatermarkAudio::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkAudio::GetPath

The GetPath method gets the path to an audio file to be used as audio watermark.

Syntax

HRESULT GetPath(

LPWSTR path

);

Parameters

path

[out] The path to an audio file.


IWMSDKWatermarkAudio::SetPath

The SetPath method sets the path to an audio file to be used as audio watermark.

Syntax

HRESULT SetPath(

LPCWSTR path

);

Parameters

path

[in] The path to an audio file.


IWMSDKWatermarkAudio::GetRepeatMode

The GetRepeatMode method gets the repetition mode for an audio watermark.

Syntax

HRESULT GetRepeatMode(

int* repeatMode

);

Parameters

repeatMode

[out] The repetition mode. This parameter can take one of the following values:

WMSDK_REPEAT_NONE

WMSDK_REPEAT_INFINITE


IWMSDKWatermarkAudio::SetRepeatMode

The SetRepeatMode method sets the repetition mode for an audio watermark.

Syntax

HRESULT SetRepeatMode(

int repeatMode

);

Parameters

repeatMode

[in] The repetition mode. This parameter can take one of the following values:

WMSDK_REPEAT_NONE

WMSDK_REPEAT_INFINITE


IWMSDKWatermarkAudio::GetVolume

The GetVolume method gets the volume for an audio watermark.

Syntax

HRESULT GetVolume(

int* volume

);

Parameters

volume

[out] The volume.


IWMSDKWatermarkAudio::SetVolume

The SetVolume method sets the volume for an audio watermark.

Syntax

HRESULT SetVolume(

int volume

);

Parameters

volume

[in] The volume.


IWMSDKWatermarkBlurArea Interface

The IWMSDKWatermarkBlurArea interface includes methods and properties that configure the parameters of blurring areas of an image.

The IWMSDKWatermarkBlurArea interface exposes the following methods.

Method | Description
GetPosition | Gets the position of an area to be blurred.
SetPosition | Sets the position of an area to be blurred.
GetPositionType | Gets a point relative to which the position of a blur area is specified.
SetPositionType | Sets a point relative to which the position of a blur area is specified.
GetDrawOrder | Gets the drawing order for a blur area.
SetDrawOrder | Sets the drawing order for a blur area.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetTransparency | Gets the transparency for a blur area.
SetTransparency | Sets the transparency for a blur area.
GetWidth | Gets the blur area width.
SetWidth | Sets the blur area width.
GetHeight | Gets the blur area height.
SetHeight | Sets the blur area height.
GetRaidus | Gets the blur strength for a blur area.
SetRaidus | Sets the blur strength for a blur area.
GetShape | Gets the blur area shape.
SetShape | Sets the blur area shape.


IWMSDKWatermarkBlurArea::GetPosition

The GetPosition method gets the position of an area to be blurred relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkBlurArea::SetPosition

The SetPosition method sets the position of an area to be blurred relative to a preset point.

Syntax

HRESULT SetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkBlurArea::GetPositionType

The GetPositionType method gets a point relative to which the position of a blur area is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the position of a blur area watermark is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkBlurArea::SetPositionType

The SetPositionType method sets a point relative to which the position of a blur area is specified.

Syntax

HRESULT SetPositionType(

int type

);

Parameters

type

[in] A point relative to which the position of a blur area watermark is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkBlurArea::GetDrawOrder

The GetDrawOrder method gets the drawing order for a blur area.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkBlurArea::SetDrawOrder

The SetDrawOrder method sets the drawing order for a blur area.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkBlurArea::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkBlurArea::GetTransparency

The GetTransparency method gets the transparency for a blur area.

Syntax

HRESULT GetTransparency(

int* transparency

);

Parameters

transparency

[out] The transparency.


IWMSDKWatermarkBlurArea::SetTransparency

The SetTransparency method sets the transparency for a blur area.

Syntax

HRESULT SetTransparency(

int transparency

);

Parameters

transparency

[in] The transparency.


IWMSDKWatermarkBlurArea::GetWidth

The GetWidth method gets the blur area width.

Syntax

HRESULT GetWidth(

int* width

);

Parameters

width

[out] The width.


IWMSDKWatermarkBlurArea::SetWidth

The SetWidth method sets the blur area width.

Syntax

HRESULT SetWidth(

int width

);

Parameters

width

[in] The width.


IWMSDKWatermarkBlurArea::GetHeight

The GetHeight method gets the blur area height.

Syntax

HRESULT GetHeight(

int* height

);

Parameters

height

[out] The height.


IWMSDKWatermarkBlurArea::SetHeight

The SetHeight method sets the blur area height.

Syntax

HRESULT SetHeight(

int height

);

Parameters

height

[in] The height.


IWMSDKWatermarkBlurArea::GetRadius

The GetRadius method gets the blur strength for a blur area.

Syntax

HRESULT GetRadius(

int* radius

);

Parameters

radius

[out] The blur strength.


IWMSDKWatermarkBlurArea::SetRadius

The SetRadius method sets the blur strength for a blur area.

Syntax

HRESULT SetRadius(

int radius

);

Parameters

radius

[in] The blur strength.


IWMSDKWatermarkBlurArea::GetShape

The GetShape method gets the blur area shape.

Syntax

HRESULT GetShape(

int* shape

);

Parameters

shape

[out] The shape. This parameter can take one of the following values:

WMSDK_BLUR_SHAPE_RECT

WMSDK_BLUR_SHAPE_OVAL


IWMSDKWatermarkBlurArea::SetShape

The SetShape method sets the blur area shape.

Syntax

HRESULT SetShape(

int shape

);

Parameters

shape

[in] The shape. This parameter can take one of the following values:

WMSDK_BLUR_SHAPE_RECT

WMSDK_BLUR_SHAPE_OVAL


IWMSDKWatermarkClean Interface

The IWMSDKWatermarkClean interface includes methods and properties that configure the parameters of erasing static objects from an image.

The IWMSDKWatermarkClean interface exposes the following methods.

Method | Description
GetPosition | Gets the position of an area to be erased.
SetPosition | Sets the position of an area to be erased.
GetPositionType | Gets a point relative to which the position of an area to be erased is specified.
SetPositionType | Sets a point relative to which the position of an area to be erased is specified.
GetDrawOrder | Gets the drawing order for an area to be erased.
SetDrawOrder | Sets the drawing order for an area to be erased.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetWidth | Gets the width of an area to be erased.
SetWidth | Sets the width of an area to be erased.
GetHeight | Gets the height of an area to be erased.
SetHeight | Sets the height of an area to be erased.
GetDetectMask | Gets the mask for an area to be erased. ???
SetDetectMask | Sets the mask for an area to be erased. ???
GetTime | Gets the time the preprocessing takes for detection of the mask.
SetTime | Sets the time the preprocessing takes for detection of the mask.
GetMaskColor | Gets the color to be used as the mask.
Set MaskColor | Sets the color to be used as the mask.
GetColorRange | Gets the color tolerance for the mask.
SetColorRange | Sets the color tolerance for the mask.


IWMSDKWatermarkClean::GetPosition

The GetPosition method gets the position of an area to be erased relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkClean::SetPosition

The SetPosition method sets the position of an area to be erased relative to a preset point.

Syntax

HRESULT SetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkClean::GetPositionType

The GetPositionType method gets a point relative to which the position of an area to be erased is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the position of an area to be erased is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkClean::SetPositionType

The SetPositionType method sets a point relative to which the position of an area to be erased is specified.

Syntax

HRESULT SetPositionType(

int type

);

Parameters

type

[in] A point relative to which the position of an area to be erased is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkClean::GetDrawOrder

The GetDrawOrder method gets the drawing order for an area to be erased.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkClean::SetDrawOrder

The SetDrawOrder method sets the drawing order for an area to be erased.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkClean::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkClean::GetWidth

The GetWidth method gets the width of an area to be erased.

Syntax

HRESULT GetWidth(

int* width

);

Parameters

width

[out] The width.


IWMSDKWatermarkClean::SetWidth

The SetWidth method sets the width of an area to be erased.

Syntax

HRESULT SetWidth(

int width

);

Parameters

width

[in] The width.


IWMSDKWatermarkClean::GetHeight

The GetHeight method gets the height of an area to be erased.

Syntax

HRESULT GetHeight(

int* height

);

Parameters

height

[out] The height.


IWMSDKWatermarkClean::SetHeight

The SetHeight method sets the height of an area to be erased.

Syntax

HRESULT SetHeight(

int height

);

Parameters

height

[in] The height.


IWMSDKWatermarkClean::GetDetectMask

The GetDetectMask method gets the mask for an area to be erased. ???

Syntax

HRESULT GetDetectMask(

int* mask,

int* maskType

);

Parameters

mask

[out] ??? This parameter can take one of the following values:

WMSDK_DETECT_MASK_PREPROCESS

WMSDK_DETECT_MASK_COLOR

WMSDK_DETECT_MASK_NONE

maskType

[out] ??? This parameter can take one of the following values:

WMSDK_DETECT_MASK_RANGE_ALL

WMSDK_DETECT_MASK_RANGE_TIME


IWMSDKWatermarkClean::SetDetectMask

The SetDetectMask method sets the mask for an area to be erased. ???

Syntax

HRESULT SetDetectMask(

int mask,

int maskType

);

Parameters

mask

[out] ??? This parameter can take one of the following values:

WMSDK_DETECT_MASK_PREPROCESS

WMSDK_DETECT_MASK_COLOR

WMSDK_DETECT_MASK_NONE

maskType

[out] ??? This parameter can take one of the following values:

WMSDK_DETECT_MASK_RANGE_ALL

WMSDK_DETECT_MASK_RANGE_TIME


IWMSDKWatermarkClean::GetTime

The GetTime method gets the time the preprocessing takes for detection of the mask for an area to be erased.

Syntax

HRESULT GetTime(

LPWSTR time

);

Parameters

time

[out] The time.


IWMSDKWatermarkClean::SetTime

The SetTime method sets the time the preprocessing takes for detection of the mask for an area to be erased.

Syntax

HRESULT SetTime(

LPCWSTR time

);

Parameters

time

[in] The time.


IWMSDKWatermarkClean::GetMaskColor

The GetMaskColor method gets the color to be used as the mask for an area to be erased.

Syntax

HRESULT GetMaskColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKWatermarkClean::SetMaskColor

The SetMaskColor method sets the color to be used as the mask for an area to be erased.

Syntax

HRESULT SetMaskColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKWatermarkClean::GetColorRange

The GetColorRange method gets the color tolerance for the mask.

Syntax

HRESULT GetColorRange(

int* range

);

Parameters

range

[out] The color tolerance.


IWMSDKWatermarkClean::SetColorRange

The SetColorRange method sets the color tolerance for the mask.

Syntax

HRESULT SetColorRange(

int range

);

Parameters

range

[in] The color tolerance.


IWMSDKWatermarkDVDSubtitle Interface

The IWMSDKWatermarkDVDSubtitle interface includes methods and properties that configure the parameters of DVD subtitles onto an image.

The IWMSDKWatermarkDVDSubtitle interface exposes the following methods.

Method | Description
GetPosition | Gets the position of a DVD subtitle.
SetPosition | Sets the position of a DVD subtitle.
GetPositionType | Gets a point relative to which the position of a DVD subtitle is specified.
SetPositionType | Sets a point relative to which the position of a DVD subtitle is specified.
GetDrawOrder | Gets the drawing order for a DVD subtitle.
SetDrawOrder | Sets the drawing order for a DVD subtitle.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetEffects | Retrieves a pointer to the IWMSDKEffects interface.
GetStreamID | Gets the DVD subtitle ID.
SetStreamID | Sets the DVD subtitle ID.
GetAngle | Gets the rotation angle for a DVD subtitle.
SetAngle | Sets the rotation angle for a DVD subtitle.
GetResize | Gets the zoom factor for a DVD subtitle.
SetResize | Sets the zoom factor for a DVD subtitle.
GetTransparency | Gets the transparency for a DVD subtitle.
SetTransparency | Sets the transparency for a DVD subtitle.
GetFillType | Gets the fill type for a DVD subtitle.
SetFillType | Sets the fill type for a DVD subtitle.
GetColor | Gets the color for a DVD subtitle.
SetColor | Sets the color for a DVD subtitle.
GetGradient | Retrieves a pointer to the IWMSDKGradient interface.
GetPattern | Gets the path to a pattern source file.
SetPattern | Sets the path to a pattern source file.


IWMSDKWatermarkDVDSubtitle::GetPosition

The GetPosition method gets the position of a DVD subtitle relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkDVDSubtitle::SetPosition

The SetPosition method sets the position of a DVD subtitle relative to a preset point.

Syntax

HRESULT SetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkDVDSubtitle::GetPositionType

The GetPositionType method gets a point relative to which the position of a DVD subtitle is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the position of a DVD subtitle is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkDVDSubtitle::SetPositionType

The SetPositionType method sets a point relative to which the position of a DVD subtitle is specified.

Syntax

HRESULT SetPositionType(

int type

);

Parameters

type

[in] A point relative to which the position of a DVD subtitle is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkDVDSubtitle::GetDrawOrder

The GetDrawOrder method gets the drawing order for a DVD subtitle.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkDVDSubtitle::SetDrawOrder

The SetDrawOrder method sets the drawing order for a DVD subtitle.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkDVDSubtitle::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkDVDSubtitle::GetEffects

The GetEffects method retrieves a pointer to the IWMSDKEffects interface.

Syntax

HRESULT GetEffects(

IWMSDKEffects** pEffects

);

Parameters

pEffects

[out] A pointer to the IWMSDKEffects interface.


IWMSDKWatermarkDVDSubtitle::GetStreamID

The GetStreamID method gets the DVD subtitle ID.

Syntax

HRESULT GetStreamID(

int* id

);

Parameters

id

[out] The DVD subtitle ID. This parameter can take integer values from 1 to 32.


IWMSDKWatermarkDVDSubtitle::SetStreamID

The SetStreamID method sets the DVD subtitle ID.

Syntax

HRESULT SetStreamID(

int id

);

Parameters

id

[in] The DVD subtitle ID. This parameter can take integer values from 1 to 32.


IWMSDKWatermarkDVDSubtitle::GetAngle

The GetAngle method gets the rotation angle for a DVD subtitle.

Syntax

HRESULT GetAngle(

int* angle

);

Parameters

angle

[out] The rotation angle.


IWMSDKWatermarkDVDSubtitle::SetAngle

The SetAngle method sets the rotation angle for a DVD subtitle.

Syntax

HRESULT SetAngle(

int angle

);

Parameters

angle

[in] The rotation angle.


IWMSDKWatermarkDVDSubtitle::GetResize

The GetResize method gets the zoom factor for a DVD subtitle.

Syntax

HRESULT GetResize(

LPWSTR resize

);

Parameters

resize

[out] The zoom factor.


IWMSDKWatermarkDVDSubtitle::SetResize

The SetResize method sets the zoom factor for a DVD subtitle.

Syntax

HRESULT SetResize(

LPCWSTR resize

);

Parameters

resize

[in] The zoom factor.


IWMSDKWatermarkDVDSubtitle::GetTransparency

The GetTransparency method gets the transparency for a DVD subtitle.

Syntax

HRESULT GetTransparency(

int* transparency

);

Parameters

transparency

[out] The transparency.


IWMSDKWatermarkDVDSubtitle::SetTransparency

The SetTransparency method sets the transparency for a DVD subtitle.

Syntax

HRESULT SetTransparency(

int transparency

);

Parameters

transparency

[in] The transparency.


IWMSDKWatermarkDVDSubtitle::GetFillType

The GetFillType method gets the fill type for a DVD subtitle.

Syntax

HRESULT GetFillType(

int* type

);

Parameters

type

[out] The fill type.


IWMSDKWatermarkDVDSubtitle::SetFillType

The SetFillType method sets the fill type for a DVD subtitle.

Syntax

HRESULT SetFillType(

int type

);

Parameters

type

[in] The fill type.


IWMSDKWatermarkDVDSubtitle::GetColor

The GetColor method gets the color for a DVD subtitle.

Syntax

HRESULT GetColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKWatermarkDVDSubtitle::SetColor

The SetColor method sets the color for a DVD subtitle.

Syntax

HRESULT SetColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKWatermarkDVDSubtitle::GetGradient

The GetGradient method retrieves a pointer to the IWMSDKGradient interface.

Syntax

HRESULT GetGradient(

IWMSDKGradient** pGradient

);

Parameters

pGradient

[out] A pointer to the IWMSDKGradient interface.


IWMSDKWatermarkDVDSubtitle::GetPattern

The GetPattern method gets the path to a pattern source file to be used for filling a DVD subtitle.

Syntax

HRESULT GetPattern(

LPWSTR path

);

Parameters

path

[out] The path to a pattern source file.


IWMSDKWatermarkDVDSubtitle::SetPattern

The SetPattern method sets the path to a pattern source file to be used for filling a DVD subtitle.

Syntax

HRESULT SetPattern(

LPCWSTR path

);

Parameters

path

[in] The path to a pattern source file.


IWMSDKWatermark Interface

The IWMSDKWatermark interface is an aggregate interface for all watermark objects.

The IWMSDKWatermark interface exposes the following methods.

Method | Description
GetType | Gets the type of a watermark.


IWMSDKWatermark::GetType

The GetType method gets the type of a watermark.

Syntax

HRESULT GetType(

int* type

);

Parameters

type

[out] The type of a watermark. This parameter can take one of the following values:

WMSDK_WATERMARK_IMAGE

WMSDK_WATERMARK_TEXT

WMSDK_WATERMARK_RECT

WMSDK_WATERMARK_BLUR_AREA

WMSDK_WATERMARK_VIDEO

WMSDK_WATERMARK_CLEAN

WMSDK_WATERMARK_CREEPING_LINE

WMSDK_WATERMARK_AUDIO

WMSDK_WATERMARK_ELLIPSE

WMSDK_WATERMARK_DVD_SUBTITLE


IWMSDKWatermarkCreepingLine Interface

The IWMSDKWatermarkCreepingLine interface includes methods and properties that configure the parameters of putting creeping lines onto an image.

The IWMSDKWatermarkCreepingLine interface exposes the following methods.

Method | Description
GetPosition | Gets the initial position of a creeping line.
SetPosition | Sets the initial position of a creeping line.
GetPositionType | Gets a point relative to which the initial position of a creeping line is specified.
SetPositionType | Sets a point relative to which the initial position of a creeping line is specified.
GetDrawOrder | Gets the drawing order for a creeping line.
SetDrawOrder | Sets the drawing order for a creeping line.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetEffects | Retrieves a pointer to the IWMSDKEffects interface.
GetText | Gets the text for a creeping line.
SetText | Sets the text for a creeping line.
GetTransparency | Gets the transparency for a creeping line.
SetTransparency | Sets the transparency for a creeping line.
GetFont | Gets the font for a creeping line.
SetFont | Sets the font for a creeping line.
GetColor | Gets the color for a creeping line.
SetColor | Sets the color for a creeping line.
GetBackColor | Gets the background color for a creeping line.
SetBackColor | Sets the background color for a creeping line.
GetAlignPosition | Gets the horizontal alignment for a creeping line.
SetAlignPosition | Sets the horizontal alignment for a creeping line.
GetIsTextTransparent | Gets a boolean value that indicates whether transparency of the background of a creeping line is enabled.
SetIsTextTransparent | Sets a boolean value that indicates whether transparency of the background of a creeping line is enabled.
GetFillType | Gets the fill type for a creeping line.
SetFillType | Sets the fill type for a creeping line.
GetGradient | Retrieves a pointer to the IWMSDKGradient interface.
GetPattern | Gets the path to a pattern source file.
SetPattern | Sets the path to a pattern source file.
GetMotionMode | Gets the motion direction for a creeping line.
SetMotionMode | Sets the motion direction for a creeping line.
GetRepeatMode | Gets the repetition mode for a creeping line.
SetRepeatMode | Sets the repetition mode for a creeping line.
GetDuration | Gets the time that one pass of a creeping line takes.
SetDuration | Sets the time that one pass of a creeping line takes.
GetDelay | Gets the time between two passes of a creeping line.
SetDelay | Sets the time between two passes of a creeping line.


IWMSDKWatermarkCreepingLine::GetPosition

The GetPosition method gets the initial position of a creeping line relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkCreepingLine::SetPosition

The SetPosition method sets the initial position of a creeping line relative to a preset point.

Syntax

HRESULT SetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkCreepingLine::GetPositionType

The GetPositionType method gets a point relative to which the initial position of a creeping line is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the initial position of a creeping line is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkCreepingLine::SetPositionType

The SetPositionType method sets a point relative to which the initial position of a creeping line is specified.

Syntax

HRESULT GetPositionType(

int type

);

Parameters

type

[in] A point relative to which the initial position of a creeping line is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkCreepingLine::GetDrawOrder

The GetDrawOrder method gets the drawing order for a creeping line.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkCreepingLine::SetDrawOrder

The SetDrawOrder method sets the drawing order for a creeping line.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkCreepingLine::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkCreepingLine::GetEffects

The GetEffects method retrieves a pointer to the IWMSDKEffects interface.

Syntax

HRESULT GetEffects(

IWMSDKEffects** pEffects

);

Parameters

pEffects

[out] A pointer to the IWMSDKEffects interface.


IWMSDKWatermarkCreepingLine::GetText

The GetText method gets the text for a creeping line.

Syntax

HRESULT GetText(

LPWSTR text

);

Parameters

text

[out] The text.


IWMSDKWatermarkCreepingLine::SetText

The SetText method sets the text for a creeping line.

Syntax

HRESULT SetText(

LPCWSTR text

);

Parameters

text

[in] The text.


IWMSDKWatermarkCreepingLine::GetTransparency

The GetTransparency method gets the transparency for a creeping line.

Syntax

HRESULT GetTransparency(

int* transparency

);

Parameters

transparency

[out] The transparency.


IWMSDKWatermarkCreepingLine::SetTransparency

The SetTransparency method sets the transparency for a creeping line.

Syntax

HRESULT SetTransparency(

int transparency

);

Parameters

transparency

[in] The transparency.


IWMSDKWatermarkCreepingLine::GetFont

The GetFont method gets the font for a creeping line.

Syntax

HRESULT GetFont(

int* pLogFont

);

Parameters

pLogFont

[out] A pointer to the LOGFONT structure.

Необходимо выполнить пересчет параметра pLogFont->lfHeight в условные единицы при установке и в дюймы при получении (перед прорисовкой). См. MSDN, LOGFONT structure.


IWMSDKWatermarkCreepingLine::SetFont

The SetFont method sets the font for a creeping line.

Syntax

HRESULT SetFont(

int pLogFont

);

Parameters

pLogFont

[in] A pointer to the LOGFONT structure.

Необходимо выполнить пересчет параметра pLogFont->lfHeight в условные единицы при установке и в дюймы при получении (перед прорисовкой). См. MSDN, LOGFONT structure.


IWMSDKWatermarkCreepingLine::GetColor

The GetColor method gets the color for a creeping line.

Syntax

HRESULT GetColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKWatermarkCreepingLine::SetColor

The SetColor method sets the color for a creeping line.

Syntax

HRESULT SetColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKWatermarkCreepingLine::GetBackColor

The GetBackColor method gets the background color for a creeping line.

Syntax

HRESULT GetBackColor(

DWORD* cr

);

Parameters

cr

[out] The background color.


IWMSDKWatermarkCreepingLine::SetBackColor

The SetBackColor method sets the background color for a creeping line.

Syntax

HRESULT SetBackColor(

DWORD cr

);

Parameters

cr

[in] The background color.


IWMSDKWatermarkCreepingLine::GetAlignPosition

The GetAlignPosition method gets the horizontal alignment for a creeping line.

Syntax

HRESULT GetAlignPosition(

int* pos

);

Parameters

pos

[out] The horizontal alignment. This parameter can take one of the following values:

WMSDK_ALIGN_LEFT

WMSDK_ALIGN_CENTER

WMSDK_ALIGN_RIGHT


IWMSDKWatermarkCreepingLine::SetAlignPosition

The SetAlignPosition method sets the horizontal alignment for a creeping line.

Syntax

HRESULT SetAlignPosition(

int pos

);

Parameters

pos

[in] The horizontal alignment. This parameter can take one of the following values:

WMSDK_ALIGN_LEFT

WMSDK_ALIGN_CENTER

WMSDK_ALIGN_RIGHT


IWMSDKWatermarkCreepingLine::GetIsTextTransparent

The GetIsTextTransparent method gets a boolean value that indicates whether transparency of the background of a creeping line is enabled.

Syntax

HRESULT GetIsTextTransparent(

int* transparent

);

Parameters

transparent

[out] A boolean value that indicates whether transparency of the background of a creeping line is enabled.


IWMSDKWatermarkCreepingLine::SetIsTextTransparent

The SetIsTextTransparent method sets a boolean value that indicates whether transparency of the background of a creeping line is enabled.

Syntax

HRESULT SetIsTextTransparent(

int transparent

);

Parameters

transparent

[in] A boolean value that indicates whether transparency of the background of a creeping line is enabled.


IWMSDKWatermarkCreepingLine::GetFillType

The GetFillType method gets the fill type for a creeping line.

Syntax

HRESULT GetFillType(

int* type

);

Parameters

type

[out] The fill type. This parameter can take one of the following values:

WMSDK_FILLTYPE_COLOR

WMSDK_FILLTYPE_GRADIENT

WMSDK_FILLTYPE_PATTERN


IWMSDKWatermarkCreepingLine::SetFillType

The SetFillType method sets the fill type for a creeping line.

Syntax

HRESULT SetFillType(

int type

);

Parameters

type

[in] The fill type. This parameter can take one of the following values:

WMSDK_FILLTYPE_COLOR

WMSDK_FILLTYPE_GRADIENT

WMSDK_FILLTYPE_PATTERN


IWMSDKWatermarkCreepingLine::GetGradient

The GetGradient method retrieves a pointer to the IWMSDKGradient interface.

Syntax

HRESULT GetGradient(

IWMSDKGradient** pGradient

);

Parameters

pGradient

[out] A pointer to the IWMSDKGradient interface.


IWMSDKWatermarkCreepingLine::GetPattern

The GetPattern method gets the path to a pattern source file to be used for filling a creeping line.

Syntax

HRESULT GetPattern(

LPWSTR path

);

Parameters

path

[out] The path to a pattern source file.


IWMSDKWatermarkCreepingLine::SetPattern

The SetPattern method sets the path to a pattern source file to be used for filling a creeping line.

Syntax

HRESULT SetPattern(

LPCWSTR path

);

Parameters

path

[in] The path to a pattern source file.


IWMSDKWatermarkCreepingLine::GetMotionMode

The GetMotionMode method gets the motion direction for a creeping line.

Syntax

HRESULT GetMotionMode(

int* mode

);

Parameters

mode

[out] The motion direction. This parameter can take one of the following values:

WMSDK_MM_LEFT_RIGHT

WMSDK_MM_RIGHT_LEFT

WMSDK_MM_TOP_BOTTOM

WMSDK_MM_BOTTOM_TOP


IWMSDKWatermarkCreepingLine::SetMotionMode

The SetMotionMode method sets the motion direction for a creeping line.

Syntax

HRESULT SetMotionMode(

int mode

);

Parameters

mode

[in] The motion direction. This parameter can take one of the following values:

WMSDK_MM_LEFT_RIGHT

WMSDK_MM_RIGHT_LEFT

WMSDK_MM_TOP_BOTTOM

WMSDK_MM_BOTTOM_TOP


IWMSDKWatermarkCreepingLine::GetRepeatMode

The GetRepeatMode method gets the repetition mode for a creeping line.

Syntax

HRESULT GetRepeatMode(

int* mode

);

Parameters

mode

[out] The repetition mode. This parameter can take one of the following values:

WMSDK_REPEAT_NONE

WMSDK_REPEAT_INFINITE


IWMSDKWatermarkCreepingLine::SetRepeatMode

The SetRepeatMode method sets the repetition mode for a creeping line.

Syntax

HRESULT SetRepeatMode(

int mode

);

Parameters

mode

[in] The repetition mode. This parameter can take one of the following values:

WMSDK_REPEAT_NONE

WMSDK_REPEAT_INFINITE


IWMSDKWatermarkCreepingLine::GetDuration

The GetDuration method gets the time that one pass of a creeping line takes.

Syntax

HRESULT GetDuration(

float* duration

);

Parameters

duration

[out] The time.


IWMSDKWatermarkCreepingLine::SetDuration

The SetDuration method sets the time that one pass of a creeping line takes.

Syntax

HRESULT SetDuration(

float duration

);

Parameters

duration

[in] The time.


IWMSDKWatermarkCreepingLine::GetDelay

The GetDelay method gets the time between two passes of a creeping line.

Syntax

HRESULT GetDelay(

float* duration

);

Parameters

duration

[out] The time.


IWMSDKWatermarkCreepingLine::SetDelay

The SetDelay method sets the time between two passes of a creeping line.

Syntax

HRESULT SetDelay(

float duration

);

Parameters

duration

[in] The time.


IWMSDKWatermarkEllipse Interface

The IWMSDKWatermarkEllipse interface includes methods and properties that configure the parameters of putting ellipses onto an image.

The IWMSDKWatermarkEllipse interface exposes the following methods.

Method | Description
GetPosition | Gets the position of an ellipse.
SetPosition | Sets the position of an ellipse.
GetPositionType | Gets a point relative to which the position of an ellipse is specified.
SetPositionType | Sets a point relative to which the position of an ellipse is specified.
GetDrawOrder | Gets the drawing order for an ellipse.
SetDrawOrder | Sets the drawing order for an ellipse.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetEffects | Retrieves a pointer to the IWMSDKEffects interface.
GetTransparency | Gets the transparency for an ellipse.
SetTransparency | Sets the transparency for an ellipse.
GetColor | Gets the color for an ellipse.
SetColor | Sets the color for an ellipse.
GetBorderColor | Gets the border color for an ellipse.
SetBorderColor | Sets the border color for an ellipse.
GetWidth | Gets the width of an ellipse.
SetWidth | Sets the width of an ellipse.
GetHeight | Gets the height of an ellipse.
SetHeight | Sets the height of an ellipse.
GetStretching | Gets the stretching for an ellipse.
SetStretching | Sets the stretching for an ellipse.
GetEllipseFillType | Gets the ellipse type.
SetEllipseFillType | Sets the ellipse type.
GetBorderWidth | Gets the border width for an ellipse.
SetBorderWidth | Sets the border width for an ellipse.
GetFillType | Gets the fill type for an ellipse.
SetFillType | Gets the fill type for an ellipse.
GetGradient | Retrieves a pointer to the IWMSDKGradient interface.
GetPattern | Gets the path to a pattern source file.
SetPattern | Sets the path to a pattern source file.


IWMSDKWatermarkEllipse::GetPosition

The GetPosition method gets the position of an ellipse relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkEllipse::SetPosition

The SetPosition method sets the position of an ellipse relative to a preset point.

Syntax

HRESULT SetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkEllipse::GetPositionType

The GetPositionType method gets a point relative to which the position of an ellipse is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the position of an ellipse is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkEllipse::SetPositionType

The SetPositionType method sets a point relative to which the position of an ellipse is specified.

Syntax

HRESULT SetPositionType(

int type

);

Parameters

type

[in] A point relative to which the position of an ellipse is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkEllipse::GetDrawOrder

The GetDrawOrder method gets the drawing order for an ellipse.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkEllipse::SetDrawOrder

The SetDrawOrder method sets the drawing order for an ellipse.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkEllipse::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkEllipse::GetEffects

The GetEffects method retrieves a pointer to the IWMSDKEffects interface.

Syntax

HRESULT GetEffects(

IWMSDKEffects** pEffects

);

Parameters

pEffects

[out] A pointer to the IWMSDKEffects interface.


IWMSDKWatermarkEllipse::GetTransparency

The GetTransparency method gets the transparency for an ellipse.

Syntax

HRESULT GetTransparency(

int* transparency

);

Parameters

transparency

[out] The transparency.


IWMSDKWatermarkEllipse::SetTransparency

The SetTransparency method sets the transparency for an ellipse.

Syntax

HRESULT SetTransparency(

int transparency

);

Parameters

transparency

[in] The transparency.


IWMSDKWatermarkEllipse::GetColor

The GetColor method gets the color for an ellipse.

Syntax

HRESULT GetColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKWatermarkEllipse::SetColor

The SetColor method sets the color for an ellipse.

Syntax

HRESULT SetColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKWatermarkEllipse::GetBorderColor

The GetBorderColor method gets the border color for an ellipse.

Syntax

HRESULT GetBorderColor(

DWORD* cr

);

Parameters

cr

[out] The border color.


IWMSDKWatermarkEllipse::SetBorderColor

The SetBorderColor method sets the border color for an ellipse.

Syntax

HRESULT SetBorderColor(

DWORD cr

);

Parameters

cr

[in] The border color.


IWMSDKWatermarkEllipse::GetWidth

The GetWidth method gets the width of an ellipse.

Syntax

HRESULT GetWidth(

int* width

);

Parameters

width

[out] The width.


IWMSDKWatermarkEllipse::SetWidth

The SetWidth method sets the width of an ellipse.

Syntax

HRESULT SetWidth(

int width

);

Parameters

width

[in] The width.


IWMSDKWatermarkEllipse::GetHeight

The GetHeight method gets the height of an ellipse.

Syntax

HRESULT GetHeight(

int* height

);

Parameters

height

[out] The height.


IWMSDKWatermarkEllipse::SetHeight

The SetHeight method sets the height of an ellipse.

Syntax

HRESULT SetHeight(

int height

);

Parameters

height

[in] The height.


IWMSDKWatermarkEllipse::GetStretching

The GetStretching method gets the stretching for an ellipse.

Syntax

HRESULT GetStretching(

int* stretching

);

Parameters

stretching

[out] The stretching. This parameter can take one of the following values:

WMSDK_STRETCHING_NONE

WMSDK_STRETCHING_WIDTH

WMSDK_STRETCHING_HEIGHT


IWMSDKWatermarkEllipse::SetStretching

The SetStretching method sets the stretching for an ellipse.

Syntax

HRESULT SetStretching(

int stretching

);

Parameters

stretching

[in] The stretching. This parameter can take one of the following values:

WMSDK_STRETCHING_NONE

WMSDK_STRETCHING_WIDTH

WMSDK_STRETCHING_HEIGHT


IWMSDKWatermarkEllipse::GetEllipseFillType

The GetEllipseFillType method gets the ellipse type.

Syntax

HRESULT GetEllipseFillType(

int* type

);

Parameters

type

[out] The ellipse type. This parameter can take one of the following parameters:

WMSDK_RT_FRAME

WMSDK_RT_OUTLINED

WMSDK_RT_FILL


IWMSDKWatermarkEllipse::SetEllipseFillType

The SetEllipseFillType method sets the ellipse type.

Syntax

HRESULT SetEllipseFillType(

int type

);

Parameters

type

[in] The ellipse type. This parameter can take one of the following parameters:

WMSDK_RT_FRAME

WMSDK_RT_OUTLINED

WMSDK_RT_FILL


IWMSDKWatermarkEllipse::GetBorderWidth

The GetBorderWidth method gets the border width for an ellipse.

Syntax

HRESULT GetBorderWidth(

int* width

);

Parameters

width

[out] The border width.


IWMSDKWatermarkEllipse::SetBorderWidth

The SetBorderWidth method sets the border width for an ellipse.

Syntax

HRESULT SetBorderWidth(

int width

);

Parameters

width

[in] The border width.


IWMSDKWatermarkEllipse::GetFillType

The GetFillType method gets the fill type for an ellipse.

Syntax

HRESULT GetFillType(

int* type

);

Parameters

type

[out] The fill type.


IWMSDKWatermarkEllipse::SetFillType

The SetFillType method sets the fill type for an ellipse.

Syntax

HRESULT SetFillType(

int type

);

Parameters

type

[in] The fill type.


IWMSDKWatermarkEllipse::GetGradient

The GetGradient method retrieves a pointer to the IWMSDKGradient interface.

Syntax

HRESULT GetGradient(

IWMSDKGradient** pGradient

);

Parameters

pGradient

[out] A pointer to the IWMSDKGradient interface.


IWMSDKWatermarkEllipse::GetPattern

The GetPattern method gets the path to a pattern source file to be used for filling an ellipse.

Syntax

HRESULT GetPattern(

LPWSTR path

);

Parameters

path

[out] The path to a pattern source file.


IWMSDKWatermarkEllipse::SetPattern

The SetPattern method sets the path to a pattern source file to be used for filling an ellipse.

Syntax

HRESULT SetPattern(

LPCWSTR path

);

Parameters

path

[in] The path to a pattern source file.


IWMSDKWatermarkImage Interface

The IWMSDKWatermarkImage interface includes methods and properties that configure the parameters of putting graphics files onto an image.

The IWMSDKWatermarkImage interface exposes the following methods.

Method | Description
GetPosition | Gets the position of a graphics watermark.
SetPosition | Sets the position of a graphics watermark.
GetPositionType | Gets a point relative to which the position of a graphics watermark is specified.
SetPositionType | Sets a point relative to which the position of a graphics watermark is specified.
GetDrawOrder | Gets the drawing order for a graphics watermark.
SetDrawOrder | Sets the drawing order for a graphics watermark.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetEffects | Retrieves a pointer to the IWMSDKEffects interface.
GetPathToImage | Gets the path to a graphics file.
SetPathToImage | Sets the path to a graphics file.
GetTransparency | Gets the transparency for a graphics watermark.
SetTransparency | Sets the transparency for a graphics watermark.
GetTransparentColor | Gets the transparent color for a graphics watermark.
SetTransparentColor | Sets the transparent color for a graphics watermark.
GetTransparentColorRange | Gets the transparent color range for a graphics watermark.
SetTransparentColorRange | Sets the transparent color range for a graphics watermark.
GetResize | Gets the zoom factor for a graphics watermark.
SetResize | Sets the zoom factor for a graphics watermark.
GetAngle | Gets the rotation angle for a graphics watermark.
SetAngle | Sets the rotation angle for a graphics watermark.


IWMSDKWatermarkImage::GetPosition

The GetPosition method gets the position of a graphics watermark relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkImage::SetPosition

The SetPosition method sets the position of a graphics watermark relative to a preset point.

Syntax

HRESULT SetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkImage::GetPositionType

The GetPositionType method gets a point relative to which the position of a graphics watermark is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the position of an ellipse is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkImage::SetPositionType

The SetPositionType method sets a point relative to which the position of a graphics watermark is specified.

Syntax

HRESULT SetPositionType(

int type

);

Parameters

type

[in] A point relative to which the position of an ellipse is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkImage::GetDrawOrder

The GetDrawOrder method gets the drawing order for a graphics watermark.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkImage::SetDrawOrder

The SetDrawOrder method sets the drawing order for a graphics watermark.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkImage::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkImage::GetEffects

The GetEffects method retrieves a pointer to the IWMSDKEffects interface.

Syntax

HRESULT GetEffects(

IWMSDKEffects** pEffects

);

Parameters

pEffects

[out] A pointer to the IWMSDKEffects interface.


IWMSDKWatermarkImage::GetPathToImage

The GetPathToImage method gets the path to a graphics file to be used as graphics watermark.

Syntax

HRESULT GetPathToImage(

LPWSTR path

);

Parameters

path

[out] The path to a graphics file.


IWMSDKWatermarkImage::SetPathToImage

The SetPathToImage method sets the path to a graphics file to be used as graphics watermark.

Syntax

HRESULT SetPathToImage(

LPCWSTR path

);

Parameters

path

[in] The path to a graphics file.


IWMSDKWatermarkImage::GetTransparency

The GetTransparency method gets the transparency for a graphics watermark.

Syntax

HRESULT GetTransparency(

int* transparency

);

Parameters

transparency

[out] The transparency.


IWMSDKWatermarkImage::SetTransparency

The SetTransparency method sets the transparency for a graphics watermark.

Syntax

HRESULT SetTransparency(

int transparency

);

Parameters

transparency

[in] The transparency.


IWMSDKWatermarkImage::GetTransparentColor

The GetTransparentColor method gets the transparent color for a graphics watermark. The watermark's pixels of this color become transparent.

Syntax

HRESULT GetTransparentColor(

DWORD* cr

);

Parameters

cr

[out] The transparent color.


IWMSDKWatermarkImage::SetTransparentColor

The SetTransparentColor method sets the transparent color for a graphics watermark. The watermark's pixels of this color become transparent.

Syntax

HRESULT SetTransparentColor(

DWORD cr

);

Parameters

cr

[in] The transparent color.


IWMSDKWatermarkImage::GetTransparentColorRange

The GetTransparentColorRange method gets the tolerance value for the transparent color.

Syntax

HRESULT GetTransparentColorRange(

int* range

);

Parameters

range

[out] The tolerance value.


IWMSDKWatermarkImage::SetTransparentColorRange

The SetTransparentColorRange method sets the tolerance value for the transparent color.

Syntax

HRESULT SetTransparentColorRange(

int range

);

Parameters

range

[in] The tolerance value.


IWMSDKWatermarkImage::GetResize

The GetResize method gets the zoom factor for a graphics watermark.

Syntax

HRESULT GetResize(

LPWSTR resize

);

Parameters

resize

[out] The zoom factor.


IWMSDKWatermarkImage::SetResize

The SetResize method sets the zoom factor for a graphics watermark.

Syntax

HRESULT SetResize(

LPCWSTR resize

);

Parameters

resize

[in] The zoom factor.


IWMSDKWatermarkImage::GetAngle

The GetAngle method gets the rotation angle for a graphics watermark.

Syntax

HRESULT GetAngle(

int* angle

);

Parameters

angle

[out] The rotation angle.


IWMSDKWatermarkImage::SetAngle

The SetAngle method sets the rotation angle for a graphics watermark.

Syntax

HRESULT SetAngle(

int angle

);

Parameters

angle

[in] The rotation angle.


IWMSDKWatermarkRect Interface

The IWMSDKWatermarkRect interface includes methods and properties that configure the parameters of putting rectangles onto an image.

The IWMSDKWatermarkRect interface exposes the following methods.

Method | Description
GetPosition | Gets the position of a rectangle.
SetPosition | Sets the position of a rectangle.
GetPositionType | Gets a point relative to which the position of a rectangle is specified.
SetPositionType | Sets a point relative to which the position of a rectangle is specified.
GetDrawOrder | Gets the drawing order for a rectangle.
SetDrawOrder | Sets the drawing order for a rectangle.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetEffects | Retrieves a pointer to the IWMSDKEffects interface.
GetTransparency | Gets the transparency for a rectangle.
SetTransparency | Sets the transparency for a rectangle.
GetColor | Gets the color for a rectangle.
SetColor | Sets the color for a rectangle.
GetBorderColor | Gets the border color for a rectangle.
SetBorderColor | Sets the border color for a rectangle.
GetWidth | Gets the width of a rectangle.
SetWidth | Sets the width of a rectangle.
GetHeight | Gets the height of a rectangle.
SetHeight | Sets the height of a rectangle.
GetStretching | Gets the stretching for a rectangle.
SetStretching | Sets the stretching for a rectangle.
GetRectFillType | Gets the rectangle type.
SetRectFillType | Sets the rectangle type.
GetBorderWidth | Gets the border width for a rectangle.
SetBorderWidth | Sets the border width for a rectangle.
GetRoundCornersCoeff | Gets the rounded radius for a rectangle.
SetRoundCornersCoeff | Sets the rounded radius for a rectangle.
GetFillType | Gets the fill type for a rectangle.
SetFillType | Sets the fill type for a rectangle.
GetGradient | Retrieves a pointer to the IWMSDKGradient interface.
GetPattern | Gets the path to a pattern source file.
SetPattern | Sets the path to a pattern source file.


IWMSDKWatermarkRect::GetPosition

The GetPosition method gets the position of a rectangle relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkRect::SetPosition

The SetPosition method sets the position of a rectangle relative to a preset point.

Syntax

HRESULT SetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkRect::GetPositionType

The GetPositionType methos gets a point relative to which the position of a rectangle is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the position of an ellipse is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkRect::SetPositionType

The SetPositionType methos sets a point relative to which the position of a rectangle is specified.

Syntax

HRESULT SetPositionType(

int type

);

Parameters

type

[in] A point relative to which the position of an ellipse is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkRect::GetDrawOrder

The GetDrawOrder method gets the drawing order for a rectangle.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkRect::SetDrawOrder

The SetDrawOrder method sets the drawing order for a rectangle.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkRect::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkRect::GetEffects

The GetEffects method retrieves a pointer to the IWMSDKEffects interface.

Syntax

HRESULT GetEffects(

IWMSDKEffects** pEffects

);

Parameters

pEffects

[out] A pointer to the IWMSDKEffects interface.


IWMSDKWatermarkRect::GetTransparency

The GetTransparency method gets the transparency for a rectangle.

Syntax

HRESULT GetTransparency(

int* transparency

);

Parameters

transparency

[out] The transparency.


IWMSDKWatermarkRect::SetTransparency

The SetTransparency method sets the transparency for a rectangle.

Syntax

HRESULT SetTransparency(

int transparency

);

Parameters

transparency

[in] The transparency.


IWMSDKWatermarkRect::GetColor

The GetColor method gets the color for a rectangle.

Syntax

HRESULT GetColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKWatermarkRect::SetColor

The SetColor method sets the color for a rectangle.

Syntax

HRESULT SetColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKWatermarkRect::GetBorderColor

The GetBorderColor method gets the border color for a rectangle.

Syntax

HRESULT GetBorderColor(

DWORD* cr

);

Parameters

cr

[out] The border color.


IWMSDKWatermarkRect::SetBorderColor

The SetBorderColor method sets the border color for a rectangle.

Syntax

HRESULT SetBorderColor(

DWORD cr

);

Parameters

cr

[in] The border color.


IWMSDKWatermarkRect::GetWidth

The GetWidth method gets the width of a rectangle.

Syntax

HRESULT GetWidth(

int* width

);

Parameters

width

[out] The width.


IWMSDKWatermarkRect::SetWidth

The SetWidth method sets the width of a rectangle.

Syntax

HRESULT SetWidth(

int width

);

Parameters

width

[in] The width.


IWMSDKWatermarkRect::GetHeight

The GetHeight method gets the height of a rectangle.

Syntax

HRESULT GetHeight(

int* height

);

Parameters

height

[out] The height.


IWMSDKWatermarkRect::SetHeight

The SetHeight method sets the height of a rectangle.

Syntax

HRESULT SetHeight(

int height

);

Parameters

height

[in] The height.


IWMSDKWatermarkRect::GetStretching

The GetStretching method gets the stretching for a rectangle.

Syntax

HRESULT GetStretching(

int* stretching

);

Parameters

stretching

[out] The stretching. This parameter can take one of the following parameters:

WMSDK_STRETCHING_NONE

WMSDK_STRETCHING_WIDTH

WMSDK_STRETCHING_HEIGHT


IWMSDKWatermarkRect::SetStretching

The SetStretching method sets the stretching for a rectangle.

Syntax

HRESULT SetStretching(

int stretching

);

Parameters

stretching

[in] The stretching. This parameter can take one of the following parameters:

WMSDK_STRETCHING_NONE

WMSDK_STRETCHING_WIDTH

WMSDK_STRETCHING_HEIGHT


IWMSDKWatermarkRect::GetRectFillType

The GetRectFillType method gets the rectangle type.

Syntax

HRESULT GetRectFillType(

int* type

);

Parameters

type

[out] The rectangle type. This parameter can take one of the following parameters:

WMSDK_RT_FRAME

WMSDK_RT_OUTLINED

WMSDK_RT_FILL


IWMSDKWatermarkRect::SetRectFillType

The SetRectFillType method sets the rectangle type.

Syntax

HRESULT SetRectFillType(

int type

);

Parameters

type

[in] The rectangle type. This parameter can take one of the following parameters:

WMSDK_RT_FRAME

WMSDK_RT_OUTLINED

WMSDK_RT_FILL


IWMSDKWatermarkRect::GetBorderWidth

The GetBorderWidth method gets the border width for a rectangle.

Syntax

HRESULT GetBorderWidth(

int* width

);

Parameters

width

[out] The border width.


IWMSDKWatermarkRect::SetBorderWidth

The SetBorderWidth method sets the border width for a rectangle.

Syntax

HRESULT SetBorderWidth(

int width

);

Parameters

width

[in] The border width.


IWMSDKWatermarkRect::GetRoundCornersCoeff

The GetRoundCornersCoeff method gets the rounded radius for a rectangle.

Syntax

HRESULT GetRoundCornersCoeff(

int* coeff

);

Parameters

coeff

[out] The rounded radius.


IWMSDKWatermarkRect::SetRoundCornersCoeff

The SetRoundCornersCoeff method sets the rounded radius for a rectangle.

Syntax

HRESULT SetRoundCornersCoeff(

int coeff

);

Parameters

coeff

[in] The rounded radius.


IWMSDKWatermarkRect::GetFillType

IWMSDKWatermarkRect::GetEllipseFillType

The GetEllipseFillType method gets the fill type for a rectangle.

Syntax

HRESULT GetFillType(

int* type

);

Parameters

type

[out] The fill type. This parameter can take one of the following parameters:

WMSDK_FILLTYPE_COLOR

WMSDK_FILLTYPE_GRADIENT

WMSDK_FILLTYPE_PATTERN


IWMSDKWatermarkRect::SetFillType

The SetEllipseFillType method sets the fill type for a rectangle.

Syntax

HRESULT SetFillType(

int type

);

Parameters

type

[in] The fill type. This parameter can take one of the following parameters:

WMSDK_FILLTYPE_COLOR

WMSDK_FILLTYPE_GRADIENT

WMSDK_FILLTYPE_PATTERN


IWMSDKWatermarkRect::GetGradient

The GetGradient method retrieves a pointer to the IWMSDKGradient interface.

Syntax

HRESULT GetGradient(

IWMSDKGradient** pGradient

);

Parameters

pGradient

[out] A pointer to the IWMSDKGradient interface.


IWMSDKWatermarkRect::GetPattern

The GetPattern method gets the path to a pattern source file to be used for filling a rectangle.

Syntax

HRESULT GetPattern(

LPWSTR path

);

Parameters

path

[out] The path to a pattern source file.


IWMSDKWatermarkRect::SetPattern

The SetPattern method sets the path to a pattern source file to be used for filling a rectangle.

Syntax

HRESULT SetPattern(

LPCWSTR path

);

Parameters

path

[in] The path to a pattern source file.


IWMSDKWatermarkText Interface

The IWMSDKWatermarkText interface includes methods and properties that configure the parameters of putting text onto an image.

The IWMSDKWatermarkText interface exposes the following methods.

Method | Description
GetPosition | Gets the position of a text.
SetPosition | Sets the position of a text.
GetPositionType | Gets a point relative to which the position of a text is specified.
SetPositionType | Sets a point relative to which the position of a text is specified.
GetDrawOrder | Gets the drawing order for a text.
SetDrawOrder | Sets the drawing order for a text.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetEffects | Retrieves a pointer to the IWMSDKEffects interface.
GetText | Gets a text.
SetText | Sets a text.
GetTransparency | Gets the transparency for a text.
SetTransparency | Sets the transparency for a text.
GetFont | Gets the font for a text.
SetFont | Sets the font for a text.
GetColor | Gets the color for a text.
SetColor | Sets the color for a text.
GetBackColor | Gets the background color for a text.
SetBackColor | Sets the background color for a text.
GetAlignPosition | Gets the horizontal alignment for a text.
SetAlignPosition | Sets the horizontal alignment for a text.
GetIsTextTransparent | Gets a boolean value that indicates whether transparency of the background of a text is enabled.
SetIsTextTransparent | Sets a boolean value that indicates whether transparency of the background of a text is enabled.
GetResize | Gets the zoom factor for a text.
SetResize | Sets the zoom factor for a text.
GetFillType | Gets the fill type for a text.
SetFillType | Sets the fill type for a text.
GetGradient | Retrieves a pointer to the IWMSDKGradient interface.
GetPattern | Gets the path to a pattern source file.
SetPattern | Sets the path to a pattern source file.


IWMSDKWatermarkText::GetPosition

The GetPosition method gets the position of a text relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkText::SetPosition

The SetPosition method sets the position of a text relative to a preset point.

Syntax

HRESULT SetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkText::GetPositionType

The GetPositionType method gets a point relative to which the position of a text is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the position of a text is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkText::SetPositionType

The SetPositionType method sets a point relative to which the position of a text is specified.

Syntax

HRESULT SetPositionType(

int type

);

Parameters

type

[in] A point relative to which the position of a text is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkText::GetDrawOrder

The GetDrawOrder method gets the drawing order for a text.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkText::SetDrawOrder

The SetDrawOrder method sets the drawing order for a text.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkText::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkText::GetEffects

The GetEffects method retrieves a pointer to the IWMSDKEffects interface.

Syntax

HRESULT GetEffects(

IWMSDKEffects** pEffects

);

Parameters

pEffects

[out] A pointer to the IWMSDKEffects interface.


IWMSDKWatermarkText::GetText

The GetText method gets a text.

Syntax

HRESULT GetText(

LPWSTR text

);

Parameters

text

[out] A text.


IWMSDKWatermarkText::SetText

The SetText method sets a text.

Syntax

HRESULT SetText(

LPCWSTR text

);

Parameters

text

[in] A text.


IWMSDKWatermarkText::GetTransparency

The GetTransparency method gets the transparency for a text.

Syntax

HRESULT GetTransparency(

int* transparency

);

Parameters

transparency

[out] The transparency.


IWMSDKWatermarkText::SetTransparency

Syntax

HRESULT SetTransparency(

int transparency

);

Parameters

transparency

[in]


IWMSDKWatermarkText::GetFont

The GetFont method gets the font for a text.

Syntax

HRESULT GetFont(

int* pLogFont

);

Parameters

pLogFont

[out] A pointer to the LOGFONT structure.

Необходимо выполнить пересчет параметра pLogFont->lfHeight в условные единицы при установке и в дюймы при получении (перед прорисовкой). См. MSDN, LOGFONT structure.


IWMSDKWatermarkText::SetFont

The SetFont method sets the font for a text.

Syntax

HRESULT SetFont(

int pLogFont

);

Parameters

pLogFont

[in] A pointer to the LOGFONT structure.

Необходимо выполнить пересчет параметра pLogFont->lfHeight в условные единицы при установке и в дюймы при получении (перед прорисовкой). См. MSDN, LOGFONT structure.


IWMSDKWatermarkText::GetColor

The GetColor method gets the color for a text.

Syntax

HRESULT GetColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKWatermarkText::SetColor

The SetColor method sets the color for a text.

Syntax

HRESULT SetColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKWatermarkText::GetBackColor

The GetBackColor method gets the background color for a text.

Syntax

HRESULT GetBackColor(

DWORD* cr

);

Parameters

cr

[out] The background color.


IWMSDKWatermarkText::SetBackColor

The SetBackColor method sets the background color for a text.

Syntax

HRESULT SetBackColor(

DWORD cr

);

Parameters

cr

[in] The background color.


IWMSDKWatermarkText::GetAlignPosition

The GetAlignPosition method gets the horizontal alignment for a text.

Syntax

HRESULT GetAlignPosition(

int* pos

);

Parameters

pos

[out] The horizontal alignment. This parameter can take one of the following values:

WMSDK_ALIGN_LEFT

WMSDK_ALIGN_CENTER

WMSDK_ALIGN_RIGHT


IWMSDKWatermarkText::SetAlignPosition

The SetAlignPosition method sets the horizontal alignment for a text.

Syntax

HRESULT SetAlignPosition(

int pos

);

Parameters

pos

[in] The horizontal alignment. This parameter can take one of the following values:

WMSDK_ALIGN_LEFT

WMSDK_ALIGN_CENTER

WMSDK_ALIGN_RIGHT


IWMSDKWatermarkText::GetIsTextTransparent

The GetIsTextTransparent method gets a boolean value that indicates whether transparency of the background of a text is enabled.

Syntax

HRESULT GetIsTextTransparent(

int* transparent

);

Parameters

transparent

[out] A boolean value that indicates whether transparency of the background of a text is enabled.


IWMSDKWatermarkText::SetIsTextTransparent

The SetIsTextTransparent method sets a boolean value that indicates whether transparency of the background of a text is enabled.

Syntax

HRESULT SetIsTextTransparent(

int transparent

);

Parameters

transparent

[in] A boolean value that indicates whether transparency of the background of a text is enabled.


IWMSDKWatermarkText::GetResize

The GetResize method gets the zoom factor for a text.

Syntax

HRESULT GetResize(

LPWSTR resize

);

Parameters

resize

[out] The zoom factor.


IWMSDKWatermarkText::SetResize

The SetResize method sets the zoom factor for a text.

Syntax

HRESULT SetResize(

LPCWSTR resize

);

Parameters

resize

[in] The zoom factor.


IWMSDKWatermarkText::GetFillType

The GetFillType method gets the fill type for a creeping line.

Syntax

HRESULT GetResize(

int* type

);

Parameters

type

[out] The fill type. This parameter can take one of the following values:

WMSDK_FILLTYPE_COLOR

WMSDK_FILLTYPE_GRADIENT

WMSDK_FILLTYPE_PATTERN


IWMSDKWatermarkText::SetFillType

The SetFillType method sets the fill type for a creeping line.

Syntax

HRESULT SetResize(

int type

);

Parameters

type

[in] The fill type. This parameter can take one of the following values:

WMSDK_FILLTYPE_COLOR

WMSDK_FILLTYPE_GRADIENT

WMSDK_FILLTYPE_PATTERN


IWMSDKWatermarkText::GetGradient

The GetGradient method retrieves a pointer to the IWMSDKGradient interface.

Syntax

HRESULT GetGradient(

IWMSDKGradient** pGradient

);

Parameters

pGradient

[out] A pointer to the IWMSDKGradient interface.


IWMSDKWatermarkText::GetPattern

The GetPattern method gets the path to a pattern source file to be used for filling a text.

Syntax

HRESULT GetPattern(

LPWSTR path

);

Parameters

path

[out] The path to a pattern source file.


IWMSDKWatermarkText::SetPattern

The SetPattern method sets the path to a pattern source file to be used for filling a text.

Syntax

HRESULT SetPattern(

LPCWSTR path

);

Parameters

path

[in] The path to a pattern source file.


IWMSDKWatermarkVideo Interface

The IWMSDKWatermarkVideo interface includes methods and properties that configure the parameters of putting video files onto the video stream.

The IWMSDKWatermarkVideo interface exposes the following methods.

Method | Description
GetPosition | Gets the position of a video watermark.
SetPosition | Sets the position of a video watermark.
GetPositionType | Gets a point relative to which the position of a video watermark is specified.
SetPositionType | Sets a point relative to which the position of a video watermark is specified.
GetDrawOrder | Gets the drawing order for a video watermark.
SetDrawOrder | Sets the drawing order for a video watermark.
GetTimeline | Retrieves a pointer to the IWMSDKTimeline interface.
GetPath | Gets the path to a video file.
SetPath | Sets the path to a video file.
GetTransparency | Gets the transparency for a video watermark.
SetTransparency | Sets the transparency for a video watermark.
GetResize | Gets the zoom factor for a video watermark.
SetResize | Sets the zoom factor for a video watermark.
GetAngle | Gets the rotation angle for a video watermark.
SetAngle | Sets the rotation angle for a video watermark.
GetRepeatMode | Gets the repetition mode for a video watermark.
SetRepeatMode | Sets the repetition mode for a video watermark.
GetIsIncludeAudio | Gets a boolean value that indicates whether putting the audio stream of a video watermark onto the audio stream of a produced file is enabled.
SetIsIncludeAudio | Sets a boolean value that indicates whether putting the audio stream of a video watermark onto the audio stream of a produced file is enabled.
GetVolume | Gets the volume for the audio stream of a video watermark.
SetVolume | Sets the volume for the audio stream of a video watermark.


IWMSDKWatermarkVideo::GetPosition

The GetPosition method gets the position of a video watermark relative to a preset point.

Syntax

HRESULT GetPosition(

int* posX,

int* posY

);

Parameters

posX

[out] X-offset relative to a preset point.

posY

[out] Y-offset relative to a preset point.


IWMSDKWatermarkVideo::SetPosition

The SetPosition method sets the position of a video watermark relative to a preset point.

Syntax

HRESULT GetPosition(

int posX,

int posY

);

Parameters

posX

[in] X-offset relative to a preset point.

posY

[in] Y-offset relative to a preset point.


IWMSDKWatermarkVideo::GetPositionType

The GetPositionType method gets a point relative to which the position of a video watermark is specified.

Syntax

HRESULT GetPositionType(

int* type

);

Parameters

type

[out] A point relative to which the position of a video watermark is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkVideo::SetPositionType

The SetPositionType method sets a point relative to which the position of a video watermark is specified.

Syntax

HRESULT SetPositionType(

int type

);

Parameters

type

[in] A point relative to which the position of a video watermark is specified. This parameter can take one of the following values:

WMSDK_WATERMARK_POS_TOP_LEFT

WMSDK_WATERMARK_POS_TOP_CENTER

WMSDK_WATERMARK_POS_TOP_RIGHT

WMSDK_WATERMARK_POS_MIDDLE_LEFT

WMSDK_WATERMARK_POS_MIDDLE_CENTER

WMSDK_WATERMARK_POS_MIDDLE_RIGHT

WMSDK_WATERMARK_POS_BOTTOM_LEFT

WMSDK_WATERMARK_POS_BOTTOM_CENTER

WMSDK_WATERMARK_POS_BOTTOM_RIGHT


IWMSDKWatermarkVideo::GetDrawOrder

The GetDrawOrder method gets the drawing order for a video watermark.

Syntax

HRESULT GetDrawOrder(

int* order

);

Parameters

order

[out] The drawing order.


IWMSDKWatermarkVideo::SetDrawOrder

The SetDrawOrder method sets the drawing order for a video watermark.

Syntax

HRESULT SetDrawOrder(

int order

);

Parameters

order

[in] The drawing order.


IWMSDKWatermarkVideo::GetTimeline

The GetTimeline method retrieves a pointer to the IWMSDKTimeline interface.

Syntax

HRESULT GetTimeline(

IWMSDKTimeline** pTimeline

);

Parameters

pTimeline

[out] A pointer to the IWMSDKTimeline interface.


IWMSDKWatermarkVideo::GetPath

The GetPath method gets the path to a video file to be used as video watermark.

Syntax

HRESULT GetPath(

LPWSTR path

);

Parameters

path

[out] The path to a video file.


IWMSDKWatermarkVideo::SetPath

The SetPath method sets the path to a video file to be used as video watermark.

Syntax

HRESULT SetPath(

LPCWSTR path

);

Parameters

path

[in] The path to a video file.


IWMSDKWatermarkVideo::GetTransparency

The GetTransparency method gets the transparency for a video watermark.

Syntax

HRESULT GetTransparency(

int* transparency

);

Parameters

transparency

[out] The transparency.


IWMSDKWatermarkVideo::SetTransparency

The SetTransparency method sets the transparency for a video watermark.

Syntax

HRESULT SetTransparency(

int transparency

);

Parameters

transparency

[in] The transparency.


IWMSDKWatermarkVideo::GetResize

The GetResize method gets the zoom factor for a video watermark.

Syntax

HRESULT GetResize(

LPWSTR resize

);

Parameters

resize

[out] The zoom factor.


IWMSDKWatermarkVideo::SetResize

The SetResize method sets the zoom factor for a video watermark.

Syntax

HRESULT SetResize(

LPCWSTR resize

);

Parameters

resize

[in] The zoom factor.


IWMSDKWatermarkVideo::GetAngle

The GetAngle method gets the rotation angle for a video watermark.

Syntax

HRESULT GetAngle(

int* angle

);

Parameters

angle

[out] The rotation angle.


IWMSDKWatermarkVideo::SetAngle

The SetAngle method sets the rotation angle for a video watermark.

Syntax

HRESULT SetAngle(

int angle

);

Parameters

angle

[in] The rotation angle.


IWMSDKWatermarkVideo::GetRepeatMode

The GetRepeatMode method gets the repetition mode for a video watermark.

Syntax

HRESULT GetRepeatMode(

int* mode

);

Parameters

mode

[out] The repetition mode. This parameter can take one of the following values:

WMSDK_REPEAT_NONE

WMSDK_REPEAT_INFINITE


IWMSDKWatermarkVideo::SetRepeatMode

The SetRepeatMode method sets the repetition mode for a video watermark.

Syntax

HRESULT SetRepeatMode(

int mode

);

Parameters

mode

[in] The repetition mode. This parameter can take one of the following values:

WMSDK_REPEAT_NONE

WMSDK_REPEAT_INFINITE


IWMSDKWatermarkVideo::GetIsIncludeAudio

The GetIsIncludeAudio method gets a boolean value that indicates whether putting the audio stream of a video watermark onto the audio stream of a produced file is enabled.

Syntax

HRESULT GetIsIncludeAudio(

int* isInclude

);

Parameters

isInclude

[out] A boolean value that indicates whether putting the audio stream of a video watermark onto the audio stream of a produced file is enabled.


IWMSDKWatermarkVideo::SetIsIncludeAudio

The SetIsIncludeAudio method sets a boolean value that indicates whether putting the audio stream of a video watermark onto the audio stream of a produced file is enabled.

Syntax

HRESULT SetIsIncludeAudio(

int isInclude

);

Parameters

isInclude

[in] A boolean value that indicates whether putting the audio stream of a video watermark onto the audio stream of a produced file is enabled.


IWMSDKWatermarkVideo::GetVolume

The GetVolume method gets the volume for the audio stream of a video watermark.

Syntax

HRESULT GetVolume(

int* volume

);

Parameters

volume

[out] The volume.


IWMSDKWatermarkVideo::SetVolume

The SetVolume method sets the volume for the audio stream of a video watermark.

Syntax

HRESULT SetVolume(

int volume

);

Parameters

volume

[in] The volume.


IWMSDKEffect3D Interface

The IWMSDKEffect3D interface includes methods and properties that configure the parameters of applying the 3D effect to watermarks.

The IWMSDKEffect3D interface exposes the following methods.

Method | Description
IsTurnedOn | Gets a boolean value that indicates whether the 3D effect is enabled.
TurnOn | Sets a boolean value that indicates whether the 3D effect is enabled.
GetColor | Gets the color for the 3D effect.
SetColor | Sets the color for the 3D effect.
GetWidth | Gets the width for the 3D effect.
SetWidth | Sets the width for the 3D effect.
GetOpacity | Gets the opacity for the 3D effect.
SetOpacity | Sets the opacity for the 3D effect.
GetAngle | Gets the slope angle for the 3D effect.
SetAngle | Sets the slope angle for the 3D effect.


IWMSDKEffect3D::IsTurnedOn

The IsTurnedOn method gets a boolean value that indicates whether the 3D effect is enabled.

Syntax

HRESULT IsTurnedOn(

int* isOn

);

Parameters

isOn

[out] A boolean value that indicates whether the 3D effect is enabled.


IWMSDKEffect3D::TurnOn

The TurnOn method sets a boolean value that indicates whether the 3D effect is enabled.

Syntax

HRESULT TurnOn(

int On

);

Parameters

On

[in] A boolean value that indicates whether the 3D effect is enabled.


IWMSDKEffect3D::GetColor

The GetColor method gets the color for the 3D effect.

Syntax

HRESULT GetColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKEffect3D::SetColor

The SetColor method sets the color for the 3D effect.

Syntax

HRESULT SetColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKEffect3D::GetWidth

The GetWidth method gets the width for the 3D effect.

Syntax

HRESULT GetWidth(

int* width

);

Parameters

width

[out] The width.


IWMSDKEffect3D::SetWidth

The SetWidth method sets the width for the 3D effect.

Syntax

HRESULT SetWidth(

int width

);

Parameters

width

[in]


IWMSDKEffect3D::GetOpacity

The GetOpacity method gets the opacity for the 3D effect.

Syntax

HRESULT GetOpacity(

int* opacity

);

Parameters

opacity

[out] The opacity.


IWMSDKEffect3D::SetOpacity

The SetOpacity method sets the opacity for the 3D effect.

Syntax

HRESULT SetOpacity(

int opacity

);

Parameters

opacity

[in] The opacity.


IWMSDKEffect3D::GetAngle

The GetAngle method gets the slope angle for the 3D effect.

Syntax

HRESULT GetAngle(

int* angle

);

Parameters

angle

[out] The slope angle.


IWMSDKEffect3D::SetAngle

The SetAngle method sets the slope angle for the 3D effect.

Syntax

HRESULT SetAngle(

int angle

);

Parameters

angle

[in] The slope angle.


IWMSDKEffectBevelEmboss Interface

The IWMSDKEffectBevelEmboss interface includes methods and properties that configure the parameters of applying the Bevel and Emboss effect to watermarks.

The IWMSDKEffectBevelEmboss interface exposes the following methods.

Method | Description
IsTurnedOn | Gets a boolean value that indicates whether the Bevel and Emboss effect is enabled.
TurnOn | Sets a boolean value that indicates whether the Bevel and Emboss effect is enabled.
GetRadius | Gets the radius for the Bevel and Emboss effect.
SetRadius | Sets the radius for the Bevel and Emboss effect.
GetWashout | Gets the washout for the Bevel and Emboss effect.
SetWashout | Sets the washout for the Bevel and Emboss effect.
GetColorBalance | Gets the color balance for the Bevel and Emboss effect.
SetColorBalance | Sets the color balance for the Bevel and Emboss effect.
GetLightVector | Gets the light source vector for the Bevel and Emboss effect.
SetLightVector | Sets the light source vector for the Bevel and Emboss effect.
GetGlossContour | Gets the gloss contour for the Bevel and Emboss effect.
SetGlossContour | Sets the gloss contour for the Bevel and Emboss effect.
GetDirection | Gets the direction for the Bevel and Emboss effect.
SetDirection | Sets the direction for the Bevel and Emboss effect.
GetColorType | Gets the type of the Bevel and Emboss effect.
SetColorType | Sets the type of the Bevel and Emboss effect.
GetOpacity | Gets the opacity for the Bevel and Emboss effect.
SetOpacity | Sets the opacity for the Bevel and Emboss effect.
GetSide | Gets the side of a watermark to be affected by the Bevel and Emboss effect.
SetSide | Sets the side of a watermark to be affected by the Bevel and Emboss effect.


IWMSDKEffectBevelEmboss::IsTurnedOn

The IsTurnedOn method gets a boolean value that indicates whether the Bevel and Emboss effect is enabled.

Syntax

HRESULT IsTurnedOn(

int* isOn

);

Parameters

isOn

[out] A boolean value that indicates whether the Bevel and Emboss effect is enabled.


IWMSDKEffectBevelEmboss::TurnOn

The TurnOn method sets a boolean value that indicates whether the Bevel and Emboss effect is enabled.

Syntax

HRESULT TurnOn(

int On

);

Parameters

On

[in] A boolean value that indicates whether the Bevel and Emboss effect is enabled.


IWMSDKEffectBevelEmboss::GetRadius

The GetRadius method gets the radius for the Bevel and Emboss effect.

Syntax

HRESULT GetRadius(

int* radius

);

Parameters

radius

[out] The radius.


IWMSDKEffectBevelEmboss::SetRadius

The SetRadius method sets the radius for the Bevel and Emboss effect.

Syntax

HRESULT SetRadius(

int radius

);

Parameters

radius

[in] The radius.


IWMSDKEffectBevelEmboss::GetWashout

The GetWashout method gets the washout for the Bevel and Emboss effect.

Syntax

HRESULT GetWashout(

int* washout

);

Parameters

washout

[out] The washout.


IWMSDKEffectBevelEmboss::SetWashout

The SetWashout method sets the washout for the Bevel and Emboss effect.

Syntax

HRESULT SetWashout(

int washout

);

Parameters

washout

[in] The washout.


IWMSDKEffectBevelEmboss::GetColorBalance

The GetColorBalance method gets the color balance for the Bevel and Emboss effect.

Syntax

HRESULT GetColorBalance(

int* balance

);

Parameters

balance

[out] The color balance.


IWMSDKEffectBevelEmboss::SetColorBalance

The SetColorBalance method sets the color balance for the Bevel and Emboss effect.

Syntax

HRESULT SetColorBalance(

int balance

);

Parameters

balance

[in] The color balance.


IWMSDKEffectBevelEmboss::GetLightVector

The GetLightVector method gets the light source vector for the Bevel and Emboss effect.

Syntax

HRESULT GetLightVector(

int* x,

int* y

);

Parameters

x

[out] X-coordinate of the light source vector.

y

[out] Y-coordinate of the light source vector.


IWMSDKEffectBevelEmboss::SetLightVector

The SetLightVector method sets the light source vector for the Bevel and Emboss effect.

Syntax

HRESULT SetLightVector(

int x,

int y

);

Parameters

x

[in] X-coordinate of the light source vector.

y

[in] Y-coordinate of the light source vector.


IWMSDKEffectBevelEmboss::GetGlossContour

The GetGlossContour method gets the gloss contour for the Bevel and Emboss effect.

Syntax

HRESULT GetGlossContour(

int* contour

);

Parameters

contour

[out] The gloss contour. This parameter can take one of the following values:

WMSDK_GLOSSCONTOUR_LINE

WMSDK_GLOSSCONTOUR_SPHERE

WMSDK_GLOSSCONTOUR_HEMISPHERE


IWMSDKEffectBevelEmboss::SetGlossContour

The SetGlossContour method sets the gloss contour for the Bevel and Emboss effect.

Syntax

HRESULT SetGlossContour(

int contour

);

Parameters

contour

[in] The gloss contour. This parameter can take one of the following values:

WMSDK_GLOSSCONTOUR_LINE

WMSDK_GLOSSCONTOUR_SPHERE

WMSDK_GLOSSCONTOUR_HEMISPHERE


IWMSDKEffectBevelEmboss::GetDirection

The GetDirection method gets the direction for the Bevel and Emboss effect.

Syntax

HRESULT GetDirection(

int* direction

);

Parameters

direction

[out] The direction. This parameter can take one of the following values:

WMSDK_DIRECTION_UP

WMSDK_DIRECTION_DOWN


IWMSDKEffectBevelEmboss::SetDirection

The SetDirection method sets the direction for the Bevel and Emboss effect.

Syntax

HRESULT SetDirection(

int direction

);

Parameters

direction

[in] The direction. This parameter can take one of the following values:

WMSDK_DIRECTION_UP

WMSDK_DIRECTION_DOWN


IWMSDKEffectBevelEmboss::GetColorType

The GetColorType method gets the type of the Bevel and Emboss effect.

Syntax

HRESULT GetColorType(

int* type

);

Parameters

type

[out] The type of the Bevel and Emboss effect. This parameter can take one of the following values:

WMSDK_COLOR_EMBOSS_TYPE_MAIN

WMSDK_COLOR_EMBOSS_TYPE_LIGHT

WMSDK_COLOR_EMBOSS_TYPE_TRANSPARENT


IWMSDKEffectBevelEmboss::SetColorType

The SetColorType method sets the type of the Bevel and Emboss effect.

Syntax

HRESULT SetColorType(

int type

);

Parameters

type

[in] The type of the Bevel and Emboss effect. This parameter can take one of the following values:

WMSDK_COLOR_EMBOSS_TYPE_MAIN

WMSDK_COLOR_EMBOSS_TYPE_LIGHT

WMSDK_COLOR_EMBOSS_TYPE_TRANSPARENT


IWMSDKEffectBevelEmboss::GetOpacity

The GetOpacity method gets the opacity for the Bevel and Emboss effect.

Syntax

HRESULT GetOpacity(

int* opacity

);

Parameters

opacity

[out] The opacity.


IWMSDKEffectBevelEmboss::SetOpacity

The SetOpacity method sets the opacity for the Bevel and Emboss effect.

Syntax

HRESULT SetOpacity(

int opacity

);

Parameters

opacity

[in] The opacity.


IWMSDKEffectBevelEmboss::GetSide

The GetSide method gets the side of a watermark to be affected by the Bevel and Emboss effect.

Syntax

HRESULT GetSide(

int* side

);

Parameters

side

[out] The side of a watermark. This parameter can take one of the following values:

???


IWMSDKEffectBevelEmboss::SetSide

The SetSide method sets the side of a watermark to be affected by the Bevel and Emboss effect.

Syntax

HRESULT SetSide(

int side

);

Parameters

side

[in] The side of a watermark. This parameter can take one of the following values:

???


IWMSDKEffectCurvature Interface

The IWMSDKEffectCurvature interface includes methods and properties that configure the parameters of applying the Curvature effect to watermarks.

The IWMSDKEffectCurvature interface exposes the following methods.

Method | Description
IsTurnedOn | Gets a boolean value that indicates whether the Curvature effect is enabled.
TurnOn | Sets a boolean value that indicates whether the Curvature effect is enabled.
GetScale | Gets the strength for the Curvature effect.
SetScale | Sets the strength for the Curvature effect.
GetCenter | Gets the point of application for the Curvature effect.
SetCenter | Gets the point of application for the Curvature effect.
GetForm | Gets the type of the Curvature effect.
SetForm | Sets the type of the Curvature effect.
GetOrientation | Gets the orientation for the Curvature effect.
SetOrientation | Sets the orientation for the Curvature effect.


IWMSDKEffectCurvature::IsTurnedOn

The IsTurnedOn method gets a boolean value that indicates whether the Curvature effect is enabled.

Syntax

HRESULT IsTurnedOn(

int* isOn

);

Parameters

isOn

[out] A boolean value that indicates whether the Curvature effect is enabled.


IWMSDKEffectCurvature::TurnOn

The TurnOn method sets a boolean value that indicates whether the Curvature effect is enabled.

Syntax

HRESULT TurnOn(

int On

);

Parameters

On

[in] A boolean value that indicates whether the Curvature effect is enabled.


IWMSDKEffectCurvature::GetScale

The GetScale method gets the strength for the Curvature effect.

Syntax

HRESULT GetScale(

int* scale

);

Parameters

scale

[out] The strength.


IWMSDKEffectCurvature::SetScale

The SetScale method sets the strength for the Curvature effect.

Syntax

HRESULT SetScale(

int scale

);

Parameters

scale

[in] The strength.


IWMSDKEffectCurvature::GetCenter

The GetCenter method gets the point of application for the Curvature effect.

Syntax

HRESULT GetCenter(

int* center

);

Parameters

center

[out] The point of application.


IWMSDKEffectCurvature::SetCenter

The SetCenter method sets the point of application for the Curvature effect.

Syntax

HRESULT SetCenter(

int center

);

Parameters

center

[in] The point of application.


IWMSDKEffectCurvature::GetForm

The GetForm method gets the type of the Curvature effect.

Syntax

HRESULT GetForm(

int* form

);

Parameters

form

[out] The type of the Curvature effect. This parameter can take one of the following values:

WMSDK_FORM_CURVATURE_INSIDE

WMSDK_FORM_CURVATURE_OUTSIDE


IWMSDKEffectCurvature::SetForm

The SetForm method sets the type of the Curvature effect.

Syntax

HRESULT SetForm(

int form

);

Parameters

form

[in] The type of the Curvature effect. This parameter can take one of the following values:

WMSDK_FORM_CURVATURE_INSIDE

WMSDK_FORM_CURVATURE_OUTSIDE


IWMSDKEffectCurvature::GetOrientation

The GetOrientation method gets the orientation for the Curvature effect.

Syntax

HRESULT GetOrientation(

int* orient

);

Parameters

orient

[out] The orientation. This parameter can take one of the following values:

WMSDK_ORIENTATION_TRANSFORM_X

WMSDK_ORIENTATION_TRANSFORM_Y


IWMSDKEffectCurvature::SetOrientation

The SetOrientation method sets the orientation for the Curvature effect.

Syntax

HRESULT SetOrientation(

int orient

);

Parameters

orient

[in] The orientation. This parameter can take one of the following values:

WMSDK_ORIENTATION_TRANSFORM_X

WMSDK_ORIENTATION_TRANSFORM_Y


IWMSDKEffectDropShadow Interface

The IWMSDKEffectDropShadow interface includes methods and properties that configure the parameters of applying the Drop Shadow effect to watermarks.

The IWMSDKEffectDropShadow interface exposes the following methods.

Method | Description
IsTurnedOn | Gets a boolean value that indicates whether the Drop Shadow effect is enabled.
TurnOn | Sets a boolean value that indicates whether the Drop Shadow effect is enabled.
GetColor | Gets the color for the Drop Shadow effect.
SetColor | Sets the color for the Drop Shadow effect.
GetOpacity | Gets the opacity for the Drop Shadow effect.
SetOpacity | Sets the opacity for the Drop Shadow effect.
GetAngle | Gets the slope angle for the Drop Shadow effect.
SetAngle | Sets the slope angle for the Drop Shadow effect.
GetDistance | Gets the distance for the Drop Shadow effect.
SetDistance | Sets the distance for the Drop Shadow effect.
GetSize | Gets the size for the Drop Shadow effect.
SetSize | Sets the size for the Drop Shadow effect.
GetSpread | Gets the spread for the Drop Shadow effect.
SetSpread | Sets the spread for the Drop Shadow effect.

.


IWMSDKEffectDropShadow::IsTurnedOn

The IsTurnedOn method gets a boolean value that indicates whether the Drop Shadow effect is enabled.

Syntax

HRESULT IsTurnedOn(

int* isOn

);

Parameters

isOn

[out] A boolean value that indicates whether the Drop Shadow effect is enabled.


IWMSDKEffectDropShadow::TurnOn

The TurnOn method sets a boolean value that indicates whether the Drop Shadow effect is enabled.

Syntax

HRESULT TurnOn(

int On

);

Parameters

On

[in] A boolean value that indicates whether the Drop Shadow effect is enabled.


IWMSDKEffectDropShadow::GetColor

The GetColor method gets the color for the Drop Shadow effect.

Syntax

HRESULT GetColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKEffectDropShadow::SetColor

The SetColor method sets the color for the Drop Shadow effect.

Syntax

HRESULT SetColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKEffectDropShadow::GetOpacity

The GetOpacity method gets the opacity for the Drop Shadow effect.

Syntax

HRESULT GetOpacity(

int* opacity

);

Parameters

opacity

[out] The opacity.


IWMSDKEffectDropShadow::SetOpacity

The SetOpacity method sets the opacity for the Drop Shadow effect.

Syntax

HRESULT SetOpacity(

int opacity

);

Parameters

opacity

[in] The opacity.


IWMSDKEffectDropShadow::GetAngle

The GetAngle method gets the slope angle for the Drop Shadow effect.

Syntax

HRESULT GetAngle(

int* angle

);

Parameters

angle

[out] The slope angle.


IWMSDKEffectDropShadow::SetAngle

The SetAngle method sets the slope angle for the Drop Shadow effect.

Syntax

HRESULT SetAngle(

int angle

);

Parameters

angle

[in] The slope angle.


IWMSDKEffectDropShadow::GetDistance

The GetDistance method gets the distance for the Drop Shadow effect.

Syntax

HRESULT GetDistance(

int* distance

);

Parameters

distance

[out] The distance.


IWMSDKEffectDropShadow::SetDistance

The SetDistance method sets the distance for the Drop Shadow effect.

Syntax

HRESULT SetDistance(

int distance

);

Parameters

distance

[in] The distance.


IWMSDKEffectDropShadow::GetSize

The GetSize method gets the size for the Drop Shadow effect.

Syntax

HRESULT GetSize(

int* size

);

Parameters

size

[out] The size.


IWMSDKEffectDropShadow::SetSize

The SetSize method sets the size for the Drop Shadow effect.

Syntax

HRESULT SetSize(

int size

);

Parameters

size

[in] The size.


IWMSDKEffectDropShadow::GetSpread

The GetSpread method gets the spread for the Drop Shadow effect.

Syntax

HRESULT GetSpread(

int* spread

);

Parameters

spread

[out] The spread.


IWMSDKEffectDropShadow::SetSpread

The SetSpread method sets the spread for the Drop Shadow effect.

Syntax

HRESULT GetSpread(

int spread

);

Parameters

spread

[in] The spread.


IWMSDKEffectRotation Interface

The IWMSDKEffectRotation interface includes methods and properties that configure the parameters of applying the Rotate effect to watermarks.

The IWMSDKEffectRotation interface exposes the following methods.

Method | Description
IsTurnedOn | Gets a boolean value that indicates whether the Rotate effect is enabled.
TurnOn | Sets a boolean value that indicates whether the Rotate effect is enabled.
GetAngleX | Gets the X angle of rotation for the Rotate effect.
SetAngleX | Sets the X angle of rotation for the Rotate effect.
GetAngleY | Gets the Y angle of rotation for the Rotate effect.
SetAngleY | Sets the Y angle of rotation for the Rotate effect.
GetProjection | Gets the projection for the Rotate effect.
SetProjection | Sets the projection for the Rotate effect.


IWMSDKEffectRotation::IsTurnedOn

The IsTurnedOn method gets a boolean value that indicates whether the Rotate effect is enabled.

Syntax

HRESULT IsTurnedOn(

int* isOn

);

Parameters

isOn

[out] A boolean value that indicates whether the Rotate effect is enabled.


IWMSDKEffectRotation::TurnOn

The TurnOn method gets a boolean value that indicates whether the Rotate effect is enabled.

Syntax

HRESULT IsTurnedOn(

int On

);

Parameters

On

[in] A boolean value that indicates whether the Rotate effect is enabled.


IWMSDKEffectRotation::GetAngleX

The GetAngleX method gets the X angle of rotation for the Rotate effect.

Syntax

HRESULT GetAngleX(

int* angle

);

Parameters

angle

[out] The X angle of rotation.


IWMSDKEffectRotation::SetAngleX

The SetAngleX method sets the X angle of rotation for the Rotate effect.

Syntax

HRESULT SetAngleX(

int angle

);

Parameters

angle

[in] The X angle of rotation.


IWMSDKEffectRotation::GetAngleY

The GetAngleY method gets the Y angle of rotation for the Rotate effect.

Syntax

HRESULT GetAngleY(

int* angle

);

Parameters

angle

[out] The Y angle of rotation.


IWMSDKEffectRotation::SetAngleY

Syntax

HRESULT SetAngleY(

int angle

);

Parameters

angle

[in]


IWMSDKEffectRotation::GetProjection

The GetProjection method gets the projection for the Rotate effect.

Syntax

HRESULT GetProjection(

int* projection

);

Parameters

projection

[out] The projection.


IWMSDKEffectRotation::SetProjection

The SetProjection method sets the projection for the Rotate effect.

Syntax

HRESULT SetProjection(

int projection

);

Parameters

projection

[in] The projection.


IWMSDKEffectStroke Interface

The IWMSDKEffectStroke interface includes methods and properties that configure the parameters of applying the Stroke effect to watermarks.

The IWMSDKEffectStroke interface exposes the following methods.

Method | Description
IsTurnedOn | Gets a boolean value that indicates whether the Stroke effect is enabled.
TurnOn | Sets a boolean value that indicates whether the Stroke effect is enabled.
GetWidth | Gets the width for the Stroke effect.
SetWidth | Sets the width for the Stroke effect.
GetOpacity | Gets the opacity for the Stroke effect.
SetOpacity | Sets the opacity for the Stroke effect.
GetFillType | Gets the fill type for the Stroke effect.
SetFillType | Sets the fill type for the Stroke effect.
GetColor | Gets the color for the Stroke effect.
SetColor | Sets the color for the Stroke effect.
GetGradient | Retrieves a pointer to the IWMSDKGradient interface.
GetPattern | Gets the path to a pattern source file.
SetPattern | Sets the path to a pattern source file.


IWMSDKEffectStroke::IsTurnedOn

Syntax

HRESULT IsTurnedOn(

int* isOn

);

Parameters

isOn

[out]


IWMSDKEffectStroke::TurnOn

Syntax

HRESULT TurnOn(

int on

);

Parameters

on

[in]


IWMSDKEffectStroke::GetWidth

The GetWidth method gets the width for the Stroke effect.

Syntax

HRESULT GetWidth(

int* width

);

Parameters

width

[out] The width.


IWMSDKEffectStroke::SetWidth

The SetWidth method sets the width for the Stroke effect.

Syntax

HRESULT SetWidth(

int width

);

Parameters

width

[in] The width.


IWMSDKEffectStroke::GetOpacity

The GetOpacity method gets the opacity for the Stroke effect.

Syntax

HRESULT GetOpacity(

int* opacity

);

Parameters

opacity

[out] The opacity.


IWMSDKEffectStroke::SetOpacity

The SetOpacity method sets the opacity for the Stroke effect.

Syntax

HRESULT SetOpacity(

int opacity

);

Parameters

opacity

[in] The opacity.


IWMSDKEffectStroke::GetFillType

The GetFillType method gets the fill type for the Stroke effect.

Syntax

HRESULT GetFillType(

int* type

);

Parameters

type

[out] The fill type. This parameter can take one of the following values:

WMSDK_FILLTYPE_COLOR

WMSDK_FILLTYPE_GRADIENT

WMSDK_FILLTYPE_PATTERN


IWMSDKEffectStroke::SetFillType

The SetFillType method sets the fill type for the Stroke effect.

Syntax

HRESULT SetFillType(

int type

);

Parameters

type

[in] The fill type. This parameter can take one of the following values:

WMSDK_FILLTYPE_COLOR

WMSDK_FILLTYPE_GRADIENT

WMSDK_FILLTYPE_PATTERN


IWMSDKEffectStroke::GetColor

The GetColor method gets the color for the Stroke effect.

Syntax

HRESULT GetColor(

DWORD* cr

);

Parameters

cr

[out] The color.


IWMSDKEffectStroke::SetColor

The SetColor method sets the color for the Stroke effect.

Syntax

HRESULT SetColor(

DWORD cr

);

Parameters

cr

[in] The color.


IWMSDKEffectStroke::GetGradient

The GetGradient method retrieves a pointer to the IWMSDKGradient interface.

Syntax

HRESULT GetGradient(

IWMSDKGradient** pGradient

);

Parameters

pGradient

[out] A pointer to the IWMSDKGradient interface.


IWMSDKEffectStroke::GetPattern

The GetPattern method gets the path to a pattern source file to be used for filling the stroke area.

Syntax

HRESULT GetPattern(

LPWSTR path

);

Parameters

path

[out] The path to a pattern source file.


IWMSDKEffectStroke::SetPattern

The SetPattern method sets the path to a pattern source file to be used for filling the stroke area.

Syntax

HRESULT SetPattern(

LPCWSTR path

);

Parameters

path

[in] The path to a pattern source file.


IWMSDKGradient Interface

The IWMSDKGradient interface includes methods and properties that configure the parameters of applying a gradient fill.

The IWMSDKGradient interface exposes the following methods.

Method | Description
GetAngle | Gets the direction of a gradient fill.
SetAngle | Sets the direction of a gradient fill.
GetInterpolationColors | Gets the interpolation colors for a gradient fill.
SetInterpolationColors | Sets the interpolation colors for a gradient fill.
GetWrapMode | Gets the wrap mode for a gradient fill.
SetWrapMode | Sets the wrap mode for a gradient fill.
GetInterpolationColorCount | Gets the number of interpolation colors for a gradient fill.


IWMSDKGradient::GetAngle

The GetAngle method gets the direction of a gradient fill.

Syntax

HRESULT GetAngle(

float* angle

);

Parameters

angle

[out] The direction.


IWMSDKGradient::SetAngle

The SetAngle method sets the direction of a gradient fill.

Syntax

HRESULT SetAngle(

float angle

);

Parameters

angle

[in] The direction.


IWMSDKGradient::GetInterpolationColors

The GetInterpolationColors method gets the interpolation colors for a gradient fill.

Syntax

GetInterpolationColors(

DWORD* colors,

float* positions

);

Parameters

colors

[out] An array of colors.

positions

[out] An array of real numbers that specify the blend positions. Each number in the array specifies a percentage of the distance between the starting boundary and the ending boundary and is in the range from 0.0 through 1.0, where 0.0 indicates the starting boundary of the gradient and 1.0 indicates the ending boundary. There must be at least two positions specified: the first position, which is always 0.0f, and the last position, which is always 1.0f.


IWMSDKGradient::SetInterpolationColors

The SetInterpolationColors method sets the interpolation colors for a gradient fill.

Syntax

HRESULT SetInterpolationColors(

DWORD* colors,

float* positions,

int count

);

Parameters

colors

[in] An array of colors.

positions

[in] An array of real numbers that specify the blend positions. Each number in the array specifies a percentage of the distance between the starting boundary and the ending boundary and is in the range from 0.0 through 1.0, where 0.0 indicates the starting boundary of the gradient and 1.0 indicates the ending boundary. There must be at least two positions specified: the first position, which is always 0.0f, and the last position, which is always 1.0f.

count

[in] The number of elements in the colors array.


IWMSDKGradient::GetWrapMode

The GetWrapMode method gets the wrap mode for a gradient fill.

Syntax

HRESULT GetWrapMode(

int* wrapMode

);

Parameters

wrapMode

[out] The wrap mode.


IWMSDKGradient::SetWrapMode

The SetWrapMode method sets the wrap mode for a gradient fill.

Syntax

HRESULT SetWrapMode(

int wrapMode

);

Parameters

wrapMode

[in] The wrap mode.


IWMSDKGradient::GetInterpolationColorCount

The GetInterpolationColorCount method gets the number of interpolation colors for a gradient fill.

Syntax

HRESULT GetInterpolationColorCount(

int* count

);

Parameters

count

[out] The number of colors.


Sample Applications

The sample code supplied with the SDK is in the form of projects for Microsoft Visual C++ version 6.0.


Getting Started

The following sections list the settings and issues that should be taken into account before developing applications with this SDK.


SDK Library Files and Compiler Settings

To develop an application by using the Watermark Master SDK, you must use Microsoft Visual C++ version 6.0 or later. The only programming languages appropriate for development are C++ and C.


Using the Code Examples

Many of the explanatory sections of this SDK include code examples. The examples are written to be as clear and concise as possible. When reading the examples, you should be aware of the following conventions.


IWMSDKFrame::SetFrameCallback

The SetFrameCallback method sets a callback function for custom editing of videos and images.

Syntax

HRESULT SetFrameCallback(

int* pCallback,

int* pData

);

Parameters

pCallback

[in] A pointer to a callback function. The function has format HRESULT CustomCallback(IUnknown* pFile, LONGLONG rtTime, BYTE** pFrame, DWORD* pdwFrameSize, BYTE** pFormat, DWORD* pdwFormatSize, void* pOwner).

IUnknown* pFile - a pointer to a file object

LONGLONG rtTime - frame time

BYTE** pFrame - RGB buffer with data

DWORD* pdwFrameSize - buffer size

BYTE** pFormat - a pointer to BITMAPINFOHEADER structure

DWORD* pdwFormatSize - format size

void* pOwner - a pointer to a custom class

pData

[in] A pointer to arbitrary user's data.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

The given method enables to edit graphics files or video frames, put custom watermarks, apply custom filters and dynamic effects, etc.