summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-06 01:52:13 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-06 01:52:13 +0000
commite5112c69dbf8ce4c3b723b5d6b80f9e3c0bc1deb (patch)
tree7324042afc9b3d8ffcf03170d71de75bab922dcb /third_party
parent65b4910a3001e77ccbe99f6efd147d696150e44b (diff)
downloadchromium_src-e5112c69dbf8ce4c3b723b5d6b80f9e3c0bc1deb.zip
chromium_src-e5112c69dbf8ce4c3b723b5d6b80f9e3c0bc1deb.tar.gz
chromium_src-e5112c69dbf8ce4c3b723b5d6b80f9e3c0bc1deb.tar.bz2
Reverting r17820 and r17819 due to mac breakage.
Review URL: http://codereview.chromium.org/119276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17821 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/ffmpeg/avcodec-52.sigs18
-rw-r--r--third_party/ffmpeg/avformat-52.sigs12
-rw-r--r--third_party/ffmpeg/avutil-50.sigs10
-rwxr-xr-xthird_party/ffmpeg/ffmpeg.gyp142
-rw-r--r--third_party/ffmpeg/ffmpeg_stub_headers.fragment9
-rwxr-xr-xthird_party/ffmpeg/generate_stubs.py8
6 files changed, 41 insertions, 158 deletions
diff --git a/third_party/ffmpeg/avcodec-52.sigs b/third_party/ffmpeg/avcodec-52.sigs
deleted file mode 100644
index 27b8ef9..0000000
--- a/third_party/ffmpeg/avcodec-52.sigs
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# Functions from avcodec used in chromium code.
-
-AVCodec *avcodec_find_decoder(enum CodecID id);
-AVFrame *avcodec_alloc_frame(void);
-int av_get_bits_per_sample_format(enum SampleFormat sample_fmt);
-int av_new_packet(AVPacket *pkt, int size);
-int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt);
-int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt);
-int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
-int avcodec_thread_init(AVCodecContext *s, int thread_count);
-void av_free_packet(AVPacket *pkt);
-void av_init_packet(AVPacket *pkt);
-void avcodec_flush_buffers(AVCodecContext *avctx);
-void avcodec_init(void);
diff --git a/third_party/ffmpeg/avformat-52.sigs b/third_party/ffmpeg/avformat-52.sigs
deleted file mode 100644
index 5f7b193..0000000
--- a/third_party/ffmpeg/avformat-52.sigs
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# Functions from avformat used in chromium code.
-
-int av_find_stream_info(AVFormatContext *ic);
-int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, AVInputFormat *fmt, int buf_size, AVFormatParameters *ap);
-int av_read_frame(AVFormatContext *s, AVPacket *pkt);
-int av_register_protocol(URLProtocol *protocol);
-int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags);
-void av_register_all(void);
diff --git a/third_party/ffmpeg/avutil-50.sigs b/third_party/ffmpeg/avutil-50.sigs
deleted file mode 100644
index d70bfac..0000000
--- a/third_party/ffmpeg/avutil-50.sigs
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# Functions from avutil used in chromium code.
-#
-
-int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq);
-void *av_malloc(unsigned int size);
-void av_free(void *ptr);
diff --git a/third_party/ffmpeg/ffmpeg.gyp b/third_party/ffmpeg/ffmpeg.gyp
index 115064a..5a3d706 100755
--- a/third_party/ffmpeg/ffmpeg.gyp
+++ b/third_party/ffmpeg/ffmpeg.gyp
@@ -15,16 +15,8 @@
},
'targets': [
{
- 'variables': {
- 'generate_stubs_script': 'generate_stubs.py',
- 'sig_files': [
- 'avcodec-52.sigs',
- 'avformat-52.sigs',
- 'avutil-50.sigs',
- ],
- 'extra_header': 'ffmpeg_stub_headers.fragment',
- },
'target_name': 'ffmpeg',
+ 'type': 'none',
'msvs_guid': 'D7A94F58-576A-45D9-A45F-EB87C63ABBB0',
'sources': [
'include/libavcodec/avcodec.h',
@@ -51,8 +43,6 @@
'include/libavutil/sha1.h',
'include/win/inttypes.h',
'include/win/stdint.h',
- '<@(sig_files)',
- '<(extra_header)'
],
'direct_dependent_settings': {
'include_dirs': [
@@ -60,104 +50,50 @@
],
},
'conditions': [
- ['OS=="win"',
- {
- 'variables': {
- 'outfile_type': 'windows_lib',
- 'output_dir': '<(SHARED_INTERMEDIATE_DIR)'
- },
- 'type': 'none',
- 'dependencies': [
- 'ffmpeg_binaries',
- ],
- 'sources!': [
- '<(extra_header)',
- ],
- 'direct_dependent_settings': {
- 'link_settings': {
- 'libraries': [
- '<(output_dir)/avcodec-52.lib',
- '<(output_dir)/avformat-52.lib',
- '<(output_dir)/avutil-50.lib',
- ],
- },
- },
- 'rules': [
- {
- 'rule_name': 'generate_libs',
- 'extension': 'sigs',
- 'inputs': [
- '<(generate_stubs_script)',
- '<@(sig_files)',
- ],
- 'outputs': [
- '<(output_dir)/<(RULE_INPUT_ROOT).lib',
- ],
- 'action': ['python', '<(generate_stubs_script)',
- '-o', '<(output_dir)',
- '-t', '<(outfile_type)',
- '<@(RULE_INPUT_PATH)',
- ],
- 'message': 'Generating FFmpeg import libraries.',
- },
- ],
- }
- ],
- ['OS=="linux"',
- # TODO(ajwong): Mac distributed build fails because media will
- # build before this action is taken. Enable this for mac when
- # that is fixed.
- {
- 'variables': {
- 'outfile_type': 'posix_stubs',
- 'stubs_filename_root': 'ffmpeg_stubs',
- 'project_path': 'third_party/ffmpeg',
- 'output_root': '<(SHARED_INTERMEDIATE_DIR)/ffmpeg',
- },
- 'type': '<(library)',
+ ['OS=="win"', {
+ 'sources': [
+ 'avcodec-52.def',
+ 'avformat-52.def',
+ 'avutil-50.def',
+ ],
+ 'direct_dependent_settings': {
'include_dirs': [
- 'include',
- '<(output_root)',
- '../..', # The chromium 'src' directory.
+ 'include/win',
],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(output_root)',
- '../..', # The chromium 'src' directory.
+ 'link_settings': {
+ 'libraries': [
+ '<(PRODUCT_DIR)/lib/avcodec-52.lib',
+ '<(PRODUCT_DIR)/lib/avformat-52.lib',
+ '<(PRODUCT_DIR)/lib/avutil-50.lib',
],
},
- 'actions': [
- {
- 'action_name': 'generate_stubs',
- 'inputs': [
- '<(generate_stubs_script)',
- '<(extra_header)',
- '<@(sig_files)',
- ],
- 'outputs': [
- '<(output_root)/<(project_path)/<(stubs_filename_root).cc',
- '<(output_root)/<(project_path)/<(stubs_filename_root).h',
- ],
- 'action': ['python',
- '<(generate_stubs_script)',
- '-o', '<(output_root)/<(project_path)',
- '-t', '<(outfile_type)',
- '-e', '<(extra_header)',
- '-s', '<(stubs_filename_root)',
- '-p', '<(project_path)',
- '<@(_inputs)',
+ },
+ 'dependencies': [
+ 'ffmpeg_binaries',
+ '../../build/win/system.gyp:cygwin',
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'generate_libs',
+ 'extension': 'def',
+ 'inputs': [
+ 'generate_libs.py',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/lib/<(RULE_INPUT_ROOT).lib',
+ ],
+ 'variables': {
+ 'def_files': [
+ 'avcodec-52.def',
+ 'avformat-52.def',
+ 'avutil-50.def',
],
- 'message': 'Generating FFmpeg stubs for dynamic loading.',
- 'process_outputs_as_sources': 1,
},
- ],
- }
- ],
- ['OS=="mac"',
- {
- 'type': 'none',
- }
- ],
+ 'action': ['python', '<@(_inputs)', '-o', '<(PRODUCT_DIR)/lib', '<@(RULE_INPUT_PATH)'],
+ 'message': 'Generating import libraries',
+ },
+ ],
+ }],
],
},
{
diff --git a/third_party/ffmpeg/ffmpeg_stub_headers.fragment b/third_party/ffmpeg/ffmpeg_stub_headers.fragment
deleted file mode 100644
index 99abcf7..0000000
--- a/third_party/ffmpeg/ffmpeg_stub_headers.fragment
+++ /dev/null
@@ -1,9 +0,0 @@
-// These are some extra includes needed in the generated stub file for defining
-// various FFmpeg types.
-
-extern "C" {
-
-#include "third_party/ffmpeg/include/libavcodec/avcodec.h"
-#include "third_party/ffmpeg/include/libavformat/avformat.h"
-
-}
diff --git a/third_party/ffmpeg/generate_stubs.py b/third_party/ffmpeg/generate_stubs.py
index 1713d76..1288697 100755
--- a/third_party/ffmpeg/generate_stubs.py
+++ b/third_party/ffmpeg/generate_stubs.py
@@ -575,7 +575,6 @@ void %s();
// Umbrella initializer for all the modules in this stub file.
bool InitializeStubs(const StubPathMap& path_map);
-
} // namespace %s
#endif // %s
@@ -589,17 +588,15 @@ bool InitializeStubs(const StubPathMap& path_map);
outfile: The file handle to populate.
"""
outfile.write('extern "C" {\n')
- outfile.write('\n')
self.WriteFunctionPointers(outfile)
self.WriteStubFunctions(outfile)
- outfile.write('\n')
outfile.write('} // extern "C"\n')
outfile.write('\n')
outfile.write('namespace %s {\n' % namespace)
outfile.write('\n')
self.WriteModuleInitializeFunctions(outfile)
- outfile.write('} // namespace %s\n\n' % namespace)
+ outfile.write('} // namespace %s\n' % namespace)
def WriteFunctionPointers(self, outfile):
"""Write the function pointer declarations needed by the stubs.
@@ -741,7 +738,7 @@ def main():
if options.out_dir is None:
parser.error('Output location not specified')
- if len(args) == 0:
+ if args:
parser.error('No inputs specified')
if options.type not in [FILE_TYPE_WIN, FILE_TYPE_POSIX_STUB]:
@@ -791,7 +788,6 @@ def main():
impl_file)
if options.extra_stub_header is not None:
try:
- impl_file.write('\n')
extra_header_file = open(options.extra_stub_header, 'r')
for line in extra_header_file:
impl_file.write(line)