[PyQt] absolute beginner's question about "was not declared in this scope"

Sampsa Riikonen sampsa.riikonen at iki.fi
Fri Nov 6 11:50:43 GMT 2015


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)





More information about the PyQt mailing list