[PyQt] Fwd: absolute beginner's question about "was not declared in this scope"
Sampsa Riikonen
sampsa.riikonen at iki.fi
Fri Nov 6 12:28:37 GMT 2015
Hello,
.. ups, silly me. I forgot to
#include <h264_stream.h>
in the ".sip" file. Sorry about that.
But that still leaves me with one of the original questions, because,
now, when compiling I get:
error: invalid conversion from ‘char*’ to ‘uint8_t* {aka unsigned char*}’
Regards,
Sampsa
-------- Forwarded Message --------
Subject: absolute beginner's question about "was not declared in this
scope"
Date: Fri, 06 Nov 2015 13:50:43 +0200
From: Sampsa Riikonen <sampsa.riikonen at iki.fi>
To: pyqt at riverbankcomputing.com
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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20151106/31681b40/attachment.html>
More information about the PyQt
mailing list