Bug 1151628 - Re-enable MJPEG in libyuv (especially for getUserMedia). r=glandium, a=sledru
authorRandell Jesup <rjesup@jesup.org>
Tue, 07 Apr 2015 08:54:20 -0400
changeset 260247 f6448c4cf87f
parent 260246 2161d1dc7e2b
child 260248 97d33db56113
push id727
push userryanvm@gmail.com
push date2015-04-23 14:45 +0000
treeherdermozilla-release@7c66212e4c09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, sledru
bugs1151628
milestone38.0
Bug 1151628 - Re-enable MJPEG in libyuv (especially for getUserMedia). r=glandium, a=sledru
media/libyuv/libyuv.gyp
media/libyuv/source/mjpeg_decoder.cc
--- a/media/libyuv/libyuv.gyp
+++ b/media/libyuv/libyuv.gyp
@@ -76,16 +76,21 @@
     {
       'target_name': 'libyuv',
       # Change type to 'shared_library' to build .so or .dll files.
       'type': 'static_library',
       # Allows libyuv.a redistributable library without external dependencies.
       # 'standalone_static_library': 1,
       'conditions': [
         # TODO(fbarchard): Use gyp define to enable jpeg.
+        [ 'build_with_mozilla==1', {
+          'defines': [
+            'HAVE_JPEG'
+          ],
+        }],
         [ 'OS != "ios" and build_with_mozilla!=1', {
           'defines': [
             'HAVE_JPEG'
           ],
           'conditions': [
             # Android uses libjpeg for system jpeg support.
             [ 'OS == "android" and use_system_libjpeg == 1', {
               'dependencies': [
--- a/media/libyuv/source/mjpeg_decoder.cc
+++ b/media/libyuv/source/mjpeg_decoder.cc
@@ -14,17 +14,16 @@
 #include <assert.h>
 
 #if !defined(__pnacl__) && !defined(__CLR_VER) && !defined(COVERAGE_ENABLED) &&\
     !defined(TARGET_IPHONE_SIMULATOR)
 // Must be included before jpeglib.
 #include <setjmp.h>
 #define HAVE_SETJMP
 #endif
-struct FILE;  // For jpeglib.h.
 
 // C++ build requires extern C for jpeg internals.
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #include <jpeglib.h>