[libbluray-devel] [Git][videolan/libbluray][master] 4 commits: Remove useless error message

Petri Hintukainen gitlab at videolan.org
Wed Feb 27 08:36:24 CET 2019


Petri Hintukainen pushed to branch master at VideoLAN / libbluray


Commits:
6096cf40 by hpi1 at 2019-02-27T07:29:39Z
Remove useless error message

- - - - -
b2fcf2dc by hpi1 at 2019-02-27T07:29:39Z
Cosmetics

- - - - -
7f437135 by hpi1 at 2019-02-27T07:29:39Z
Make inner class static

- - - - -
2b0b711a by hpi1 at 2019-02-27T07:29:39Z
Fix using default encoding

- - - - -


6 changed files:

- src/libbluray/bdj/java-build-support/java/awt/event/FocusEvent.java
- src/libbluray/bdj/java-build-support/sun/awt/CausedFocusEvent.java
- src/libbluray/bdj/java/org/videolan/Logger.java
- src/libbluray/bdnav/navigation.c
- src/libbluray/bdnav/navigation.h
- src/libbluray/bluray.c


Changes:

=====================================
src/libbluray/bdj/java-build-support/java/awt/event/FocusEvent.java
=====================================
@@ -44,7 +44,7 @@ public class FocusEvent extends ComponentEvent {
             throw new Error("This class should not be included at run time");
     }
 
-    public class /* enum */ Cause {
+    public static class /* enum */ Cause {
     }
 
     /* Needed when compiling for HaVi */


=====================================
src/libbluray/bdj/java-build-support/sun/awt/CausedFocusEvent.java
=====================================
@@ -44,7 +44,7 @@ public class CausedFocusEvent extends FocusEvent {
             throw new Error("This class should not be included at run time");
     }
 
-    public class /* enum */ Cause {
+    public static class /* enum */ Cause {
     };
 
     public CausedFocusEvent(Component src, int id) {


=====================================
src/libbluray/bdj/java/org/videolan/Logger.java
=====================================
@@ -30,8 +30,12 @@ public class Logger {
 
         // capture stdout and stderr from on-disc applets
         // (those produce useful debug information sometimes)
-        System.setOut(createCapture(System.out, false));
-        System.setErr(createCapture(System.err, true));
+        try {
+            System.setOut(createCapture(System.out, false));
+            System.setErr(createCapture(System.err, true));
+        } catch (java.io.UnsupportedEncodingException uee) {
+            System.err.println("Error capturing stdout/stderr: " + uee);
+        }
 
         prop = System.getProperty("debug.unimplemented.throw");
         if (prop != null && prop.equalsIgnoreCase("YES")) {
@@ -73,8 +77,10 @@ public class Logger {
         return new Location();
     }
 
-    private static PrintStream createCapture(final PrintStream printStream, final boolean error) {
-        return new PrintStream(printStream) {
+    private static PrintStream createCapture(final PrintStream printStream, final boolean error)
+        throws java.io.UnsupportedEncodingException {
+
+        return new PrintStream(printStream, false, "UTF-8") {
             public void print(final String string) {
                 Logger.log(error, string);
             }


=====================================
src/libbluray/bdnav/navigation.c
=====================================
@@ -511,7 +511,7 @@ void nav_free_title_list(NAV_TITLE_LIST **title_list)
  *
  */
 
-uint8_t nav_lookup_aspect(NAV_CLIP *clip, int pid)
+uint8_t nav_clip_lookup_aspect(NAV_CLIP *clip, int pid)
 {
     CLPI_PROG *progs;
     int ii, jj;
@@ -955,7 +955,7 @@ NAV_CLIP* nav_packet_search(NAV_TITLE *title, uint32_t pkt, uint32_t *clip_pkt,
 //    Search to the timestamp obtained from nav_angle_change_search using
 //    nav_clip_time_search. Otherwise start at the start_pkt defined 
 //    by the clip.
-uint32_t nav_angle_change_search(NAV_CLIP *clip, uint32_t pkt, uint32_t *time)
+uint32_t nav_clip_angle_change_search(NAV_CLIP *clip, uint32_t pkt, uint32_t *time)
 {
     if (clip->cl == NULL) {
         return pkt;


=====================================
src/libbluray/bdnav/navigation.h
=====================================
@@ -141,24 +141,33 @@ struct nav_title_list_s
     unsigned int     main_title_idx;
 };
 
-BD_PRIVATE uint8_t nav_lookup_aspect(NAV_CLIP *clip, int pid);
+/* title list */
+
+BD_PRIVATE NAV_TITLE_LIST* nav_get_title_list(struct bd_disc *disc, uint32_t flags, uint32_t min_title_length) BD_ATTR_MALLOC;
+BD_PRIVATE void nav_free_title_list(NAV_TITLE_LIST **title_list);
+
+/* title ops */
+
 BD_PRIVATE NAV_TITLE* nav_title_open(struct bd_disc *disc, const char *playlist, unsigned angle) BD_ATTR_MALLOC;
 BD_PRIVATE void nav_title_close(NAV_TITLE **title);
+
 BD_PRIVATE NAV_CLIP* nav_next_clip(NAV_TITLE *title, NAV_CLIP *clip);
+BD_PRIVATE uint32_t  nav_chapter_get_current(NAV_TITLE *title, uint32_t title_pkt);
+BD_PRIVATE NAV_CLIP* nav_set_angle(NAV_TITLE *title, NAV_CLIP *clip, unsigned angle);
+
 BD_PRIVATE NAV_CLIP* nav_packet_search(NAV_TITLE *title, uint32_t pkt, uint32_t *clip_pkt,
                                        uint32_t *out_pkt, uint32_t *out_time);
-BD_PRIVATE void nav_clip_packet_search(NAV_CLIP *clip, uint32_t pkt, uint32_t *clip_pkt, uint32_t *clip_time);
 BD_PRIVATE NAV_CLIP* nav_time_search(NAV_TITLE *title, uint32_t tick, uint32_t *clip_pkt, uint32_t *out_pkt);
-BD_PRIVATE void nav_clip_time_search(NAV_CLIP *clip, uint32_t tick, uint32_t *clip_pkt, uint32_t *out_pkt);
 BD_PRIVATE NAV_CLIP* nav_chapter_search(NAV_TITLE *title, unsigned chapter, uint32_t *clip_pkt, uint32_t *out_pkt);
-BD_PRIVATE uint32_t nav_chapter_get_current(NAV_TITLE *title, uint32_t title_pkt);
 BD_PRIVATE NAV_CLIP* nav_mark_search(NAV_TITLE *title, unsigned mark, uint32_t *clip_pkt, uint32_t *out_pkt);
-BD_PRIVATE uint32_t nav_angle_change_search(NAV_CLIP *clip, uint32_t pkt, uint32_t *time);
-BD_PRIVATE NAV_CLIP* nav_set_angle(NAV_TITLE *title, NAV_CLIP *clip, unsigned angle);
 
-BD_PRIVATE NAV_TITLE_LIST* nav_get_title_list(struct bd_disc *disc, uint32_t flags, uint32_t min_title_length) BD_ATTR_MALLOC;
-BD_PRIVATE void nav_free_title_list(NAV_TITLE_LIST **title_list);
+/* clip ops */
+
+BD_PRIVATE uint32_t nav_clip_angle_change_search(NAV_CLIP *clip, uint32_t pkt, uint32_t *time);
+BD_PRIVATE void nav_clip_time_search(NAV_CLIP *clip, uint32_t tick, uint32_t *clip_pkt, uint32_t *out_pkt);
+BD_PRIVATE void nav_clip_packet_search(NAV_CLIP *clip, uint32_t pkt, uint32_t *clip_pkt, uint32_t *clip_time);
 
 BD_PRIVATE char *nav_clip_textst_font(NAV_CLIP *clip, int index);
+BD_PRIVATE uint8_t nav_clip_lookup_aspect(NAV_CLIP *clip, int pid);
 
 #endif // _NAVIGATION_H_


=====================================
src/libbluray/bluray.c
=====================================
@@ -2521,8 +2521,8 @@ void bd_seamless_angle_change(BLURAY *bd, unsigned angle)
     bd_mutex_lock(&bd->mutex);
 
     clip_pkt = SPN(bd->st0.clip_pos + 191);
-    bd->angle_change_pkt = nav_angle_change_search(bd->st0.clip, clip_pkt,
-                                                   &bd->angle_change_time);
+    bd->angle_change_pkt = nav_clip_angle_change_search(bd->st0.clip, clip_pkt,
+                                                        &bd->angle_change_time);
     bd->request_angle = angle;
     bd->seamless_angle_change = 1;
 
@@ -2536,7 +2536,6 @@ void bd_seamless_angle_change(BLURAY *bd, unsigned angle)
 uint32_t bd_get_titles(BLURAY *bd, uint8_t flags, uint32_t min_title_length)
 {
     if (!bd) {
-        BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bd_get_titles(NULL) failed\n");
         return 0;
     }
 
@@ -2590,7 +2589,7 @@ static int _copy_streams(NAV_CLIP *clip, BLURAY_STREAM_INFO **pstreams, MPLS_STR
         streams[ii].char_code = si[ii].char_code;
         memcpy(streams[ii].lang, si[ii].lang, 4);
         streams[ii].pid = si[ii].pid;
-        streams[ii].aspect = nav_lookup_aspect(clip, si[ii].pid);
+        streams[ii].aspect = nav_clip_lookup_aspect(clip, si[ii].pid);
         if ((si->stream_type == 2) || (si->stream_type == 3))
             streams[ii].subpath_id = si->subpath_id;
         else



View it on GitLab: https://code.videolan.org/videolan/libbluray/compare/a6faca515537781efba3560c68ee0b9f29884cef...2b0b711a70ddb0731fdc63430b477839f7f4260b

-- 
View it on GitLab: https://code.videolan.org/videolan/libbluray/compare/a6faca515537781efba3560c68ee0b9f29884cef...2b0b711a70ddb0731fdc63430b477839f7f4260b
You're receiving this email because of your account on code.videolan.org.


More information about the libbluray-devel mailing list