[libbluray-devel] [Git][videolan/libbluray][master] 2 commits: keys.h: Document enums and defines

Petri Hintukainen (@hpi) gitlab at videolan.org
Sun Sep 25 12:45:12 UTC 2022



Petri Hintukainen pushed to branch master at VideoLAN / libbluray


Commits:
ba5a66b8 by Petri Hintukainen at 2022-09-25T15:34:19+03:00
keys.h: Document enums and defines

- - - - -
caab0081 by Petri Hintukainen at 2022-09-25T15:34:19+03:00
overlay.h: convert member descriptions to doxygen

- - - - -


2 changed files:

- src/libbluray/decoders/overlay.h
- src/libbluray/keys.h


Changes:

=====================================
src/libbluray/decoders/overlay.h
=====================================
@@ -33,32 +33,41 @@ extern "C" {
 
 #define BD_OVERLAY_INTERFACE_VERSION 2
 
+/**
+ * Overlay plane
+ */
 typedef enum {
-    BD_OVERLAY_PG = 0,  /* Presentation Graphics plane */
-    BD_OVERLAY_IG = 1,  /* Interactive Graphics plane (on top of PG plane) */
+    BD_OVERLAY_PG = 0,  /**< Presentation Graphics plane */
+    BD_OVERLAY_IG = 1,  /**< Interactive Graphics plane (on top of PG plane) */
 } bd_overlay_plane_e;
 
+/*
+ * Compressed YUV overlays
+ */
+
+/**
+ * YUV overlay event type
+ */
 typedef enum {
     /* following events are executed immediately */
-    BD_OVERLAY_INIT  = 0,    /* init overlay plane. Size and position of plane in x,y,w,h */
-    BD_OVERLAY_CLOSE = 1,    /* close overlay plane */
+    BD_OVERLAY_INIT  = 0,    /**< Initialize overlay plane. Size and position of plane in x,y,w,h. */
+    BD_OVERLAY_CLOSE = 1,    /**< Close overlay plane */
 
     /* following events can be processed immediately, but changes
      * should not be flushed to display before next FLUSH event
      */
-    BD_OVERLAY_CLEAR = 2,    /* clear plane */
-    BD_OVERLAY_DRAW  = 3,    /* draw bitmap (x,y,w,h,img,palette,crop) */
-    BD_OVERLAY_WIPE  = 4,    /* clear area (x,y,w,h) */
-    BD_OVERLAY_HIDE  = 5,    /* overlay is empty and can be hidden */
+    BD_OVERLAY_CLEAR = 2,    /**< Clear overlay plane */
+    BD_OVERLAY_DRAW  = 3,    /**< Draw bitmap (x, y, w, h, img, palette, crop) */
+    BD_OVERLAY_WIPE  = 4,    /**< Clear area (x, y, w, h) */
+    BD_OVERLAY_HIDE  = 5,    /**< Overlay is empty and can be hidden */
 
-    BD_OVERLAY_FLUSH = 6,    /* all changes have been done, flush overlay to display at given pts */
+    BD_OVERLAY_FLUSH = 6,    /**< All changes have been done, flush overlay to display at given pts */
 
 } bd_overlay_cmd_e;
 
-/*
- * Compressed YUV overlays
+/**
+ * Overlay palette entry
  */
-
 typedef struct bd_pg_palette_entry_s {
     uint8_t Y;
     uint8_t Cr;
@@ -66,17 +75,23 @@ typedef struct bd_pg_palette_entry_s {
     uint8_t T;
 } BD_PG_PALETTE_ENTRY;
 
+/**
+ * RLE element
+ */
 typedef struct bd_pg_rle_elem_s {
     uint16_t len;
     uint16_t color;
 } BD_PG_RLE_ELEM;
 
+/**
+ * YUV overlay event
+ */
 typedef struct bd_overlay_s {
     int64_t  pts;
-    uint8_t  plane; /* bd_overlay_plane_e */
-    uint8_t  cmd;   /* bd_overlay_cmd_e */
+    uint8_t  plane; /**< Overlay plane (\ref bd_overlay_plane_e) */
+    uint8_t  cmd;   /**< Overlay event type (\ref bd_overlay_cmd_e) */
 
-    uint8_t  palette_update_flag; /* only palette was changed */
+    uint8_t  palette_update_flag; /**< Set if only overlay palette is changed */
 
     uint16_t x;
     uint16_t y;
@@ -124,26 +139,28 @@ void bd_overlay_free(BD_OVERLAY **pov)
 }
 #endif
 
-/*
- * ARGB overlays
+/**
+ * ARGB overlay event type
  */
-
 typedef enum {
     /* following events are executed immediately */
-    BD_ARGB_OVERLAY_INIT  = 0,    /* init overlay plane. Size and position of plane in x,y,w,h */
-    BD_ARGB_OVERLAY_CLOSE = 1,    /* close overlay */
+    BD_ARGB_OVERLAY_INIT  = 0,    /**< Initialize overlay plane. Size and position of plane are in x,y,w,h */
+    BD_ARGB_OVERLAY_CLOSE = 1,    /**< Close overlay plane */
 
     /* following events can be processed immediately, but changes
      * should not be flushed to display before next FLUSH event
      */
-    BD_ARGB_OVERLAY_DRAW  = 3,    /* draw image */
-    BD_ARGB_OVERLAY_FLUSH = 6,    /* all changes have been done, flush overlay to display at given pts */
+    BD_ARGB_OVERLAY_DRAW  = 3,    /**< Draw ARGB image on plane */
+    BD_ARGB_OVERLAY_FLUSH = 6,    /**< All changes have been done, flush overlay to display at given pts */
 } bd_argb_overlay_cmd_e;
 
+/**
+ * ARGB overlay event
+ */
 typedef struct bd_argb_overlay_s {
     int64_t  pts;
-    uint8_t  plane; /* bd_overlay_plane_e */
-    uint8_t  cmd;   /* bd_argb_overlay_cmd_e */
+    uint8_t  plane; /**< Overlay plane (\ref bd_overlay_plane_e) */
+    uint8_t  cmd;   /**< Overlay event type (\ref bd_argb_overlay_cmd_e) */
 
     /* following fileds are used only when not using application-allocated
      * frame buffer
@@ -154,13 +171,13 @@ typedef struct bd_argb_overlay_s {
     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;       /**< ARGB buffer stride */
+    const uint32_t * argb; /**< ARGB image data, 'h' lines, line stride 'stride' pixels */
 
 } BD_ARGB_OVERLAY;
 
-/*
+/**
  * Application-allocated frame buffer for ARGB overlays
  *
  * When using application-allocated frame buffer DRAW events are
@@ -183,7 +200,7 @@ typedef struct bd_argb_buffer_s {
      * - buffer can be replaced in overlay callback or lock().
      */
 
-    uint32_t *buf[4]; /* [0] - PG plane, [1] - IG plane. [2], [3] reserved for stereoscopic overlay. */
+    uint32_t *buf[4]; /**< [0] - PG plane, [1] - IG plane. [2], [3] reserved for stereoscopic overlay. */
 
     /* size of buffers
      * - Set by application
@@ -193,13 +210,13 @@ typedef struct bd_argb_buffer_s {
     int width;
     int height;
 
-    /* dirty area of frame buffers
+    /** Dirty area of frame buffers
      * - Updated by library before lock() call.
      * - Reset after each BD_ARGB_OVERLAY_FLUSH.
      */
     struct {
         uint16_t x0, y0, x1, y1;
-    } dirty[2]; /* [0] - PG plane, [1] - IG plane */
+    } dirty[2]; /**< [0] - PG plane, [1] - IG plane */
 
 } BD_ARGB_BUFFER;
 


=====================================
src/libbluray/keys.h
=====================================
@@ -1,6 +1,6 @@
 /*
  * This file is part of libbluray
- * Copyright (C) 2010-2019  Petri Hintukainen <phintuka at users.sourceforge.net>
+ * Copyright (C) 2010-2022  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
@@ -25,44 +25,42 @@
 #if !defined(_BD_KEYS_H_)
 #define _BD_KEYS_H_
 
-/*
- * User input
+/**
+ * Key codes
  */
-
 typedef enum {
-    BD_VK_NONE      = 0xffff,
+    BD_VK_NONE      = 0xffff,  /**< no key pressed */
 
     /* numeric key events */
-    BD_VK_0         = 0,
-    BD_VK_1         = 1,
-    BD_VK_2         = 2,
-    BD_VK_3         = 3,
-    BD_VK_4         = 4,
-    BD_VK_5         = 5,
-    BD_VK_6         = 6,
-    BD_VK_7         = 7,
-    BD_VK_8         = 8,
-    BD_VK_9         = 9,
+    BD_VK_0         = 0,   /**< "1" */
+    BD_VK_1         = 1,   /**< "2" */
+    BD_VK_2         = 2,   /**< "3" */
+    BD_VK_3         = 3,   /**< "4" */
+    BD_VK_4         = 4,   /**< "5" */
+    BD_VK_5         = 5,   /**< "6" */
+    BD_VK_6         = 6,   /**< "7" */
+    BD_VK_7         = 7,   /**< "8" */
+    BD_VK_8         = 8,   /**< "9" */
+    BD_VK_9         = 9,   /**< "0" */
 
     /* */
-    BD_VK_ROOT_MENU = 10,  /* open root menu */
-    BD_VK_POPUP     = 11,  /* toggle popup menu */
+    BD_VK_ROOT_MENU = 10,  /**< Open disc root menu */
+    BD_VK_POPUP     = 11,  /**< Toggle popup menu */
 
     /* interactive key events */
-    BD_VK_UP        = 12,
-    BD_VK_DOWN      = 13,
-    BD_VK_LEFT      = 14,
-    BD_VK_RIGHT     = 15,
-    BD_VK_ENTER     = 16,
+    BD_VK_UP        = 12,  /**< Arrow up */
+    BD_VK_DOWN      = 13,  /**< Arrow down */
+    BD_VK_LEFT      = 14,  /**< Arrow left */
+    BD_VK_RIGHT     = 15,  /**< Arrow right */
+    BD_VK_ENTER     = 16,  /**< Select */
 
-    /* Mouse click */
-    /* Translated to BD_VK_ENTER if mouse is over valid button */
+    /** Mouse click. Translated to BD_VK_ENTER if mouse is over a valid button. */
     BD_VK_MOUSE_ACTIVATE = 17,
 
-    BD_VK_RED       = 403,
-    BD_VK_GREEN     = 404,
-    BD_VL_YELLOW    = 405,
-    BD_VK_BLUE      = 406,
+    BD_VK_RED       = 403, /**< Color key "Red" */
+    BD_VK_GREEN     = 404, /**< Color key "Green" */
+    BD_VL_YELLOW    = 405, /**< Color key "Yellow" */
+    BD_VK_BLUE      = 406, /**< Color key "Blue" */
 
 } bd_vk_key_e;
 
@@ -71,8 +69,8 @@ typedef enum {
  * These masks are OR'd with the key code when calling bd_user_input().
  */
 
-#define BD_VK_KEY_PRESSED   0x80000000   /* Key was pressed down */
-#define BD_VK_KEY_TYPED     0x40000000   /* Key was typed */
-#define BD_VK_KEY_RELEASED  0x20000000   /* Key was released */
+#define BD_VK_KEY_PRESSED   0x80000000   /**< Key was pressed down */
+#define BD_VK_KEY_TYPED     0x40000000   /**< Key was typed */
+#define BD_VK_KEY_RELEASED  0x20000000   /**< Key was released */
 
 #endif // _BD_KEYS_H_



View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/1488c7d47996b015a1d9b9cc3e241d1c4d56b8c4...caab0081f34aec0f4eb3b0da4e78c50a49b6fa87

-- 
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/1488c7d47996b015a1d9b9cc3e241d1c4d56b8c4...caab0081f34aec0f4eb3b0da4e78c50a49b6fa87
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