[ros-users] a patch for compiling usb_cam package with the latest libavutil

Ryohei Ueda ueda at jsk.t.u-tokyo.ac.jp
Fri Dec 3 07:33:55 UTC 2010


Hi all.

now i try to use usb_cam package of bosch_drivers stack with the
latest libavutil.

however, i got the following errors when i compile it:
[ 66%] Building CXX object src/libusb_cam/CMakeFiles/usb_cam.dir/usb_cam.o
In file included from /usr/include/libavutil/avutil.h:81,
                from /usr/include/libavcodec/avcodec.h:30,
                from
/home/mechuser/ros/cturtle/bosch-ros-pkg/stacks/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:55:
/usr/include/libavutil/common.h: In function 'int32_t av_clipl_int32(int64_t)':
/usr/include/libavutil/common.h:154: error: 'UINT64_C' was not
declared in this scope
/home/mechuser/ros/cturtle/bosch-ros-pkg/stacks/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:
In function 'void mjpeg2rgb(char*, int, char*, int)':
/home/mechuser/ros/cturtle/bosch-ros-pkg/stacks/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:321:
warning: 'int avcodec_decode_video(AVCodecContext*, AVFrame*, int*,
const uint8_t*, int)' is deprecated (declared at
/usr/include/libavcodec/avcodec.h:3452)
/home/mechuser/ros/cturtle/bosch-ros-pkg/stacks/bosch_drivers/usb_cam/src/libusb_cam/usb_cam.cpp:321:
warning: 'int avcodec_decode_video(AVCodecContext*, AVFrame*, int*,
const uint8_t*, int)' is deprecated (declared at
/usr/include/libavcodec/avcodec.h:3452)
make[3]: *** [src/libusb_cam/CMakeFiles/usb_cam.dir/usb_cam.o] Error 1
make[3]: Leaving directory
`/home/mechuser/ros/cturtle/bosch-ros-pkg/stacks/bosch_drivers/usb_cam/build'
make[2]: *** [src/libusb_cam/CMakeFiles/usb_cam.dir/all] Error 2
make[2]: Leaving directory
`/home/mechuser/ros/cturtle/bosch-ros-pkg/stacks/bosch_drivers/usb_cam/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/home/mechuser/ros/cturtle/bosch-ros-pkg/stacks/bosch_drivers/usb_cam/build'
make: *** [all] Error 2

i found we need to put
#define __STDC_CONSTANT_MACROS
before include stdio.h.

i also attatched the patch.

you can find the similar topic here:
http://lists.willowgarage.com/pipermail/pr2-users/2010-October/001203.html

thanks

-- ryohei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb_cam.patch
Type: application/octet-stream
Size: 371 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20101203/fd3c7d90/attachment-0004.obj>


More information about the ros-users mailing list