PDA

View Full Version : How to make open any name mpeg file.


roma123
02-26-2005, 06:47 AM
How to make Video Object to open any name mpeg file in root cdrom.
to open *.mpg file in root cdrom.
If you have solution please attach simple example project file.
I learning better from examples.

Thanks

roma123
02-26-2005, 01:43 PM
Basically when I insert video object to
the project must have name of the file.

But name video file in my project the always change, but it in same location
as project.
How to make video object to run file witout knowing the name of the file?

Or how to make this action:


find name of the file mpeg file in root cd-rom
and put name of mpeg file to "video object" and play.

Or

play \\*.mpg file

sside
02-26-2005, 03:44 PM
You must find the video file first then play it.

result = File.Find("AutoPlay\\Videos", "*.mpg", false, false, nil, nil);
Video.Load("Video1", result[1], true, false);

yosik
02-26-2005, 11:39 PM
If you are talking about runtime finding of your mpg file, then SSIDE gave you the answer, but from your post, it looks as if you want to do it at BUILD time.
If so, it is much simpler. 2 ways:
1. use a dummy name in your video object for the file and then, put the mpeg file in the dir, renaming it to the name of your dummy file.
2. you CAN have a video object without a name at design time. When you run the project, it will give you an error though. So what you can do is build sort of a template project abd for each project, you just insert the mpg file name in the video object field.

I hope that between SSIDE and this, you found what you were looking for.

Yossi

roma123
02-27-2005, 02:36 PM
Thanks to SSIDE and Thanks(תודה) to the Yossi.
The project will be defaut mpeg player with logo of my company,
so when burn CD-ROM I do need change name of mpeg file,
to default name in the project.

So SSIDE gave right solution.

But I have tiny problem, when I change path of search to SourceDrive
or SourceFolder its not working, Its working if I change path to folder.

I doing something wrong? :

result = File.Find("{_SourceFolder}", "*.mpg", false, false, nil, nil);
Video.Load("Video1", result[1], true, false);

or

result = File.Find("SourceFolder", "*.mpg", false, false, nil, nil);
Video.Load("Video1", result[1], true, false);

Thanks

sside
02-27-2005, 03:06 PM
result = File.Find(_SourceFolder.."\\AutoPlay\\Videos", "*.mpg", false, false, nil, nil);
Video.Load("Video1", result[1], true, false);

roma123
02-27-2005, 04:01 PM
Thanks, but its not working.
Take look in the project with mpeg file.

sside
02-27-2005, 04:34 PM
In this occasion it would be:

result = File.Find(_SourceFolder, "*.mpg", false, false, nil, nil);
Video.Load("Video1", result[1], true, false);


You had to place the video file in the video folder. AutoPlay\Videos

roma123
02-27-2005, 04:51 PM
In this occasion it would be:

result = File.Find(_SourceFolder, "*.mpg", false, false, nil, nil);
Video.Load("Video1", result[1], true, false);


You had to place the video file in the video folder. AutoPlay\Videos

Its WORKING from root cdrom!!! THANKS! :yes

roma123
02-28-2005, 11:11 AM
I change it to:

result = File.Find(_SourceFolder, "*.mpg", false, false, nil, nil);
MediaPlayer.Load("Plugin1", result[1]);

Now its look like Windows Media Player interface!

Derek
02-28-2005, 11:20 AM
I thought roma123 was gonna tell us all how to open any mpeg file. The title suggests so :rolleyes

roma123
02-28-2005, 11:40 AM
I thought roma123 was gonna tell us all how to open any mpeg file. The title suggests so :rolleyes

You missing one word: " How to make open any name mpeg file"

Derek
02-28-2005, 12:21 PM
Same thing!

roma123
02-28-2005, 01:22 PM
open any mpeg files-say it any type of mpeg files (mpeg1,mpeg2,mpeg4)

open any name mpeg files - say it any file name mpeg files.

Aniway Derek you don't explanation for this, with 809 posting :)

Derek
02-28-2005, 05:19 PM
I read your 'statement' .. job done!