| Newsgroups |
gmane.comp.windows.gui4cli |
| Message-ID |
<[email protected]> |
Hi Dimitris,
> Its incredible that such a useful tidbit of information as "type mpegVideo" is nowhere to be found in the
> MCI manuals.. - http://msdn.microsoft.com/en-us/library/dd743638(v=vs.85).aspx
I think this is the unupdated documentation from the time MCI was released. DirectShow didn't exist
yet and it could only handle VFW codecs. They probably added support for DirectShow later.
> The part where I said the video is dark when it starts is not due to fade in. Its messing up - you can see
> shadows of what its supposed to be showing. It clears after 10-20 seconds or so. Anyway, its probably
> something to do with the window type.
Does this happen with every video you play? I have it with some and the reason is that the clip is a bit
broken at the start. Compressed video works with groups of pictures (GOP) with I, B and P frames.
Each gop has to start with a I frame. If someone cut of the start of a clip unproperly, it starts somewhere
in the middle of a gop and then you get this effect.
> Re the MCI code, its been a long time since I looked at it, but its pretty simple. I've pasted it hereunder.
> One of the main problems, as I remember, is that the return notification doesn't specify which process is
> returning, so if you're running multiple videos at the same time, you don't know which one is finished. Its
> probably still the same...
That's why I had the three mci1, mci2 and mc3 dll functions. They returned the status info back to the
gui in separate variables.
About you previous post...
> Also, by "full screen window", I meant to be able to show it in a G4C window
> (which I see now that it can) so I can handle it, make it full screen and zoom, etc using:
> - mci 'put movie destination at 0 0 $$gui.width $$gui.height'
If you put it on the window this way, it's stretched to your current window size. In general you want
to display it at the proper aspect ratio e.g. 16:9 or 4:3. This can be done by calculating the desired
visible area, subtract that from your current window size, divide the result by 2 and use that as the
"top" coordinate in the "put movie destination command". To display a 4:3 clip on a 16:9 monitor,
you stretch to the height but do the calculation on the width and put the result in "left" coordinate.
For the borderless window for fullscreen playback, I use these style attributes for the g4c window...
setWinAttr #this style '-noborder/-MaxBox/-MinBox/-Border/-caption/-resize'
At the end of the video player example script is the actual player in a separate gui, starting
with "NEWFILE AVSHOW". You could use it separately and call it up from any custom gui when
you add the InitPlayMovie, PlayMovie, CloseMovie and mci_error xRoutines to it.
Chris