IM: im_format_wmv.h Source File

IM - An Imaging Tool

im_format_wmv.h

Go to the documentation of this file.
00001 /** \file
00002  * \brief Register the WMF Format
00003  *
00004  * See Copyright Notice in im_lib.h
00005  * $Id: im_format_wmv.h,v 1.3 2006/05/16 13:57:17 scuri Exp $
00006  */
00007 
00008 #ifndef __IM_FORMAT_WMV_H
00009 #define __IM_FORMAT_WMV_H
00010 
00011 #if defined(__cplusplus)
00012 extern "C" {
00013 #endif
00014 
00015 /** \defgroup wmv WMV - Windows Media Video Format
00016  * \section Description
00017  * 
00018  * \par
00019  * Advanced Systems Format (ASF) \n
00020  * Windows Copyright Microsoft Corporation.
00021  * \par
00022  * Access to the WMV format uses Windows Media SDK. Available in Windows Only. \n
00023  * You must link the application with "im_wmv.lib" 
00024  * and you must call the function \ref imFormatRegisterWMV once 
00025  * to register the format into the IM core library. \n
00026  * Depends also on the WMF SDK (wmvcore.lib).
00027  * When using the "im_wmv.dll" this extra library is not necessary.
00028  * \par
00029  * The application users should have the WMV codec 9 installed:
00030  * http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx
00031  * \par
00032  * You must agree with the WMF SDK EULA to use the SDK. \n
00033  * http://wmlicense.smdisp.net/v9sdk/
00034  * \par
00035  * For more information: \n
00036  * http://www.microsoft.com/windows/windowsmedia/9series/sdk.aspx \n
00037  * http://msdn.microsoft.com/library/en-us/wmform/htm/introducingwindowsmediaformat.asp 
00038  * \par
00039  * See \ref im_format_wmv.h
00040  * 
00041  * \section Features
00042  *
00043 \verbatim
00044     Data Types: Byte
00045     Color Spaces: RGB and MAP (Gray and Binary saved as MAP)
00046     Compressions (installed in Windows XP by default):
00047       NONE       - no compression
00048       MPEG-4v3   - Windows Media MPEG-4 Video V3
00049       MPEG-4v1   - ISO MPEG-4 Video V1
00050       WMV7       - Windows Media Video  V7
00051       WMV7Screen - Windows Media Screen V7
00052       WMV8       - Windows Media Video  V8
00053       WMV9Screen - Windows Media Video 9 Screen
00054       WMV9       - Windows Media Video 9 [default]
00055       Unknown    - Others
00056     Can have more than one image. 
00057     Can have an alpha channel (only for RGB) ?
00058     Internally the components are always packed.
00059     Lines arranged from top down to bottom or bottom up to top.
00060     Handle(0) return NULL. imBinFile is not supported.
00061     Handle(1) returns IWMSyncReader* when reading, IWMWriter* when writing.
00062  
00063     Attributes:
00064       FPS IM_FLOAT (1) (should set when writing, default 15)
00065       WMFQuality IM_INT (1) [0-100, default 50] (write only)
00066       MaxKeyFrameTime IM_INT (1) (write only) [maximum key frame interval in miliseconds, default 5 seconds]
00067       DataRate IM_INT (1) (write only) [kilobits/second, default 2400]
00068       VBR IM_INT (1) [0, 1] (write only) [0 - Constant Bit Rate (default), 1 - Variable Bit Rate (Quality-Based)]
00069       (and several others from the file-level attributes) For ex:
00070         Title, Author, Copyright, Description (string)
00071         Duration IM_INT [100-nanosecond units]
00072         Seekable, HasAudio, HasVideo, Is_Protected, Is_Trusted, IsVBR IM_INT (1) [0, 1]
00073         NumberOfFrames IM_INT (1)
00074 
00075     Comments:
00076       IMPORTANT - The "image_count" and the "FPS" attribute may not be available from the file,
00077         we try to estimate from the duration and from the average time between frames, or using the default value.
00078       We do not handle DRM protected files (Digital Rights Management).
00079       Reads only the first video stream. Other streams are ignored.
00080       All the images have the same size, you must call imFileReadImageInfo/imFileWriteImageInfo 
00081         at least once.
00082       For optimal random reading, the file should be indexed previously.
00083       If not indexed by frame, random positioning may not be precise.
00084       Sequencial reading will always be precise.
00085       When writing we use a custom profile and time indexing only.
00086       We do not support multipass encoding.  
00087       Since the driver uses COM, CoInitialize(NULL) and CoUninitialize() are called every Open/Close.
00088 \endverbatim
00089  * \ingroup format */
00090  
00091 /** Register the WMF Format 
00092  * \ingroup wmv */
00093 void imFormatRegisterWMV(void);
00094                
00095                
00096 #if defined(__cplusplus)
00097 }
00098 #endif
00099 
00100 #endif