View Single Post
  #41 (permalink)  
Old 9th May 2007
Tizio Tizio is offline
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 28
Tizio will become famous soon enough
Default

Quote:
Originally Posted by XilasZ
As promised, here is the source code.

the method to change google talk message came from this forum
http://www.customizetalk.com/forums/viewtopic.php?t=33 but i changed a few things :p

And i used a simple timer class from http://www.cppfrance.com/code.aspx?ID=9374

All the rest is my own work :D
Congratulation! And thanks for the source (who knows, maybe I'll start produce some plugins once I'll find the time I have no more :roll: )

EDIT:
Only one question: I took a rapid look into your plugin source and the question is "why have you used a timer?"
In BS.Player SDK is available a number of callback calls that let you handle everything your plugin does without the need of a timer.
For example to know if the movie has changed (by doubleclick on the file, play button pressed, next/previous track buttons pressed etc.) there's a callback call for FILEOPEN event.

Then if you want to know if a movie is playing or not (since you want to display the watching message only if a movie is playing) you can check BSplayer status once a file is opened, and then listen for PLAY, STOP and PAUSE events... don't you? (maybe after every PAUSE event check the player status, I don't know if the PAUSE event can toggle the play status, but I think it acts like this, and sometimes toggle variables get messed up for some reasons)
Plus, if a user plays a song instead of a movie the word "watching" is not entirely correct, maybe you can check the file extension (at least for most common file names, for the unknown you can still pass the watching message)

Last suggestion:
Maybe make the "watching" (and maybe a future "listening") message customizable, so that everyone can change/translate it to fullfil his needs or follow his language style :

Just few suggestions, probably the filesize of the plugin will increase with these controls, but the instructions involved will be really reduced (and also the computing time and resources needed) :roll:

And again congratulation for the work done, keep up the great work
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
 

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