Commit 6ad561b9 authored by Jean-Paul Saman's avatar Jean-Paul Saman

doxygen: layout improvements.

parent 5ce1bf15
...@@ -27,37 +27,38 @@ longer needed. ...@@ -27,37 +27,38 @@ longer needed.
<p> <p>
The following examples shows howto translate existing applications. In these examples only 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 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>
<p>In many existing applications the following scheme is used to attaching a PAT decoder to a dvbpsi handle:</p> <p>In many existing applications the following scheme is used to attaching a PAT decoder to a dvbpsi handle:</p>
<code> <code>
dvbpsi_handle handle; &nbsp; dvbpsi_handle handle; <br />
dvbpsi_AttachPAT(handle, handle_PAT, data); &nbsp; dvbpsi_AttachPAT(handle, handle_PAT, data); <br />
</code> </code>
<p>The same scheme is used for other PSI tables too, this translate to the following code sequence:</p> <p>The same scheme is used for other PSI tables too, this translate to the following code sequence:</p>
<code> <code>
dvbpsi_t *handle = dvbpsi_NewHandle(&dvbpsi_message, DVBPSI_MSG_DEBUG); &nbsp; dvbpsi_t *handle = dvbpsi_NewHandle(&dvbpsi_message, DVBPSI_MSG_DEBUG); <br />
if (handle == NULL) &nbsp; if (handle == NULL) <br />
goto error; &nbsp;&nbsp; goto error; <br />
if (!dvbpsi_AttachPAT(handle, handle_PAT, data)) &nbsp; if (!dvbpsi_AttachPAT(handle, handle_PAT, data)) <br />
{ &nbsp; { <br />
dvbpsi_DeleteHandle(handle); &nbsp; &nbsp; dvbpsi_DeleteHandle(handle); <br />
handle = NULL; &nbsp; &nbsp; handle = NULL; <br />
goto error; &nbsp; &nbsp; goto error; <br />
} &nbsp; } <br />
&nbsp; <br />
return 0; &nbsp; return 0; <br />
&nbsp; <br />
error: error: <br />
if (dvbpsi_HasDecoder(handle)) &nbsp; if (dvbpsi_HasDecoder(handle)) <br />
dvbpsi_DetachPAT(andle); &nbsp; &nbsp; dvbpsi_DetachPAT(andle); <br />
if (handle) &nbsp; if (handle) <br />
dvbpsi_DeleteHandle(handle); &nbsp; &nbsp; dvbpsi_DeleteHandle(handle); <br />
return -1; &nbsp; return -1; <br />
</code> </code>
<p>The <em>message callback function</em> <b>dvbpsi_message</b> is defined as follows below. In this case <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: ...@@ -66,17 +67,17 @@ along libdvbpsi messages if wanted. See the following example:
</p> </p>
<code> <code>
static void dvbpsi_message(dvbpsi_t *p_dvbpsi, const dvbpsi_msg_level_t level, const char* msg) static void dvbpsi_message(dvbpsi_t *p_dvbpsi, const dvbpsi_msg_level_t level, const char* msg) <br />
{ { <br />
switch(level) &nbsp; switch(level) <br />
{ &nbsp; { <br />
case DVBPSI_MSG_ERROR: fprintf(stderr, "Error: "); break; &nbsp; case DVBPSI_MSG_ERROR: fprintf(stderr, "Error: "); break; <br />
case DVBPSI_MSG_WARN: fprintf(stderr, "Warning: "); break; &nbsp; case DVBPSI_MSG_WARN: fprintf(stderr, "Warning: "); break; <br />
case DVBPSI_MSG_DEBUG: fprintf(stderr, "Debug: "); break; &nbsp; case DVBPSI_MSG_DEBUG: fprintf(stderr, "Debug: "); break; <br />
default: &nbsp; default: <br />
return; &nbsp; &nbsp; return; <br />
} &nbsp; } <br />
fprintf(stderr, "%s\n", msg); &nbsp; fprintf(stderr, "%s\n", msg); <br />
} } <br />
</code> </code>
*/ */
...@@ -27,7 +27,8 @@ TS discontinuities signaled by the <em>PSI decoder</em>. </p> ...@@ -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 <em>specific decoder</em> must be implemented for all the PSI
tables.</p> tables.</p>
\ref usage <ul>
\ref howto-new-api <li>\ref usage</li>
<li>\ref howto-new-api</li>
</ul>
*/ */
...@@ -39,7 +39,9 @@ have been detached.</p> ...@@ -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> <li>ATSC tables: atsc_eit.h atsc_ett.h atsc_mgt.h atsc_stt.h atsc_vct.h</li>
</ul> </ul>
\ref structure <p>See also:</p>
\ref howto-new-api <ul>
<li>\ref structure</li>
<li>\ref howto-new-api</li>
</ul>
*/ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment