several fixes for libjpeg related issues:

1. enable usage of libjpeg when libjpeg_turbo is not available;
2. remove forward declaration of some jpeg types since libjpeg and libjpeg_turbo have them defined differently;
3. pull in libjpeg code;
Review URL: http://webrtc-codereview.appspot.com/80003

git-svn-id: http://webrtc.googlecode.com/svn/trunk@230 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
wjia@google.com 2011-07-18 21:51:45 +00:00
parent 0c52e935e2
commit dd8076044a
5 changed files with 21 additions and 41 deletions

3
DEPS
View File

@ -30,6 +30,9 @@ deps = {
"trunk/third_party/libjpeg_turbo/":
Var("chromium_trunk") + "/deps/third_party/libjpeg_turbo@78340",
"trunk/third_party/libjpeg/":
Var("chromium_trunk") + "/src/third_party/libjpeg@" + Var("chromium_revision"),
"trunk/third_party/yasm/":
Var("chromium_trunk") + "/src/third_party/yasm@" + Var("chromium_revision"),

View File

@ -14,16 +14,6 @@
#include "data_manager.h"
#ifdef ANDROID
extern "C" {
#endif
#include "jpeglib.h"
#ifdef ANDROID
}
#endif
#include "jmorecfg.h"
namespace webrtc
{

View File

@ -16,13 +16,9 @@
#define WEBRTC_COMMON_VIDEO_JPEG_DATA_MANAGER
#include <stdio.h>
// jpeg forward declaration
struct jpeg_source_mgr;
typedef unsigned char JOCTET;
typedef int boolean;
typedef struct jpeg_decompress_struct* j_decompress_ptr;
typedef struct jpeg_compress_struct* j_compress_ptr;
extern "C" {
#include "jpeglib.h"
}
namespace webrtc
{

View File

@ -22,13 +22,9 @@
#if defined(WIN32)
#include <basetsd.h>
#endif
#ifdef ANDROID
extern "C" {
#endif
#include "jpeglib.h"
#ifdef ANDROID
}
#endif
#include <setjmp.h>

View File

@ -10,6 +10,9 @@
'includes': [
'../../../../common_settings.gypi', # Common settings
],
'variables': {
'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
},
'targets': [
{
'target_name': 'webrtc_jpeg',
@ -31,28 +34,20 @@
'conditions': [
['build_with_chromium==1', {
'dependencies': [
'../../../../../libjpeg_turbo/libjpeg.gyp:libjpeg',
'<(libjpeg_gyp_path):libjpeg',
],
'include_dirs': [
'../../../../../libjpeg_turbo',
}, {
'conditions': [
['use_libjpeg_turbo==1', {
'dependencies': [
'../../../../../third_party/libjpeg_turbo/libjpeg.gyp:libjpeg',
],
}, {
'dependencies': [
'../../../../../third_party/libjpeg/libjpeg.gyp:libjpeg',
],
}],
],
'direct_dependent_settings': {
'include_dirs': [
'../../../../../libjpeg_turbo',
],
},
},{
'dependencies': [
'../../../../../third_party/libjpeg_turbo/libjpeg.gyp:libjpeg',
],
'include_dirs': [
'../../../../third_party/libjpeg_turbo',
],
'direct_dependent_settings': {
'include_dirs': [
'../../../../third_party/libjpeg_turbo',
],
},
}],
],
'sources': [