Merge lp:~gal-fourier/ubuntu/natty/opencv/bug-756154 into lp:ubuntu/natty/opencv
Status: | Rejected | ||||||||
---|---|---|---|---|---|---|---|---|---|
Rejected by: | James Westby | ||||||||
Proposed branch: | lp:~gal-fourier/ubuntu/natty/opencv/bug-756154 | ||||||||
Merge into: | lp:ubuntu/natty/opencv | ||||||||
Diff against target: |
257 lines (+215/-1) 6 files modified
debian/changelog (+14/-0) debian/control (+1/-1) debian/patches/cvcap_ffmpeg_fix_compile_against_libav0.7.patch (+120/-0) debian/patches/series (+4/-0) debian/patches/ubuntu11.04_no_videodev.h_include_file.patch (+56/-0) debian/patches/ubuntu11.10_oneiric_fix_compilation_error_with_gcc4.6.patch (+20/-0) |
||||||||
To merge this branch: | bzr merge lp:~gal-fourier/ubuntu/natty/opencv/bug-756154 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Chris Coulson | Pending | ||
Review via email: mp+68171@code.launchpad.net |
This proposal supersedes a proposal from 2011-07-07.
Description of the change
Ubuntu 11.10 Oneiric fix of compilation error of opencv-2.1.0 when compiled against the (new) ffmpeg package libav-0.7:
Fix changes as requested by reviewer Chris Coulson (community) at https:/
Chris Coulson wrote on 2011-07-11
Hi,
Thanks for your work. I have a few comments though:
1) "unstable" isn't a valid target for Ubuntu. This should be targetted to "oneiric" instead.
2) You can collapse the 2 changelog entries in to 1, as 2.1.0-3ubuntu2 has never been uploaded
3) Please wrap changelog entries to around 80 characters. The current changelog entries trigger this lintian warning: http://
4) In cvcap_ffmpeg_
@@ -514,6 +514,24 @@
}
+#if LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) /* As defined when compiled against libav-0.7 from Ubuntu 11.10 Oneiric */
+/* Gal Shalif: temporary add a backward compatible function - till OpenCV is properly ported to compile against ffmpeg 0.7 */
+/* Gal Shalif: code is copy from Ubuntu 11.04 Natty libav-0.
+int avcodec_
+ int *got_picture_ptr,
+ uint8_t *buf, int buf_size)
+{
+ AVPacket avpkt;
+ av_init_
+ avpkt.data = buf;
+ avpkt.size = buf_size;
+ // HACK for CorePNG to decode as normal PNG by default
+ avpkt.flags = AV_PKT_FLAG_KEY;
+
+ return avcodec_
+}
+#endif /* LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) */
+
bool CvCapture_
{
bool valid = false;
@@ -795,6 +813,17 @@
#endif
};
+#if LIBAVFORMAT_BUILD >= (53<<16 | 2<<8 | 0) /* As defined when compiled against libav-0.7 from Ubuntu 11.10 Oneiric */
+/* Gal Shalif: temporary add a backward compatible define - till OpenCV is properly ported to compile against ffmpeg 0.7 */
+
+/* Gal Shalif: code is copy from Ubuntu 11.04 Natty libav-0.
+#define AVERROR_NUMEXPECTED AVERROR(EDOM) ///< Number syntax expected in filename
+#define AVERROR_NOFMT AVERROR(EILSEQ) ///< Unknown format
+#define AVERROR_IO AVERROR(EIO) ///< I/O error
+#define AVERROR_NOMEM AVERROR(ENOMEM) ///< Not enough memory
+
+#endif /* LIBAVFORMAT_BUILD >= (53<<16 | 2<<8 | 0) */
+
static const char * icvFFMPEGErrStr(int err)
{
switch(err) {
Reply
review: Needs Fixing
Unmerged revisions
- 23. By Gal Shalif
-
* Add patch ubuntu11.
10_oneiric_ fix_compilation _error_ with_gcc4. 6.patch:
+ fix build error on Ubuntu 11.10 Oneiric (LP: #791527):
* Add cvcap_ffmpeg_fix_compile_ against_ libav0. 7.patch:
fix compilation errors when compiled against libav-0.7
(as applicable for Ubuntu 11.10 Oneiric) (LP: 756154)
* Add patch ubuntu11.04_no_videodev. h_include_ file.patch:
fix build error on Ubuntu 11.04 Natty (LP: #756154):
- Backport the upstream 2.2 changeset to void the use of the obsolete V4L1
(i.e. do not use the obsolete linux/videodev.h) - 22. By Gal Shalif
-
Add cvcap_ffmpeg_
fix_compile_ against_ libav0. 7.patch - fix compilation errors when compiled against libav-0.7 (as applicable for Ubuntu 11.10 Oneiric) (LP: 756154) - 21. By Gal Shalif
-
Add patch ubuntu11.
10_oneiric_ fix_compilation _error_ with_gcc4. 6.patch - fix build error on Ubuntu 11.10 Oneiric (LP: #791527): - 20. By Gal Shalif
-
* Add patch ubuntu11.
04_no_videodev. h_include_ file.patch - fix build error on Ubuntu 11.04 Natty (LP: #756154):
- Backport the upstream 2.2 changeset to void the use of the obsolete V4L1 (linux/videodev.h) - 19. By Gal Shalif
-
add a forgoten patch file
- 18. By Gal Shalif
-
add a forgoten patch file
- 17. By Gal Shalif
-
* Use libv4l1-videodev.h (from libv4l-dev) as a replacement for the obsolete linux/videodev.h on Ubuntu 11.04
- Add libv4l-dev to build dependencies
- ubuntu11.04_no_videodev. h_include_ file.patch: modify src/highgui/ cvcap_libv4l. cpp, src/highgui/ cvcap_v4l. cpp
Hi,
Thanks for your work. I have a few comments though:
1) "unstable" isn't a valid target for Ubuntu. This should be targetted to "oneiric" instead. lintian. debian. org/tags/ debian- changelog- line-too- long.html fix_compile_ against_ libav0. 7.patch, you use 2 different values when checking LIBAVFORMAT_BUILD. Is this deliberate? Eg, in these 2 hunks:
2) You can collapse the 2 changelog entries in to 1, as 2.1.0-3ubuntu2 has never been uploaded
3) Please wrap changelog entries to around 80 characters. The current changelog entries trigger this lintian warning: http://
4) In cvcap_ffmpeg_
@@ -514,6 +514,24 @@
}
+#if LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) /* As defined when compiled against libav-0.7 from Ubuntu 11.10 Oneiric */ 6.2/libavcodec/ utils.c */ decode_ video(AVCodecCo ntext *avctx, AVFrame *picture, packet( &avpkt) ; decode_ video2( avctx, picture, got_picture_ptr, &avpkt); FFMPEG: :grabFrame( )
+/* Gal Shalif: temporary add a backward compatible function - till OpenCV is properly ported to compile against ffmpeg 0.7 */
+/* Gal Shalif: code is copy from Ubuntu 11.04 Natty libav-0.
+int avcodec_
+ int *got_picture_ptr,
+ uint8_t *buf, int buf_size)
+{
+ AVPacket avpkt;
+ av_init_
+ avpkt.data = buf;
+ avpkt.size = buf_size;
+ // HACK for CorePNG to decode as normal PNG by default
+ avpkt.flags = AV_PKT_FLAG_KEY;
+
+ return avcodec_
+}
+#endif /* LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) */
+
bool CvCapture_
{
bool valid = false;
@@ -795,6 +813,17 @@
#endif
};
+#if LIBAVFORMAT_BUILD >= (53<<16 | 2<<8 | 0) /* As defined when compiled against libav-0.7 from Ubuntu 11.10 Oneiric */ 6.2/libavutil/ error.h and is enclosed within LIBAVUTIL_ VERSION_ MAJOR < 51 ... #endif */
+/* Gal Shalif: temporary add a backward compatible define - till OpenCV is properly ported to compile against ffmpeg 0.7 */
+
+/* Gal Shalif: code is copy from Ubuntu 11.04 Natty libav-0.
+#define AVERROR_NUMEXPECTED AVERROR(EDOM) ///< Number syntax expected in filename
+#define AVERROR_NOFMT AVERROR(EILSEQ) ///< Unknown format
+#define AVERROR_IO AVERROR(EIO) ///< I/O error
+#define AVERROR_NOMEM AVERROR(ENOMEM) ///< Not enough memory
+
+#endif /* LIBAVFORMAT_BUILD >= (53<<16 | 2<<8 | 0) */
+
static const char * icvFFMPEGErrStr(int err)
{
switch(err) {