diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 23:25:36 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 23:25:36 +0000 |
commit | 3579c4dbb74148d4d3f0bb594a099c97811b029e (patch) | |
tree | 5fa9f0c6a7f30f8cc6053e66995c7b96bf035648 /media/base/media_posix.cc | |
parent | c238b694ea2c28b28c30f983e38ccf846a637234 (diff) | |
download | chromium_src-3579c4dbb74148d4d3f0bb594a099c97811b029e.zip chromium_src-3579c4dbb74148d4d3f0bb594a099c97811b029e.tar.gz chromium_src-3579c4dbb74148d4d3f0bb594a099c97811b029e.tar.bz2 |
Revert "Enable video in posix builds and remove unneeded ifdefs to guard windows."
This reverts commit 9c23aa9006918e7091742e1826181db081a16a65.
TBR=evan
Review URL: http://codereview.chromium.org/101020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/media_posix.cc')
-rw-r--r-- | media/base/media_posix.cc | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/media/base/media_posix.cc b/media/base/media_posix.cc index 1b3f323..edbced0 100644 --- a/media/base/media_posix.cc +++ b/media/base/media_posix.cc @@ -22,6 +22,11 @@ // be promising, but I don't quite understand it yet. extern "C" { +int (*av_get_bits_per_sample_format_ptr)(enum SampleFormat sample_fmt); +int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) { + return av_get_bits_per_sample_format(sample_fmt); +} + void (*avcodec_init_ptr)(void) = NULL; void avcodec_init(void) { avcodec_init_ptr(); @@ -70,11 +75,6 @@ int avcodec_decode_video(AVCodecContext* avctx, AVFrame* picture, } -int (*av_get_bits_per_sample_format_ptr)(enum SampleFormat sample_fmt); -int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) { - return av_get_bits_per_sample_format_ptr(sample_fmt); -} - void (*av_register_all_ptr)(void); void av_register_all(void) { av_register_all_ptr(); @@ -99,29 +99,12 @@ int av_read_frame(AVFormatContext* s, AVPacket* pkt) { return av_read_frame_ptr(s, pkt); } -int (*av_seek_frame_ptr)(AVFormatContext* s, int stream_index, - int64_t timestamp, int flags) = NULL; -int av_seek_frame(AVFormatContext* s, int stream_index, - int64_t timestamp, int flags) { - return av_seek_frame_ptr(s, stream_index, timestamp, flags); -} - -int (*av_register_protocol_ptr)(URLProtocol* protocol) = NULL; -int av_register_protocol(URLProtocol* protocol) { - return av_register_protocol_ptr(protocol); -} - void* (*av_malloc_ptr)(unsigned int size) = NULL; void* av_malloc(unsigned int size) { return av_malloc_ptr(size); } -void (*av_free_ptr)(void* ptr) = NULL; -void av_free(void* ptr) { - return av_free_ptr(ptr); -} - } // extern "C" @@ -186,6 +169,9 @@ bool InitializeMediaLibrary(const FilePath& module_dir) { // TODO(ajwong): Extract this to somewhere saner, and hopefully // autogenerate the bindings from the .def files. Having all this // code here is incredibly ugly. + av_get_bits_per_sample_format_ptr = + reinterpret_cast<int (*)(enum SampleFormat)>( + dlsym(libs[FILE_LIBAVCODEC], "av_get_bits_per_sample_format")); avcodec_init_ptr = reinterpret_cast<void(*)(void)>( dlsym(libs[FILE_LIBAVCODEC], "avcodec_init")); @@ -210,9 +196,6 @@ bool InitializeMediaLibrary(const FilePath& module_dir) { const uint8_t*, int)>( dlsym(libs[FILE_LIBAVCODEC], "avcodec_decode_video")); - av_get_bits_per_sample_format_ptr = - reinterpret_cast<int (*)(enum SampleFormat)>( - dlsym(libs[FILE_LIBAVCODEC], "av_get_bits_per_sample_format")); av_register_all_ptr = reinterpret_cast<void(*)(void)>( dlsym(libs[FILE_LIBAVFORMAT], "av_register_all")); @@ -227,19 +210,10 @@ bool InitializeMediaLibrary(const FilePath& module_dir) { av_read_frame_ptr = reinterpret_cast<int (*)(AVFormatContext*, AVPacket*)>( dlsym(libs[FILE_LIBAVFORMAT], "av_read_frame")); - av_seek_frame_ptr = - reinterpret_cast<int (*)(AVFormatContext*, int, int64_t, int)>( - dlsym(libs[FILE_LIBAVFORMAT], "av_seek_frame")); - av_register_protocol_ptr = - reinterpret_cast<int (*)(URLProtocol*)>( - dlsym(libs[FILE_LIBAVFORMAT], "av_register_protocol")); av_malloc_ptr = reinterpret_cast<void* (*)(unsigned int)>( dlsym(libs[FILE_LIBAVUTIL], "av_malloc")); - av_free_ptr = - reinterpret_cast<void (*)(void*)>( - dlsym(libs[FILE_LIBAVUTIL], "av_free")); // Check that all the symbols were loaded correctly before returning true. if (avcodec_init_ptr && @@ -250,15 +224,11 @@ bool InitializeMediaLibrary(const FilePath& module_dir) { avcodec_decode_audio2_ptr && avcodec_decode_video_ptr && - av_get_bits_per_sample_format_ptr && av_register_all_ptr && av_open_input_file_ptr && av_find_stream_info_ptr && av_read_frame_ptr && - av_seek_frame_ptr && - av_register_protocol_ptr && - av_free_ptr && av_malloc_ptr) { return true; } |