Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: media/media.gyp

Issue 10919092: Build supported media targets on iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add use_ffmpeg flag. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« media/base/media_stub.cc ('K') | « media/base/media_stub.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/media.gyp
diff --git a/media/media.gyp b/media/media.gyp
index a830de99495b75f63e372030c192e0f09ba82e27..a48c61cf55a31971f4ee353ce3dc8520423ebb77 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -9,6 +9,14 @@
'use_pulseaudio%': 0,
# Override to dynamically link the cras (ChromeOS audio) library.
'use_cras%': 0,
+ 'conditions': [
+ ['OS=="android" or OS=="ios"', {
stuartmorgan 2012/09/05 12:34:24 Spaces around the == (we aren't consistent, but it
blundell 2012/09/05 12:51:08 Done.
+ # Android and iOS don't use ffmpeg.
+ 'use_ffmpeg%': 0,
+ }, { # 'OS!="android" and OS!="ios"'
stuartmorgan 2012/09/05 12:34:24 Same
blundell 2012/09/05 12:51:08 Done.
+ 'use_ffmpeg%': 1,
+ }],
+ ],
},
'targets': [
{
@@ -16,12 +24,9 @@
'type': '<(component)',
'dependencies': [
'../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../build/temp_gyp/googleurl.gyp:googleurl',
'../crypto/crypto.gyp:crypto',
- 'shared_memory_support',
'../ui/ui.gyp:ui',
- 'yuv_convert',
],
'defines': [
'MEDIA_IMPLEMENTATION',
@@ -175,7 +180,6 @@
'base/filter_collection.cc',
'base/filter_collection.h',
'base/media.h',
- 'base/media_android.cc',
'base/media_log.cc',
'base/media_log.h',
'base/media_log_event.h',
@@ -308,14 +312,53 @@
],
},
'conditions': [
- # Android doesn't use ffmpeg, so make the dependency conditional
- # and exclude the sources which depend on ffmpeg.
- ['OS != "android"', {
+ ['OS != "ios"', {
'dependencies': [
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ 'shared_memory_support',
+ 'yuv_convert',
],
}],
- ['OS == "android"', {
+ ['OS == "ios"', {
stuartmorgan 2012/09/05 12:34:24 Move this down to at least after the use_ffmpeg bl
blundell 2012/09/05 12:51:08 Done.
+ 'includes': [
+ # For shared_memory_support_sources variable.
+ 'shared_memory_support.gypi',
+ ],
+ 'sources': [
+ 'base/media_stub.cc',
+ # These sources are normally built via a dependency on the
+ # shared_memory_support target, but that target is not built on iOS.
+ # Instead, directly build only the files that are needed for iOS.
+ '<@(shared_memory_support_sources)',
+ ],
+ 'sources/': [
+ # iOS support is limited to audio input only.
+ ['exclude', '.*'],
+ ['include', '^audio/audio_buffers_state\\.'],
+ ['include', '^audio/audio_input_controller\\.'],
+ ['include', '^audio/audio_io\\.h$'],
+ ['include', '^audio/audio_manager\\.'],
+ ['include', '^audio/audio_manager_base\\.'],
+ ['include', '^audio/audio_parameters\\.'],
+ ['include', '^audio/fake_audio_input_stream\\.'],
+ ['include', '^audio/fake_audio_output_stream\\.'],
+ ['include', '^base/channel_layout\\.'],
+ ['include', '^base/media\\.h$'],
+ ['include', '^base/media_stub\\.cc$'],
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
+ '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
+ ],
+ },
+ }],
+ ['use_ffmpeg == 1', {
+ 'dependencies': [
+ '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
+ ],
+ }, { # use_ffmpeg == 0
+ # Exclude the sources that depend on ffmpeg.
'sources!': [
'base/media_posix.cc',
'ffmpeg/ffmpeg_common.cc',
@@ -346,6 +389,9 @@
],
}],
['OS == "android"', {
+ 'sources': [
+ 'base/media_stub.cc',
+ ],
'link_settings': {
'libraries': [
'-lOpenSLES',
@@ -498,8 +544,6 @@
'dependencies': [
'media',
'media_test_support',
- 'shared_memory_support',
- 'yuv_convert',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../base/base.gyp:test_support_base',
@@ -576,7 +620,26 @@
'webm/webm_parser_unittest.cc',
],
'conditions': [
- ['os_posix==1 and OS!="mac"', {
+ ['OS != "ios"', {
+ 'dependencies': [
+ 'shared_memory_support',
+ 'yuv_convert',
+ ],
+ }],
+ ['OS == "ios"', {
stuartmorgan 2012/09/05 12:34:24 Same here.
blundell 2012/09/05 12:51:08 Done.
+ 'sources/': [
+ ['exclude', '.*'],
+ ['include', '^audio/audio_parameters_unittest\\.cc$'],
+ ['include', '^base/mock_reader\\.h$'],
+ ['include', '^base/run_all_unittests\\.cc$'],
+ ],
+ }],
+ ['use_ffmpeg == 1', {
+ 'dependencies': [
+ '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
+ ],
+ }],
+ ['os_posix==1 and OS!="mac" and OS!="ios"', {
'conditions': [
['linux_use_tcmalloc==1', {
'dependencies': [
@@ -609,10 +672,6 @@
],
}],
],
- }, { # OS!=android
- 'dependencies': [
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
}],
['OS == "linux"', {
'conditions': [
« media/base/media_stub.cc ('K') | « media/base/media_stub.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698