[vlc-commits] [Git][videolan/vlc][master] 12 commits: vlc_vout_display: fix doxygen

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Jan 29 19:06:27 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
e57a3870 by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
vlc_vout_display: fix doxygen

 - references to member from different structure without context:
    - window -> vout_display_cfg.window
    - is_display_filled -> vout_display_cfg.is_display_filled
    - reset_pictures -> vlc_display_operations.reset_pictures

 - fields that have been removed
    - cfg in display activation callback

 - invalid references: ::source

- - - - -
8b6bda47 by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
vlc_vout_window: fix doxygen

Fix missing parameters and parameter names.

- - - - -
187d9749 by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
vlc_vout_osd: move documentation to header

- - - - -
df2a9c37 by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
doc: libvlc: add minimal example from wiki

The example will be included in the main page of libVLC documentation.

- - - - -
5eefde03 by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
doc: add doc/libvlc to EXAMPLE_PATH

Co-authored-by: Simon Latapie <garf at videolabs.io>

- - - - -
410fef4d by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
doc: libvlc: add main page for libVLC documentation

Co-authored-by: Simon Latapie <garf at videolabs.io>

- - - - -
6ea238b6 by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
doc: add main page for documentation

Small main page for describing the content of the documentation, while
splitting and describing the role of both libVLC and libvlccore.

It is ought to be extended later.

Co-authored-by: Simon Latapie <garf at videolabs.io>

- - - - -
3392f498 by RĂ©mi Denis-Courmont at 2022-01-29T18:07:27+00:00
README: fix typo

- - - - -
3e71b72a by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
doc: enable interactive SVG output

Let's not target IE8. SVG graphs are much more comfortable to read and
scale, and interactive SVG allows more comfortable viewing of big
graphs.

- - - - -
29c00353 by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
doxygen: allow external theme from configure

Allow the configure script to substitute the theme used in the
documentation for Awesome doxygen css from the CI script.

The theme won't be mandatory, but we can change it and inject it for the
production documentation online.

- - - - -
8835da19 by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
doxygen: enable tree view

Not generating the tree view is the default setting, but it's actually
pretty useful and pretty common (rustdoc, msdn, mdn, awesome doxygen).

- - - - -
79084ecb by Alexandre Janniaux at 2022-01-29T18:07:27+00:00
doc: Doxygen: make dot background transparent

It works much better with dark mode theme.

- - - - -


10 changed files:

- README.md
- configure.ac
- doc/Doxyfile.in
- + doc/libvlc/example.c
- + doc/standalone/libvlc.md
- + doc/standalone/mainpage.md
- include/vlc_vout_display.h
- include/vlc_vout_osd.h
- include/vlc_vout_window.h
- src/video_output/video_epg.c


Changes:

=====================================
README.md
=====================================
@@ -85,10 +85,10 @@ CI and discussions should be resolved before a Merge Request can be merged.
 **libVLC** is an embeddable engine for 3rd party applications and frameworks.
 
 It runs on the same platforms as VLC *(and sometimes on more)* and can provide playback,
-streaming and converting of multimedia files and streams.
+streaming and conversion of multimedia files and streams.
 
 
-**libVLC** has numerous bindings for other languages, like C++, Python and C#.
+**libVLC** has numerous bindings for other languages, such as C++, Python and C#.
 
 # Support
 
@@ -137,4 +137,3 @@ share/             - Common resource files.
 src/               - libvlccore source code.
 test/              - Testing system.
 ```
-


=====================================
configure.ac
=====================================
@@ -4390,6 +4390,18 @@ AS_IF([test "${with_kde_solid}" != "no"], [
 AC_SUBST([soliddatadir])
 AM_CONDITIONAL([KDE_SOLID], [test "x${soliddatadir}" != "x"])
 
+dnl
+dnl Doxygen and documentation tools
+dnl
+doxygen_stylesheet=""
+AC_ARG_WITH([doxygen-stylesheet],
+    AS_HELP_STRING([--with-doxygen-stylesheet=PATH],
+                   [Doxygen stylesheet (default is doxygen default)]),
+                   [ doxygen_stylesheet="$with_doxygen_stylesheet" ], [])
+AC_SUBST([doxygen_stylesheet])
+
+
+
 dnl
 dnl  Find tools for win32 packaging
 dnl


=====================================
doc/Doxyfile.in
=====================================
@@ -830,7 +830,7 @@ EXCLUDE_SYMBOLS        =
 # that contain example code fragments that are included (see the \include
 # command).
 
-EXAMPLE_PATH           =
+EXAMPLE_PATH           = @top_srcdir@/doc/libvlc
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -1108,7 +1108,7 @@ HTML_STYLESHEET        =
 # list). For an example see the documentation.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_EXTRA_STYLESHEET  =
+HTML_EXTRA_STYLESHEET  = @doxygen_stylesheet@
 
 # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
 # other source files which should be copied to the HTML output directory. Note
@@ -1394,7 +1394,7 @@ DISABLE_INDEX          = NO
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-GENERATE_TREEVIEW      = NO
+GENERATE_TREEVIEW      = YES
 
 # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
 # doxygen will group on one line in the generated HTML documentation.
@@ -2276,7 +2276,7 @@ DIRECTORY_GRAPH        = YES
 # The default value is: png.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-DOT_IMAGE_FORMAT       = png
+DOT_IMAGE_FORMAT       = svg
 
 # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
 # enable generation of interactive SVG images that allow zooming and panning.
@@ -2288,7 +2288,7 @@ DOT_IMAGE_FORMAT       = png
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-INTERACTIVE_SVG        = NO
+INTERACTIVE_SVG        = YES
 
 # The DOT_PATH tag can be used to specify the path where the dot tool can be
 # found. If left blank, it is assumed the dot tool can be found in the path.
@@ -2362,7 +2362,7 @@ MAX_DOT_GRAPH_DEPTH    = 0
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-DOT_TRANSPARENT        = NO
+DOT_TRANSPARENT        = YES
 
 # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
 # files in one run (i.e. multiple -o and -T options on the command line). This


=====================================
doc/libvlc/example.c
=====================================
@@ -0,0 +1,55 @@
+/// This file is included in libVLC main page in the doxygen documentation.
+
+//! [minimal example]
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <unistd.h>
+#include <vlc/vlc.h>
+
+int main(int argc, char* argv[])
+{
+    libvlc_instance_t * inst;
+    libvlc_media_player_t *mp;
+    libvlc_media_t *m;
+
+    /* Load the VLC engine */
+    inst = libvlc_new (0, NULL);
+
+    /* Create a new item */
+    m = libvlc_media_new_location (inst, "http://mycool.movie.com/test.mov");
+    //m = libvlc_media_new_path (inst, "/path/to/test.mov");
+
+    /* Create a media player playing environement */
+    mp = libvlc_media_player_new_from_media (m);
+
+    /* No need to keep the media now */
+    libvlc_media_release (m);
+
+    /* play the media_player */
+    libvlc_media_player_play (mp);
+
+    while (libvlc_media_player_is_playing(mp))
+    {
+        sleep (1);
+        int64_t milliseconds = libvlc_media_player_get_time(mp);
+        int64_t seconds = milliseconds / 1000;
+        int64_t minutes = seconds / 60;
+        milliseconds -= seconds * 1000;
+        seconds -= minutes * 60;
+
+        printf("Current time: %" PRId64 ":%" PRId64 ":%" PRId64 "\n",
+               minutes, seconds, milliseconds);
+    }
+
+    /* Stop playing */
+    libvlc_media_player_stop_async (mp);
+
+    /* Free the media_player */
+    libvlc_media_player_release (mp);
+
+    libvlc_release (inst);
+
+    return 0;
+}
+//! [minimal example]


=====================================
doc/standalone/libvlc.md
=====================================
@@ -0,0 +1,29 @@
+# LibVLC Documentation {#libvlc_documentation}
+
+## Introduction
+
+[libVLC](@ref libvlc_documentation) is an embeddable engine for
+3rd party applications and frameworks.
+
+It runs on the same platforms as VLC <em>(and sometimes on more)</em>
+and can provide playback, streaming and conversion of multimedia
+files and streams.
+
+[libVLC](@ref libvlc_documentation) has numerous bindings for
+other languages, such as C++, Python, java, Objective-C and C#.
+
+The generated documentation can be browsed from [here](@ref libvlc).
+
+## License
+
+[libVLC](@ref libvlc_documentation) is released under the LGPLv2
+<em>(or later)</em> license. This allows embedding the engine in 3rd
+party applications, while letting them to be licensed under other
+licenses.
+
+However, note that some plugins are under more restrictive licenses,
+such as GPLv3 <em>(or later)</em>.
+
+## Example
+
+\snippet{lineno} example.c minimal example


=====================================
doc/standalone/mainpage.md
=====================================
@@ -0,0 +1,24 @@
+\mainpage
+# LibVLC and libvlccore documentation
+
+## Introduction
+
+[libVLC](@ref libvlc_documentation) is an embeddable engine for
+3rd party applications and frameworks.
+
+It runs on the same platforms as VLC <em>(and sometimes on more)</em>
+and can provide playback, streaming and conversion of multimedia
+files and streams.
+
+[libVLC](@ref libvlc_documentation) has numerous bindings for
+other languages, such as C++, Python, java, Objective-C and C#.
+
+##  License
+
+[libVLC](@ref libvlc_documentation) and **libvlccore** are released
+under the LGPLv2 <em>(or later)</em> license. This allows embedding the
+engine in 3rd party applications, while letting them to be licensed
+under other licenses.
+
+However, note that some plugins are under more restrictive licenses,
+such as GPLv3 <em>(or later)</em>.


=====================================
include/vlc_vout_display.h
=====================================
@@ -83,9 +83,10 @@ typedef struct vlc_video_align {
  *
  * This primarily controls the size of the display area within the video
  * window, as follows:
- * - If \ref is_display_filled is set,
+ * - If \ref vout_display_cfg.is_display_filled is set,
  *   the video size is fitted to the display size.
- * - If \ref window size is valid, the video size is set to the window size,
+ * - If \ref vout_display_cfg.window size is valid, the video size is set to
+ *   the window size,
  * - Otherwise, the video size is determined from the original video format,
  *   multiplied by the zoom factor.
  */
@@ -131,7 +132,8 @@ enum vout_display_query {
      * Notifies a change in display size.
      *
      * \retval VLC_SUCCESS if the display handled the change
-     * \retval VLC_EGENERIC if a \ref reset_pictures request is necessary
+     * \retval VLC_EGENERIC if a \ref vlc_display_operations.reset_pictures
+     *         request is necessary
      */
     VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,
 
@@ -139,7 +141,8 @@ enum vout_display_query {
      * Notifies a change of the display fill display flag by the user.
      *
      * \retval VLC_SUCCESS if the display handled the change
-     * \retval VLC_EGENERIC if a \ref reset_pictures request is necessary
+     * \retval VLC_EGENERIC if a \ref vlc_display_operations.reset_pictures
+     *         request is necessary
      */
     VOUT_DISPLAY_CHANGE_DISPLAY_FILLED,
 
@@ -147,7 +150,8 @@ enum vout_display_query {
      * Notifies a change of the user zoom factor.
      *
      * \retval VLC_SUCCESS if the display handled the change
-     * \retval VLC_EGENERIC if a \ref reset_pictures request is necessary
+     * \retval VLC_EGENERIC if a \ref vlc_display_operations.reset_pictures
+     *         request is necessary
      */
     VOUT_DISPLAY_CHANGE_ZOOM,
 
@@ -155,7 +159,8 @@ enum vout_display_query {
      * Notifies a change of the sample aspect ratio.
      *
      * \retval VLC_SUCCESS if the display handled the change
-     * \retval VLC_EGENERIC if a \ref reset_pictures request is necessary
+     * \retval VLC_EGENERIC if a \ref vlc_display_operations.reset_pictures
+     *         request is necessary
      */
     VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
 
@@ -166,7 +171,8 @@ enum vout_display_query {
      * and video_format_t::i_visible_width/height
      *
      * \retval VLC_SUCCESS if the display handled the change
-     * \retval VLC_EGENERIC if a \ref reset_pictures request is necessary
+     * \retval VLC_EGENERIC if a \ref vlc_display_operations.reset_pictures
+     *         request is necessary
      */
     VOUT_DISPLAY_CHANGE_SOURCE_CROP,
 };
@@ -197,9 +203,8 @@ struct vout_display_owner_t {
  * "vout display" open callback
  *
  * @param vd vout display context
- * @param cfg Initial and current configuration.
  * @param fmtp It can be changed by the module to request a different format.
- * @param context XXX: to be defined.
+ * @param context The video context to configure the display for.
  * @return VLC_SUCCESS or a VLC error code
  */
 typedef int (*vout_display_open_cb)(vout_display_t *vd,
@@ -234,8 +239,10 @@ struct vlc_display_operations
      * queue the picture to be shown asynchronously at the given date.
      *
      *
-     * If prepare and display are not \c NULL, there is an implicit guarantee
-     * that display will be invoked with the exact same picture afterwards:
+     * If \ref vlc_display_operations.prepare and
+     * \ref vlc_display_operations.display are not \c NULL, there is an
+     * implicit guarantee that display will be invoked with the exact same
+     * picture afterwards:
      * prepare 1st picture, display 1st picture, prepare 2nd picture, display
      * 2nd picture, and so on.
      *
@@ -323,13 +330,14 @@ struct vout_display_t {
      * Picture format.
      *
      * This is the format of the pictures that are supplied to the
-     * \ref prepare and \ref display callbacks. Ideally, it should be identical
-     * or as close as possible as \ref source.
+     * \ref vlc_display_operations.prepare and
+     * \ref vlc_display_operations.display callbacks.
+     * Ideally, it should be identical or as close as possible as \ref source.
      *
      * This can only be changed from the display module activation callback,
-     * or within a \ref reset_pictures request.
+     * or within a \ref vlc_display_operations.reset_pictures request.
      *
-     * By default, it is equal to ::source except for the aspect ratio
+     * By default, it is equal to \ref source except for the aspect ratio
      * which is undefined(0) and is ignored.
      */
     const video_format_t *fmt;


=====================================
include/vlc_vout_osd.h
=====================================
@@ -52,7 +52,12 @@ enum
     OSD_VERT_SLIDER,
 };
 
-VLC_API int vout_OSDEpg( vout_thread_t *, input_item_t * );
+/**
+ * \brief Show EPG information about the current program of an input item
+ * \param vout pointer to the vout the information is to be showed on
+ * \param input pointer to the input item the information is to be showed
+ */
+VLC_API int vout_OSDEpg( vout_thread_t *vout, input_item_t *input);
 
 /**
  * \brief Write an informative message if the OSD option is enabled.
@@ -111,4 +116,3 @@ VLC_API void vout_OSDIcon( vout_thread_t *p_this, int i_channel,
 #endif
 
 #endif /* VLC_VOUT_OSD_H */
-


=====================================
include/vlc_vout_window.h
=====================================
@@ -450,7 +450,7 @@ VLC_API void vout_window_Delete(vout_window_t *window);
  *
  * \param window window in respect to which the screensaver should be inhibited
  *               or deinhibited
- * \param true to inhibit, false to deinhibit
+ * \param enabled true to inhibit, false to deinhibit
  */
 void vout_window_SetInhibition(vout_window_t *window, bool enabled);
 
@@ -577,6 +577,7 @@ static inline void vout_window_ReportClose(vout_window_t *window)
  * This function is called by the window implementation to notify the owner of
  * the window that the state of the window changed.
  *
+ * \param window the window reporting the state change
  * \param state \see vout_window_state
  */
 static inline void vout_window_ReportState(vout_window_t *window,
@@ -597,6 +598,7 @@ VLC_API void vout_window_ReportWindowed(vout_window_t *wnd);
 /**
  * Reports that the window is in full screen.
  *
+ * \param wnd the window reporting the fullscreen state
  * \param id fullscreen output nul-terminated identifier, NULL for default
  */
 VLC_API void vout_window_ReportFullscreen(vout_window_t *wnd, const char *id);
@@ -694,6 +696,7 @@ static inline void vout_window_ReportKeyPress(vout_window_t *window, int key)
  * updated. Otherwise it will be added.
  * If the name parameter is NULL, the output will be removed.
  *
+ * \param window the window reporting the output device
  * \param id unique nul-terminated identifier for the output
  * \param name human-readable name
  */


=====================================
src/video_output/video_epg.c
=====================================
@@ -542,13 +542,7 @@ static void OSDEpgDestroy(subpicture_t *subpic)
     free(sys);
 }
 
-/**
- * \brief Show EPG information about the current program of an input item
- * \param vout pointer to the vout the information is to be showed on
- * \param p_input pointer to the input item the information is to be showed
- * \param i_action osd_epg_action_e action
- */
-int vout_OSDEpg(vout_thread_t *vout, input_item_t *input )
+int vout_OSDEpg(vout_thread_t *vout, input_item_t *input)
 {
     vlc_epg_t *epg = NULL;
     int64_t epg_time;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1e9daf1bf8947db10bebd58402ae7f06abd8fc92...79084ecb2f349ad47104e940c40b72487baae173

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1e9daf1bf8947db10bebd58402ae7f06abd8fc92...79084ecb2f349ad47104e940c40b72487baae173
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list