Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: IWMPMediaCollection and playlists error 0xc00d11bc

HTVi
TV Discussion Newsgroups

IWMPMediaCollection and playlists error 0xc00d11bc
Mark Duffill 11/18/2008 12:18:00 PM
Hi All,

I have got play lists working for an activex wmp control in my MFC
application.

Creating the play list works and adding multiple media files also works so
long as they are video files.

If I try and add image files (.jpg,.bmp etc) the IWMPMediaCollection::add
method fails with the code 0xc00d11bc (-1072885316)

But if I just "play" one image everything is fine.

Anyone know what this error code actually means as I couldn't find much
(meaning no) info on it?

Thanks

PS: A weird behaviour is if I quickly change the playlist the application
just *disappears* (aka exits), but this is only within the vs dev enviroment.



// create the new play list
hr = pPlayListCollection->newPlaylist(CComBSTR(sPlayListName.c_str()),
&pPlayList);

// now add all the items to it
if (SUCCEEDED(hr))
{
for( size_t i=0; i<List.GetCount(); ++i )
{
CComPtr<IWMPMedia> pMedia;

CComBSTR it(List[i].c_str());
hr = pMediaCollection->add(it, &pMedia);

if(SUCCEEDED(hr))
{
pPlayList->appendItem(pMedia);
} // fails here

pMedia = NULL;
}

// set as current play list and hope it works!
m_spWMPPlayer->put_currentPlaylist(pPlayList);
RE: IWMPMediaCollection and playlists error 0xc00d11bc
Mark Duffill 11/18/2008 12:37:00 PM
btw this error code is apparently E_WMP_INVALID_LIBRARY_ADD

which means it can't add it, but as to why....!
Re: IWMPMediaCollection and playlists error 0xc00d11bc
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 11/18/2008 1:30:52 PM
From: "Mark Duffill"

[Quoted Text]
> btw this error code is apparently
> E_WMP_INVALID_LIBRARY_ADD
>
> which means it can't add it, but as to why....!

By default, WMP is configured to only permit playback of
images:

http://msdn.microsoft.com/en-us/library/bb249287(VS.85).aspx

Changing the permissions in HKLM will impact the whole
system while changing the permissions in HKCU will impact
the current user. You should warn the user before making
such a change.

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: IWMPMediaCollection and playlists error 0xc00d11bc
Mark Duffill 11/19/2008 9:12:10 AM
Hi There,

Firstly, thanks for the reply.

Perhaps I should have been a bit clearer, if I specify the image file with
put_Url() such as m_pPlayer->put_Url(CComBStr("C:\someimage.jpg")), then the
activex control will display the picture fine. This is true of any image
format extension it supports.

However if I try and make a playlist to show more than one image as shown in
the first post, it will fail.

The aim is for the user to multiselect files of varying formats, then have
wmp activex component display them, and allowing the user to click the next
and previous buttons in wmp to flip through them. (Which works for
video/audio files).

Any ideas/thoughts?

Thanks

"Alessandro Angeli" wrote:

[Quoted Text]
> From: "Mark Duffill"
>
> > btw this error code is apparently
> > E_WMP_INVALID_LIBRARY_ADD
> >
> > which means it can't add it, but as to why....!
>
> By default, WMP is configured to only permit playback of
> images:
>
> http://msdn.microsoft.com/en-us/library/bb249287(VS.85).aspx
>
> Changing the permissions in HKLM will impact the whole
> system while changing the permissions in HKCU will impact
> the current user. You should warn the user before making
> such a change.
>
> --
> // Alessandro Angeli
> // MVP :: DirectShow / MediaFoundation
> // mvpnews at riseoftheants dot com
> // http://www.riseoftheants.com/mmx/faq.htm
>
>
>
Re: IWMPMediaCollection and playlists error 0xc00d11bc
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 11/19/2008 4:16:01 PM
From: "Mark Duffill"

[...]
[Quoted Text]
> However if I try and make a playlist to show more than
> one image as shown in the first post, it will fail.

WMP may be backing up the playlists with the library, so you
should still try to change the permissions and see what
happens.

> The aim is for the user to multiselect files of varying
> formats, then have wmp activex component display them,
> and allowing the user to click the next and previous
> buttons in wmp to flip through them. (Which works for
> video/audio files).

You do not need to use WMP's built-in playlists for that.
You can maintain the list youself and respond to the
relevant events to know when switch the current media.


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: IWMPMediaCollection and playlists error 0xc00d11bc
Mark Duffill 11/19/2008 6:31:13 PM
Hi there,

When you say respond to the relevant events, is there a set of hooks you can
utilise to do this? Basically either a link to an example or saying what
interface I should use would be very helpful!

(C++ MFC I'm using btw)

Thanks again.

"Alessandro Angeli" wrote:

[Quoted Text]
> From: "Mark Duffill"
>
> [...]
> > However if I try and make a playlist to show more than
> > one image as shown in the first post, it will fail.
>
> WMP may be backing up the playlists with the library, so you
> should still try to change the permissions and see what
> happens.
>
> > The aim is for the user to multiselect files of varying
> > formats, then have wmp activex component display them,
> > and allowing the user to click the next and previous
> > buttons in wmp to flip through them. (Which works for
> > video/audio files).
>
> You do not need to use WMP's built-in playlists for that.
> You can maintain the list youself and respond to the
> relevant events to know when switch the current media.
>
>
> --
> // Alessandro Angeli
> // MVP :: DirectShow / MediaFoundation
> // mvpnews at riseoftheants dot com
> // http://www.riseoftheants.com/mmx/faq.htm
>
>
>
Re: IWMPMediaCollection and playlists error 0xc00d11bc
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 11/19/2008 8:49:37 PM
From: "Mark Duffill"

[Quoted Text]
> When you say respond to the relevant events, is there a
> set of hooks you can utilise to do this? Basically
> either a link to an example or saying what interface I
> should use would be very helpful!

There are several events related to media/playlist changes
in IWMPEvents. I don't know what events are fired when, you
will have to try (the docs are useless). If none works for
your scenario, you can always hide WMP's own controls and
provide your own (which is what I did when I did something
similar in a web page).

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: IWMPMediaCollection and playlists error 0xc00d11bc
Mark Duffill 11/20/2008 11:10:02 AM
Thanks I'll try and look into that.

I find it odd though since I can drag and drop multiple image files into wmp
and it makes a playlist of these. I wonder why it won't work programatically?

Perhaps you have to create a different type of media library or something?
But like you said the documents are not that helpful! :(

Thanks

"Alessandro Angeli" wrote:

[Quoted Text]
> From: "Mark Duffill"
>
> > When you say respond to the relevant events, is there a
> > set of hooks you can utilise to do this? Basically
> > either a link to an example or saying what interface I
> > should use would be very helpful!
>
> There are several events related to media/playlist changes
> in IWMPEvents. I don't know what events are fired when, you
> will have to try (the docs are useless). If none works for
> your scenario, you can always hide WMP's own controls and
> provide your own (which is what I did when I did something
> similar in a web page).
>
> --
> // Alessandro Angeli
> // MVP :: DirectShow / MediaFoundation
> // mvpnews at riseoftheants dot com
> // http://www.riseoftheants.com/mmx/faq.htm
>
>
>
Re: IWMPMediaCollection and playlists error 0xc00d11bc
Mark Duffill 11/24/2008 9:11:00 AM
Hi,

Well after much trial and error I re-ordered the order I was querying for
the interfaces so that I get the media collection first then the play list
collection. This seems to have fixed the issue, however I'm not entirely
happy with the "black magic" involved in the fix! :)

Additionally I have derived my own class from a CWnd which internally
creates a CAxWindow which is used to host the control. Is there not a better
way or just a way to derived directly from a CAxWindow and make it happily
play within the MFC framework? Just that I derive from my derived CWnd class
to extend it to a CDockablePane.

Anyhow thanks for the help.

(Note the registry permissions where correct and where not changed)

"Mark Duffill" wrote:

[Quoted Text]
> Thanks I'll try and look into that.
>
> I find it odd though since I can drag and drop multiple image files into wmp
> and it makes a playlist of these. I wonder why it won't work programatically?
>
> Perhaps you have to create a different type of media library or something?
> But like you said the documents are not that helpful! :(
>
> Thanks
>
> "Alessandro Angeli" wrote:
>
> > From: "Mark Duffill"
> >
> > > When you say respond to the relevant events, is there a
> > > set of hooks you can utilise to do this? Basically
> > > either a link to an example or saying what interface I
> > > should use would be very helpful!
> >
> > There are several events related to media/playlist changes
> > in IWMPEvents. I don't know what events are fired when, you
> > will have to try (the docs are useless). If none works for
> > your scenario, you can always hide WMP's own controls and
> > provide your own (which is what I did when I did something
> > similar in a web page).
> >
> > --
> > // Alessandro Angeli
> > // MVP :: DirectShow / MediaFoundation
> > // mvpnews at riseoftheants dot com
> > // http://www.riseoftheants.com/mmx/faq.htm
> >
> >
> >

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen