Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libdvbpsi
Commits
6ad561b9
Commit
6ad561b9
authored
Jun 04, 2012
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doxygen: layout improvements.
parent
5ce1bf15
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
39 deletions
+43
-39
doc/howto-new-api.doxygen
doc/howto-new-api.doxygen
+34
-33
doc/structure.doxygen
doc/structure.doxygen
+4
-3
doc/usage.doxygen
doc/usage.doxygen
+5
-3
No files found.
doc/howto-new-api.doxygen
View file @
6ad561b9
...
...
@@ -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>
*/
doc/structure.doxygen
View file @
6ad561b9
...
...
@@ -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>
*/
doc/usage.doxygen
View file @
6ad561b9
...
...
@@ -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>
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment