[libbluray-devel] re-order fields in public structs

hpi1 git at videolan.org
Tue Feb 21 22:26:53 CET 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Feb 21 21:53:48 2017 +0200| [89171109593c1800840d6bd84c494c3ab0384d8a] | committer: hpi1

re-order fields in public structs

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=89171109593c1800840d6bd84c494c3ab0384d8a
---

 src/libbluray/bluray.h           | 60 +++++++++++++++++++---------------------
 src/libbluray/decoders/overlay.h | 10 +++----
 2 files changed, 33 insertions(+), 37 deletions(-)

diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h
index c8be696..08e884d 100644
--- a/src/libbluray/bluray.h
+++ b/src/libbluray/bluray.h
@@ -69,39 +69,33 @@ typedef struct {
 typedef struct {
     uint8_t  bluray_detected;
 
+    /* Disc ID */
+    const char *disc_name;     /* optional disc name in preferred language */
+    const char *udf_volume_id; /* optional UDF volume identifier */
+    uint8_t     disc_id[20];
+
+    /* HDMV / BD-J titles */
+    uint8_t  no_menu_support;            /* 1 if this disc can't be played using on-disc menus */
     uint8_t  first_play_supported;
     uint8_t  top_menu_supported;
 
+    uint32_t             num_titles;
+    const BLURAY_TITLE  *const *titles;  /* index is title number 1 ... N */
+    const BLURAY_TITLE  *first_play;     /* titles[N+1].   NULL if not present on the disc. */
+    const BLURAY_TITLE  *top_menu;       /* titles[0]. NULL if not present on the disc. */
+
     uint32_t num_hdmv_titles;
     uint32_t num_bdj_titles;
     uint32_t num_unsupported_titles;
 
-    uint8_t  aacs_detected;
-    uint8_t  libaacs_detected;
-    uint8_t  aacs_handled;
-
-    uint8_t  bdplus_detected;
-    uint8_t  libbdplus_detected;
-    uint8_t  bdplus_handled;
-
-    /* aacs error code */
-    int      aacs_error_code;
-    /* aacs MKB version */
-    int      aacs_mkbv;
-
-    /* Disc ID */
-    uint8_t  disc_id[20];
-
-    /* BD-J */
+    /* BD-J info  (valid only if disc uses BD-J) */
     uint8_t  bdj_detected;     /* 1 if disc uses BD-J */
     uint8_t  bdj_supported;    /* 1 if BD-J support was compiled in */
     uint8_t  libjvm_detected;  /* 1 if usable Java VM was found */
     uint8_t  bdj_handled;      /* 1 if usable Java VM + libbluray.jar was found */
 
-    /* BD+ content code generation */
-    uint8_t  bdplus_gen;
-    /* BD+ content code relese date */
-    uint32_t bdplus_date;      /* (year << 16) | (month << 8) | day */
+    char bdj_org_id[9];        /* (BD-J) disc organization ID */
+    char bdj_disc_id[33];      /* (BD-J) disc ID */
 
     /* disc application info */
     uint8_t video_format;             /* bd_video_format_e */
@@ -110,18 +104,21 @@ typedef struct {
     uint8_t initial_output_mode_preference;   /* 0 - 2D, 1 - 3D */
     uint8_t provider_data[32];
 
-    /* HDMV / BD-J titles */
-    uint32_t             num_titles;
-    const BLURAY_TITLE  *const *titles;  /* index is title number 1 ... N */
-    const BLURAY_TITLE  *first_play;     /* titles[N+1].   NULL if not present on the disc. */
-    const BLURAY_TITLE  *top_menu;       /* titles[0]. NULL if not present on the disc. */
+    /* AACS info  (valid only if disc uses AACS) */
+    uint8_t  aacs_detected;       /* 1 if disc is using AACS encoding */
+    uint8_t  libaacs_detected;    /* 1 if usable AACS decoding library was found */
+    uint8_t  aacs_handled;        /* 1 if disc is using supported AACS encoding */
 
-    char bdj_org_id[9];      /* (BD-J) disc organization ID */
-    char bdj_disc_id[33];    /* (BD-J) disc ID */
+    int      aacs_error_code;     /* AACS error code (BD_AACS_*) */
+    int      aacs_mkbv;           /* AACS MKB version */
 
-    const char *udf_volume_id; /* optional UDF volume identifier */
+    /* BD+ info  (valid only if disc uses BD+) */
+    uint8_t  bdplus_detected;     /* 1 if disc is using BD+ encoding */
+    uint8_t  libbdplus_detected;  /* 1 if usable BD+ decoding library was found */
+    uint8_t  bdplus_handled;      /* 1 if disc is using supporred BD+ encoding */
 
-    uint8_t no_menu_support;   /* 1 if this disc can't be played using on-disc menus */
+    uint8_t  bdplus_gen;          /* BD+ content code generation */
+    uint32_t bdplus_date;         /* BD+ content code relese date ((year<<16)|(month<<8)|day) */
 
 } BLURAY_DISC_INFO;
 
@@ -271,10 +268,9 @@ typedef struct bd_title_info {
     uint32_t             clip_count;
     uint8_t              angle_count;
     uint32_t             chapter_count;
+    uint32_t             mark_count;
     BLURAY_CLIP_INFO     *clips;
     BLURAY_TITLE_CHAPTER *chapters;
-
-    uint32_t             mark_count;
     BLURAY_TITLE_MARK    *marks;
 } BLURAY_TITLE_INFO;
 
diff --git a/src/libbluray/decoders/overlay.h b/src/libbluray/decoders/overlay.h
index 0c8c62b..08c3071 100644
--- a/src/libbluray/decoders/overlay.h
+++ b/src/libbluray/decoders/overlay.h
@@ -1,6 +1,6 @@
 /*
  * This file is part of libbluray
- * Copyright (C) 2010-2012  Petri Hintukainen <phintuka at users.sourceforge.net>
+ * Copyright (C) 2010-2017  Petri Hintukainen <phintuka at users.sourceforge.net>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -71,6 +71,8 @@ typedef struct bd_overlay_s {
     uint8_t  plane; /* bd_overlay_plane_e */
     uint8_t  cmd;   /* bd_overlay_cmd_e */
 
+    uint8_t  palette_update_flag; /* only palette was changed */
+
     uint16_t x;
     uint16_t y;
     uint16_t w;
@@ -79,7 +81,6 @@ typedef struct bd_overlay_s {
     const BD_PG_PALETTE_ENTRY * palette;
     const BD_PG_RLE_ELEM      * img;
 
-    uint8_t palette_update_flag; /* only palette was changed */
 } BD_OVERLAY;
 
 /*
@@ -143,15 +144,14 @@ typedef struct bd_argb_overlay_s {
      * frame buffer
      */
 
-    /* destination clip on the overlay plane
-     */
+    /* destination clip on the overlay plane */
     uint16_t x;
     uint16_t y;
     uint16_t w;
     uint16_t h;
+    uint16_t stride;       /* buffer stride */
 
     const uint32_t * argb; /* 'h' lines, line length 'stride' pixels */
-    uint16_t stride;       /* buffer stride */
 
 } BD_ARGB_OVERLAY;
 



More information about the libbluray-devel mailing list