Official BS.Player forums  

Go Back   Official BS.Player forums > Main forum > General Talk And Support

General Talk And Support General talk and peer-to-peer support about BS.Player and other video and audio multimedia players.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 20th September 2011
Junior Member
BS.player Regular User
 
Join Date: Mar 2011
Location: Romania
Age: 34
Posts: 20
Rep Power: 0
apophys is on a distinguished road
Default BSP_OpenFile, Unicode and C++

Hi guys,

Sorry if this has been posted on the forum, but I haven't found anything.

I'm developing an Android control app for bsplayer and I'm having trouble with BSP_OpenFile and unicode filenames. It works ok for ascii ones.

Here's the code I use:

int bsplayer_openFile(HWND bsp_hand, HWND bsremote_hwnd, bool fullscreen, wchar_t* filename)
{

COPYDATASTRUCT cds;

cds.dwData = BSP_OpenFile;
cds.lpData = (void *) filename;
// cds.cbData = (DWORD) strlen ((char *)cds.lpData)+1;
cds.cbData = (DWORD) (wcslen ((wchar_t *)cds.lpData))*sizeof(wchar_t)+2;

int result = SendMessage(bsp_hand, WM_COPYDATA, (WPARAM) bsremote_hwnd, (LPARAM)&cds);



}


BSplayer simply doesn't reacct, so probably I'm giving it data in the wrong format.

Could you help me with this?
Reply With Quote
  #2 (permalink)  
Old 20th September 2011
Junior Member
BS.player Regular User
 
Join Date: Mar 2011
Location: Romania
Age: 34
Posts: 20
Rep Power: 0
apophys is on a distinguished road
Default

Here's what filename I use for testing:

другие приключения Шурика.avi
Reply With Quote
  #3 (permalink)  
Old 22nd September 2011
Junior Member
BS.player Regular User
 
Join Date: Mar 2011
Location: Romania
Age: 34
Posts: 20
Rep Power: 0
apophys is on a distinguished road
Default

This works only for ASCII strings, not unicode:

int bsplayer_openFile(HWND bsp_hand, HWND bsremote_hwnd, bool fullscreen, wchar_t* filename)
{
char* fff = (char*) calloc(1000, 1);

size_t sizeRequired = WideCharToMultiByte( 950, 0, filename, -1, fff, 1000, NULL, NULL);

COPYDATASTRUCT cds;
cds.dwData = BSP_OpenFile;
cds.lpData = (void *) fff;
cds.cbData = (DWORD) sizeRequired +2;

int result = SendMessage(bsp_hand, WM_COPYDATA, (WPARAM) bsremote_hwnd, (LPARAM)&cds);

..

}
Reply With Quote
  #4 (permalink)  
Old 24th September 2011
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 22
Tizio will become famous soon enough
Default

I don't know if you actually need to forcedly call the SendMessageW function, but the problem can lay in BSplayer code.
Only a BSplayer member can reply to this last statement, as for my suggestion in using SendMessageW... I'm not sure, not coding in C since a lot of time and never dealt with unicode strings before, sorry
__________________
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
  #5 (permalink)  
Old 25th September 2011
Junior Member
BS.player Regular User
 
Join Date: Mar 2011
Location: Romania
Age: 34
Posts: 20
Rep Power: 0
apophys is on a distinguished road
Default

Quote:
Originally Posted by Tizio View Post
I don't know if you actually need to forcedly call the SendMessageW function, but the problem can lay in BSplayer code.
Only a BSplayer member can reply to this last statement, as for my suggestion in using SendMessageW... I'm not sure, not coding in C since a lot of time and never dealt with unicode strings before, sorry
Thanks for the tip, I'll give it a shot. Though I think the problem is on the bsplayer side of things...
Reply With Quote
  #6 (permalink)  
Old 26th September 2011
Ico-man's Avatar
BS.Support
BS.Player Power User
 
Join Date: Sep 2006
Location: Slovenia
Posts: 1,468
Rep Power: 10
Ico-man is on a distinguished road
Default

Support for BSP_OpenFileW will be added in next beta. Unicode should work then.
Reply With Quote
  #7 (permalink)  
Old 2nd October 2011
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 22
Tizio will become famous soon enough
Default

Thank you very much for this addition
__________________
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
  #8 (permalink)  
Old 2nd October 2011
Junior Member
BS.player Regular User
 
Join Date: Mar 2011
Location: Romania
Age: 34
Posts: 20
Rep Power: 0
apophys is on a distinguished road
Default

Quote:
Originally Posted by Ico-man View Post
Support for BSP_OpenFileW will be added in next beta. Unicode should work then.
Thanks, looking forward to the next release :D
Reply With Quote
  #9 (permalink)  
Old 7th October 2011
BSPeter's Avatar
Moderator
BS.Player Master
 
Join Date: Nov 2002
Location: The Netherlands
Posts: 5,463
Rep Power: 27
BSPeter is on a distinguished road
Default

Next release (beta) just published: BSPlayer 2.59 beta is released!
__________________
Help2Help (click) BSplayer: simply the best & most versatile (Build 1072 Dutch language here!)
When posting always mention your computer's OS and the version and build number(!) of BS.Player as used by you,
as well as - if applicable and especially when encountering problems - the type(s) of the file(s) mentioned in your post.
Private messages/Visitor messages are NOT for seeking personal help with respect to BS.Player! Instead use the forums!
Reply With Quote
  #10 (permalink)  
Old 8th October 2011
Junior Member
BS.player Regular User
 
Join Date: Mar 2011
Location: Romania
Age: 34
Posts: 20
Rep Power: 0
apophys is on a distinguished road
Thumbs up

Quote:
Originally Posted by BSPeter View Post
Next release (beta) just published: BSPlayer 2.59 beta is released!
Sweet! I'll test it and get back to you.

Thanks!
Reply With Quote
  #11 (permalink)  
Old 7th November 2011
Junior Member
BS.player Regular User
 
Join Date: Mar 2011
Location: Romania
Age: 34
Posts: 20
Rep Power: 0
apophys is on a distinguished road
Thumbs up

Quote:
Originally Posted by apophys View Post
Sweet! I'll test it and get back to you.

Thanks!
Hi guys!

I finally got around to implementing unicode in bsremote and it works like a charm. Thanks a lot for responding to the request so quickly!

When you have some more time on your hands , could you also add support in the API for unicode subtitles? Nobody asked for that yet, but I assume it will be needed at some point.

Great work!
Reply With Quote
Reply

Tags
bspopenfile, unicode

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Full Unicode support? uly Feature Requests, Feedback And Suggestions 0 10th January 2007 11:05 AM
QUERY: unicode support kevingpo Feature Requests, Feedback And Suggestions 6 3rd December 2006 07:55 PM
File with Unicode Char & Folder Handling uncpotato Bug Reports And Codecs 0 24th June 2006 11:26 AM
codes that change color of subtitles. and the unicode issue. delikedi General Talk And Support 0 27th April 2005 08:47 AM
subtitles under unicode or rtf format don't work blueQ Bug Reports And Codecs 0 29th April 2004 09:37 PM


All times are GMT +1. The time now is 10:01 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