The reason is that I'm a bit concerned about IWMIndexer seeting some "global
identifiers" i.e. g_ws***, making me feel that if running multiple IWMIndexer
at the same time it will disturb their states, cause some indexings to fail.
The objects should be thread-safe. The global identifiers
you are referring to, are static constants linked in your
own code, not something used internally by the WMIndexer.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
"Alessandro Angeli" wrote:
> .
>
Basically, that is my concern: if I create multiple IWMIndexer in the same
thread and run for indexing of different video files at the same time (since
the indexing operation is asynchronous), when any of the indexer sets those
global identifiers, how could I know which IWMIndexer (hence which video
file) is related to?
It seems like I should create just 1 IWMIndexer and do the indexing one at a
time.
> Basically, that is my concern: if I create multiple
> IWMIndexer in the same thread and run for indexing of
> different video files at the same time (since the
> indexing operation is asynchronous), when any of the
> indexer sets those global identifiers, how could I know
> which IWMIndexer (hence which video file) is related to?
The WMIndexer does not "set" any global indentifier. Can you
post the code snippet that worries you?
"Alessandro Angeli" wrote:
> .
>
Please look at the following MSDN document, on IWMIndexer::StartIndexing
(please scroll almost to the bottom). That is the source of my worry.
http://msdn.microsoft.com/en-us/library/dd757208(VS.85).aspx
> Please look at the following MSDN document, on
> IWMIndexer::StartIndexing (please scroll almost to the
> bottom). That is the source of my worry.
The attributes the article refers to are attributes in the
output file header, not global variables in your process.
The g_* symbols are constant strings containing the names of
the attributes that will be set, nothing else.