Official BS.Player forums

Official BS.Player forums (http://forum.bsplayer.com/)
-   General Talk And Support (http://forum.bsplayer.com/general-talk-support/)
-   -   BSPlayer Subtitle Plugin... (http://forum.bsplayer.com/general-talk-support/9018-bsplayer-subtitle-plugin.html)

Condor 17th September 2008 05:13 PM

BSPlayer Subtitle Plugin...
 
Shortly: Some times ago I begin with creating plugin for my favourite video player... For some reasons, I stopped this project, until few days ago when I again continue working on that... and I will try soon to finish the same!

But now, I have one question, if somebody can help me:
Is there a way to embed some simple GUI application to BSP plugin's dll?
This simple GUI will be started by pressing some keyboard key (shortcut) and have had very simple functionality!
If this is possible, is there someone that can explain me HOW to do that???
Btw, I'm using Visual Studio 2008 (GUI was created in Visual C++ Builder)...

Sorry for my bad English, I hope that you understand what I want to say (ask)...

Regards,
Stole

Tizio 17th September 2008 06:05 PM

Hi!
Since v1.0.811 (SDK updated only since v2.11.940), EV_KEY_PRESS event has been added to the SDK, so you can add a statement that checks for this event and calls a routine where you can parse the key pressed.
At this time you can show up the GUI, or you can add the visualization of the GUI at the Config or About button pression in BSplayer Plugins preferences page (respectively EV_CONFIG and EV_ABOUT events)

Take a look at C:\Program Files\Webteh\BSplayer\sdk\plugins\bspplg.h file ;)
And for an example on KeyPress and Config calls take a look at C:\Program Files\Webteh\BSplayer\sdk\plugins\C\Sample\samplep lugin.c

Condor 18th September 2008 04:03 PM

Thanks Tizio, but I think that You don't understand me, i.e. I don't well formulate my question!

The main QUESTION is:
Is there a way to EMBED some simple GUI application to BSP PLUGIN's DLL??? when I say "GUI" I thinked on some extern windowed application (for example created with Visual C++ Builder 2008, also I have source code for the same), and I want to run this app from BS.Player with some parameters!???
Simple example how it should work:
From BSP I run this application and in applications window I should have seen subtitle lines in the same moment like that's in BSP showed, with the difference that I can edit this one in my app and save on the disk!

Starting on the key press was just a suggestion how to run this program (my app), and I know how key press (EV_KEY_PRESS event) works normally... Also, I ponder both files that You suggested (bspplg.h & sampleplugin.c), and understanded all the logic of creating simple BSP plugins...

Thanks one more time, Tizio, for interested for my work, to help me!!!

Tizio 19th September 2008 10:10 AM

Unfortunately I never used GUIs in C++ programs (I always created dos like programs in C++), the only GUIs I used were with VisualBasic, but I'm sure it's something you can do (to add a GUI to your DLL file). If you know how to create a GUI in standard C++ programs, you'll be able to create it with a DLL.

To create the GUI you can use C++ Builder, but in your app (not a DLL, but a simple app) you have to make a call to a routine that actually shows the GUI, right?
This, in a normal application, will probably happen in the main routine, and in BSP plaug in will happen in the EV_KEY_PRESSED case statement..

Sorry if I can't help you any further with this topic, I planned to learn Visual C, but due to lack of time I left the project.. :(

Condor 19th September 2008 10:49 AM

Quote:

Originally Posted by Tizio
To create the GUI you can use C++ Builder, but in your app (not a DLL, but a simple app) you have to make a call to a routine that actually shows the GUI, right?
This, in a normal application, will probably happen in the main routine, and in BSP plaug in will happen in the EV_KEY_PRESSED case statement..

YES, exactly that is what I want to do, and I don't know clearly how to implement this routines that shows the GUI in the EV_KEY_PRESSED...
But I'm not going to surrender yet with this! ;)

Quote:

Originally Posted by Tizio
Sorry if I can't help you any further with this topic, I planned to learn Visual C, but due to lack of time I left the project.. :(

Thanks very much Tizio, You already helped me, and I apreciate that...

Regards,

Stole

Tizio 19th September 2008 11:04 AM

Well, if you already know how to visualize the GUI from main routine, just add that code to an external routine (maybe call it ShowGUI) then when the KeyPress event occurs, parse the key pressed, and if it's your shortcut combination make a call to the ShowGUI function...
But if you don't know how to make a GUI to show up I can't help you :P

If you manage to make it work post here your results, I'm sure many BSplayer users will be grateful ;)

Condor 19th September 2008 03:41 PM

Quote:

Originally Posted by Tizio
Well, if you already know how to visualize the GUI from main routine, just add that code to an external routine (maybe call it ShowGUI) then when the KeyPress event occurs, parse the key pressed, and if it's your shortcut combination make a call to the ShowGUI function...
But if you don't know how to make a GUI to show up I can't help you :P

Until now, I have no need to visualize GUI from main routine (I do that in Python & Java, but not in C++), so I don't know how to do that exactly, but I will try to find something about this on the internet, Google will help... ;)

Quote:

Originally Posted by Tizio
If you manage to make it work post here your results, I'm sure many BSplayer users will be grateful ;)

Of course, my friend, if I succeed, I think that it will be very useful plugin, and it will be available to ALL BSP users...

Regards

Tizio 20th September 2008 02:53 PM

Good luck ;)

Condor 21st September 2008 08:05 PM

Thanks! :D

adicoto 21st September 2008 08:13 PM

We keep the fingers crossed for you. Good luck.

BSPeter 23rd September 2008 09:38 PM

Just curious for what kind(s) of subs this plug-in is being developped.
:?:

Condor 24th September 2008 02:27 PM

Quote:

Originally Posted by adicoto
We keep the fingers crossed for you. Good luck.

Thanks! ;)

Quote:

Originally Posted by BSPeter
Just curious for what kind(s) of subs this plug-in is being developped.

First (initial) version works only with .srt (SubRip) and .sub (MicroDVD)... After, if plug-in will be accepted from wide circle of BSP users, I will add functionality for much more sub kinds...

Regards

adicoto 24th September 2008 04:50 PM

The purpose of BSPeter's question was that currently BSPlayer supports natively srt, sub, basic suport for ass/ssa and also can manage vobsub and embedded subtitles in avi and mkv. It can also dispaly rared subtiles from idx/sub in /sub subfolder of an avi file.
So, if the plugin it's not dedicated to other subtitle types (or, for example for ass/ssa full support and for divx proprietary format), it's somehow useless.

BSPeter 24th September 2008 08:29 PM

I must say that's a bit of a disappointment.
Check out BS.Player's existing features (click here)
(it even supports two different subtitles at the same time)
:(
But maybe you were e.g. thinking of subs to be displayed in a separate (detached) window?

Tizio 24th September 2008 11:25 PM

I think he wants to create a subtitles editor for BSplayer :roll:
Quote:

Originally Posted by Condor
Simple example how it should work:
From BSP I run this application and in applications window I should have seen subtitle lines in the same moment like that's in BSP showed, with the difference that I can edit this one in my app and save on the disk!


adicoto 25th September 2008 05:22 AM

Yeap, I think Tizio is right. Somehow missed that explanation.
So, another subtitle editor for BSPlayer ? :)

Condor 25th September 2008 01:20 PM

Quote:

Originally Posted by Tizio
I think he wants to create a subtitles editor for BSplayer :roll:

Yes, that's right... Thanks Tizio! ;)

Quote:

Originally Posted by adicoto
So, another subtitle editor for BSPlayer ? Smile

Yes, but this one will be embeded into BSP, i.e. there is no need to run any external applications (like SubRip, SubtitleWorkshop, TimeAdjuster) to do some basic operation on the subtitle (like time corrections, i.e. synchronization and subtitle editing, etc.)... Everything should be done FROM BSP, with huge simplicity! Simple GUI, which was reason for opening this thread, is only one small part of the whole plug-in and his funcionality!
And I know, BSP have sub time corrections (only basic, linear), but also, that changes will not be saved on HD!

And the above story, relevant to sub formats, add up to very simple explanation: I represent sub in my plug-in with my "internal format" which means that is very simple to add funcionality for new formats (of course, only thats which are supported by BSP, for other no sense...)! But this is not so matter, because this is not primary plug-in purpose... .sub and .srt are absolutely enough for me, but if somebody think that will be good to maintenance some other format - OK...

Also, I'm study and work simultaneous, so this project will not go very fast, i.e. it will not be finished at once, but I will doing it part-by-part and adding more and more funcionality...


And very IMPORTANT:
I work this for my OWN needs and purpose, BUT, like I said earlier, it will be available to ALL BSP users, and of course, I will always consider all suggestions and advices, and be thankful for that...

Regards,
Stole

adicoto 25th September 2008 01:31 PM

But BSPlayer has an embeded subtitles editor. :wink:

Condor 25th September 2008 03:29 PM

Quote:

Originally Posted by adicoto
But BSPlayer has an embeded subtitles editor. :wink:

Which not works that what I want to do... :D

adicoto 25th September 2008 06:35 PM

OK, so...what do you want to do with this plug-in ?
I recognise that I don't use BSPlayer's subtitle editor because every time I tested it, it was bugy and just get me nervous (because I just want to try using it). I am currently using an external aplication wich I am more than comfortable, with full of functionality I need. I generally create 2-3 subtitles each week and it's more than perfect for me. So...what do you want to add in this plug-in ?


All times are GMT +1. The time now is 09:04 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, 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