1 /** \file
2  * \brief Register the WMF Format
3  *
4  * See Copyright Notice in im_lib.h
5  */
6 module im.im_format_wmv;
7 
8 version(IM) :
9 version(Windows) :
10 version(D_LP64) :
11 
12 version(DigitalMars) { pragma(lib, "im_wmv.lib"); } // found in Win64 package only
13 
14 extern(C) @nogc nothrow :
15 
16 /** \defgroup wmv WMV - Windows Media Video Format
17  * \section Description
18  * 
19  * \par
20  * Advanced Systems Format (ASF) \n
21  * Windows Copyright Microsoft Corporation.
22  * \par
23  * Access to the WMV format uses Windows Media SDK. Available in Windows Only. \n
24  * You must link the application with "im_wmv.lib" 
25  * and you must call the function \ref imFormatRegisterWMV once 
26  * to register the format into the IM core library. 
27  * In Lua call require"imlua_wmv". \n
28  * Depends also on the WMF SDK (wmvcore.lib).
29  * When using the "im_wmv.dll" this extra library is not necessary.
30  * \par
31  * The application users should have the WMV codec 9 installed:
32  * http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx
33  * \par
34  * You must agree with the WMF SDK EULA to use the SDK. \n
35  * http://wmlicense.smdisp.net/v9sdk/
36  * \par
37  * For more information: \n
38  * http://www.microsoft.com/windows/windowsmedia/9series/sdk.aspx \n
39  * http://msdn.microsoft.com/library/en-us/wmform/htm/introducingwindowsmediaformat.asp 
40  * \par
41  * See \ref im_format_wmv.h
42  * 
43  * \section Features
44  *
45 \verbatim
46     Data Types: Byte
47     Color Spaces: RGB and MAP (Gray and Binary saved as MAP)
48     Compressions (installed in Windows XP by default):
49       NONE       - no compression
50       MPEG-4v3   - Windows Media MPEG-4 Video V3
51       MPEG-4v1   - ISO MPEG-4 Video V1
52       WMV7       - Windows Media Video  V7
53       WMV7Screen - Windows Media Screen V7
54       WMV8       - Windows Media Video  V8
55       WMV9Screen - Windows Media Video 9 Screen
56       WMV9       - Windows Media Video 9 [default]
57       Unknown    - Others
58     Can have more than one image. 
59     Can have an alpha channel (only for RGB) ?
60     Internally the components are always packed.
61     Lines arranged from top down to bottom or bottom up to top.
62     Handle(0) return NULL. imBinFile is not supported.
63     Handle(1) returns IWMSyncReader* when reading, IWMWriter* when writing.
64  
65     Attributes:
66       FPS IM_FLOAT (1) (should set when writing, default 15)
67       WMFQuality IM_INT (1) [0-100, default 50] (write only)
68       MaxKeyFrameTime IM_INT (1) (write only) [maximum key frame interval in miliseconds, default 5 seconds]
69       DataRate IM_INT (1) (write only) [kilobits/second, default 2400]
70       VBR IM_INT (1) [0, 1] (write only) [0 - Constant Bit Rate (default), 1 - Variable Bit Rate (Quality-Based)]
71       (and several others from the file-level attributes) For ex:
72         Title, Author, Copyright, Description (string)
73         Duration IM_INT [100-nanosecond units]
74         Seekable, HasAudio, HasVideo, Is_Protected, Is_Trusted, IsVBR IM_INT (1) [0, 1]
75         NumberOfFrames IM_INT (1)
76 
77     Comments:
78       IMPORTANT - The "image_count" and the "FPS" attribute may not be available from the file,
79         we try to estimate from the duration and from the average time between frames, or using the default value.
80       We do not handle DRM protected files (Digital Rights Management).
81       Reads only the first video stream. Other streams are ignored.
82       All the images have the same size, you must call imFileReadImageInfo/imFileWriteImageInfo 
83         at least once.
84       For optimal random reading, the file should be indexed previously.
85       If not indexed by frame, random positioning may not be precise.
86       Sequencial reading will always be precise.
87       When writing we use a custom profile and time indexing only.
88       We do not support multipass encoding.  
89       Since the driver uses COM, CoInitialize(NULL) and CoUninitialize() are called every Open/Close.
90 \endverbatim
91  * \ingroup format */
92  
93 /** Register the WMF Format. \n
94  * In Lua, when using require"imlua_wmv" this function will be automatically called.
95  * \ingroup wmv */
96 void imFormatRegisterWMV();