Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

running multiple IWMIndexer simultaneously

6 views
Skip to first unread message

tfs

unread,
Oct 30, 2009, 9:59:02 AM10/30/09
to
Is it okay to create a few IWMIndexer instances and do the indexing at the
same time? Or should I create just 1 IWMIndexer and queue the video files
doing them one by one?

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.


Alessandro Angeli

unread,
Oct 30, 2009, 2:45:02 PM10/30/09
to
From: "tfs"

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


tfs

unread,
Oct 30, 2009, 10:46:01 PM10/30/09
to

"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.

Alessandro Angeli

unread,
Oct 31, 2009, 10:38:27 PM10/31/09
to
From: "tfs"

> 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?

tfs

unread,
Nov 2, 2009, 8:19:02 AM11/2/09
to

"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


Alessandro Angeli

unread,
Nov 2, 2009, 9:29:34 AM11/2/09
to
From: "tfs"

> 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.

0 new messages