[libbluray-devel] [Git][videolan/libbluray][master] 5 commits: Fix typos

Petri Hintukainen (@hpi) gitlab at videolan.org
Sun Sep 25 18:55:34 UTC 2022



Petri Hintukainen pushed to branch master at VideoLAN / libbluray


Commits:
f34e1480 by Petri Hintukainen at 2022-09-25T21:35:42+03:00
Fix typos

- - - - -
aaf498ad by Petri Hintukainen at 2022-09-25T21:36:01+03:00
Add comment

- - - - -
ffd5b0ed by Petri Hintukainen at 2022-09-25T21:37:08+03:00
player_settings.h: convert member descriptions to doxygen

- - - - -
9cfb3bd9 by Petri Hintukainen at 2022-09-25T21:53:54+03:00
bluray.h: fix errors in doxygen

- - - - -
f66370cb by Petri Hintukainen at 2022-09-25T21:53:54+03:00
bluray.h: add short describtion for structs and enums

- - - - -


3 changed files:

- src/libbluray/bdj/java/org/videolan/Libbluray.java
- src/libbluray/bluray.h
- src/libbluray/player_settings.h


Changes:

=====================================
src/libbluray/bdj/java/org/videolan/Libbluray.java
=====================================
@@ -760,7 +760,7 @@ public class Libbluray {
             case 404: key = HRcEvent.VK_COLORED_KEY_1; break;
             case 405: key = HRcEvent.VK_COLORED_KEY_2; break;
             case 406: key = HRcEvent.VK_COLORED_KEY_3; break;
-            case 17:
+            case 17: /* BD_VK_MOUSE_ACTIVATE */
                 result = false;
                 if ((param & 0x80000000) != 0) {
                     result = java.awt.BDJHelper.postMouseEvent(MouseEvent.MOUSE_PRESSED) || result;


=====================================
src/libbluray/bluray.h
=====================================
@@ -55,7 +55,7 @@ typedef struct bluray BLURAY;
 #define BD_AACS_CERT_REVOKED    -5
 #define BD_AACS_MMC_FAILED      -6
 
-/* HDMV / BD-J title */
+/** HDMV / BD-J title */
 typedef struct {
     const char *name;         /* optional title name in preferred language */
     uint8_t     interactive;  /* 1 if title is interactive (title length and playback position should not be shown in UI) */
@@ -66,6 +66,7 @@ typedef struct {
     uint32_t    id_ref;       /* Movie Object number / bdjo file number */
 } BLURAY_TITLE;
 
+/** Disc information */
 typedef struct {
     uint8_t  bluray_detected;
 
@@ -129,6 +130,7 @@ typedef struct {
  * Playlist info
  */
 
+/** Stream video coding type */
 typedef enum {
     BLURAY_STREAM_TYPE_VIDEO_MPEG1              = 0x01,
     BLURAY_STREAM_TYPE_VIDEO_MPEG2              = 0x02,
@@ -151,6 +153,7 @@ typedef enum {
     BLURAY_STREAM_TYPE_AUDIO_DTSHD_SECONDARY    = 0xa2
 } bd_stream_type_e;
 
+/** Stream video format */
 typedef enum {
     BLURAY_VIDEO_FORMAT_480I              = 1,  // ITU-R BT.601-5
     BLURAY_VIDEO_FORMAT_576I              = 2,  // ITU-R BT.601-4
@@ -162,6 +165,7 @@ typedef enum {
     BLURAY_VIDEO_FORMAT_2160P             = 8,  //
 } bd_video_format_e;
 
+/** Stream video frame rate */
 typedef enum {
     BLURAY_VIDEO_RATE_24000_1001          = 1,  // 23.976
     BLURAY_VIDEO_RATE_24                  = 2,
@@ -171,11 +175,13 @@ typedef enum {
     BLURAY_VIDEO_RATE_60000_1001          = 7   // 59.94
 } bd_video_rate_e;
 
+/** Stream video aspect ratio */
 typedef enum {
     BLURAY_ASPECT_RATIO_4_3               = 2,
     BLURAY_ASPECT_RATIO_16_9              = 3
 } bd_video_aspect_e;
 
+/** Stream audio format */
 typedef enum {
     BLURAY_AUDIO_FORMAT_MONO              = 1,
     BLURAY_AUDIO_FORMAT_STEREO            = 3,
@@ -183,7 +189,7 @@ typedef enum {
     BLURAY_AUDIO_FORMAT_COMBO             = 12  // Stereo ac3/dts, 
 } bd_audio_format_e;
                                                 // multi mlp/dts-hd
-
+/** Stream audio rate */
 typedef enum {
     BLURAY_AUDIO_RATE_48                  = 1,
     BLURAY_AUDIO_RATE_96                  = 4,
@@ -194,6 +200,7 @@ typedef enum {
                                                 // 96 mpl/dts-hd
 } bd_audio_rate_e;
 
+/** Text subtitle charset */
 typedef enum {
     BLURAY_TEXT_CHAR_CODE_UTF8            = 0x01,
     BLURAY_TEXT_CHAR_CODE_UTF16BE         = 0x02,
@@ -204,23 +211,27 @@ typedef enum {
     BLURAY_TEXT_CHAR_CODE_BIG5            = 0x07
 } bd_char_code_e;
 
+/** Clip still mode */
 typedef enum {
     BLURAY_STILL_NONE     = 0x00,
     BLURAY_STILL_TIME     = 0x01,
     BLURAY_STILL_INFINITE = 0x02,
 } bd_still_mode_e;
 
+/** Mark type */
 typedef enum {
     BLURAY_MARK_ENTRY     = 0x01,  /* entry mark for chapter search */
     BLURAY_MARK_LINK      = 0x02,  /* link point */
 } bd_mark_type_e;
 
+/** Clip dynamic range */
 typedef enum {
     BLURAY_DYNAMIC_RANGE_SDR          = 0,
     BLURAY_DYNAMIC_RANGE_HDR10        = 1,
     BLURAY_DYNAMIC_RANGE_DOLBY_VISION = 2
 } bd_dynamic_range_type_e;
 
+/** Clip substream information */
 typedef struct bd_stream_info {
     uint8_t     coding_type;
     uint8_t     format;
@@ -232,6 +243,7 @@ typedef struct bd_stream_info {
     uint8_t     subpath_id;
 } BLURAY_STREAM_INFO;
 
+/** Clip information */
 typedef struct bd_clip {
     uint32_t           pkt_count;
     uint8_t            still_mode;
@@ -255,6 +267,7 @@ typedef struct bd_clip {
     char               clip_id[6];
 } BLURAY_CLIP_INFO;
 
+/** Chapter entry */
 typedef struct bd_chapter {
     uint32_t    idx;
     uint64_t    start;     /* start media time, 90kHz, ("playlist time") */
@@ -263,6 +276,7 @@ typedef struct bd_chapter {
     unsigned    clip_ref;
 } BLURAY_TITLE_CHAPTER;
 
+/** Playmark information */
 typedef struct bd_mark {
     uint32_t    idx;
     int         type;      /* bd_mark_type_e */
@@ -272,6 +286,7 @@ typedef struct bd_mark {
     unsigned    clip_ref;
 } BLURAY_TITLE_MARK;
 
+/** Playlist information */
 typedef struct bd_title_info {
     uint32_t             idx;            /* filled only with bd_get_title_info() */
     uint32_t             playlist;
@@ -287,10 +302,7 @@ typedef struct bd_title_info {
     uint8_t              mvc_base_view_r_flag;
 } BLURAY_TITLE_INFO;
 
-/*
- * Sound effect data
- */
-
+/** Sound effect data */
 typedef struct bd_sound_effect {
     uint8_t         num_channels; /* 1 - mono, 2 - stereo */
     uint32_t        num_frames;
@@ -308,6 +320,10 @@ void bd_get_version(int *major, int *minor, int *micro);
  * Disc functions
  */
 
+struct bd_dir_s;
+struct bd_file_s;
+struct meta_dl;
+
 /**
  *  Open BluRay disc
  *
@@ -342,7 +358,7 @@ int bd_open_disc(BLURAY *bd, const char *device_path, const char *keyfile_path);
  *  Open BluRay disc
  *
  * @param bd  BLURAY object
- * @param handle  opaque handle for read_blocks
+ * @param read_blocks_handle  opaque handle for read_blocks
  * @param read_blocks  function used to read disc blocks
  * @return 1 on success, 0 if error
  */
@@ -359,8 +375,6 @@ int bd_open_stream(BLURAY *bd,
  * @param open_file  function used to open a file
  * @return 1 on success, 0 if error
  */
-struct bd_dir_s;
-struct bd_file_s;
 int bd_open_files(BLURAY *bd,
                   void *handle,
                   struct bd_dir_s *(*open_dir)(void *handle, const char *rel_path),
@@ -395,7 +409,6 @@ const BLURAY_DISC_INFO *bd_get_disc_info(BLURAY *bd);
  * @param bd  BLURAY object
  * @return META_DL (disclib) object, NULL on error
  */
-struct meta_dl;
 const struct meta_dl *bd_get_meta(BLURAY *bd);
 
 /**
@@ -551,7 +564,7 @@ int64_t bd_seek_mark(BLURAY *bd, unsigned mark);
  *  Seek to a playitem.
  *
  * @param bd  BLURAY object
- * @param playitem to seek to
+ * @param clip_ref playitem to seek to
  * @return current seek position
  */
 int64_t bd_seek_playitem(BLURAY *bd, unsigned clip_ref);
@@ -597,11 +610,11 @@ void bd_seamless_angle_change(BLURAY *bd, unsigned angle);
  * @param stream_id  stream number (1..N)
  * @param enable_flag  set to 0 to disable streams of this type
  */
+void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
+
 #define BLURAY_AUDIO_STREAM      0
 #define BLURAY_PG_TEXTST_STREAM  1
 
-void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, uint32_t enable_flag);
-
 
 /*
  * Playback status functions
@@ -669,6 +682,7 @@ uint64_t bd_tell_time(BLURAY *bd);
  * player settings
  */
 
+/** Player setting */
 typedef enum {
     BLURAY_PLAYER_SETTING_AUDIO_LANG     = 16,    /* Initial audio language.      String (ISO 639-2/T). */
     BLURAY_PLAYER_SETTING_PG_LANG        = 17,    /* Initial PG/SPU language.     String (ISO 639-2/T). */
@@ -716,6 +730,7 @@ int bd_set_player_setting_str(BLURAY *bd, uint32_t idx, const char *value);
  * events
  */
 
+/** Event type */
 typedef enum {
 
     BD_EVENT_NONE         = 0,  /* no pending events */
@@ -807,6 +822,7 @@ typedef enum {
 
 } bd_event_e;
 
+/** Event */
 typedef struct {
     uint32_t   event;  /* bd_event_e */
     uint32_t   param;
@@ -982,7 +998,7 @@ BLURAY_TITLE_INFO* bd_get_playlist_info(BLURAY *bd, uint32_t playlist, unsigned
  *  Get sound effect
  *
  * @param bd  BLURAY object
- * @param effect_id  sound effect id (0...N)
+ * @param sound_id  sound effect id (0...N)
  * @param effect     sound effect data
  * @return <0 when no effects, 0 when id out of range, 1 on success
  */
@@ -1015,9 +1031,10 @@ void bd_set_scr(BLURAY *bd, int64_t pts);
  * @param rate current playback rate * 90000 (0 = paused, 90000 = normal)
  * @return <0 on error, 0 on success
  */
+int bd_set_rate(BLURAY *bd, uint32_t rate);
+
 #define BLURAY_RATE_PAUSED  0
 #define BLURAY_RATE_NORMAL  90000
-int bd_set_rate(BLURAY *bd, uint32_t rate);
 
 /**
  *
@@ -1103,16 +1120,28 @@ void bd_stop_bdj(BLURAY *bd); // shutdown BD-J and clean up resources
  *  Caller must free the memory block with free().
  *
  * @param bd  BLURAY object
- * @param file_name  path to the file (relative to disc root)
+ * @param path  path to the file (relative to disc root)
  * @param data  where to store pointer to allocated data
  * @param size  where to store file size
  * @return 1 on success, 0 on error
  */
-int bd_read_file(BLURAY *, const char *path, void **data, int64_t *size);
+int bd_read_file(BLURAY *bd, const char *path, void **data, int64_t *size);
+
+/**
+ *
+ *  Open a directory from BluRay Virtual File System.
+ *
+ *  Caller must close with dir->close().
+ *
+ * @param bd  BLURAY object
+ * @param dir  target directory (relative to disc root)
+ * @return BD_DIR_H *, NULL if failed
+ */
+struct bd_dir_s *bd_open_dir(BLURAY *bd, const char *dir);
 
 /**
  *
- *  Open a file/dir from BluRay Virtual File System.
+ *  Open a file from BluRay Virtual File System.
  *
  *  encrypted streams are decrypted, and because of how
  *  decryption works, it can only seek to (N*6144) bytes,
@@ -1120,15 +1149,14 @@ int bd_read_file(BLURAY *, const char *path, void **data, int64_t *size);
  *  DO NOT mix any play functionalities with these functions.
  *  It might cause broken stream. In general, accessing
  *  mutiple file on disk at the same time is a bad idea.
- *  Caller must close with file_close()/dir_close().
+ *
+ *  Caller must close with file->close().
  *
  * @param bd  BLURAY object
- * @param dir  target directory (relative to disc root)
  * @param path  path to the file (relative to disc root)
- * @return BD_DIR_H * or BD_FILE_H *, NULL if failed
+ * @return BD_FILE_H *, NULL if failed
  */
-struct bd_dir_s *bd_open_dir(BLURAY *, const char *dir);
-struct bd_file_s *bd_open_file_dec(BLURAY *, const char *path);
+struct bd_file_s *bd_open_file_dec(BLURAY *bd, const char *path);
 
 
 #ifdef __cplusplus


=====================================
src/libbluray/player_settings.h
=====================================
@@ -25,7 +25,7 @@
 #ifndef BD_PLAYER_SETTINGS_H_
 #define BD_PLAYER_SETTINGS_H_
 
-/*
+/**
  * BLURAY_PLAYER_SETTING_AUDIO_CAP (PSR15)
  *
  * Player capability for audio (bitmask)
@@ -36,12 +36,12 @@ enum {
     /* LPCM */
 
     /* 48/96kHz (mandatory) */
-    BLURAY_ACAP_LPCM_48_96_STEREO_ONLY = 0x0001,  /* LPCM 48kHz and 96kHz stereo */
-    BLURAY_ACAP_LPCM_48_96_SURROUND    = 0x0002,  /* LPCM 48kHz and 96kHz surround */
+    BLURAY_ACAP_LPCM_48_96_STEREO_ONLY = 0x0001,  /**< LPCM 48kHz and 96kHz stereo */
+    BLURAY_ACAP_LPCM_48_96_SURROUND    = 0x0002,  /**< LPCM 48kHz and 96kHz surround */
 
     /* 192kHz (optional) */
-    BLURAY_ACAP_LPCM_192_STEREO_ONLY   = 0x0004,  /* LPCM 192kHz stereo */
-    BLURAY_ACAP_LPCM_192_SURROUND      = 0x0008,  /* LPCM 192kHz surround */
+    BLURAY_ACAP_LPCM_192_STEREO_ONLY   = 0x0004,  /**< LPCM 192kHz stereo */
+    BLURAY_ACAP_LPCM_192_SURROUND      = 0x0008,  /**< LPCM 192kHz surround */
 
     /* Dolby Digital Plus */
 
@@ -75,14 +75,16 @@ enum {
 };
 
 
-/*
+/**
  * BLURAY_PLAYER_SETTING_REGION_CODE (PSR20)
  *
  * Player region code (integer)
  *
  * Region A: the Americas, East and Southeast Asia, U.S. territories, and Bermuda.
+ *
  * Region B: Africa, Europe, Oceania, the Middle East, the Kingdom of the Netherlands,
  *           British overseas territories, French territories, and Greenland.
+ *
  * Region C: Central and South Asia, Mongolia, Russia, and the People's Republic of China.
  *
  */
@@ -94,7 +96,7 @@ enum {
 };
 
 
-/*
+/**
  * BLURAY_PLAYER_SETTING_OUTPUT_PREFER (PSR21)
  *
  * Output mode preference (integer)
@@ -112,9 +114,9 @@ enum {
  * Display capability (bit mask) and display size
  */
 
-#define BLURAY_DCAP_1080p_720p_3D           0x01  /* capable of 1920x1080 23.976Hz and 1280x720 59.94Hz 3D */
-#define BLURAY_DCAP_720p_50Hz_3D            0x02  /* capable of 1280x720 50Hz 3D */
-#define BLURAY_DCAP_NO_3D_CLASSES_REQUIRED  0x04  /* 3D glasses are not required */
+#define BLURAY_DCAP_1080p_720p_3D           0x01  /**< capable of 1920x1080 23.976Hz and 1280x720 59.94Hz 3D */
+#define BLURAY_DCAP_720p_50Hz_3D            0x02  /**< capable of 1280x720 50Hz 3D */
+#define BLURAY_DCAP_NO_3D_CLASSES_REQUIRED  0x04  /**< 3D glasses are not required */
 #define BLURAY_DCAP_INTERLACED_3D           0x08  /* */
 
 /* horizintal display size in centimeters */
@@ -122,53 +124,53 @@ enum {
 #define BLURAY_DCAP_DISPLAY_SIZE(cm)        (((cm) > 0xfff ? 0xfff : (cm)) << 8)
 
 
-/*
+/**
  * BLURAY_PLAYER_SETTING_VIDEO_CAP (PSR29)
  *
  * Player capability for video (bit mask)
  */
 
 enum {
-    BLURAY_VCAP_SECONDARY_HD = 0x01,  /* player can play secondary stream in HD */
-    BLURAY_VCAP_25Hz_50Hz    = 0x02,  /* player can play 25Hz and 50Hz video */
+    BLURAY_VCAP_SECONDARY_HD = 0x01,  /**< player can play secondary stream in HD */
+    BLURAY_VCAP_25Hz_50Hz    = 0x02,  /**< player can play 25Hz and 50Hz video */
 };
 
-/*
+/**
  * BLURAY_PLAYER_SETTING_PLAYER_PROFILE (PSR31)
  *
  * Player profile and version
  *
- * Profile 1, version 1.0: no local storage, no VFS, no internet
- * Profile 1, version 1.1: PiP, VFS, sec. audio, 256MB local storage, no internet
- * Profile 2, version 2.0: BdLive (internet), 1GB local storage
+ * - Profile 1, version 1.0: no local storage, no VFS, no internet
+ * - Profile 1, version 1.1: PiP, VFS, sec. audio, 256MB local storage, no internet
+ * - Profile 2, version 2.0: BdLive (internet), 1GB local storage
  */
 
 enum {
-    BLURAY_PLAYER_PROFILE_1_v1_0 = ((0x00 << 16) | (0x0100)),   /* Profile 1, version 1.0 (Initial Standard Profile) */
-    BLURAY_PLAYER_PROFILE_1_v1_1 = ((0x01 << 16) | (0x0110)),   /* Profile 1, version 1.1 (secondary stream support) */
-    BLURAY_PLAYER_PROFILE_2_v2_0 = ((0x03 << 16) | (0x0200)),   /* Profile 2, version 2.0 (network access, BdLive) */
-    BLURAY_PLAYER_PROFILE_3_v2_0 = ((0x08 << 16) | (0x0200)),   /* Profile 3, version 2.0 (audio only player) */
-    BLURAY_PLAYER_PROFILE_5_v2_4 = ((0x13 << 16) | (0x0240)),   /* Profile 5, version 2.4 (3D) */
-    BLURAY_PLAYER_PROFILE_6_v3_0 = ((0x00 << 16) | (0x0300)),   /* Profile 6, version 3.0 (UHD) */
-    BLURAY_PLAYER_PROFILE_6_v3_1 = ((0x00 << 16) | (0x0310)),   /* Profile 6, version 3.1 (UHD) */
+    BLURAY_PLAYER_PROFILE_1_v1_0 = ((0x00 << 16) | (0x0100)),   /**< Profile 1, version 1.0 (Initial Standard Profile) */
+    BLURAY_PLAYER_PROFILE_1_v1_1 = ((0x01 << 16) | (0x0110)),   /**< Profile 1, version 1.1 (secondary stream support) */
+    BLURAY_PLAYER_PROFILE_2_v2_0 = ((0x03 << 16) | (0x0200)),   /**< Profile 2, version 2.0 (network access, BdLive) */
+    BLURAY_PLAYER_PROFILE_3_v2_0 = ((0x08 << 16) | (0x0200)),   /**< Profile 3, version 2.0 (audio only player) */
+    BLURAY_PLAYER_PROFILE_5_v2_4 = ((0x13 << 16) | (0x0240)),   /**< Profile 5, version 2.4 (3D) */
+    BLURAY_PLAYER_PROFILE_6_v3_0 = ((0x00 << 16) | (0x0300)),   /**< Profile 6, version 3.0 (UHD) */
+    BLURAY_PLAYER_PROFILE_6_v3_1 = ((0x00 << 16) | (0x0310)),   /**< Profile 6, version 3.1 (UHD) */
 };
 
 #define BLURAY_PLAYER_PROFILE_3D_FLAG       0x100000
 #define BLURAY_PLAYER_PROFILE_VERSION_MASK  0xffff
 
-/*
+/**
  * BLURAY_PLAYER_SETTING_DECODE_PG
  *
  * Enable Presentation Graphics and Text Subtitle decoder
  */
 
 enum {
-    BLURAY_PG_TEXTST_DECODER_DISABLE  = 0,  /* disable both decoders */
-    BLURAY_PG_TEXTST_DECODER_ENABLE   = 1,  /* enable both decoders */
+    BLURAY_PG_TEXTST_DECODER_DISABLE  = 0,  /**< disable both decoders */
+    BLURAY_PG_TEXTST_DECODER_ENABLE   = 1,  /**< enable both decoders */
 };
 
 
-/*
+/**
  * BLURAY_PLAYER_SETTING_PERSISTENT_STORAGE
  *
  * Enable / disable BD-J persistent storage.
@@ -181,8 +183,8 @@ enum {
  */
 
 enum {
-    BLURAY_PERSISTENT_STORAGE_DISABLE = 0,  /* disable persistent storage between playback sessions */
-    BLURAY_PERSISTENT_STORAGE_ENABLE  = 1,  /* enable persistent storage */
+    BLURAY_PERSISTENT_STORAGE_DISABLE = 0,  /**< disable persistent storage between playback sessions */
+    BLURAY_PERSISTENT_STORAGE_ENABLE  = 1,  /**< enable persistent storage */
 };
 
 #endif /* BD_PLAYER_SETTINGS_H_ */



View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/fccabb932d76da76f2c83f503d5c38906c308d72...f66370cb05af1f21bafe8e20bc360a431f3e8f80

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


VideoLAN code repository instance


More information about the libbluray-devel mailing list