<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
.. ups, silly me. I forgot to<br>
<br>
#include <h264_stream.h><br>
<br>
in the ".sip" file. Sorry about that.<br>
<br>
But that still leaves me with one of the original questions,
because, now, when compiling I get:<br>
<br>
error: invalid conversion from ‘char*’ to ‘uint8_t* {aka unsigned
char*}’<br>
<br>
Regards,<br>
<br>
Sampsa<br>
<div class="moz-forward-container"><br>
<br>
-------- Forwarded Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject:
</th>
<td>absolute beginner's question about "was not declared in
this scope"</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th>
<td>Fri, 06 Nov 2015 13:50:43 +0200</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th>
<td>Sampsa Riikonen <a class="moz-txt-link-rfc2396E" href="mailto:sampsa.riikonen@iki.fi"><sampsa.riikonen@iki.fi></a></td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:pyqt@riverbankcomputing.com">pyqt@riverbankcomputing.com</a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>Hello,
An absolute beginners question in wrapping C libraries with SIP:
The library header file ("h264_stream.h") has the following:
-------------------
#ifndef _H264_STREAM_H
#define _H264_STREAM_H 1
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
....
....
....
int find_nal_unit(uint8_t* buf, int size, int* nal_start, int* nal_end);
...
...
...
----------------------
Here is my "h264_stream.sip":
---------------------
%Module h264_stream
%UnitCode
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
%End
// int find_nal_unit(uint8_t* buf, int size, int* nal_start, int* nal_end);
int find_nal_unit(char* buf, int size, int* nal_start, int* nal_end);
// int find_nal_unit(int* buf, int size, int* nal_start, int* nal_end);
-------------------------
.. those commented lines were things I tried, but as I want a byte
buffer, so "char*" makes the most sense, right?
After ..
-------------
sip -c . h264_stream.sip
python configure.py
make
-------------
.. I get:
------------
./siph264_streamcmodule.cpp:37:49: error: ‘find_nal_unit’ was not
declared in this scope
sipRes = find_nal_unit(a0,a1,&a2,&a3);
^
make: *** [siph264_streamcmodule.o] Error 1
-------------
What is going on?
Also, I'd like to use the data type "uint8_t", i.e.
int find_nal_unit(uint8_t* buf, int size, int* nal_start, int* nal_end);
.. but that does not seem to be possible. Any way to achieve this (or
does it make any difference?) ?
I can see that "stdint" etc. are correctly included in
"siph264_streamcmodule.cpp"
Regards,
Sampsa (a sip newbie)
</pre>
<br>
</div>
<br>
</body>
</html>