Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd April 2012, 19:56   #101  |  Link
Mercury_22
Registered User
 
Join Date: Dec 2007
Posts: 1,138
Quote:
Originally Posted by dukey View Post
does this happen with all your blurays ? Or just this particular frozen planet one.
I see it throws an exception when the frozen planet one starts to play the main title
No it happens with others too
I think it's better to revert rev 99 for the moment
__________________
Intel UHD Graphics 750; Win 10 22H2
Mercury_22 is offline   Reply With Quote
Old 3rd April 2012, 23:53   #102  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
Well I tracked the issue down. Well partly at least. It hangs on bd_close. Normally when it exits it throws a load of exceptions, on that frozen planet title. But if you press some keys, which happens to work in a separate thread, it hangs. Not sure why. The critical sections should protect against any thread insanity.

The frozen planet doesn't work with the latest edition though. I get this error. Hopefully useful for cb2000 ;p

Quote:
c:\users\ian\desktop\bluray\trunk\libbluray\src\libbluray\register.c:391: bd_psr
_write(): PSR4 (TITLE_NUMBER) 0x0 -> 0x4
c:\users\ian\desktop\bluray\trunk\libbluray\src\libbluray\bluray.c:2108: PSR cha
nge: psr4 = 4 (03D445F0)
destroyXlet: lookup( org.videolan.BDJXletContext@5ed01d74, /7fff002e/4001/TitleC
hangeHandler ) = framework.title.TitleChangeProxy_stub2[framework.title.TitleCha
ngeProxy@4d277e8f]
startXlet: lookup( org.videolan.BDJXletContext@5ed01d74, /7fff002e/4001/TitleCha
ngeHandler ) = framework.title.TitleChangeProxy_stub2[framework.title.TitleChang
eProxy@4d277e8f]
c:\users\ian\desktop\bluray\trunk\libbluray\src\libbluray\bdj\bdj_util.c:19: Cla
ss org/videolan/StreamInfo constructor not found
c:\users\ian\desktop\bluray\trunk\libbluray\src\libbluray\bdj\bdj_util.c:19: Cla
ss org/videolan/StreamInfo constructor not found
c:\users\ian\desktop\bluray\trunk\libbluray\src\libbluray\bdj\bdj_util.c:19: Cla
ss org/videolan/StreamInfo constructor not found
c:\users\ian\desktop\bluray\trunk\libbluray\src\libbluray\bdj\bdj_util.c:19: Cla
ss org/videolan/StreamInfo constructor not found
Thread died with exception c0000005 at pc 51ef1795 addr 0
Edit:
heres the link to vid, or menu files anyway
http://www7.zippyshare.com/v/82423600/file.html

Last edited by dukey; 4th April 2012 at 01:18.
dukey is offline   Reply With Quote
Old 4th April 2012, 02:39   #103  |  Link
cb2000
Registered User
 
Join Date: Nov 2010
Posts: 91
use same reversion of libbluray.jar and bluray.dll
cb2000 is offline   Reply With Quote
Old 4th April 2012, 07:21   #104  |  Link
Mercury_22
Registered User
 
Join Date: Dec 2007
Posts: 1,138
Quote:
Originally Posted by dukey View Post
Well I tracked the issue down. Well partly at least. It hangs on bd_close. Normally when it exits it throws a load of exceptions, on that frozen planet title. But if you press some keys, which happens to work in a separate thread, it hangs. Not sure why. The critical sections should protect against any thread insanity.

The frozen planet doesn't work with the latest edition though. I get this error. Hopefully useful for cb2000 ;p



Edit:
heres the link to vid, or menu files anyway
http://www7.zippyshare.com/v/82423600/file.html
F.P. works with the latest edition here ! except the "stops responding after stop and exit in the main movie" introduced in rev 99 of course
__________________
Intel UHD Graphics 750; Win 10 22H2
Mercury_22 is offline   Reply With Quote
Old 4th April 2012, 10:15   #105  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
Quote:
Originally Posted by cb2000 View Post
use same reversion of libbluray.jar and bluray.dll
yeah that worked
cb2000 any idea why calling bd_user_input on a separate thread would cause
bd_close to hang ?
It doesn't do it on all titles, just some I think.
dukey is offline   Reply With Quote
Old 4th April 2012, 22:29   #106  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
Okay I found out exactly what's happening. I assumed libbluray was thread safe since it uses mutexes to protects its internal state, but it's not.

When
Code:
void bdj_process_event(BDJAVA *bdjava, unsigned ev, unsigned param)
is called. It calls

Code:
(*bdjava->jvm)->AttachCurrentThread(bdjava->jvm, (void**)&env, NULL);
If you are just using a single thread, this is a no-op according to the documentation. But if the current thread has changed it attaches the new one. This is fine, until it exits.

Quote:
The VM waits until the main thread is the only user thread before it actually unloads. User threads include both Java threads and attached native threads.
So we must use DetachCurrentThread somewhere to fix this. If we can fix this I can probably finish the rest of the control interface
dukey is offline   Reply With Quote
Old 6th April 2012, 07:49   #107  |  Link
Mercury_22
Registered User
 
Join Date: Dec 2007
Posts: 1,138
@dukey after your latest changes building it's failing
Code:
2>BDSource.obj : error LNK2019: unresolved external symbol "void __cdecl PTSToHMSF(__int64,struct tagDVD_HMSF_TIMECODE *)" (?PTSToHMSF@@YAX_JPAUtagDVD_HMSF_TIMECODE@@@Z) referenced in function "public: virtual long __stdcall CBDSource::GetTotalTitleTime(struct tagDVD_HMSF_TIMECODE *)" (?GetTotalTitleTime@CBDSource@@UAGJPAUtagDVD_HMSF_TIMECODE@@@Z)
2>BDSource.obj : error LNK2019: unresolved external symbol "__int64 __cdecl HMSFToPTS(struct tagDVD_HMSF_TIMECODE *)" (?HMSFToPTS@@YA_JPAUtagDVD_HMSF_TIMECODE@@@Z) referenced in function "public: virtual long __stdcall CBDSource::PlayAtTime(struct tagDVD_HMSF_TIMECODE *)" (?PlayAtTime@CBDSource@@UAGJPAUtagDVD_HMSF_TIMECODE@@@Z)
2>C:\DSLibBluray\Win32\Debug\dslibbluray.ax : fatal error LNK1120: 2 unresolved externals
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:00.88
========== Build: 1 succeeded, 1 failed, 4 up-to-date, 0 skipped ==========
__________________
Intel UHD Graphics 750; Win 10 22H2
Mercury_22 is offline   Reply With Quote
Old 6th April 2012, 09:56   #108  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
try now, i added the files, just forgot to submit changes to project files
dukey is offline   Reply With Quote
Old 6th April 2012, 10:08   #109  |  Link
Mercury_22
Registered User
 
Join Date: Dec 2007
Posts: 1,138
Quote:
Originally Posted by dukey View Post
try now, i added the files, just forgot to submit changes to project files
It's working now
__________________
Intel UHD Graphics 750; Win 10 22H2
Mercury_22 is offline   Reply With Quote
Old 9th April 2012, 12:29   #110  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
Mercury_22,
you got any .m2ts files with enhanced ac3 audio ? I am writing stream parsers at the moment. Finished ac3, but need some test files for e-ac3
dukey is offline   Reply With Quote
Old 9th April 2012, 12:42   #111  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
E-AC3 on BD doesn't exist in the real world, its only used on the dolby demo disc.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 9th April 2012, 12:51   #112  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
Okay, thanks for the heads up. I'm only parsing the stream headers so its only a few lines of code.
dukey is offline   Reply With Quote
Old 9th April 2012, 13:13   #113  |  Link
Mercury_22
Registered User
 
Join Date: Dec 2007
Posts: 1,138
Quote:
Originally Posted by dukey View Post
Mercury_22,
you got any .m2ts files with enhanced ac3 audio ? I am writing stream parsers at the moment. Finished ac3, but need some test files for e-ac3
Here it is

@ Nev if it's not too much to ask can you help make "dslibbluray" properly decode TrueHD with LAVAudio ?
Quote:
Originally Posted by nevcairiel View Post
TrueHD is special, the Blu-ray source filter needs to remove the embedded AC3 or it won't work properly.
With LAV I'm getting
Code:
[truehd @ 02ad42e0] Invalid nonrestart_substr.
[truehd @ 02ad42e0] mlpparse: Parity check failed.
[truehd @ 02ad42e0] Lossless check failed - expected 85, calculated 5f.
[truehd @ 02ad42e0] mlpparse: Parity check failed.
[truehd @ 02ad42e0] Lossless check failed - expected 19, calculated b7.
...
__________________
Intel UHD Graphics 750; Win 10 22H2

Last edited by Mercury_22; 9th April 2012 at 13:15.
Mercury_22 is offline   Reply With Quote
Old 9th April 2012, 13:21   #114  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
Quote:
Originally Posted by Mercury_22 View Post
@ Nev if it's not too much to ask can you help make "dslibbluray" properly decode TrueHD with LAVAudio ?
No thanks, my time is already occupied.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 9th April 2012, 13:29   #115  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
If you point me in the right direction can probably write the code
dukey is offline   Reply With Quote
Old 9th April 2012, 13:38   #116  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
Its actually pretty simple. You need to check the extended stream id in the PES Header.
http://dvd.sourceforge.net/dvdinfo/pes-hdr.html

In PES Extension 2 (at the bottom of the page), the bits marked "Reserved" are the extended stream id.
If the main stream_type == 0x83 (TrueHD) and extended_stream_id == 0x76, then that PES packet is for the AC3 substream, and needs to be skipped.

You can see the parsing in ffmpeg here:
http://git.1f0.de/gitweb?p=ffmpeg.gi...9;hb=HEAD#l913
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 9th April 2012, 13:42   #117  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
Thanks, that should help a lot
dukey is offline   Reply With Quote
Old 9th April 2012, 13:46   #118  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
While i'm here, i have another question about the need of the special EVR Mixer.

Is all its required for the need to mix the RGB Overlays on top of the video image?
Or is there more?

If the RGB overlay is all, i could easily make for example LAV Video do that (without DXVA, at least), giving us way more flexibility in how the graph is setup.
If i could get the EVR requirement removed, it would be quite a bit more interesting for me, i might even start helping the development if you let me. I don't want to start my own BD project, but i want BDs to work.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 9th April 2012 at 13:53.
nevcairiel is offline   Reply With Quote
Old 9th April 2012, 14:04   #119  |  Link
Mercury_22
Registered User
 
Join Date: Dec 2007
Posts: 1,138
That will be great and CB2000 knows about the EVR
@dukey Did you manage to do something about the LPCM with LAVAudio ?
__________________
Intel UHD Graphics 750; Win 10 22H2
Mercury_22 is offline   Reply With Quote
Old 9th April 2012, 15:35   #120  |  Link
dukey
Registered User
 
Join Date: Dec 2005
Posts: 560
Quote:
Originally Posted by nevcairiel View Post
While i'm here, i have another question about the need of the special EVR Mixer.

Is all its required for the need to mix the RGB Overlays on top of the video image?
Or is there more?

If the RGB overlay is all, i could easily make for example LAV Video do that (without DXVA, at least), giving us way more flexibility in how the graph is setup.
If i could get the EVR requirement removed, it would be quite a bit more interesting for me, i might even start helping the development if you let me. I don't want to start my own BD project, but i want BDs to work.
I think the problem was sometimes the primary video stream stops, and only the substreams render. So with the default evr mixer or vrm9 nothing will render, hence the need for the custom mixer. The custom mixer actually works fairly transparently. You just need to create an instance of it and it pretty much works. I had to make a few changes to get it to work with my custom presenter, ie to make it thread safe with regards to direct3d. I've done a fair bit of work on the mixer, so anyone that uses a custom presenter only minimal changes would be required.
dukey is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.