[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Fwd: absolute beginner's question about "was not declared in this scope"
From:       Sampsa Riikonen <sampsa.riikonen () iki ! fi>
Date:       2015-11-06 12:28:37
Message-ID: 563C9CF5.7080509 () iki ! fi
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@iki.fi>
To: 	pyqt@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)






[Attachment #5 (text/html)]

<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 &lt;h264_stream.h&gt;<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">&lt;sampsa.riikonen@iki.fi&gt;</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 &lt;stdint.h&gt;
#include &lt;stdio.h&gt;
#include &lt;assert.h&gt;

....
....
....

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 &lt;stdint.h&gt;
#include &lt;stdio.h&gt;
#include &lt;assert.h&gt;
%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,&amp;a2,&amp;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>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic