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

MJPEG codec confusion using VFW (MCIWndPlay)

9 views
Skip to first unread message

Jim

unread,
Feb 4, 2008, 6:53:40 PM2/4/08
to
Hi,

I have an MFC app that displays my pics and movies in a separate
modeless dialog box. My old camera created QuickTime movies. I use
Apple's SDK to create a player inside a dialog box to play.

My new camera (Canon) creates AVI files and need to update my app to
handle these files. After looking at a couple of options, it appeared
the simplest API to use was VFW. However when I call MCIWndPlay() and
try to play the file, I get a missing codec error (mjpeg). I have
WinXP SP2. Windows Media Player (version 10) can play the file, so
"a" codec is installed. Does VFW use different codecs?

If VFW does use different codecs, what (newer) API would you
recommend? VFW and Apple's Quicktime SDK required just a few
additional lines of code. Simple. I'm looking for something similar,
if possible. And if I have to add a window with play and pause
buttons, that's OK.

Thanks much!


Jim
p.s. I'm using VC++ 6.0 with the last SDK for it so I can use
gdiplus.

Tom Serface

unread,
Feb 4, 2008, 11:14:21 PM2/4/08
to
Have you considered just using the WMP ActiveX control? Take a look at the
WMP 10 SDK.

http://msdn2.microsoft.com/en-us/windowsmedia/bb190309.aspx

Tom

"Jim" <adiron...@yahoo.com> wrote in message
news:1a83aaca-1ef7-4330...@d70g2000hsb.googlegroups.com...

Mark Salsbery [MVP]

unread,
Feb 5, 2008, 2:18:17 PM2/5/08
to
For most flavors of MPEG, there's no codec included with Windows (licensing
issue).

You may want to search for a third party codec, or you can write your own :)

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++


"Jim" <adiron...@yahoo.com> wrote in message
news:1a83aaca-1ef7-4330...@d70g2000hsb.googlegroups.com...

Jim

unread,
Feb 6, 2008, 7:44:57 PM2/6/08
to
Mark,

You missed a letter :). I was referring to motion jpeg (mjpeg). If
you are referring to mjpeg, then my camera install must've put one
in. Back to my original question--why doesn't MCIWndPlay() see it,
but WMP does?


Thanks,


Jim
On Feb 5, 2:18 pm, "Mark Salsbery [MVP]"

Jim

unread,
Feb 7, 2008, 6:35:10 PM2/7/08
to
Tom,

Thanks for the recommendation. It's pretty easy to use and for the
most part works as expected. It took a bit to get the control to be
hidden when the dialog box opens up. I had to set the uiMode to
"none".

However, the player will repaint when I don't expect it to. Say I
play an AVI. I then stop the player and do an m_wmp.ShowWindow(FALSE)
followed by setting uiMode to "none". Then I display a picture (jpeg/
png, etc). If I move the window with that picture in it, the last AVI
shows up. Anyone know how to make it behave correctly? If I have to,
I'll do something kludgey like make the window width & height 0 or
kill it altogether and recreate it at runtime when I need it.

Thanks again,


Jim
p.s. I tried sending this reply earlier and never saw it come out, so
I think I clicked the wrong thing and sent you an email. Oops.


On Feb 4, 11:14 pm, "Tom Serface" <tom.nos...@camaswood.com> wrote:
> Have you considered just using the WMP ActiveX control? Take a look at the
> WMP 10 SDK.
>
> http://msdn2.microsoft.com/en-us/windowsmedia/bb190309.aspx
>
> Tom
>

> "Jim" <adirondack...@yahoo.com> wrote in message


>
> news:1a83aaca-1ef7-4330...@d70g2000hsb.googlegroups.com...
>
> > Hi,
>
> > I have an MFC app that displays my pics and movies in a separate
> > modeless dialog box. My old camera created QuickTime movies. I use
> > Apple's SDK to create a player inside a dialog box to play.
>
> > My new camera (Canon) creates AVI files and need to update my app to
> > handle these files. After looking at a couple of options, it appeared

> > the simplest API to use was VFW. However when I callMCIWndPlay() and

Mark Salsbery [MVP]

unread,
Feb 8, 2008, 1:19:33 PM2/8/08
to
"Jim" <adiron...@yahoo.com> wrote in message
news:8e5f7147-977e-4e34...@d21g2000prf.googlegroups.com...

> Mark,
>
> You missed a letter :). I was referring to motion jpeg (mjpeg). If
> you are referring to mjpeg, then my camera install must've put one
> in. Back to my original question--why doesn't MCIWndPlay() see it,
> but WMP does?


Oops sorry about that :)

Probably because the WMP uses a its own codec or a licensed 3rd party one.

I don't see any free MJPEG codec support in any of the Windows Media codec
packs.

Jim

unread,
Feb 10, 2008, 7:06:27 PM2/10/08
to
FYI: problem solved. Somehow I missed the uiMode attribute
"invisible"...
0 new messages