"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp" (8 Mar 2017, 37163 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
    2 # Use of this source code is governed by a BSD-style license that can be
    3 # found in the LICENSE file.
    4 
    5 {
    6   'variables': {
    7     'chromium_code': 1,
    8     # Override to dynamically link the PulseAudio library.
    9     'use_pulseaudio%': 0,
   10     # Override to dynamically link the cras (ChromeOS audio) library.
   11     'use_cras%': 0,
   12   },
   13   'targets': [
   14     {
   15       'target_name': 'media',
   16       'type': '<(component)',
   17       'dependencies': [
   18         'yuv_convert',
   19         '../base/base.gyp:base',
   20         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
   21         '../build/temp_gyp/googleurl.gyp:googleurl',
   22         '../crypto/crypto.gyp:crypto',
   23         '../third_party/openmax/openmax.gyp:il',
   24         '../ui/ui.gyp:ui',
   25       ],
   26       'defines': [
   27         'MEDIA_IMPLEMENTATION',
   28       ],
   29       'include_dirs': [
   30         '..',
   31       ],
   32       'sources': [
   33         'audio/android/audio_manager_android.cc',
   34         'audio/android/audio_manager_android.h',
   35         'audio/android/audio_track_output_android.cc',
   36         'audio/android/audio_track_output_android.h',
   37         'audio/android/opensles_input.cc',
   38         'audio/android/opensles_input.h',
   39         'audio/android/opensles_output.cc',
   40         'audio/android/opensles_output.h',
   41         'audio/async_socket_io_handler.h',
   42         'audio/async_socket_io_handler_posix.cc',
   43         'audio/async_socket_io_handler_win.cc',
   44         'audio/audio_buffers_state.cc',
   45         'audio/audio_buffers_state.h',
   46         'audio/audio_io.h',
   47         'audio/audio_input_controller.cc',
   48         'audio/audio_input_controller.h',
   49         'audio/audio_input_stream_impl.cc',
   50         'audio/audio_input_stream_impl.h',
   51         'audio/audio_device_name.cc',
   52         'audio/audio_device_name.h',
   53         'audio/audio_manager.cc',
   54         'audio/audio_manager.h',
   55         'audio/audio_manager_base.cc',
   56         'audio/audio_manager_base.h',
   57         'audio/audio_output_controller.cc',
   58         'audio/audio_output_controller.h',
   59         'audio/audio_output_dispatcher.cc',
   60         'audio/audio_output_dispatcher.h',
   61         'audio/audio_output_dispatcher_impl.cc',
   62         'audio/audio_output_dispatcher_impl.h',
   63         'audio/audio_output_mixer.cc',
   64         'audio/audio_output_mixer.h',
   65         'audio/audio_output_proxy.cc',
   66         'audio/audio_output_proxy.h',
   67         'audio/audio_parameters.cc',
   68         'audio/audio_parameters.h',
   69         'audio/audio_util.cc',
   70         'audio/audio_util.h',
   71         'audio/cross_process_notification.cc',
   72         'audio/cross_process_notification.h',
   73         'audio/cross_process_notification_win.cc',
   74         'audio/cross_process_notification_posix.cc',
   75         'audio/fake_audio_input_stream.cc',
   76         'audio/fake_audio_input_stream.h',
   77         'audio/fake_audio_output_stream.cc',
   78         'audio/fake_audio_output_stream.h',
   79         'audio/linux/audio_manager_linux.cc',
   80         'audio/linux/audio_manager_linux.h',
   81         'audio/linux/alsa_input.cc',
   82         'audio/linux/alsa_input.h',
   83         'audio/linux/alsa_output.cc',
   84         'audio/linux/alsa_output.h',
   85         'audio/linux/alsa_util.cc',
   86         'audio/linux/alsa_util.h',
   87         'audio/linux/alsa_wrapper.cc',
   88         'audio/linux/alsa_wrapper.h',
   89         'audio/linux/cras_output.cc',
   90         'audio/linux/cras_output.h',
   91         'audio/openbsd/audio_manager_openbsd.cc',
   92         'audio/openbsd/audio_manager_openbsd.h',
   93         'audio/mac/audio_input_mac.cc',
   94         'audio/mac/audio_input_mac.h',
   95         'audio/mac/audio_low_latency_input_mac.cc',
   96         'audio/mac/audio_low_latency_input_mac.h',
   97         'audio/mac/audio_low_latency_output_mac.cc',
   98         'audio/mac/audio_low_latency_output_mac.h',
   99         'audio/mac/audio_manager_mac.cc',
  100         'audio/mac/audio_manager_mac.h',
  101         'audio/mac/audio_output_mac.cc',
  102         'audio/mac/audio_output_mac.h',
  103         'audio/null_audio_sink.cc',
  104         'audio/null_audio_sink.h',
  105         'audio/pulse/pulse_output.cc',
  106         'audio/pulse/pulse_output.h',
  107         'audio/sample_rates.cc',
  108         'audio/sample_rates.h',
  109         'audio/simple_sources.cc',
  110         'audio/simple_sources.h',
  111         'audio/win/audio_low_latency_input_win.cc',
  112         'audio/win/audio_low_latency_input_win.h',
  113         'audio/win/audio_low_latency_output_win.cc',
  114         'audio/win/audio_low_latency_output_win.h',
  115         'audio/win/audio_manager_win.cc',
  116         'audio/win/audio_manager_win.h',
  117         'audio/win/avrt_wrapper_win.cc',
  118         'audio/win/avrt_wrapper_win.h',
  119         'audio/win/device_enumeration_win.cc',
  120         'audio/win/device_enumeration_win.h',
  121         'audio/win/wavein_input_win.cc',
  122         'audio/win/wavein_input_win.h',
  123         'audio/win/waveout_output_win.cc',
  124         'audio/win/waveout_output_win.h',
  125         'base/android/media_jni_registrar.cc',
  126         'base/android/media_jni_registrar.h',
  127         'base/audio_decoder.cc',
  128         'base/audio_decoder.h',
  129         'base/audio_decoder_config.cc',
  130         'base/audio_decoder_config.h',
  131         'base/audio_renderer.h',
  132         'base/audio_renderer_mixer.cc',
  133         'base/audio_renderer_mixer.h',
  134         'base/audio_renderer_mixer_input.cc',
  135         'base/audio_renderer_mixer_input.h',
  136         'base/bitstream_buffer.h',
  137         'base/buffers.cc',
  138         'base/buffers.h',
  139         'base/byte_queue.cc',
  140         'base/byte_queue.h',
  141         'base/channel_layout.cc',
  142         'base/channel_layout.h',
  143         'base/clock.cc',
  144         'base/clock.h',
  145         'base/composite_filter.cc',
  146         'base/composite_filter.h',
  147         'base/data_buffer.cc',
  148         'base/data_buffer.h',
  149         'base/data_source.cc',
  150         'base/data_source.h',
  151         'base/decoder_buffer.cc',
  152         'base/decoder_buffer.h',
  153         'base/decrypt_config.cc',
  154         'base/decrypt_config.h',
  155         'base/decryptor.h',
  156         'base/decryptor_client.h',
  157         'base/demuxer.cc',
  158         'base/demuxer.h',
  159         'base/demuxer_stream.cc',
  160         'base/demuxer_stream.h',
  161         'base/djb2.cc',
  162         'base/djb2.h',
  163         'base/filter_collection.cc',
  164         'base/filter_collection.h',
  165         'base/filter_host.h',
  166         'base/filters.cc',
  167         'base/filters.h',
  168         'base/h264_bitstream_converter.cc',
  169         'base/h264_bitstream_converter.h',
  170         'base/media.h',
  171         'base/media_android.cc',
  172         'base/media_export.h',
  173         'base/media_log.cc',
  174         'base/media_log.h',
  175         'base/media_log_event.h',
  176         'base/media_posix.cc',
  177         'base/media_switches.cc',
  178         'base/media_switches.h',
  179         'base/media_win.cc',
  180         'base/message_loop_factory.cc',
  181         'base/message_loop_factory.h',
  182         'base/pipeline.cc',
  183         'base/pipeline.h',
  184         'base/pipeline_status.cc',
  185         'base/pipeline_status.h',
  186         'base/ranges.cc',
  187         'base/ranges.h',
  188         'base/seekable_buffer.cc',
  189         'base/seekable_buffer.h',
  190         'base/state_matrix.cc',
  191         'base/state_matrix.h',
  192         'base/stream_parser.cc',
  193         'base/stream_parser.h',
  194         'base/stream_parser_buffer.cc',
  195         'base/stream_parser_buffer.h',
  196         'base/video_decoder.cc',
  197         'base/video_decoder.h',
  198         'base/video_decoder_config.cc',
  199         'base/video_decoder_config.h',
  200         'base/video_frame.cc',
  201         'base/video_frame.h',
  202         'base/video_renderer.h',
  203         'base/video_util.cc',
  204         'base/video_util.h',
  205         'crypto/aes_decryptor.cc',
  206         'crypto/aes_decryptor.h',
  207         'ffmpeg/ffmpeg_common.cc',
  208         'ffmpeg/ffmpeg_common.h',
  209         'ffmpeg/file_protocol.cc',
  210         'ffmpeg/file_protocol.h',
  211         'filters/audio_file_reader.cc',
  212         'filters/audio_file_reader.h',
  213         'filters/audio_renderer_algorithm.cc',
  214         'filters/audio_renderer_algorithm.h',
  215         'filters/audio_renderer_impl.cc',
  216         'filters/audio_renderer_impl.h',
  217         'filters/bitstream_converter.cc',
  218         'filters/bitstream_converter.h',
  219         'filters/chunk_demuxer.cc',
  220         'filters/chunk_demuxer.h',
  221         'filters/chunk_demuxer_client.h',
  222         'filters/dummy_demuxer.cc',
  223         'filters/dummy_demuxer.h',
  224         'filters/ffmpeg_audio_decoder.cc',
  225         'filters/ffmpeg_audio_decoder.h',
  226         'filters/ffmpeg_demuxer.cc',
  227         'filters/ffmpeg_demuxer.h',
  228         'filters/ffmpeg_h264_bitstream_converter.cc',
  229         'filters/ffmpeg_h264_bitstream_converter.h',
  230         'filters/ffmpeg_glue.cc',
  231         'filters/ffmpeg_glue.h',
  232         'filters/ffmpeg_video_decoder.cc',
  233         'filters/ffmpeg_video_decoder.h',
  234         'filters/file_data_source.cc',
  235         'filters/file_data_source.h',
  236         'filters/gpu_video_decoder.cc',
  237         'filters/gpu_video_decoder.h',
  238         'filters/in_memory_url_protocol.cc',
  239         'filters/in_memory_url_protocol.h',
  240         'filters/source_buffer_stream.cc',
  241         'filters/source_buffer_stream.h',
  242         'filters/video_frame_generator.cc',
  243         'filters/video_frame_generator.h',
  244         'filters/video_renderer_base.cc',
  245         'filters/video_renderer_base.h',
  246         'video/capture/fake_video_capture_device.cc',
  247         'video/capture/fake_video_capture_device.h',
  248         'video/capture/linux/video_capture_device_linux.cc',
  249         'video/capture/linux/video_capture_device_linux.h',
  250         'video/capture/mac/video_capture_device_mac.h',
  251         'video/capture/mac/video_capture_device_mac.mm',
  252         'video/capture/mac/video_capture_device_qtkit_mac.h',
  253         'video/capture/mac/video_capture_device_qtkit_mac.mm',
  254         'video/capture/video_capture.h',
  255         'video/capture/video_capture_device.h',
  256         'video/capture/video_capture_device_dummy.cc',
  257         'video/capture/video_capture_device_dummy.h',
  258         'video/capture/video_capture_proxy.cc',
  259         'video/capture/video_capture_proxy.h',
  260         'video/capture/video_capture_types.h',
  261         'video/capture/win/filter_base_win.cc',
  262         'video/capture/win/filter_base_win.h',
  263         'video/capture/win/pin_base_win.cc',
  264         'video/capture/win/pin_base_win.h',
  265         'video/capture/win/sink_filter_observer_win.h',
  266         'video/capture/win/sink_filter_win.cc',
  267         'video/capture/win/sink_filter_win.h',
  268         'video/capture/win/sink_input_pin_win.cc',
  269         'video/capture/win/sink_input_pin_win.h',
  270         'video/capture/win/video_capture_device_win.cc',
  271         'video/capture/win/video_capture_device_win.h',
  272         'video/picture.cc',
  273         'video/picture.h',
  274         'video/video_decode_accelerator.cc',
  275         'video/video_decode_accelerator.h',
  276         'webm/webm_constants.h',
  277         'webm/webm_cluster_parser.cc',
  278         'webm/webm_cluster_parser.h',
  279         'webm/webm_content_encodings.cc',
  280         'webm/webm_content_encodings.h',
  281         'webm/webm_content_encodings_client.cc',
  282         'webm/webm_content_encodings_client.h',
  283         'webm/webm_info_parser.cc',
  284         'webm/webm_info_parser.h',
  285         'webm/webm_parser.cc',
  286         'webm/webm_parser.h',
  287         'webm/webm_stream_parser.cc',
  288         'webm/webm_stream_parser.h',
  289         'webm/webm_tracks_parser.cc',
  290         'webm/webm_tracks_parser.h',
  291       ],
  292       'direct_dependent_settings': {
  293         'include_dirs': [
  294           '..',
  295         ],
  296       },
  297       'conditions': [
  298         # Android doesn't use ffmpeg, so make the dependency conditional
  299         # and exclude the sources which depend on ffmpeg.
  300         ['OS != "android"', {
  301           'dependencies': [
  302             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
  303           ],
  304         }],
  305         ['OS == "android"', {
  306           'sources!': [
  307             'base/media_posix.cc',
  308             'ffmpeg/ffmpeg_common.cc',
  309             'ffmpeg/ffmpeg_common.h',
  310             'ffmpeg/file_protocol.cc',
  311             'ffmpeg/file_protocol.h',
  312             'filters/audio_file_reader.cc',
  313             'filters/audio_file_reader.h',
  314             'filters/bitstream_converter.cc',
  315             'filters/bitstream_converter.h',
  316             'filters/chunk_demuxer.cc',
  317             'filters/chunk_demuxer.h',
  318             'filters/chunk_demuxer_client.h',
  319             'filters/ffmpeg_audio_decoder.cc',
  320             'filters/ffmpeg_audio_decoder.h',
  321             'filters/ffmpeg_demuxer.cc',
  322             'filters/ffmpeg_demuxer.h',
  323             'filters/ffmpeg_h264_bitstream_converter.cc',
  324             'filters/ffmpeg_h264_bitstream_converter.h',
  325             'filters/ffmpeg_glue.cc',
  326             'filters/ffmpeg_glue.h',
  327             'filters/ffmpeg_video_decoder.cc',
  328             'filters/ffmpeg_video_decoder.h',
  329             'filters/gpu_video_decoder.cc',
  330             'filters/gpu_video_decoder.h',
  331             'webm/webm_cluster_parser.cc',
  332             'webm/webm_cluster_parser.h',
  333             'webm/webm_stream_parser.cc',
  334             'webm/webm_stream_parser.h',
  335           ],
  336         }],
  337         # The below 'android' condition were added temporarily and should be
  338         # removed in downstream, because there is no Java environment setup in
  339         # upstream yet.
  340         ['OS == "android"', {
  341           'sources!':[
  342             'audio/android/audio_track_output_android.cc',
  343           ],
  344           'sources':[
  345             'audio/android/audio_track_output_stub_android.cc',
  346           ],
  347           'link_settings': {
  348             'libraries': [
  349               '-lOpenSLES',
  350             ],
  351           },
  352         }],
  353         ['OS=="linux" or OS=="freebsd" or OS=="solaris"', {
  354           'link_settings': {
  355             'libraries': [
  356               '-lasound',
  357             ],
  358           },
  359         }],
  360         ['OS=="openbsd"', {
  361           'sources/': [ ['exclude', '/alsa_' ],
  362                         ['exclude', '/audio_manager_linux' ] ],
  363           'link_settings': {
  364             'libraries': [
  365             ],
  366           },
  367         }],
  368         ['OS!="openbsd"', {
  369           'sources!': [
  370             'audio/openbsd/audio_manager_openbsd.cc',
  371             'audio/openbsd/audio_manager_openbsd.h',
  372           ],
  373         }],
  374         ['OS=="linux"', {
  375           'variables': {
  376             'conditions': [
  377               ['sysroot!=""', {
  378                 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
  379               }, {
  380                 'pkg-config': 'pkg-config'
  381               }],
  382             ],
  383           },
  384           'conditions': [
  385             ['use_cras == 1', {
  386               'cflags': [
  387                 '<!@(<(pkg-config) --cflags libcras)',
  388               ],
  389               'link_settings': {
  390                 'libraries': [
  391                   '<!@(<(pkg-config) --libs libcras)',
  392                 ],
  393               },
  394               'defines': [
  395                 'USE_CRAS',
  396               ],
  397             }, {  # else: use_cras == 0
  398               'sources!': [
  399                 'audio/linux/cras_output.cc',
  400                 'audio/linux/cras_output.h',
  401               ],
  402             }],
  403           ],
  404         }],
  405         ['os_posix == 1', {
  406           'conditions': [
  407             ['use_pulseaudio == 1', {
  408               'cflags': [
  409                 '<!@(pkg-config --cflags libpulse)',
  410               ],
  411               'link_settings': {
  412                 'libraries': [
  413                   '<!@(pkg-config --libs-only-l libpulse)',
  414                 ],
  415               },
  416               'defines': [
  417                 'USE_PULSEAUDIO',
  418               ],
  419             }, {  # else: use_pulseaudio == 0
  420               'sources!': [
  421                 'audio/pulse/pulse_output.cc',
  422                 'audio/pulse/pulse_output.h',
  423               ],
  424             }],
  425           ],
  426         }],
  427         ['os_posix == 1 and OS != "android"', {
  428           # Video capture isn't supported in Android yet.
  429           'sources!': [
  430             'video/capture/video_capture_device_dummy.cc',
  431             'video/capture/video_capture_device_dummy.h',
  432           ],
  433         }],
  434         ['OS=="mac"', {
  435           'link_settings': {
  436             'libraries': [
  437               '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
  438               '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
  439               '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
  440               '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
  441               '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
  442             ],
  443           },
  444         }],
  445         ['OS=="win"', {
  446           'sources!': [
  447             'audio/pulse/pulse_output.cc',
  448             'audio/pulse/pulse_output.h',
  449             'video/capture/video_capture_device_dummy.cc',
  450             'video/capture/video_capture_device_dummy.h',
  451           ],
  452         }],
  453         ['proprietary_codecs==1 or branding=="Chrome"', {
  454           'sources': [
  455             'mp4/avc.cc',
  456             'mp4/avc.h',
  457             'mp4/box_definitions.cc',
  458             'mp4/box_definitions.h',
  459             'mp4/box_reader.cc',
  460             'mp4/box_reader.h',
  461             'mp4/cenc.cc',
  462             'mp4/cenc.h',
  463             'mp4/mp4_stream_parser.cc',
  464             'mp4/mp4_stream_parser.h',
  465             'mp4/offset_byte_queue.cc',
  466             'mp4/offset_byte_queue.h',
  467             'mp4/track_run_iterator.cc',
  468             'mp4/track_run_iterator.h',
  469           ],
  470         }],
  471       ],
  472     },
  473     {
  474       'target_name': 'yuv_convert',
  475       'type': 'static_library',
  476       'include_dirs': [
  477         '..',
  478       ],
  479       'conditions': [
  480         ['order_profiling != 0', {
  481           'target_conditions' : [
  482             ['_toolset=="target"', {
  483               'cflags!': [ '-finstrument-functions' ],
  484             }],
  485           ],
  486         }],
  487         [ 'target_arch == "ia32" or target_arch == "x64"', {
  488           'dependencies': [
  489             'yuv_convert_simd_x86',
  490           ],
  491         }],
  492         [ 'target_arch == "arm"', {
  493           'dependencies': [
  494             'yuv_convert_simd_arm',
  495           ],
  496         }],
  497       ],
  498       'sources': [
  499         'base/yuv_convert.cc',
  500         'base/yuv_convert.h',
  501       ],
  502     },
  503     {
  504       'target_name': 'yuv_convert_simd_x86',
  505       'type': 'static_library',
  506       'include_dirs': [
  507         '..',
  508       ],
  509       'sources': [
  510         'base/simd/convert_rgb_to_yuv_c.cc',
  511         'base/simd/convert_rgb_to_yuv_sse2.cc',
  512         'base/simd/convert_rgb_to_yuv_ssse3.asm',
  513         'base/simd/convert_rgb_to_yuv_ssse3.cc',
  514         'base/simd/convert_rgb_to_yuv_ssse3.inc',
  515         'base/simd/convert_yuv_to_rgb_c.cc',
  516         'base/simd/convert_yuv_to_rgb_x86.cc',
  517         'base/simd/convert_yuv_to_rgb_mmx.asm',
  518         'base/simd/convert_yuv_to_rgb_mmx.inc',
  519         'base/simd/convert_yuv_to_rgb_sse.asm',
  520         'base/simd/filter_yuv.h',
  521         'base/simd/filter_yuv_c.cc',
  522         'base/simd/filter_yuv_mmx.cc',
  523         'base/simd/filter_yuv_sse2.cc',
  524         'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
  525         'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
  526         'base/simd/linear_scale_yuv_to_rgb_sse.asm',
  527         'base/simd/scale_yuv_to_rgb_mmx.asm',
  528         'base/simd/scale_yuv_to_rgb_mmx.inc',
  529         'base/simd/scale_yuv_to_rgb_sse.asm',
  530         'base/simd/yuv_to_rgb_table.cc',
  531         'base/simd/yuv_to_rgb_table.h',
  532       ],
  533       'conditions': [
  534         ['order_profiling != 0', {
  535           'target_conditions' : [
  536             ['_toolset=="target"', {
  537               'cflags!': [ '-finstrument-functions' ],
  538             }],
  539           ],
  540         }],
  541         [ 'target_arch == "x64"', {
  542           # Source files optimized for X64 systems.
  543           'sources': [
  544             'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
  545             'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
  546           ],
  547         }],
  548         [ 'os_posix == 1 and OS != "mac" and OS != "android"', {
  549           'cflags': [
  550             '-msse2',
  551           ],
  552         }],
  553         [ 'OS == "mac"', {
  554           'configurations': {
  555             'Debug': {
  556               'xcode_settings': {
  557                 # gcc on the mac builds horribly unoptimized sse code in debug
  558                 # mode. Since this is rarely going to be debugged, run with full
  559                 # optimizations in Debug as well as Release.
  560                 'GCC_OPTIMIZATION_LEVEL': '3',  # -O3
  561                },
  562              },
  563           },
  564         }],
  565         [ 'OS=="win"', {
  566           'variables': {
  567             'yasm_flags': [
  568               '-DWIN32',
  569               '-DMSVC',
  570               '-DCHROMIUM',
  571               '-Isimd',
  572             ],
  573           },
  574         }],
  575         [ 'OS=="mac"', {
  576           'variables': {
  577             'yasm_flags': [
  578               '-DPREFIX',
  579               '-DMACHO',
  580               '-DCHROMIUM',
  581               '-Isimd',
  582             ],
  583           },
  584         }],
  585         [ 'os_posix==1 and OS!="mac"', {
  586           'variables': {
  587             'conditions': [
  588               [ 'target_arch=="ia32"', {
  589                 'yasm_flags': [
  590                   '-DX86_32',
  591                   '-DELF',
  592                   '-DCHROMIUM',
  593                   '-Isimd',
  594                 ],
  595               }, {
  596                 'yasm_flags': [
  597                   '-DARCH_X86_64',
  598                   '-DELF',
  599                   '-DPIC',
  600                   '-DCHROMIUM',
  601                   '-Isimd',
  602                 ],
  603               }],
  604             ],
  605           },
  606         }],
  607       ],
  608       'variables': {
  609         'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
  610       },
  611       'msvs_2010_disable_uldi_when_referenced': 1,
  612       'includes': [
  613         '../third_party/yasm/yasm_compile.gypi',
  614       ],
  615     },
  616     {
  617       'target_name': 'yuv_convert_simd_arm',
  618       'type': 'static_library',
  619       'include_dirs': [
  620         '..',
  621       ],
  622       'sources': [
  623         'base/simd/convert_rgb_to_yuv_c.cc',
  624         'base/simd/convert_rgb_to_yuv.h',
  625         'base/simd/convert_yuv_to_rgb_c.cc',
  626         'base/simd/convert_yuv_to_rgb.h',
  627         'base/simd/filter_yuv.h',
  628         'base/simd/filter_yuv_c.cc',
  629         'base/simd/yuv_to_rgb_table.cc',
  630         'base/simd/yuv_to_rgb_table.h',
  631       ],
  632     },
  633     {
  634       'target_name': 'media_unittests',
  635       'type': 'executable',
  636       'dependencies': [
  637         'media',
  638         'media_test_support',
  639         'yuv_convert',
  640         '../base/base.gyp:base',
  641         '../base/base.gyp:base_i18n',
  642         '../base/base.gyp:test_support_base',
  643         '../testing/gmock.gyp:gmock',
  644         '../testing/gtest.gyp:gtest',
  645         '../ui/ui.gyp:ui',
  646       ],
  647       'sources': [
  648         'audio/async_socket_io_handler_unittest.cc',
  649         'audio/audio_input_controller_unittest.cc',
  650         'audio/audio_input_device_unittest.cc',
  651         'audio/audio_input_unittest.cc',
  652         'audio/audio_input_volume_unittest.cc',
  653         'audio/audio_low_latency_input_output_unittest.cc',
  654         'audio/audio_output_controller_unittest.cc',
  655         'audio/audio_output_proxy_unittest.cc',
  656         'audio/audio_parameters_unittest.cc',
  657         'audio/audio_util_unittest.cc',
  658         'audio/cross_process_notification_unittest.cc',
  659         'audio/linux/alsa_output_unittest.cc',
  660         'audio/mac/audio_low_latency_input_mac_unittest.cc',
  661         'audio/mac/audio_output_mac_unittest.cc',
  662         'audio/simple_sources_unittest.cc',
  663         'audio/win/audio_low_latency_input_win_unittest.cc',
  664         'audio/win/audio_low_latency_output_win_unittest.cc',
  665         'audio/win/audio_output_win_unittest.cc',
  666         'base/audio_renderer_mixer_unittest.cc',
  667         'base/audio_renderer_mixer_input_unittest.cc',
  668         'base/buffers_unittest.cc',
  669         'base/clock_unittest.cc',
  670         'base/composite_filter_unittest.cc',
  671         'base/data_buffer_unittest.cc',
  672         'base/decoder_buffer_unittest.cc',
  673         'base/djb2_unittest.cc',
  674         'base/fake_audio_render_callback.cc',
  675         'base/fake_audio_render_callback.h',
  676         'base/filter_collection_unittest.cc',
  677         'base/h264_bitstream_converter_unittest.cc',
  678         'base/pipeline_unittest.cc',
  679         'base/ranges_unittest.cc',
  680         'base/run_all_unittests.cc',
  681         'base/seekable_buffer_unittest.cc',
  682         'base/state_matrix_unittest.cc',
  683         'base/test_data_util.cc',
  684         'base/test_data_util.h',
  685         'base/video_frame_unittest.cc',
  686         'base/video_util_unittest.cc',
  687         'base/yuv_convert_unittest.cc',
  688         'crypto/aes_decryptor_unittest.cc',
  689         'ffmpeg/ffmpeg_common_unittest.cc',
  690         'filters/audio_renderer_algorithm_unittest.cc',
  691         'filters/audio_renderer_impl_unittest.cc',
  692         'filters/bitstream_converter_unittest.cc',
  693         'filters/chunk_demuxer_unittest.cc',
  694         'filters/ffmpeg_audio_decoder_unittest.cc',
  695         'filters/ffmpeg_decoder_unittest.h',
  696         'filters/ffmpeg_demuxer_unittest.cc',
  697         'filters/ffmpeg_glue_unittest.cc',
  698         'filters/ffmpeg_h264_bitstream_converter_unittest.cc',
  699         'filters/ffmpeg_video_decoder_unittest.cc',
  700         'filters/file_data_source_unittest.cc',
  701         'filters/pipeline_integration_test.cc',
  702         'filters/pipeline_integration_test_base.cc',
  703         'filters/source_buffer_stream_unittest.cc',
  704         'filters/video_renderer_base_unittest.cc',
  705         'video/capture/video_capture_device_unittest.cc',
  706         'webm/cluster_builder.cc',
  707         'webm/cluster_builder.h',
  708         'webm/webm_cluster_parser_unittest.cc',
  709         'webm/webm_content_encodings_client_unittest.cc',
  710         'webm/webm_parser_unittest.cc',
  711       ],
  712       'conditions': [
  713         ['os_posix==1 and OS!="mac"', {
  714           'conditions': [
  715             ['linux_use_tcmalloc==1', {
  716               'dependencies': [
  717                 '../base/allocator/allocator.gyp:allocator',
  718               ],
  719             }],
  720           ],
  721         }],
  722         ['OS != "android"', {
  723           'dependencies': [
  724             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
  725           ],
  726         }],
  727         ['OS == "android"', {
  728           'sources!': [
  729             'audio/audio_input_volume_unittest.cc',
  730             'base/test_data_util.cc',
  731             'base/test_data_util.h',
  732             'ffmpeg/ffmpeg_common_unittest.cc',
  733             'filters/ffmpeg_audio_decoder_unittest.cc',
  734             'filters/bitstream_converter_unittest.cc',
  735             'filters/chunk_demuxer_unittest.cc',
  736             'filters/ffmpeg_demuxer_unittest.cc',
  737             'filters/ffmpeg_glue_unittest.cc',
  738             'filters/ffmpeg_h264_bitstream_converter_unittest.cc',
  739             'filters/ffmpeg_video_decoder_unittest.cc',
  740             'filters/pipeline_integration_test.cc',
  741             'filters/pipeline_integration_test_base.cc',
  742             'mp4/mp4_stream_parser_unittest.cc',
  743             'webm/webm_cluster_parser_unittest.cc',
  744           ],
  745         }],
  746         ['OS == "linux"', {
  747           'conditions': [
  748             ['use_cras == 1', {
  749               'sources': [
  750                 'audio/linux/cras_output_unittest.cc',
  751               ],
  752               'defines': [
  753                 'USE_CRAS',
  754               ],
  755             }],
  756           ],
  757         }],
  758         [ 'target_arch=="ia32" or target_arch=="x64"', {
  759           'sources': [
  760             'base/simd/convert_rgb_to_yuv_unittest.cc',
  761           ],
  762         }],
  763         ['proprietary_codecs==1 or branding=="Chrome"', {
  764           'sources': [
  765             'mp4/avc_unittest.cc',
  766             'mp4/box_reader_unittest.cc',
  767             'mp4/mp4_stream_parser_unittest.cc',
  768             'mp4/offset_byte_queue_unittest.cc',
  769           ],
  770         }],
  771       ],
  772     },
  773     {
  774       'target_name': 'media_test_support',
  775       'type': 'static_library',
  776       'dependencies': [
  777         'media',
  778         '../base/base.gyp:base',
  779         '../testing/gmock.gyp:gmock',
  780         '../testing/gtest.gyp:gtest',
  781       ],
  782       'sources': [
  783         'audio/test_audio_input_controller_factory.cc',
  784         'audio/test_audio_input_controller_factory.h',
  785         'base/mock_callback.cc',
  786         'base/mock_callback.h',
  787         'base/mock_data_source_host.cc',
  788         'base/mock_data_source_host.h',
  789         'base/mock_demuxer_host.cc',
  790         'base/mock_demuxer_host.h',
  791         'base/mock_filter_host.cc',
  792         'base/mock_filter_host.h',
  793         'base/mock_filters.cc',
  794         'base/mock_filters.h',
  795       ],
  796     },
  797     {
  798       'target_name': 'scaler_bench',
  799       'type': 'executable',
  800       'dependencies': [
  801         'media',
  802         'yuv_convert',
  803         '../base/base.gyp:base',
  804         '../skia/skia.gyp:skia',
  805       ],
  806       'sources': [
  807         'tools/scaler_bench/scaler_bench.cc',
  808       ],
  809     },
  810     {
  811       'target_name': 'qt_faststart',
  812       'type': 'executable',
  813       'sources': [
  814         'tools/qt_faststart/qt_faststart.c'
  815       ],
  816     },
  817     {
  818       'target_name': 'seek_tester',
  819       'type': 'executable',
  820       'dependencies': [
  821         'media',
  822         '../base/base.gyp:base',
  823       ],
  824       'sources': [
  825         'tools/seek_tester/seek_tester.cc',
  826       ],
  827     },
  828   ],
  829   'conditions': [
  830     ['OS=="win"', {
  831       'targets': [
  832         {
  833           'target_name': 'player_wtl',
  834           'type': 'executable',
  835           'dependencies': [
  836             'media',
  837             'yuv_convert',
  838             '../base/base.gyp:base',
  839             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
  840             '../ui/ui.gyp:ui',
  841           ],
  842           'include_dirs': [
  843             '<(DEPTH)/third_party/wtl/include',
  844           ],
  845           'sources': [
  846             'tools/player_wtl/list.h',
  847             'tools/player_wtl/mainfrm.h',
  848             'tools/player_wtl/movie.cc',
  849             'tools/player_wtl/movie.h',
  850             'tools/player_wtl/player_wtl.cc',
  851             'tools/player_wtl/player_wtl.rc',
  852             'tools/player_wtl/props.h',
  853             'tools/player_wtl/seek.h',
  854             'tools/player_wtl/resource.h',
  855             'tools/player_wtl/view.h',
  856           ],
  857           'msvs_settings': {
  858             'VCLinkerTool': {
  859               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
  860             },
  861           },
  862           'defines': [
  863             '_CRT_SECURE_NO_WARNINGS=1',
  864           ],
  865         },
  866       ],
  867     }],
  868     ['OS == "win" or toolkit_uses_gtk == 1', {
  869       'targets': [
  870         {
  871           'target_name': 'shader_bench',
  872           'type': 'executable',
  873           'dependencies': [
  874             'media',
  875             'yuv_convert',
  876             '../base/base.gyp:base',
  877             '../ui/gl/gl.gyp:gl',
  878           ],
  879           'sources': [
  880             'tools/shader_bench/shader_bench.cc',
  881             'tools/shader_bench/cpu_color_painter.cc',
  882             'tools/shader_bench/cpu_color_painter.h',
  883             'tools/shader_bench/gpu_color_painter.cc',
  884             'tools/shader_bench/gpu_color_painter.h',
  885             'tools/shader_bench/gpu_painter.cc',
  886             'tools/shader_bench/gpu_painter.h',
  887             'tools/shader_bench/painter.cc',
  888             'tools/shader_bench/painter.h',
  889             'tools/shader_bench/window.cc',
  890             'tools/shader_bench/window.h',
  891           ],
  892           'conditions': [
  893             ['toolkit_uses_gtk == 1', {
  894               'dependencies': [
  895                 '../build/linux/system.gyp:gtk',
  896               ],
  897               'sources': [
  898                 'tools/shader_bench/window_linux.cc',
  899               ],
  900             }],
  901             ['OS=="win"', {
  902               'dependencies': [
  903                 '../third_party/angle/src/build_angle.gyp:libEGL',
  904                 '../third_party/angle/src/build_angle.gyp:libGLESv2',
  905               ],
  906               'sources': [
  907                 'tools/shader_bench/window_win.cc',
  908               ],
  909             }],
  910           ],
  911         },
  912       ],
  913     }],
  914     ['OS == "linux" and target_arch != "arm"', {
  915       'targets': [
  916         {
  917           'target_name': 'tile_render_bench',
  918           'type': 'executable',
  919           'dependencies': [
  920             '../base/base.gyp:base',
  921             '../ui/gl/gl.gyp:gl',
  922           ],
  923           'libraries': [
  924             '-lGL',
  925             '-ldl',
  926           ],
  927           'sources': [
  928             'tools/tile_render_bench/tile_render_bench.cc',
  929           ],
  930         },
  931       ],
  932     }],
  933     ['os_posix == 1 and OS != "mac" and OS != "android"', {
  934       'targets': [
  935         {
  936           'target_name': 'player_x11',
  937           'type': 'executable',
  938           'dependencies': [
  939             'media',
  940             'yuv_convert',
  941             '../base/base.gyp:base',
  942             '../ui/gl/gl.gyp:gl',
  943           ],
  944           'link_settings': {
  945             'libraries': [
  946               '-ldl',
  947               '-lX11',
  948               '-lXrender',
  949               '-lXext',
  950             ],
  951           },
  952           'sources': [
  953             'tools/player_x11/data_source_logger.cc',
  954             'tools/player_x11/data_source_logger.h',
  955             'tools/player_x11/gl_video_renderer.cc',
  956             'tools/player_x11/gl_video_renderer.h',
  957             'tools/player_x11/player_x11.cc',
  958             'tools/player_x11/x11_video_renderer.cc',
  959             'tools/player_x11/x11_video_renderer.h',
  960           ],
  961         },
  962       ],
  963     }],
  964     ['OS == "android"', {
  965       'targets': [
  966         {
  967           'target_name': 'player_android',
  968           'type': 'static_library',
  969           'sources': [
  970             'base/android/media_player_bridge.cc',
  971             'base/android/media_player_bridge.h',
  972           ],
  973           'dependencies': [
  974             '../base/base.gyp:base',
  975           ],
  976           'include_dirs': [
  977             '<(SHARED_INTERMEDIATE_DIR)/media',
  978           ],
  979           'actions': [
  980             {
  981               'action_name': 'generate-jni-headers',
  982               'inputs': [
  983                 '../base/android/jni_generator/jni_generator.py',
  984                 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
  985               ],
  986               'outputs': [
  987                 '<(SHARED_INTERMEDIATE_DIR)/media/jni/media_player_listener_jni.h',
  988               ],
  989               'action': [
  990                 'python',
  991                 '<(DEPTH)/base/android/jni_generator/jni_generator.py',
  992                 '-o',
  993                 '<@(_inputs)',
  994                 '<@(_outputs)',
  995               ],
  996             },
  997           ],
  998         },
  999         {
 1000           'target_name': 'media_java',
 1001           'type': 'none',
 1002           'dependencies': [ '../base/base.gyp:base_java' ],
 1003           'variables': {
 1004             'package_name': 'media',
 1005             'java_in_dir': 'base/android/java',
 1006           },
 1007           'includes': [ '../build/java.gypi' ],
 1008         },
 1009 
 1010       ],
 1011     }, { # OS != "android"'
 1012       # Android does not use ffmpeg, so disable the targets which require it.
 1013       'targets': [
 1014         {
 1015           'target_name': 'ffmpeg_unittests',
 1016           'type': 'executable',
 1017           'dependencies': [
 1018             'media',
 1019             'media_test_support',
 1020             '../base/base.gyp:base',
 1021             '../base/base.gyp:base_i18n',
 1022             '../base/base.gyp:test_support_base',
 1023             '../base/base.gyp:test_support_perf',
 1024             '../testing/gtest.gyp:gtest',
 1025             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
 1026           ],
 1027           'sources': [
 1028             'ffmpeg/ffmpeg_unittest.cc',
 1029           ],
 1030           'conditions': [
 1031             ['toolkit_uses_gtk == 1', {
 1032               'dependencies': [
 1033                 # Needed for the following #include chain:
 1034                 #   base/run_all_unittests.cc
 1035                 #   ../base/test_suite.h
 1036                 #   gtk/gtk.h
 1037                 '../build/linux/system.gyp:gtk',
 1038               ],
 1039               'conditions': [
 1040                 ['linux_use_tcmalloc==1', {
 1041                   'dependencies': [
 1042                     '../base/allocator/allocator.gyp:allocator',
 1043                   ],
 1044                 }],
 1045               ],
 1046             }],
 1047           ],
 1048         },
 1049         {
 1050           'target_name': 'ffmpeg_regression_tests',
 1051           'type': 'executable',
 1052           'dependencies': [
 1053             'media',
 1054             'media_test_support',
 1055             '../base/base.gyp:test_support_base',
 1056             '../testing/gmock.gyp:gmock',
 1057             '../testing/gtest.gyp:gtest',
 1058             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
 1059           ],
 1060           'sources': [
 1061             'base/test_data_util.cc',
 1062             'base/run_all_unittests.cc',
 1063             'ffmpeg/ffmpeg_regression_tests.cc',
 1064             'filters/pipeline_integration_test_base.cc',
 1065           ],
 1066           'conditions': [
 1067             ['os_posix==1 and OS!="mac"', {
 1068               'conditions': [
 1069                 ['linux_use_tcmalloc==1', {
 1070                   'dependencies': [
 1071                     '../base/allocator/allocator.gyp:allocator',
 1072                   ],
 1073                 }],
 1074               ],
 1075             }],
 1076           ],
 1077         },
 1078         {
 1079           'target_name': 'ffmpeg_tests',
 1080           'type': 'executable',
 1081           'dependencies': [
 1082             'media',
 1083             '../base/base.gyp:base',
 1084             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
 1085           ],
 1086           'sources': [
 1087             'test/ffmpeg_tests/ffmpeg_tests.cc',
 1088           ],
 1089         },
 1090         {
 1091           'target_name': 'media_bench',
 1092           'type': 'executable',
 1093           'dependencies': [
 1094             'media',
 1095             '../base/base.gyp:base',
 1096             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
 1097           ],
 1098           'sources': [
 1099             'tools/media_bench/media_bench.cc',
 1100           ],
 1101         },
 1102       ],
 1103     }]
 1104   ],
 1105 }