Official BS.Player forums  

Go Back   Official BS.Player forums > Main forum > Feature Requests, Feedback And Suggestions

Feature Requests, Feedback And Suggestions Post your suggestions and feature requests here, what would you like to use in BS.Player. Any feedback is appreciated and will be reviewed by our team.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 31st December 2002
Junior Member
BS.Player Newbie
 
Join Date: Dec 2002
Posts: 7
Rep Power: 0
Bubba is an unknown quantity at this point
Default Windows XP Enhanced Autorun

Hi. I'm new here, although not new to BSPlayer. My multimedia PC runs Windows XP, and my family use it to watch Divx's on the tv. However, these divx's are usually burned onto cd by other people, and therefore don't have bsplayer ini files on them. So, I wrote a program that takes advantage of the Windows XP Autorun v2 standard - such as the box that appears saying that the cd contains "Video Files". I've had it in testing for a few days, but finally cracked a problem with the NSIS installer, so now everything happens automatically - in theory anyway!

For this to work, you need to have BSPlayer installed to the hard drive - and for everything to happen automatically, you must have downloaded the installer version of BSPlayer. Just make sure the program is installed into the same folder as bsplayer - then everything should be fine. If you prefer not to open the movie fullscreen, change the startfs=1 tp startfs=0 in the settings.ini file will disable the -fs command.

The program requires you to specify which extensions will be added to the bsplayer playlist. I've added a few by default - if you want to add more, simply open the settings.ini file and add / remove / change extensions. Shortly, I'll get round to writing an extension editor program, but until then you can still do it manually. If you have any problems, let me know by replying here - i'm interested to see how it works!

Cheers

Bubba
Attached Files
File Type: exe 760_1041302168.exe (68.6 KB, 959 views)
Reply With Quote
  #2 (permalink)  
Old 8th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Jan 2003
Posts: 9
Rep Power: 0
akamonrg is an unknown quantity at this point
Default

great but it is possible to have the source code to make this solution for another appz?
??+µ
Reply With Quote
  #3 (permalink)  
Old 8th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Dec 2002
Posts: 7
Rep Power: 0
Bubba is an unknown quantity at this point
Default

Yeah sure. The souce is in vb 6, with all the registry settings for autorun v2 set up by the nullsoft nsis installer. I've included everything. If you want to run other programs, it will take a bit of playing with but it should be possible. Cheers - let me know how the program runs.

Bubba
Attached Files
File Type: zip bsplayer_autorun.zip (71.5 KB, 686 views)
Reply With Quote
  #4 (permalink)  
Old 8th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Jan 2003
Posts: 9
Rep Power: 0
akamonrg is an unknown quantity at this point
Default

yeah thxs , i've read the msdn explications about autoplay v2 but I think my problems is I've run on VB5 :( , so I will start an upgrade of my program I think.
Really thanks ??+µ
Reply With Quote
  #5 (permalink)  
Old 8th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Dec 2002
Posts: 7
Rep Power: 0
Bubba is an unknown quantity at this point
Default

I think vb5 should run alright - what problems are you experiencing? A good way to test is to use tweakui xp to enter the details in which saves messing with the registry too much. I did this, then kind of half figured out how it was working before i found the msdn article on autoplay v2.
Reply With Quote
  #6 (permalink)  
Old 8th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Jan 2003
Posts: 9
Rep Power: 0
akamonrg is an unknown quantity at this point
Default

problem to compile their sample exemple to view, I've understand what is necessary to make an application works with autoplayv2 but after it is hard to try to make a project that could manage what the device return and to play with an application.
??+µ
Reply With Quote
  #7 (permalink)  
Old 8th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Dec 2002
Posts: 7
Rep Power: 0
Bubba is an unknown quantity at this point
Default

Yeah, that is true. I just grabbed a standard event (the video one!) and wrote a program around what it returns. In theory you can do lots of different "stuff" with autorun such as interaction with programs, but this is a bit beyond my programming skills! Good luck - let me know how it goes.

Cheers

Bubba
Reply With Quote
  #8 (permalink)  
Old 8th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Jan 2003
Posts: 9
Rep Power: 0
akamonrg is an unknown quantity at this point
Default

how I read my preview message and I tell you a mistake :oops: it's not VB5 but Visual C++ (yep I learn this language but VB no) so the source file appears me like a big kestion.
Well I will describe you what I understand of your sources.
The nsi I know it's to make the installer .exe , this is not a problem .
The problem is the 6 others files that (I hope to have VB6 soon) I don't understand what kind of thing they do or their utility.
I understand that to have video files listening in an application that don't basically support autoplayv2 you should create an registry entry in the event handlers to link to the describe on what this do in the handlers.
In the handlers you write the description of the application and a link in HKCR to find what application start and the InvokeVerb that allow start.
After read the msdn description of the mechanism of autoplayv2 I understand that this give a sort of list with the description of what you find on a cd (in our exemple only video files), so this list is given to the application bsplayrun that proceed to create a BSPlayer file list and execute the command like "$INSTDIR\bplay.exe tmplist.bsl" with the option "-fs" or not to have fullscreen, I've notice that your software select only extension that were in the ini file.
So I learn your source code at this time to know what is the construction and learn how VB works (erf it's hard :-| ).
But There is some things that I don't understant like how you know what autoplay give to the soft (because it is a different method discribe in the msdn sample and c++). After that I think in any language the soft have just to read this thing, arrange this by extensions specified returned a formated bsl playlist compatible with the player and so execute a command like I describe up.
Correct my mistake and explain me really bacose I'm very interested in developp a kind of soft like these to play the files on cd automatically under windows xp.
??+µ
Reply With Quote
  #9 (permalink)  
Old 9th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Dec 2002
Posts: 7
Rep Power: 0
Bubba is an unknown quantity at this point
Default

No Problem - if I knew c++ then the app would have been written entirely in it - i only use vb cause im too busy with school work to learn c++ yet. Anyway, here's the information I think you are after. The nsi file that builds the installer also creates all the necessary registry entries that are required for autorun v2 to show bsplayer. Below is the required registry code:
Code:
  ;Write Registry Settings
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\BSPlayVideoFiles" "Action" "Play These Video Files"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\BSPlayVideoFiles" "DefaultIcon" "$INSTDIR\bplay.exe,0"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\BSPlayVideoFiles" "InvokeProgID" "BSPlayerAutorun"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\BSPlayVideoFiles" "InvokeVerb" "BSPlayerAutorun_scan"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\BSPlayVideoFiles" "Provider" "BSPlayer"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "BSPlayVideoFiles" ""
  WriteRegStr HKCR "BSPlayerAutorun\shell\BSPlayerAutorun_scan" "" "Play These Video Files"
  WriteRegStr HKCR "BSPlayerAutorun\shell\BSPlayerAutorun_scan\command" "" '"$INSTDIR\bsplayrun.exe" "%L"'
Now, all the HKLM registry are written to the HKEY LOCAL MACHINE part of the registry, where you provide the handler details, and some other detials such as the text labels "Provider". Now, this also writes the name of our handler into the necessary eventhandlers part. The key parts come from the "InvokeVerb" and "InvokeProgID" parts within the handler. The invokeprogid refrences to a class found in HKEY_CLASSES_ROOT part of the registry - called "BSPlayerAutorun". All this is is a key created in the HKEY_CLASSES_ROOT called "BSPlayerAutorun". Then, the invokeverb specifies which action within the "BSPlayerAutorun" class should be performed, which in my case is "BSPlayerAutorun_scan". To set the description like "Play these videos", simply set the default string value of the action to the text you want to show. Then, the following line of code sets the command to be run when this action is selected.

Code:
"BSPlayerAutorun\shell\BSPlayerAutorun_scan\command" "" '"$INSTDIR\bsplayrun.exe" "%L"'
Now, here the $INSTDIR bit becomes the installation location, and the "%L" bit is a variable that windows xp replaces with the root location of the drive that you just inserted the media into, for example "G:" in my case. This MAY NOT include a trailing \ - it didn't in my case! A full list of variables is available on the MSDN site (I think!).

Hopefully I've made everything a bit clearer - the actual app in vb doesn't do much - it simply checks the inserted cd for files matching the specified extensions and adds them to a playlist file, then tells bsplayer to open it. All of the serious registry work is done by the nsis installation script. If you need any more info either post here or e-mail / pm me.

Cheers

Bubba
Reply With Quote
  #10 (permalink)  
Old 9th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Jan 2003
Posts: 9
Rep Power: 0
akamonrg is an unknown quantity at this point
Default

yes this part of the difficulty to make an autoplay for an appz I've understand now I have read more precisely the pathlogger.cls and the frmdemo.frm (If I have understand it is these 2 files contain the code to make a listing of a device and his subdirectories and to performed to a playlist) now I've just to have to understand the operate of your vb code to tranpose in c++ , but it is a little bit hard because I've not make type of these code since 2 years and I want to develop a family of utility to make a sort of software that could play divx DVD mp3....
The first step is to have an autoplay on all cd/dvd inserted in the player-device and for a part of application it's a problem like bsplayer and other problem is for mixtecd containing mp3/divx/ and other stuff.
So you see that it is a little difficult but possible.
??+µ (if you have more explication about your vb code I take it with pleasure becose I'm not familiar with it but I start to be since I've notice that there is familiarity with other language.)
Reply With Quote
  #11 (permalink)  
Old 10th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Dec 2002
Posts: 3
Rep Power: 0
Der Moe!! is an unknown quantity at this point
Default

is there away to rewrite the programm that it can be used with other operating systems, e.g. win98/2k ?
Reply With Quote
  #12 (permalink)  
Old 10th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Dec 2002
Posts: 7
Rep Power: 0
Bubba is an unknown quantity at this point
Default

Autorun V2 is only available on winxp and above. However, it would be possible to re-write the program to run under win9x or win2k. If i get the chance, I will do. If you have ever seen a creative labs dvd drive or sound blaster live card, you may have seen they have a tray icon which is installed that opens the creative dvd player whenever a dvd is inserted. I don't know how they do this, but I assume they can capture when the drive is ejected. If you can find out how to find when a new disk is inserted then it should be possible to re-write it. I don't know how to do this and I'm currently doing a level exams so when these are sorted I'll get back to programming. I should think I'll be able to either find a way to capture the drives eject, or search for a change in volume label. One thing - will you be inserting other cd's that may have videos on them but will not be specifically movie cd's, such as game cd's? As long as these files have an autorun.inf file on the cd then the program will ignore them, otherwise your best bet is to upgrade to xp - I don't know how xp determines what type of cd is inserted - I guess it just scans the cd for files.

If I were you, I'd look into an XP upgrade - it really is a great os!

Cheers

Andrew
Reply With Quote
  #13 (permalink)  
Old 10th January 2003
Junior Member
BS.Player Newbie
 
Join Date: Jan 2003
Posts: 9
Rep Power: 0
akamonrg is an unknown quantity at this point
Default

yeah you're right bubba, I've read the msdn writing about autoplay and they tell that this function scan the 4 first folder and determine what type of content is the cd if there is 2 different extension it's a mixte cd otherwise if there is only one extension it open the software your choose.
So make a program for Win98 or 2k is possible we just have to make what the autoplayv2 do, so actually I search how to make your program run in c or c++ (better but hard because c++ I have not a lot of documentation but I will try to find).
One thing that is interesting with 98 and 2k is the insertion notification, to do this program we have just ("just" lol easy to write but difficult to do hehe) to capture the event of the autoplayV1 and make what autoplayv2 do in xp.
With Xp you can just run too the autoplayv1 by making an autocancellingquery when a media is inserted and after run your program player with the type of detected files.
So it is to do. Ps if you want to work on this me I want, Ps2 I'm french guy so don't hurt me for the english mistake :).
??+µ
Reply With Quote
  #14 (permalink)  
Old 6th March 2003
Junior Member
BS.player Regular User
 
Join Date: Nov 2002
Posts: 10
Rep Power: 0
dwarfy is an unknown quantity at this point
Default

waaouua. I've just dicover this program. it's great and works like a charm !

thanks
Reply With Quote
  #15 (permalink)  
Old 20th June 2003
Junior Member
BS.Player Newbie
 
Join Date: Jun 2003
Posts: 2
Rep Power: 0
Xnedra is an unknown quantity at this point
Default

Hi there,

is it possible ot start a ini on the cd with this tool, too?

Thanks a lot for answers,
Xnedra
Reply With Quote
  #16 (permalink)  
Old 20th June 2003
Moderator
BS.Player Master
 
Join Date: Jan 2003
Location: Romania
Age: 52
Posts: 5,163
Rep Power: 27
adicoto is on a distinguished road
Default

For cd autorun, read the documentation in the install folder. Cd autorun uses the bsplayer.ini file and there you can find details about how to create those files.
Reply With Quote
  #17 (permalink)  
Old 22nd June 2003
Junior Member
BS.Player Newbie
 
Join Date: Jun 2003
Posts: 2
Rep Power: 0
Xnedra is an unknown quantity at this point
Default

Hi there,

thanks for your answer. I tried to make the autoplay recognize the bsplayer.bsi by giving it the same name as the move and i tried a bsplayer.bsi. But not bsplayer.ini. It works now.

I already edited the registry to recogize a *.bsi file on the cd and created a contenttypehandler and eventhandler to start that file instead of the avi directly. Should have read your answer before that ;)

Thanks,
Xnedra
Reply With Quote
  #18 (permalink)  
Old 4th July 2003
Junior Member
BS.Player Newbie
 
Join Date: Jul 2003
Posts: 1
Rep Power: 0
mtelleri is an unknown quantity at this point
Default Problems with OGM files

Hi!

The program work fine. But the problem is when i try to insert a cd with an ogm file. Windows doesnt recognize as a Video file and only open a folder with the cd files.

How can i put a ogm file to a be a video file? And when i insert a cd the bsplayer start.

Thanx,
Telle.
Reply With Quote
Reply

Tags
autorun, enhanced, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules


All times are GMT +1. The time now is 10:45 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
Ad Management plugin by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20