[libdvbpsi-devel] doxygen: layout improvements.

Jean-Paul Saman git at videolan.org
Mon Jun 4 16:14:42 CEST 2012


libdvbpsi | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Mon Jun  4 16:13:56 2012 +0200| [6ad561b99674d70c52277c5695510222a626944c] | committer: Jean-Paul Saman

doxygen: layout improvements.

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=6ad561b99674d70c52277c5695510222a626944c
---

 doc/howto-new-api.doxygen |   67 +++++++++++++++++++++++----------------------
 doc/structure.doxygen     |    7 +++--
 doc/usage.doxygen         |    8 ++++--
 3 files changed, 43 insertions(+), 39 deletions(-)

diff --git a/doc/howto-new-api.doxygen b/doc/howto-new-api.doxygen
index f507b47..bacb64d 100644
--- a/doc/howto-new-api.doxygen
+++ b/doc/howto-new-api.doxygen
@@ -27,37 +27,38 @@ longer needed.
 <p>
 The following examples shows howto translate existing applications. In these examples only
 source code snippits are used and can thus not be compiled standalone. The examples are taken
-from existing applications using libdvbpsi.
+from existing applications using libdvbpsi. For a more elaborate example take a look in examples/ directory
+and especially to the file examples/dvbinfo/libdvbpsi.c from the dvbinfo application.
 </p>
 
 <p>In many existing applications the following scheme is used to attaching a PAT decoder to a dvbpsi handle:</p>
 
 <code>
-    dvbpsi_handle handle;
-    dvbpsi_AttachPAT(handle, handle_PAT, data);
+  dvbpsi_handle handle; <br />
+  dvbpsi_AttachPAT(handle, handle_PAT, data); <br />
 </code>
 
 <p>The same scheme is used for other PSI tables too, this translate to the following code sequence:</p>
 
 <code>
-    dvbpsi_t *handle = dvbpsi_NewHandle(&dvbpsi_message, DVBPSI_MSG_DEBUG);
-    if (handle == NULL)
-        goto error;
-    if (!dvbpsi_AttachPAT(handle, handle_PAT, data))
-    {
-        dvbpsi_DeleteHandle(handle);
-        handle = NULL;
-        goto error;
-    }
-
-    return 0;
-
-error:
-    if (dvbpsi_HasDecoder(handle))
-        dvbpsi_DetachPAT(andle);
-    if (handle)
-        dvbpsi_DeleteHandle(handle);
-    return -1;
+  dvbpsi_t *handle = dvbpsi_NewHandle(&dvbpsi_message, DVBPSI_MSG_DEBUG); <br />
+  if (handle == NULL) <br />
+   goto error; <br />
+  if (!dvbpsi_AttachPAT(handle, handle_PAT, data)) <br />
+  { <br />
+    dvbpsi_DeleteHandle(handle); <br />
+    handle = NULL; <br />
+    goto error; <br />
+  } <br />
+  <br />
+  return 0; <br />
+  <br />
+error: <br />
+  if (dvbpsi_HasDecoder(handle)) <br />
+    dvbpsi_DetachPAT(andle); <br />
+  if (handle) <br />
+     dvbpsi_DeleteHandle(handle); <br />
+  return -1; <br />
 </code>
 
 <p>The <em>message callback function</em> <b>dvbpsi_message</b> is defined as follows below. In this case
@@ -66,17 +67,17 @@ along libdvbpsi messages if wanted. See the following example:
 </p>
 
 <code>
-static void dvbpsi_message(dvbpsi_t *p_dvbpsi, const dvbpsi_msg_level_t level, const char* msg)
-{
-    switch(level)
-    {
-        case DVBPSI_MSG_ERROR: fprintf(stderr, "Error: "); break;
-        case DVBPSI_MSG_WARN:  fprintf(stderr, "Warning: "); break;
-        case DVBPSI_MSG_DEBUG: fprintf(stderr, "Debug: "); break;
-        default:
-            return;
-    }
-    fprintf(stderr, "%s\n", msg);
-}
+static void dvbpsi_message(dvbpsi_t *p_dvbpsi, const dvbpsi_msg_level_t level, const char* msg) <br />
+{ <br />
+  switch(level) <br />
+  { <br />
+  case DVBPSI_MSG_ERROR: fprintf(stderr, "Error: "); break;   <br />
+  case DVBPSI_MSG_WARN:  fprintf(stderr, "Warning: "); break; <br />
+  case DVBPSI_MSG_DEBUG: fprintf(stderr, "Debug: "); break;   <br />
+  default: <br />
+    return; <br />
+  } <br />
+  fprintf(stderr, "%s\n", msg); <br />
+} <br />
 </code>
 */
diff --git a/doc/structure.doxygen b/doc/structure.doxygen
index 11482c4..f75cd8f 100644
--- a/doc/structure.doxygen
+++ b/doc/structure.doxygen
@@ -27,7 +27,8 @@ TS discontinuities signaled by the <em>PSI decoder</em>. </p>
 <em>specific decoder</em> must be implemented for all the PSI
 tables.</p>
 
-\ref usage
-\ref howto-new-api
-
+<ul>
+<li>\ref usage</li>
+<li>\ref howto-new-api</li>
+</ul>
 */
diff --git a/doc/usage.doxygen b/doc/usage.doxygen
index a45df5e..4cd9007 100644
--- a/doc/usage.doxygen
+++ b/doc/usage.doxygen
@@ -39,7 +39,9 @@ have been detached.</p>
   <li>ATSC tables: atsc_eit.h atsc_ett.h atsc_mgt.h atsc_stt.h atsc_vct.h</li>
 </ul>
 
-\ref structure
-\ref howto-new-api
-
+<p>See also:</p>
+<ul>
+<li>\ref structure</li>
+<li>\ref howto-new-api</li>
+</ul>
 */



More information about the libdvbpsi-devel mailing list