majstang Posted May 5, 2017 Share Posted May 5, 2017 Seems to work as long as the files passed to function doesn't contain any Unicode special chars in file name. ; Files with special Unicode chars renders this OSD message = Cannot render Mediafile/Input pin, error: 0x80040216 FileToPlay := "F:\TV\Recording Service\20170429_23-54-01_Kanal 5_Ender’s Game - ★★★★★★★☆☆☆.ts" FileToPlay := "F:\TV\Recording Service\20170505_19-59-01_Discovery Channel_Gold Rush Alaska - S01E03 - “Hypothermia”.ts" ; These files play OK FileToPlay := "F:\TV\Recording Service\20170502_19-29-04_SVT2 HD_Hundra procent bonde - S02E06.ts" FileToPlay := "F:\Edited Recordings\20170305_01-24-01_TV8_Sea of Love -.ts" iDVBViewer.PlayFile(FileToPlay) 1 Quote Link to comment
Griga Posted May 6, 2017 Share Posted May 6, 2017 I can't see why, because the implementation procedure TDVBViewer.PlayFile(const Filename: WideString); begin frmMain.LoadMediafile(Filename, rtSettings); end; and drag & drop of files into the main window are both using LoadMediaFile. Drag & drop works here with filenames containing Unicode special characters. P.S. No, there is definitely something wrong because here DVBViewer always uses the LAV Source Filter for playing a dragged & dropped TS file with Unicode special characters. It should be the DVBViewer Filter. Let's see what the debugger reveals... Quote Link to comment
Griga Posted May 6, 2017 Share Posted May 6, 2017 Gotcha Will be fixed in the upcoming bugfix release. Quote Link to comment
majstang Posted May 12, 2017 Author Share Posted May 12, 2017 Quote Change Log DVBViewer Pro 6.0.2 Fix: File Playback: File playback with the DVBViewer Filter did not work if the filename contained characters that were not available in the local character set. Hmm...surprisingly enough I still cannot play files with special chars through COM. Cannot render Mediafile/Input pin, error: has changed from 0x80040216 to 0x80004005. Quote Link to comment
Griga Posted May 13, 2017 Share Posted May 13, 2017 Does it work with drag & drop to the main window? Here it works with Test_File_★★★★★★★☆☆☆.ts Quote Link to comment
majstang Posted May 13, 2017 Author Share Posted May 13, 2017 (edited) 4 hours ago, Griga said: Does it work with drag & drop to the main window? Yes, that is no problem. Hmm...this is strange Invoking COM with AutoHotkey or VBScript like this brings out the problem. VBScript: Set iDVBViewer = GetObject(, "DVBViewerServer.DVBViewer") iDVBViewer.PlayFile("F:\Edited Recordings\20170305_01-24-01_TV8_Sea of Love -.ts") 'This works WScript.Sleep 7000 iDVBViewer.PlayFile("F:\TV\Recording Service\20170512_23-59-02_TV8_Åskhjärta - ★★★★★★★☆☆☆.ts") 'Cannot render Mediafile/Input pin, error: 0x80004005.undeifined error AHK: iDVBViewer := ComObjActive("DVBViewerServer.DVBViewer") iDVBViewer.PlayFile("F:\Edited Recordings\20170305_01-24-01_TV8_Sea of Love -.ts") ; This works Sleep 7000 iDVBViewer.PlayFile("F:\TV\Recording Service\20170512_23-59-02_TV8_Åskhjärta - ★★★★★★★☆☆☆.ts") ; Cannot render Mediafile/Input pin, error: 0x80004005.undeifined error The funny part is it suddenly works if using the thumbnailed app as a drop target (which is how Im gonna utilize it) and executing the same code as above: ; ---------------------------------------------------------------------------------------------------------------------------------- ;---Drag and drop for the DVBViewer thumbnail ; ---------------------------------------------------------------------------------------------------------------------------------- IDropTargetOnDrop_THUMB(TargetObject, pDataObj, KeyState, X, Y, DropEffect) { Global iDVBViewer ; Get the dropped files IDataObject_GetDroppedFiles(pDataObj, DroppedFiles) For Index, File In DroppedFiles iDVBViewer.PlayFile(File) Return 0 } Edited May 13, 2017 by majstang Quote Link to comment
Griga Posted May 13, 2017 Share Posted May 13, 2017 Looks like the filename is converted to a one-byte (local) character set in between. DVBViewer doesn't do it (see implementation above - it's WideString = UTF-16 throughout). Seems there is quite a lot happening in the COM & Script background... Quote Link to comment
majstang Posted May 13, 2017 Author Share Posted May 13, 2017 (edited) 1 hour ago, Griga said: Looks like the filename is converted to a one-byte (local) character set in between. DVBViewer doesn't do it (see implementation above - it's WideString = UTF-16 throughout). Seems there is quite a lot happening in the COM & Script background... Ah, these COM IDispatch interface helper functions which are handling conversions seems to do some funny stuff...throwing "curve-balls" trickier than the next Why its not doing that conversion in my last (working) code sample is the question... Edited May 13, 2017 by majstang Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.