[libbluray-devel] BD-J: set stream selection registers before selecting playlist
hpi1
git at videolan.org
Mon Apr 14 11:16:29 CEST 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Apr 13 22:13:41 2014 +0300| [ed19846756763dc9ef13e3f9f42db2ce89854ffe] | committer: hpi1
BD-J: set stream selection registers before selecting playlist
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ed19846756763dc9ef13e3f9f42db2ce89854ffe
---
.../videolan/media/content/playlist/Handler.java | 33 ++++++++++----------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java b/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
index c01b5d5..136558e 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
@@ -90,6 +90,23 @@ public class Handler extends BDHandler {
protected ControllerErrorEvent doPrefetch() {
synchronized (this) {
try {
+ int stream;
+ stream = locator.getPrimaryAudioStreamNumber();
+ if (stream > 0)
+ Libbluray.writePSR(Libbluray.PSR_PRIMARY_AUDIO_ID, stream);
+ stream = locator.getPGTextStreamNumber();
+ if (stream > 0) {
+ Libbluray.writePSR(Libbluray.PSR_PG_STREAM, stream, 0x00000fff);
+ }
+ stream = locator.getSecondaryVideoStreamNumber();
+ if (stream > 0) {
+ Libbluray.writePSR(Libbluray.PSR_SECONDARY_AUDIO_VIDEO, stream << 8, 0x0000ff00);
+ }
+ stream = locator.getSecondaryAudioStreamNumber();
+ if (stream > 0) {
+ Libbluray.writePSR(Libbluray.PSR_SECONDARY_AUDIO_VIDEO, stream, 0x000000ff);
+ }
+
int pl = locator.getPlayListId();
long time = -1;
int pi = -1, mark = -1;
@@ -107,22 +124,6 @@ public class Handler extends BDHandler {
updateTime(new Time(Libbluray.tellTime() * TO_SECONDS));
- int stream;
- stream = locator.getPrimaryAudioStreamNumber();
- if (stream > 0)
- Libbluray.writePSR(Libbluray.PSR_PRIMARY_AUDIO_ID, stream);
- stream = locator.getPGTextStreamNumber();
- if (stream > 0) {
- Libbluray.writePSR(Libbluray.PSR_PG_STREAM, stream, 0x00000fff);
- }
- stream = locator.getSecondaryVideoStreamNumber();
- if (stream > 0) {
- Libbluray.writePSR(Libbluray.PSR_SECONDARY_AUDIO_VIDEO, stream << 8, 0x0000ff00);
- }
- stream = locator.getSecondaryAudioStreamNumber();
- if (stream > 0) {
- Libbluray.writePSR(Libbluray.PSR_SECONDARY_AUDIO_VIDEO, stream, 0x000000ff);
- }
} catch (Throwable e) {
return new ConnectionErrorEvent(this);
}
More information about the libbluray-devel
mailing list