summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 21:12:15 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 21:12:15 +0000
commit274f591d35c8cedbb4cf5a27135a93733b021076 (patch)
treee609b5da96a5810a46429a05dc05ec9135754e3c
parent9bae02c23cc4881423e3a3d5f4f751e7a6262dca (diff)
downloadchromium_src-274f591d35c8cedbb4cf5a27135a93733b021076.zip
chromium_src-274f591d35c8cedbb4cf5a27135a93733b021076.tar.gz
chromium_src-274f591d35c8cedbb4cf5a27135a93733b021076.tar.bz2
Create media.dll
Review URL: http://codereview.chromium.org/7523051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95496 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/speech/speech_recognizer_unittest.cc5
-rw-r--r--media/audio/audio_buffers_state.h5
-rw-r--r--media/audio/audio_input_controller.h8
-rw-r--r--media/audio/audio_input_controller_unittest.cc2
-rw-r--r--media/audio/audio_io.h8
-rw-r--r--media/audio/audio_manager.h4
-rw-r--r--media/audio/audio_output_controller.h2
-rw-r--r--media/audio/audio_output_dispatcher.h2
-rw-r--r--media/audio/audio_output_proxy.h4
-rw-r--r--media/audio/audio_parameters.h5
-rw-r--r--media/audio/audio_util.h29
-rw-r--r--media/audio/fake_audio_output_stream.h2
-rw-r--r--media/audio/simple_sources.h7
-rw-r--r--media/base/async_filter_factory_base.h4
-rw-r--r--media/base/buffers.h8
-rw-r--r--media/base/callback.h3
-rw-r--r--media/base/channel_layout.h4
-rw-r--r--media/base/clock.h3
-rw-r--r--media/base/composite_data_source_factory.h3
-rw-r--r--media/base/composite_filter.h2
-rw-r--r--media/base/data_buffer.h2
-rw-r--r--media/base/djb2.h5
-rw-r--r--media/base/filter_collection.h2
-rw-r--r--media/base/filter_factories.h5
-rw-r--r--media/base/filter_host.h2
-rw-r--r--media/base/filters.h20
-rw-r--r--media/base/h264_bitstream_converter.h3
-rw-r--r--media/base/media.h8
-rw-r--r--media/base/media_export.h29
-rw-r--r--media/base/media_switches.h5
-rw-r--r--media/base/message_loop_factory.h3
-rw-r--r--media/base/message_loop_factory_impl.h2
-rw-r--r--media/base/pipeline.h4
-rw-r--r--media/base/pipeline_impl.h4
-rw-r--r--media/base/pts_heap.h5
-rw-r--r--media/base/pts_stream.h2
-rw-r--r--media/base/seekable_buffer.h2
-rw-r--r--media/base/state_matrix.h5
-rw-r--r--media/base/video_decoder_config.h3
-rw-r--r--media/base/video_frame.h2
-rw-r--r--media/base/video_util.h10
-rw-r--r--media/base/yuv_convert.h3
-rw-r--r--media/ffmpeg/ffmpeg_common.h27
-rw-r--r--media/ffmpeg/file_protocol.h6
-rw-r--r--media/filters/adaptive_demuxer.h7
-rw-r--r--media/filters/adaptive_demuxer_unittest.cc4
-rw-r--r--media/filters/audio_file_reader.h2
-rw-r--r--media/filters/audio_renderer_algorithm_base.h2
-rw-r--r--media/filters/audio_renderer_algorithm_ola.h5
-rw-r--r--media/filters/audio_renderer_base.h2
-rw-r--r--media/filters/audio_renderer_impl.h2
-rw-r--r--media/filters/bitstream_converter.h7
-rw-r--r--media/filters/chunk_demuxer.h2
-rw-r--r--media/filters/chunk_demuxer_factory.h2
-rw-r--r--media/filters/ffmpeg_audio_decoder.h3
-rw-r--r--media/filters/ffmpeg_demuxer.h2
-rw-r--r--media/filters/ffmpeg_demuxer_factory.h2
-rw-r--r--media/filters/ffmpeg_glue.h5
-rw-r--r--media/filters/ffmpeg_h264_bitstream_converter.h2
-rw-r--r--media/filters/ffmpeg_video_decoder.h2
-rw-r--r--media/filters/file_data_source.h2
-rw-r--r--media/filters/file_data_source_factory.h2
-rw-r--r--media/filters/in_memory_url_protocol.h5
-rw-r--r--media/filters/null_audio_renderer.h2
-rw-r--r--media/filters/video_renderer_base.h2
-rw-r--r--media/media.gyp13
-rw-r--r--media/video/capture/fake_video_capture_device.h2
-rw-r--r--media/video/capture/video_capture_device.h3
-rw-r--r--media/video/ffmpeg_video_decode_engine.h2
-rw-r--r--media/video/picture.h5
-rw-r--r--media/video/video_decode_accelerator.h2
-rw-r--r--media/video/video_decode_engine.h5
72 files changed, 221 insertions, 144 deletions
diff --git a/content/browser/speech/speech_recognizer_unittest.cc b/content/browser/speech/speech_recognizer_unittest.cc
index d70df62..76133b3d 100644
--- a/content/browser/speech/speech_recognizer_unittest.cc
+++ b/content/browser/speech/speech_recognizer_unittest.cc
@@ -75,11 +75,12 @@ class SpeechRecognizerTest : public SpeechRecognizerDelegate,
// testing::Test methods.
virtual void SetUp() {
- AudioInputController::set_factory(&audio_input_controller_factory_);
+ AudioInputController::set_factory_for_testing(
+ &audio_input_controller_factory_);
}
virtual void TearDown() {
- AudioInputController::set_factory(NULL);
+ AudioInputController::set_factory_for_testing(NULL);
}
void FillPacketWithTestWaveform() {
diff --git a/media/audio/audio_buffers_state.h b/media/audio/audio_buffers_state.h
index e3a2faf..796c081 100644
--- a/media/audio/audio_buffers_state.h
+++ b/media/audio/audio_buffers_state.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -6,11 +6,12 @@
#define MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_
#include "base/time.h"
+#include "media/base/media_export.h"
// AudioBuffersState struct stores current state of audio buffers along with
// the timestamp of the moment this state corresponds to. It is used for audio
// synchronization.
-struct AudioBuffersState {
+struct MEDIA_EXPORT AudioBuffersState {
AudioBuffersState();
AudioBuffersState(int pending_bytes, int hardware_delay_bytes);
diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h
index 164b09f..22f6ffe 100644
--- a/media/audio/audio_input_controller.h
+++ b/media/audio/audio_input_controller.h
@@ -35,7 +35,7 @@
//
namespace media {
-class AudioInputController
+class MEDIA_EXPORT AudioInputController
: public base::RefCountedThreadSafe<AudioInputController>,
public AudioInputStream::AudioInputCallback {
public:
@@ -99,10 +99,8 @@ class AudioInputController
// Sets the factory used by the static method Create. AudioInputController
// does not take ownership of |factory|. A value of NULL results in an
// AudioInputController being created directly.
-#if defined(UNIT_TEST)
- static void set_factory(Factory* factory) { factory_ = factory; }
- AudioInputStream* stream() { return stream_; }
-#endif
+ static void set_factory_for_testing(Factory* factory) { factory_ = factory; }
+ AudioInputStream* stream_for_testing() { return stream_; }
// Starts recording in this audio input stream.
virtual void Record();
diff --git a/media/audio/audio_input_controller_unittest.cc b/media/audio/audio_input_controller_unittest.cc
index d7ce4db..090d97f4 100644
--- a/media/audio/audio_input_controller_unittest.cc
+++ b/media/audio/audio_input_controller_unittest.cc
@@ -139,7 +139,7 @@ TEST(AudioInputControllerTest, RecordAndError) {
event.Reset();
// Wait for the stream to be stopped.
- AudioInputStream* stream = controller->stream();
+ AudioInputStream* stream = controller->stream_for_testing();
stream->Stop();
event.Wait();
diff --git a/media/audio/audio_io.h b/media/audio/audio_io.h
index 787020c..74b5c47 100644
--- a/media/audio/audio_io.h
+++ b/media/audio/audio_io.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -45,13 +45,13 @@
// as the data is written to the audio device. Size of each packet is determined
// by |samples_per_packet| specified in AudioParameters when the stream is
// created.
-class AudioOutputStream {
+class MEDIA_EXPORT AudioOutputStream {
public:
// Audio sources must implement AudioSourceCallback. This interface will be
// called in a random thread which very likely is a high priority thread. Do
// not rely on using this thread TLS or make calls that alter the thread
// itself such as creating Windows or initializing COM.
- class AudioSourceCallback {
+ class MEDIA_EXPORT AudioSourceCallback {
public:
virtual ~AudioSourceCallback() {}
@@ -104,7 +104,7 @@ class AudioOutputStream {
// Models an audio sink receiving recorded audio from the audio driver.
class AudioInputStream {
public:
- class AudioInputCallback {
+ class MEDIA_EXPORT AudioInputCallback {
public:
virtual ~AudioInputCallback() {}
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index 29cc23d..d80026d 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -21,7 +21,7 @@ class MessageLoop;
// Manages all audio resources. In particular it owns the AudioOutputStream
// objects. Provides some convenience functions that avoid the need to provide
// iterators over the existing streams.
-class AudioManager {
+class MEDIA_EXPORT AudioManager {
public:
// Returns true if the OS reports existence of audio devices. This does not
// guarantee that the existing devices support all formats and sample rates.
diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h
index 29fb0a7..ac4fea7 100644
--- a/media/audio/audio_output_controller.h
+++ b/media/audio/audio_output_controller.h
@@ -49,7 +49,7 @@ class Task;
//
namespace media {
-class AudioOutputController
+class MEDIA_EXPORT AudioOutputController
: public base::RefCountedThreadSafe<AudioOutputController>,
public AudioOutputStream::AudioSourceCallback {
public:
diff --git a/media/audio/audio_output_dispatcher.h b/media/audio/audio_output_dispatcher.h
index 18e1b28..7a4d019 100644
--- a/media/audio/audio_output_dispatcher.h
+++ b/media/audio/audio_output_dispatcher.h
@@ -33,7 +33,7 @@
class AudioOutputStream;
class MessageLoop;
-class AudioOutputDispatcher
+class MEDIA_EXPORT AudioOutputDispatcher
: public base::RefCountedThreadSafe<AudioOutputDispatcher> {
public:
// |close_delay_ms| specifies delay after the stream is paused until
diff --git a/media/audio/audio_output_proxy.h b/media/audio/audio_output_proxy.h
index 4835cc8..c9f7d6f 100644
--- a/media/audio/audio_output_proxy.h
+++ b/media/audio/audio_output_proxy.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -20,7 +20,7 @@ class AudioOutputDispatcher;
//
// AudioOutputProxy uses AudioOutputDispatcher to open and close
// physical output streams.
-class AudioOutputProxy : public AudioOutputStream {
+class MEDIA_EXPORT AudioOutputProxy : public AudioOutputStream {
public:
// Caller keeps ownership of |dispatcher|.
AudioOutputProxy(AudioOutputDispatcher* dispatcher);
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
index 26204b0..8b6bb4b 100644
--- a/media/audio/audio_parameters.h
+++ b/media/audio/audio_parameters.h
@@ -7,10 +7,11 @@
#include "base/basictypes.h"
#include "media/base/audio_decoder_config.h"
+#include "media/base/media_export.h"
-struct AudioParameters {
+struct MEDIA_EXPORT AudioParameters {
// Compare is useful when AudioParameters is used as a key in std::map.
- class Compare {
+ class MEDIA_EXPORT Compare {
public:
bool operator()(const AudioParameters& a, const AudioParameters& b) const;
};
diff --git a/media/audio/audio_util.h b/media/audio/audio_util.h
index 0d65e19..a78fdf1 100644
--- a/media/audio/audio_util.h
+++ b/media/audio/audio_util.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "media/base/media_export.h"
namespace media {
@@ -26,11 +27,11 @@ namespace media {
// formats.
// The buffer is modified in-place to avoid memory management, as this
// function may be called in performance critical code.
-bool AdjustVolume(void* buf,
- size_t buflen,
- int channels,
- int bytes_per_sample,
- float volume);
+MEDIA_EXPORT bool AdjustVolume(void* buf,
+ size_t buflen,
+ int channels,
+ int bytes_per_sample,
+ float volume);
// FoldChannels() does a software multichannel folding down to stereo.
// Channel order is assumed to be 5.1 Dolby standard which is
@@ -45,11 +46,11 @@ bool AdjustVolume(void* buf,
// volume.
// The buffer is modified in-place to avoid memory management, as this
// function may be called in performance critical code.
-bool FoldChannels(void* buf,
- size_t buflen,
- int channels,
- int bytes_per_sample,
- float volume);
+MEDIA_EXPORT bool FoldChannels(void* buf,
+ size_t buflen,
+ int channels,
+ int bytes_per_sample,
+ float volume);
// DeinterleaveAudioChannel() takes interleaved audio buffer |source|
// of the given |sample_fmt| and |number_of_channels| and extracts
@@ -70,12 +71,12 @@ bool DeinterleaveAudioChannel(void* source,
// The size of the |source| vector determines the number of channels.
// The |destination| buffer is assumed to be large enough to hold the
// result. Thus it must be at least size: number_of_frames * source.size()
-void InterleaveFloatToInt16(const std::vector<float*>& source,
- int16* destination,
- size_t number_of_frames);
+MEDIA_EXPORT void InterleaveFloatToInt16(const std::vector<float*>& source,
+ int16* destination,
+ size_t number_of_frames);
// Returns the default audio hardware sample-rate.
-double GetAudioHardwareSampleRate();
+MEDIA_EXPORT double GetAudioHardwareSampleRate();
} // namespace media
diff --git a/media/audio/fake_audio_output_stream.h b/media/audio/fake_audio_output_stream.h
index 82453ef..ac53db5 100644
--- a/media/audio/fake_audio_output_stream.h
+++ b/media/audio/fake_audio_output_stream.h
@@ -15,7 +15,7 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-class FakeAudioOutputStream : public AudioOutputStream {
+class MEDIA_EXPORT FakeAudioOutputStream : public AudioOutputStream {
public:
static AudioOutputStream* MakeFakeStream(const AudioParameters& params);
static FakeAudioOutputStream* GetLastFakeStream();
diff --git a/media/audio/simple_sources.h b/media/audio/simple_sources.h
index 5ea1fee..de70601 100644
--- a/media/audio/simple_sources.h
+++ b/media/audio/simple_sources.h
@@ -11,7 +11,8 @@
#include "media/base/seekable_buffer.h"
// An audio source that produces a pure sinusoidal tone.
-class SineWaveAudioSource : public AudioOutputStream::AudioSourceCallback {
+class MEDIA_EXPORT SineWaveAudioSource
+ : public AudioOutputStream::AudioSourceCallback {
public:
enum Format {
FORMAT_8BIT_LINEAR_PCM,
@@ -39,7 +40,7 @@ class SineWaveAudioSource : public AudioOutputStream::AudioSourceCallback {
// Defines an interface for pushing audio output. In contrast, the interfaces
// defined by AudioSourceCallback are pull model only.
-class PushAudioOutput {
+class MEDIA_EXPORT PushAudioOutput {
public:
virtual ~PushAudioOutput() {}
@@ -56,7 +57,7 @@ class PushAudioOutput {
// a pull model provider AudioSourceCallback. Fundamentally it manages a series
// of audio buffers and is unaware of the actual audio format.
// Note that the PushSource is not thread safe and user need to provide locking.
-class PushSource
+class MEDIA_EXPORT PushSource
: public AudioOutputStream::AudioSourceCallback,
public PushAudioOutput {
public:
diff --git a/media/base/async_filter_factory_base.h b/media/base/async_filter_factory_base.h
index 34ff831..c4a76a2 100644
--- a/media/base/async_filter_factory_base.h
+++ b/media/base/async_filter_factory_base.h
@@ -46,7 +46,7 @@ namespace media {
// the BuildRequest should be in a state where it can be deleted from inside
// this call. If an error occurs during the build process, RequestComplete()
// can also be called to signal the error.
-class AsyncDataSourceFactoryBase : public DataSourceFactory {
+class MEDIA_EXPORT AsyncDataSourceFactoryBase : public DataSourceFactory {
public:
AsyncDataSourceFactoryBase();
virtual ~AsyncDataSourceFactoryBase();
@@ -64,7 +64,7 @@ class AsyncDataSourceFactoryBase : public DataSourceFactory {
virtual DataSourceFactory* Clone() const = 0;
protected:
- class BuildRequest {
+ class MEDIA_EXPORT BuildRequest {
public:
BuildRequest(const std::string& url, BuildCallback* callback);
virtual ~BuildRequest();
diff --git a/media/base/buffers.h b/media/base/buffers.h
index 8c5c219..a97d8dd 100644
--- a/media/base/buffers.h
+++ b/media/base/buffers.h
@@ -30,13 +30,15 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/time.h"
+#include "media/base/media_export.h"
namespace media {
// Indicates an invalid or missing timestamp.
-extern const base::TimeDelta kNoTimestamp;
+MEDIA_EXPORT extern const base::TimeDelta kNoTimestamp;
-class StreamSample : public base::RefCountedThreadSafe<StreamSample> {
+class MEDIA_EXPORT StreamSample
+ : public base::RefCountedThreadSafe<StreamSample> {
public:
// Returns the timestamp of this buffer in microseconds.
base::TimeDelta GetTimestamp() const {
@@ -76,7 +78,7 @@ class StreamSample : public base::RefCountedThreadSafe<StreamSample> {
};
-class Buffer : public StreamSample {
+class MEDIA_EXPORT Buffer : public StreamSample {
public:
// Returns a read only pointer to the buffer data.
virtual const uint8* GetData() const = 0;
diff --git a/media/base/callback.h b/media/base/callback.h
index 4948829..336ffb7 100644
--- a/media/base/callback.h
+++ b/media/base/callback.h
@@ -24,10 +24,11 @@
#include "base/callback_old.h"
#include "base/memory/scoped_ptr.h"
#include "base/task.h"
+#include "media/base/media_export.h"
namespace media {
-class AutoCallbackRunner {
+class MEDIA_EXPORT AutoCallbackRunner {
public:
// Takes ownership of the callback.
explicit AutoCallbackRunner(Callback0::Type* callback)
diff --git a/media/base/channel_layout.h b/media/base/channel_layout.h
index 3fa84ba..7dd1ec8 100644
--- a/media/base/channel_layout.h
+++ b/media/base/channel_layout.h
@@ -5,6 +5,8 @@
#ifndef MEDIA_BASE_CHANNEL_LAYOUT_H_
#define MEDIA_BASE_CHANNEL_LAYOUT_H_
+#include "media/base/media_export.h"
+
enum ChannelLayout {
CHANNEL_LAYOUT_NONE = 0,
CHANNEL_LAYOUT_UNSUPPORTED,
@@ -84,6 +86,6 @@ enum Channels {
extern const int kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX];
// Returns the number of channels in a given ChannelLayout.
-int ChannelLayoutToChannelCount(ChannelLayout layout);
+MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout);
#endif // MEDIA_BASE_CHANNEL_LAYOUT_H_
diff --git a/media/base/clock.h b/media/base/clock.h
index fb45b95..0acf71b 100644
--- a/media/base/clock.h
+++ b/media/base/clock.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
+#include "media/base/media_export.h"
namespace media {
@@ -24,7 +25,7 @@ namespace media {
// TODO(scherkus): Clock will some day be responsible for executing callbacks
// given a media time. This will be used primarily by video renderers. For now
// we'll keep using a poll-and-sleep solution.
-class Clock {
+class MEDIA_EXPORT Clock {
public:
// Type for a static function pointer that acts as a time source.
typedef base::Time(TimeProvider)();
diff --git a/media/base/composite_data_source_factory.h b/media/base/composite_data_source_factory.h
index 799960d..d2ead5b 100644
--- a/media/base/composite_data_source_factory.h
+++ b/media/base/composite_data_source_factory.h
@@ -13,7 +13,8 @@
namespace media {
-class CompositeDataSourceFactory : public AsyncDataSourceFactoryBase {
+class MEDIA_EXPORT CompositeDataSourceFactory
+ : public AsyncDataSourceFactoryBase {
public:
CompositeDataSourceFactory();
virtual ~CompositeDataSourceFactory();
diff --git a/media/base/composite_filter.h b/media/base/composite_filter.h
index 38d52c8..8e1ec4a 100644
--- a/media/base/composite_filter.h
+++ b/media/base/composite_filter.h
@@ -15,7 +15,7 @@ class MessageLoop;
namespace media {
-class CompositeFilter : public Filter {
+class MEDIA_EXPORT CompositeFilter : public Filter {
public:
explicit CompositeFilter(MessageLoop* message_loop);
diff --git a/media/base/data_buffer.h b/media/base/data_buffer.h
index 2e9551a..de1eb35 100644
--- a/media/base/data_buffer.h
+++ b/media/base/data_buffer.h
@@ -15,7 +15,7 @@
namespace media {
-class DataBuffer : public Buffer {
+class MEDIA_EXPORT DataBuffer : public Buffer {
public:
// Takes ownership of the passed |buffer|, assumes valid data of size
// |buffer_size|.
diff --git a/media/base/djb2.h b/media/base/djb2.h
index 2b696fa..598f9d1 100644
--- a/media/base/djb2.h
+++ b/media/base/djb2.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -6,6 +6,7 @@
#define MEDIA_BASE_DJB2_H_
#include "base/basictypes.h"
+#include "media/base/media_export.h"
// DJB2 is a hash algorithm with excellent distribution and speed
// on many different sets.
@@ -34,7 +35,7 @@ static const uint32 kDJB2HashSeed = 5381u;
// For the given buffer of data, compute the DJB2 hash of
// the data. You can call this any number of times during the computation.
-uint32 DJB2Hash(const void* buf, size_t len, uint32 seed);
+MEDIA_EXPORT uint32 DJB2Hash(const void* buf, size_t len, uint32 seed);
#endif // MEDIA_BASE_DJB2_H_
diff --git a/media/base/filter_collection.h b/media/base/filter_collection.h
index aadd2f1d..97e7232 100644
--- a/media/base/filter_collection.h
+++ b/media/base/filter_collection.h
@@ -15,7 +15,7 @@ namespace media {
// This is a collection of Filter objects used to form a media playback
// pipeline. See src/media/base/pipeline.h for more information.
-class FilterCollection {
+class MEDIA_EXPORT FilterCollection {
public:
FilterCollection();
~FilterCollection();
diff --git a/media/base/filter_factories.h b/media/base/filter_factories.h
index 5286b3f..4e34c0f 100644
--- a/media/base/filter_factories.h
+++ b/media/base/filter_factories.h
@@ -8,6 +8,7 @@
#include<string>
#include "base/callback_old.h"
+#include "media/base/media_export.h"
#include "media/base/pipeline_status.h"
namespace media {
@@ -15,7 +16,7 @@ namespace media {
class DataSource;
// Asynchronous factory interface for building DataSource objects.
-class DataSourceFactory {
+class MEDIA_EXPORT DataSourceFactory {
public:
// Ownership of the DataSource is transferred through this callback.
typedef Callback2<PipelineStatus, DataSource*>::Type BuildCallback;
@@ -33,7 +34,7 @@ class DataSourceFactory {
class Demuxer;
// Asynchronous factory interface for building Demuxer objects.
-class DemuxerFactory {
+class MEDIA_EXPORT DemuxerFactory {
public:
// Ownership of the Demuxer is transferred through this callback.
typedef Callback2<PipelineStatus, Demuxer*>::Type BuildCallback;
diff --git a/media/base/filter_host.h b/media/base/filter_host.h
index 4bdad9f..510e333 100644
--- a/media/base/filter_host.h
+++ b/media/base/filter_host.h
@@ -22,7 +22,7 @@
namespace media {
-class FilterHost {
+class MEDIA_EXPORT FilterHost {
public:
// Stops execution of the pipeline due to a fatal error. Do not call this
// method with PIPELINE_OK.
diff --git a/media/base/filters.h b/media/base/filters.h
index 1ce8682..f0c95ff 100644
--- a/media/base/filters.h
+++ b/media/base/filters.h
@@ -32,6 +32,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
#include "media/base/audio_decoder_config.h"
+#include "media/base/media_export.h"
#include "media/base/pipeline_status.h"
#include "media/base/video_frame.h"
@@ -67,12 +68,12 @@ typedef base::Callback<void(PipelineStatus)> FilterStatusCB;
// This function copies |cb|, calls Reset() on |cb|, and then calls Run()
// on the copy. This is used in the common case where you need to clear
// a callback member variable before running the callback.
-void ResetAndRunCB(FilterStatusCB* cb, PipelineStatus status);
+MEDIA_EXPORT void ResetAndRunCB(FilterStatusCB* cb, PipelineStatus status);
// Used for updating pipeline statistics.
typedef Callback1<const PipelineStatistics&>::Type StatisticsCallback;
-class Filter : public base::RefCountedThreadSafe<Filter> {
+class MEDIA_EXPORT Filter : public base::RefCountedThreadSafe<Filter> {
public:
Filter();
@@ -130,7 +131,7 @@ class Filter : public base::RefCountedThreadSafe<Filter> {
DISALLOW_COPY_AND_ASSIGN(Filter);
};
-class DataSource : public Filter {
+class MEDIA_EXPORT DataSource : public Filter {
public:
typedef Callback1<size_t>::Type ReadCallback;
static const size_t kReadError = static_cast<size_t>(-1);
@@ -155,7 +156,8 @@ class DataSource : public Filter {
virtual void SetPreload(Preload preload) = 0;
};
-class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> {
+class MEDIA_EXPORT DemuxerStream
+ : public base::RefCountedThreadSafe<DemuxerStream> {
public:
typedef base::Callback<void(Buffer*)> ReadCallback;
@@ -183,7 +185,7 @@ class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> {
virtual ~DemuxerStream();
};
-class Demuxer : public Filter {
+class MEDIA_EXPORT Demuxer : public Filter {
public:
// Returns the given stream type, or NULL if that type is not present.
virtual scoped_refptr<DemuxerStream> GetStream(DemuxerStream::Type type) = 0;
@@ -196,7 +198,7 @@ class Demuxer : public Filter {
};
-class VideoDecoder : public Filter {
+class MEDIA_EXPORT VideoDecoder : public Filter {
public:
// Initialize a VideoDecoder with the given DemuxerStream, executing the
// callback upon completion.
@@ -245,7 +247,7 @@ class VideoDecoder : public Filter {
};
-class AudioDecoder : public Filter {
+class MEDIA_EXPORT AudioDecoder : public Filter {
public:
// Initialize a AudioDecoder with the given DemuxerStream, executing the
// callback upon completion.
@@ -280,7 +282,7 @@ class AudioDecoder : public Filter {
};
-class VideoRenderer : public Filter {
+class MEDIA_EXPORT VideoRenderer : public Filter {
public:
// Initialize a VideoRenderer with the given VideoDecoder, executing the
// callback upon completion.
@@ -293,7 +295,7 @@ class VideoRenderer : public Filter {
};
-class AudioRenderer : public Filter {
+class MEDIA_EXPORT AudioRenderer : public Filter {
public:
// Initialize a AudioRenderer with the given AudioDecoder, executing the
// callback upon completion.
diff --git a/media/base/h264_bitstream_converter.h b/media/base/h264_bitstream_converter.h
index bce1e23b..4ef0966 100644
--- a/media/base/h264_bitstream_converter.h
+++ b/media/base/h264_bitstream_converter.h
@@ -6,13 +6,14 @@
#define MEDIA_BASE_H264_BITSTREAM_CONVERTER_H_
#include "base/basictypes.h"
+#include "media/base/media_export.h"
namespace media {
// H264BitstreamConverter is a class to convert H.264 bitstream from
// MP4 format (as specified in ISO/IEC 14496-15) into H.264 bytestream
// (as specified in ISO/IEC 14496-10 Annex B).
-class H264BitstreamConverter {
+class MEDIA_EXPORT H264BitstreamConverter {
public:
H264BitstreamConverter();
~H264BitstreamConverter();
diff --git a/media/base/media.h b/media/base/media.h
index 6bbad4c..54e9662 100644
--- a/media/base/media.h
+++ b/media/base/media.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -8,6 +8,8 @@
#ifndef MEDIA_BASE_MEDIA_H_
#define MEDIA_BASE_MEDIA_H_
+#include "media/base/media_export.h"
+
class FilePath;
namespace media {
@@ -23,11 +25,11 @@ namespace media {
// of the process.
//
// Returns true if everything was successfully initialized, false otherwise.
-bool InitializeMediaLibrary(const FilePath& module_dir);
+MEDIA_EXPORT bool InitializeMediaLibrary(const FilePath& module_dir);
// Use this if you need to check whether the media library is initialized
// for the this process, without actually trying to initialize it.
-bool IsMediaLibraryInitialized();
+MEDIA_EXPORT bool IsMediaLibraryInitialized();
// Attempts to initialize OpenMAX library.
//
diff --git a/media/base/media_export.h b/media/base/media_export.h
new file mode 100644
index 0000000..58a99d3
--- /dev/null
+++ b/media/base/media_export.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 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.
+
+#ifndef MEDIA_BASE_MEDIA_EXPORT_H_
+#define MEDIA_BASE_MEDIA_EXPORT_H_
+#pragma once
+
+// Defines MEDIA_EXPORT so that functionality implemented by the Media module
+// can be exported to consumers.
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(MEDIA_IMPLEMENTATION)
+#define MEDIA_EXPORT __declspec(dllexport)
+#else
+#define MEDIA_EXPORT __declspec(dllimport)
+#endif // defined(MEDIA_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#define MEDIA_EXPORT __attribute__((visibility("default")))
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define MEDIA_EXPORT
+#endif
+
+#endif // MEDIA_BASE_MEDIA_EXPORT_H_
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index dcef120..72005df 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -8,6 +8,7 @@
#define MEDIA_BASE_MEDIA_SWITCHES_H_
#include "build/build_config.h"
+#include "media/base/media_export.h"
namespace switches {
@@ -16,8 +17,8 @@ extern const char kAlsaOutputDevice[];
extern const char kAlsaInputDevice[];
#endif
-extern const char kEnableAdaptive[];
-extern const char kVideoThreads[];
+MEDIA_EXPORT extern const char kEnableAdaptive[];
+MEDIA_EXPORT extern const char kVideoThreads[];
} // namespace switches
diff --git a/media/base/message_loop_factory.h b/media/base/message_loop_factory.h
index 35078ed..7227840 100644
--- a/media/base/message_loop_factory.h
+++ b/media/base/message_loop_factory.h
@@ -10,13 +10,14 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop_proxy.h"
+#include "media/base/media_export.h"
class MessageLoop;
namespace media {
// Factory object that manages named MessageLoops.
-class MessageLoopFactory {
+class MEDIA_EXPORT MessageLoopFactory {
public:
// Get the message loop associated with |name|. A new MessageLoop
// is created if the factory doesn't have one associated with |name|.
diff --git a/media/base/message_loop_factory_impl.h b/media/base/message_loop_factory_impl.h
index 821cd66..f5b5c06 100644
--- a/media/base/message_loop_factory_impl.h
+++ b/media/base/message_loop_factory_impl.h
@@ -13,7 +13,7 @@
namespace media {
-class MessageLoopFactoryImpl : public MessageLoopFactory {
+class MEDIA_EXPORT MessageLoopFactoryImpl : public MessageLoopFactory {
public:
MessageLoopFactoryImpl();
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index 9686bb6..9488526 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -21,7 +21,7 @@ class TimeDelta;
namespace media {
-extern const char kRawMediaScheme[];
+MEDIA_EXPORT extern const char kRawMediaScheme[];
struct PipelineStatistics {
PipelineStatistics() :
@@ -39,7 +39,7 @@ struct PipelineStatistics {
class FilterCollection;
-class Pipeline : public base::RefCountedThreadSafe<Pipeline> {
+class MEDIA_EXPORT Pipeline : public base::RefCountedThreadSafe<Pipeline> {
public:
// Initializes pipeline. Pipeline takes ownership of all callbacks passed
// into this method.
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index caf4e19f..d8b4da2 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -33,7 +33,7 @@ namespace media {
// the callback to get fired and call status() to see what the callback's
// argument was. This object is for one-time use; call |Callback()| exactly
// once.
-class PipelineStatusNotification {
+class MEDIA_EXPORT PipelineStatusNotification {
public:
PipelineStatusNotification();
~PipelineStatusNotification();
@@ -91,7 +91,7 @@ class PipelineStatusNotification {
// If any error ever happens, this object will transition to the "Error" state
// from any state. If Stop() is ever called, this object will transition to
// "Stopped" state.
-class PipelineImpl : public Pipeline, public FilterHost {
+class MEDIA_EXPORT PipelineImpl : public Pipeline, public FilterHost {
public:
explicit PipelineImpl(MessageLoop* message_loop);
diff --git a/media/base/pts_heap.h b/media/base/pts_heap.h
index 11a3dbc..5e7f3be 100644
--- a/media/base/pts_heap.h
+++ b/media/base/pts_heap.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -31,10 +31,11 @@
#include <vector>
#include "base/time.h"
+#include "media/base/media_export.h"
namespace media {
-class PtsHeap {
+class MEDIA_EXPORT PtsHeap {
public:
PtsHeap();
~PtsHeap();
diff --git a/media/base/pts_stream.h b/media/base/pts_stream.h
index f3a6e95..095ae7f 100644
--- a/media/base/pts_stream.h
+++ b/media/base/pts_stream.h
@@ -25,7 +25,7 @@ namespace media {
class StreamSample;
-class PtsStream {
+class MEDIA_EXPORT PtsStream {
public:
PtsStream();
~PtsStream();
diff --git a/media/base/seekable_buffer.h b/media/base/seekable_buffer.h
index cad9be5..b32abfe 100644
--- a/media/base/seekable_buffer.h
+++ b/media/base/seekable_buffer.h
@@ -41,7 +41,7 @@
namespace media {
-class SeekableBuffer {
+class MEDIA_EXPORT SeekableBuffer {
public:
// Constructs an instance with |forward_capacity| and |backward_capacity|.
// The values are in bytes.
diff --git a/media/base/state_matrix.h b/media/base/state_matrix.h
index 779646f..07ce514 100644
--- a/media/base/state_matrix.h
+++ b/media/base/state_matrix.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -8,10 +8,11 @@
#include <map>
#include "base/logging.h"
+#include "media/base/media_export.h"
namespace media {
-class StateMatrix {
+class MEDIA_EXPORT StateMatrix {
public:
StateMatrix();
~StateMatrix();
diff --git a/media/base/video_decoder_config.h b/media/base/video_decoder_config.h
index a077312..31aa12c 100644
--- a/media/base/video_decoder_config.h
+++ b/media/base/video_decoder_config.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "media/base/media_export.h"
namespace media {
@@ -25,7 +26,7 @@ enum VideoCodec {
// that uses said codec in the same CL.
};
-class VideoDecoderConfig {
+class MEDIA_EXPORT VideoDecoderConfig {
public:
VideoDecoderConfig(VideoCodec codec, int width, int height,
int surface_width, int surface_height,
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index 529b9ee..50ea32b 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -9,7 +9,7 @@
namespace media {
-class VideoFrame : public StreamSample {
+class MEDIA_EXPORT VideoFrame : public StreamSample {
public:
static const size_t kMaxPlanes = 3;
diff --git a/media/base/video_util.h b/media/base/video_util.h
index fa40984..7ffef74 100644
--- a/media/base/video_util.h
+++ b/media/base/video_util.h
@@ -6,6 +6,7 @@
#define MEDIA_BASE_VIDEO_UTIL_H_
#include "base/basictypes.h"
+#include "media/base/media_export.h"
namespace media {
@@ -15,9 +16,12 @@ class VideoFrame;
// source and destinations dimensions.
//
// NOTE: rows is *not* the same as height!
-void CopyYPlane(const uint8* source, int stride, int rows, VideoFrame* frame);
-void CopyUPlane(const uint8* source, int stride, int rows, VideoFrame* frame);
-void CopyVPlane(const uint8* source, int stride, int rows, VideoFrame* frame);
+MEDIA_EXPORT void CopyYPlane(const uint8* source, int stride, int rows,
+ VideoFrame* frame);
+MEDIA_EXPORT void CopyUPlane(const uint8* source, int stride, int rows,
+ VideoFrame* frame);
+MEDIA_EXPORT void CopyVPlane(const uint8* source, int stride, int rows,
+ VideoFrame* frame);
} // namespace media
diff --git a/media/base/yuv_convert.h b/media/base/yuv_convert.h
index 12dab83..20ba0aa 100644
--- a/media/base/yuv_convert.h
+++ b/media/base/yuv_convert.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -93,6 +93,7 @@ void ConvertYUY2ToYUV(const uint8* src,
uint8* vplane,
int width,
int height);
+
} // namespace media
#endif // MEDIA_BASE_YUV_CONVERT_H_
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
index 5ac0607..dec47df 100644
--- a/media/ffmpeg/ffmpeg_common.h
+++ b/media/ffmpeg/ffmpeg_common.h
@@ -12,6 +12,7 @@
#include "base/memory/singleton.h"
#include "base/time.h"
#include "media/base/channel_layout.h"
+#include "media/base/media_export.h"
#include "media/video/video_decode_engine.h"
// Include FFmpeg header files.
@@ -54,15 +55,15 @@ class ScopedPtrAVFreePacket {
// For example if |timestamp| equals 11025 and |time_base| equals {1, 44100}
// then the return value will be a base::TimeDelta for 0.25 seconds since that
// is how much time 11025/44100ths of a second represents.
-base::TimeDelta ConvertFromTimeBase(const AVRational& time_base,
- int64 timestamp);
+MEDIA_EXPORT base::TimeDelta ConvertFromTimeBase(const AVRational& time_base,
+ int64 timestamp);
// Converts a base::TimeDelta into an int64 timestamp in |time_base| units.
// For example if |timestamp| is 0.5 seconds and |time_base| is {1, 44100}, then
// the return value will be 22050 since that is how many 1/44100ths of a second
// represent 0.5 seconds.
-int64 ConvertToTimeBase(const AVRational& time_base,
- const base::TimeDelta& timestamp);
+MEDIA_EXPORT int64 ConvertToTimeBase(const AVRational& time_base,
+ const base::TimeDelta& timestamp);
VideoCodec CodecIDToVideoCodec(CodecID codec_id);
CodecID VideoCodecToCodecID(VideoCodec video_codec);
@@ -80,9 +81,9 @@ base::TimeDelta GetFrameDuration(AVStream* stream);
// Returns true if a valid seek point was found after |timestamp| and
// |seek_time| was set. Returns false if a seek point could not be
// found or the parameters are invalid.
-bool GetSeekTimeAfter(AVStream* stream,
- const base::TimeDelta& timestamp,
- base::TimeDelta* seek_time);
+MEDIA_EXPORT bool GetSeekTimeAfter(AVStream* stream,
+ const base::TimeDelta& timestamp,
+ base::TimeDelta* seek_time);
// Get the number of bytes required to play the stream over a specified
// time range. This is an estimate based on the available index data.
@@ -97,12 +98,12 @@ bool GetSeekTimeAfter(AVStream* stream,
// |range_end| - The end time for the range covered by |bytes|. This may be
// different than |end_time| if the index doesn't have data for
// that exact time. |range_end| >= |end_time|
-bool GetStreamByteCountOverRange(AVStream* stream,
- const base::TimeDelta& start_time,
- const base::TimeDelta& end_time,
- int64* bytes,
- base::TimeDelta* range_start,
- base::TimeDelta* range_end);
+MEDIA_EXPORT bool GetStreamByteCountOverRange(AVStream* stream,
+ const base::TimeDelta& start_time,
+ const base::TimeDelta& end_time,
+ int64* bytes,
+ base::TimeDelta* range_start,
+ base::TimeDelta* range_end);
// Calculates the width and height of the video surface using the video's
// encoded dimensions and sample_aspect_ratio.
diff --git a/media/ffmpeg/file_protocol.h b/media/ffmpeg/file_protocol.h
index ed37467..7c16c4b 100644
--- a/media/ffmpeg/file_protocol.h
+++ b/media/ffmpeg/file_protocol.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
//
@@ -8,7 +8,9 @@
#ifndef MEDIA_FFMPEG_FILE_PROTOCOL_H_
#define MEDIA_FFMPEG_FILE_PROTOCOL_H_
+#include "media/base/media_export.h"
+
struct URLProtocol;
-extern URLProtocol kFFmpegFileProtocol;
+MEDIA_EXPORT extern URLProtocol kFFmpegFileProtocol;
#endif // MEDIA_FFMPEG_FILE_PROTOCOL_H_
diff --git a/media/filters/adaptive_demuxer.h b/media/filters/adaptive_demuxer.h
index 73fd7b6..2a52b11 100644
--- a/media/filters/adaptive_demuxer.h
+++ b/media/filters/adaptive_demuxer.h
@@ -242,7 +242,7 @@ class AdaptiveDemuxer : public Demuxer {
// DemuxerFactory's Build() method individually. For backward-compatibility,
// the manifest URL may also simply be a regular URL in which case an implicit
// "x-adaptive:0:0:" is prepended.
-class AdaptiveDemuxerFactory : public DemuxerFactory {
+class MEDIA_EXPORT AdaptiveDemuxerFactory : public DemuxerFactory {
public:
// Takes a reference to |demuxer_factory|.
AdaptiveDemuxerFactory(DemuxerFactory* delegate_factory);
@@ -260,6 +260,11 @@ class AdaptiveDemuxerFactory : public DemuxerFactory {
DISALLOW_IMPLICIT_CONSTRUCTORS(AdaptiveDemuxerFactory);
};
+// See AdaptiveDemuxerFactory's class-level comment for |url|'s format.
+MEDIA_EXPORT bool ParseAdaptiveUrl(
+ const std::string& url, int* audio_index, int* video_index,
+ std::vector<std::string>* urls);
+
} // namespace media
#endif // MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_
diff --git a/media/filters/adaptive_demuxer_unittest.cc b/media/filters/adaptive_demuxer_unittest.cc
index 3d8b31a..a6fcf79 100644
--- a/media/filters/adaptive_demuxer_unittest.cc
+++ b/media/filters/adaptive_demuxer_unittest.cc
@@ -8,10 +8,6 @@
namespace media {
-bool ParseAdaptiveUrl(
- const std::string& url, int* audio_index, int* video_index,
- std::vector<std::string>* urls);
-
TEST(ParseAdaptiveUrlTest, BackwardsCompatible) {
std::string manifest = "http://youtube.com/video.webm";
int audio_index;
diff --git a/media/filters/audio_file_reader.h b/media/filters/audio_file_reader.h
index 88a484c..6a3fd89 100644
--- a/media/filters/audio_file_reader.h
+++ b/media/filters/audio_file_reader.h
@@ -18,7 +18,7 @@ namespace media {
class FFmpegURLProtocol;
-class AudioFileReader {
+class MEDIA_EXPORT AudioFileReader {
public:
// Audio file data will be read using the given protocol.
// The AudioFileReader does not take ownership of |protocol| and
diff --git a/media/filters/audio_renderer_algorithm_base.h b/media/filters/audio_renderer_algorithm_base.h
index f6ead0d..e35e209 100644
--- a/media/filters/audio_renderer_algorithm_base.h
+++ b/media/filters/audio_renderer_algorithm_base.h
@@ -34,7 +34,7 @@ namespace media {
class Buffer;
-class AudioRendererAlgorithmBase {
+class MEDIA_EXPORT AudioRendererAlgorithmBase {
public:
// Used to simplify callback declarations.
typedef Callback0::Type RequestReadCallback;
diff --git a/media/filters/audio_renderer_algorithm_ola.h b/media/filters/audio_renderer_algorithm_ola.h
index ac98f684..88fd305 100644
--- a/media/filters/audio_renderer_algorithm_ola.h
+++ b/media/filters/audio_renderer_algorithm_ola.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -19,7 +19,8 @@
namespace media {
-class AudioRendererAlgorithmOLA : public AudioRendererAlgorithmBase {
+class MEDIA_EXPORT AudioRendererAlgorithmOLA
+ : public AudioRendererAlgorithmBase {
public:
AudioRendererAlgorithmOLA();
virtual ~AudioRendererAlgorithmOLA();
diff --git a/media/filters/audio_renderer_base.h b/media/filters/audio_renderer_base.h
index 1882743..5305c7b 100644
--- a/media/filters/audio_renderer_base.h
+++ b/media/filters/audio_renderer_base.h
@@ -27,7 +27,7 @@
namespace media {
-class AudioRendererBase : public AudioRenderer {
+class MEDIA_EXPORT AudioRendererBase : public AudioRenderer {
public:
AudioRendererBase();
virtual ~AudioRendererBase();
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index 1e33822..f52913d 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -24,7 +24,7 @@
namespace media {
-class AudioRendererImpl
+class MEDIA_EXPORT AudioRendererImpl
: public AudioRendererBase,
public AudioOutputStream::AudioSourceCallback {
public:
diff --git a/media/filters/bitstream_converter.h b/media/filters/bitstream_converter.h
index a1ca3c6..d7b553f 100644
--- a/media/filters/bitstream_converter.h
+++ b/media/filters/bitstream_converter.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -14,6 +14,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
+#include "media/base/media_export.h"
// FFmpeg types.
struct AVBitStreamFilterContext;
@@ -22,7 +23,7 @@ struct AVPacket;
namespace media {
-class BitstreamConverter {
+class MEDIA_EXPORT BitstreamConverter {
public:
BitstreamConverter() {}
virtual ~BitstreamConverter() {}
@@ -53,7 +54,7 @@ class IdentityBitstreamConverter : public BitstreamConverter {
DISALLOW_COPY_AND_ASSIGN(IdentityBitstreamConverter);
};
-class FFmpegBitstreamConverter : public BitstreamConverter {
+class MEDIA_EXPORT FFmpegBitstreamConverter : public BitstreamConverter {
public:
// Creates FFmpegBitstreamConverter based on the FFmpeg bistream filter
// corresponding to |filter_name|.
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index 84e224d..298fecd 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -21,7 +21,7 @@ class FFmpegURLProtocol;
// Demuxer implementation that allows chunks of WebM media data to be passed
// from JavaScript to the media stack.
-class ChunkDemuxer : public Demuxer {
+class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
public:
explicit ChunkDemuxer(ChunkDemuxerClient* client);
virtual ~ChunkDemuxer();
diff --git a/media/filters/chunk_demuxer_factory.h b/media/filters/chunk_demuxer_factory.h
index a3d004a..6eba933 100644
--- a/media/filters/chunk_demuxer_factory.h
+++ b/media/filters/chunk_demuxer_factory.h
@@ -18,7 +18,7 @@ class ChunkDemuxerClient;
// All other URLs are delegated to |delegate_factory_|. The url passed to
// the constructor represents the "special" URL that indicates that the
// ChunkDemuxer should be used for playback.
-class ChunkDemuxerFactory : public DemuxerFactory {
+class MEDIA_EXPORT ChunkDemuxerFactory : public DemuxerFactory {
public:
// Takes ownership of |delegate_factory|.
ChunkDemuxerFactory(const std::string& url, DemuxerFactory* delegate_factory,
diff --git a/media/filters/ffmpeg_audio_decoder.h b/media/filters/ffmpeg_audio_decoder.h
index 72978bc..1025083 100644
--- a/media/filters/ffmpeg_audio_decoder.h
+++ b/media/filters/ffmpeg_audio_decoder.h
@@ -14,7 +14,8 @@ namespace media {
// Forward declaration for scoped_ptr_malloc.
class ScopedPtrAVFree;
-class FFmpegAudioDecoder : public DecoderBase<AudioDecoder, Buffer> {
+class MEDIA_EXPORT FFmpegAudioDecoder
+ : public DecoderBase<AudioDecoder, Buffer> {
public:
explicit FFmpegAudioDecoder(MessageLoop* message_loop);
virtual ~FFmpegAudioDecoder();
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index 4ab7690..7dea4b5 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -125,7 +125,7 @@ class FFmpegDemuxerStream : public DemuxerStream {
DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream);
};
-class FFmpegDemuxer : public Demuxer, public FFmpegURLProtocol {
+class MEDIA_EXPORT FFmpegDemuxer : public Demuxer, public FFmpegURLProtocol {
public:
explicit FFmpegDemuxer(MessageLoop* message_loop);
virtual ~FFmpegDemuxer();
diff --git a/media/filters/ffmpeg_demuxer_factory.h b/media/filters/ffmpeg_demuxer_factory.h
index b467d75..37a5f43 100644
--- a/media/filters/ffmpeg_demuxer_factory.h
+++ b/media/filters/ffmpeg_demuxer_factory.h
@@ -15,7 +15,7 @@ class MessageLoop;
namespace media {
-class FFmpegDemuxerFactory : public DemuxerFactory {
+class MEDIA_EXPORT FFmpegDemuxerFactory : public DemuxerFactory {
public:
// Takes ownership of |data_source_factory|, but not of |loop|.
FFmpegDemuxerFactory(DataSourceFactory* data_source_factory,
diff --git a/media/filters/ffmpeg_glue.h b/media/filters/ffmpeg_glue.h
index a98c502..c51000a 100644
--- a/media/filters/ffmpeg_glue.h
+++ b/media/filters/ffmpeg_glue.h
@@ -31,10 +31,11 @@
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
+#include "media/base/media_export.h"
namespace media {
-class FFmpegURLProtocol {
+class MEDIA_EXPORT FFmpegURLProtocol {
public:
FFmpegURLProtocol() {
}
@@ -64,7 +65,7 @@ class FFmpegURLProtocol {
DISALLOW_COPY_AND_ASSIGN(FFmpegURLProtocol);
};
-class FFmpegGlue {
+class MEDIA_EXPORT FFmpegGlue {
public:
// Returns the singleton instance.
static FFmpegGlue* GetInstance();
diff --git a/media/filters/ffmpeg_h264_bitstream_converter.h b/media/filters/ffmpeg_h264_bitstream_converter.h
index 69d8e4c..e27cc60 100644
--- a/media/filters/ffmpeg_h264_bitstream_converter.h
+++ b/media/filters/ffmpeg_h264_bitstream_converter.h
@@ -35,7 +35,7 @@ namespace media {
// FFmpegH264BitstreamConverter uses FFmpeg allocation methods for buffer
// allocation to ensure compatibility with FFmpeg's memory management.
-class FFmpegH264BitstreamConverter : public BitstreamConverter {
+class MEDIA_EXPORT FFmpegH264BitstreamConverter : public BitstreamConverter {
public:
// The |stream_context| will be used during conversion and should be the
// AVCodecContext for the stream sourcing these packets. A reference to
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index fbf6210..7458ff7 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -19,7 +19,7 @@ namespace media {
class VideoDecodeEngine;
-class FFmpegVideoDecoder
+class MEDIA_EXPORT FFmpegVideoDecoder
: public VideoDecoder,
public VideoDecodeEngine::EventHandler {
public:
diff --git a/media/filters/file_data_source.h b/media/filters/file_data_source.h
index 10e61aa..d463f4d 100644
--- a/media/filters/file_data_source.h
+++ b/media/filters/file_data_source.h
@@ -15,7 +15,7 @@ namespace media {
// Basic data source that treats the URL as a file path, and uses the file
// system to read data for a media pipeline.
-class FileDataSource : public DataSource {
+class MEDIA_EXPORT FileDataSource : public DataSource {
public:
FileDataSource();
virtual ~FileDataSource();
diff --git a/media/filters/file_data_source_factory.h b/media/filters/file_data_source_factory.h
index 18c0587..94b056c 100644
--- a/media/filters/file_data_source_factory.h
+++ b/media/filters/file_data_source_factory.h
@@ -9,7 +9,7 @@
namespace media {
-class FileDataSourceFactory : public DataSourceFactory {
+class MEDIA_EXPORT FileDataSourceFactory : public DataSourceFactory {
public:
FileDataSourceFactory();
virtual ~FileDataSourceFactory();
diff --git a/media/filters/in_memory_url_protocol.h b/media/filters/in_memory_url_protocol.h
index 7bad5e3..7a5c468 100644
--- a/media/filters/in_memory_url_protocol.h
+++ b/media/filters/in_memory_url_protocol.h
@@ -5,9 +5,8 @@
#ifndef MEDIA_FILTERS_IN_MEMORY_URL_PROTOCOL_H_
#define MEDIA_FILTERS_IN_MEMORY_URL_PROTOCOL_H_
-#include "media/filters/ffmpeg_glue.h"
-
#include "base/basictypes.h"
+#include "media/filters/ffmpeg_glue.h"
namespace media {
@@ -16,7 +15,7 @@ namespace media {
// buffer pointer passed into the constructor
// needs to remain valid for the entire lifetime of
// this object.
-class InMemoryUrlProtocol : public FFmpegURLProtocol {
+class MEDIA_EXPORT InMemoryUrlProtocol : public FFmpegURLProtocol {
public:
InMemoryUrlProtocol(const uint8* buf, int64 size, bool streaming);
virtual ~InMemoryUrlProtocol();
diff --git a/media/filters/null_audio_renderer.h b/media/filters/null_audio_renderer.h
index 28e79b5..f330c77 100644
--- a/media/filters/null_audio_renderer.h
+++ b/media/filters/null_audio_renderer.h
@@ -23,7 +23,7 @@
namespace media {
-class NullAudioRenderer
+class MEDIA_EXPORT NullAudioRenderer
: public AudioRendererBase,
public base::PlatformThread::Delegate {
public:
diff --git a/media/filters/video_renderer_base.h b/media/filters/video_renderer_base.h
index d4a064c..3dd12bc 100644
--- a/media/filters/video_renderer_base.h
+++ b/media/filters/video_renderer_base.h
@@ -29,7 +29,7 @@ namespace media {
// TODO(scherkus): to avoid subclasses, consider using a peer/delegate interface
// and pass in a reference to the constructor.
-class VideoRendererBase
+class MEDIA_EXPORT VideoRendererBase
: public VideoRenderer,
public base::PlatformThread::Delegate {
public:
diff --git a/media/media.gyp b/media/media.gyp
index efcb8a6..c828319 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'media',
- 'type': 'static_library',
+ 'type': '<(component)',
'dependencies': [
'yuv_convert',
'../base/base.gyp:base',
@@ -17,6 +17,10 @@
'../build/temp_gyp/googleurl.gyp:googleurl',
'../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
'../third_party/openmax/openmax.gyp:il',
+ '../ui/ui.gyp:ui',
+ ],
+ 'defines': [
+ 'MEDIA_IMPLEMENTATION',
],
'include_dirs': [
'..',
@@ -104,6 +108,7 @@
'base/h264_bitstream_converter.cc',
'base/h264_bitstream_converter.h',
'base/media.h',
+ 'base/media_export.h',
'base/media_posix.cc',
'base/media_switches.cc',
'base/media_switches.h',
@@ -389,6 +394,7 @@
'dependencies': [
'media',
'media_test_support',
+ 'yuv_convert',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../base/base.gyp:test_support_base',
@@ -497,6 +503,7 @@
'type': 'executable',
'dependencies': [
'media',
+ 'yuv_convert',
'../base/base.gyp:base',
'../skia/skia.gyp:skia',
],
@@ -543,7 +550,9 @@
'type': 'executable',
'dependencies': [
'media',
+ 'yuv_convert',
'../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
],
'include_dirs': [
'<(DEPTH)/third_party/wtl/include',
@@ -595,6 +604,7 @@
'type': 'executable',
'dependencies': [
'media',
+ 'yuv_convert',
'../base/base.gyp:base',
],
'include_dirs': [
@@ -620,6 +630,7 @@
'type': 'executable',
'dependencies': [
'media',
+ 'yuv_convert',
'../base/base.gyp:base',
'../ui/gfx/gl/gl.gyp:gl',
],
diff --git a/media/video/capture/fake_video_capture_device.h b/media/video/capture/fake_video_capture_device.h
index 582e55f..d73000d 100644
--- a/media/video/capture/fake_video_capture_device.h
+++ b/media/video/capture/fake_video_capture_device.h
@@ -16,7 +16,7 @@
namespace media {
-class FakeVideoCaptureDevice : public VideoCaptureDevice {
+class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
public:
static VideoCaptureDevice* Create(const Name& device_name);
virtual ~FakeVideoCaptureDevice();
diff --git a/media/video/capture/video_capture_device.h b/media/video/capture/video_capture_device.h
index a2d4ddd..5069fc4 100644
--- a/media/video/capture/video_capture_device.h
+++ b/media/video/capture/video_capture_device.h
@@ -16,10 +16,11 @@
#include <string>
#include "base/time.h"
+#include "media/base/media_export.h"
namespace media {
-class VideoCaptureDevice {
+class MEDIA_EXPORT VideoCaptureDevice {
public:
struct Name {
diff --git a/media/video/ffmpeg_video_decode_engine.h b/media/video/ffmpeg_video_decode_engine.h
index 32eac45..ebea8df 100644
--- a/media/video/ffmpeg_video_decode_engine.h
+++ b/media/video/ffmpeg_video_decode_engine.h
@@ -17,7 +17,7 @@ struct AVFrame;
namespace media {
-class FFmpegVideoDecodeEngine : public VideoDecodeEngine {
+class MEDIA_EXPORT FFmpegVideoDecodeEngine : public VideoDecodeEngine {
public:
FFmpegVideoDecodeEngine();
virtual ~FFmpegVideoDecodeEngine();
diff --git a/media/video/picture.h b/media/video/picture.h
index 10cf47c..e3ecb9e 100644
--- a/media/video/picture.h
+++ b/media/video/picture.h
@@ -6,6 +6,7 @@
#define MEDIA_VIDEO_PICTURE_H_
#include "base/basictypes.h"
+#include "media/base/media_export.h"
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/size.h"
@@ -13,7 +14,7 @@ namespace media {
// A picture buffer that is composed of a GLES2 texture.
// This is the media-namespace equivalent of PP_PictureBuffer_Dev.
-class PictureBuffer {
+class MEDIA_EXPORT PictureBuffer {
public:
PictureBuffer(int32 id, gfx::Size size, uint32 texture_id);
@@ -42,7 +43,7 @@ class PictureBuffer {
// A decoded picture frame.
// This is the media-namespace equivalent of PP_Picture_Dev.
-class Picture {
+class MEDIA_EXPORT Picture {
public:
Picture(int32 picture_buffer_id, int32 bitstream_buffer_id);
diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h
index 6ac1c0e..46d9326 100644
--- a/media/video/video_decode_accelerator.h
+++ b/media/video/video_decode_accelerator.h
@@ -164,7 +164,7 @@ enum VideoColorFormat {
//
// No thread-safety guarantees are implied by the use of RefCountedThreadSafe
// below.
-class VideoDecodeAccelerator
+class MEDIA_EXPORT VideoDecodeAccelerator
: public base::RefCountedThreadSafe<VideoDecodeAccelerator> {
public:
// Enumeration of potential errors generated by the API.
diff --git a/media/video/video_decode_engine.h b/media/video/video_decode_engine.h
index fb6933d..43af3cb 100644
--- a/media/video/video_decode_engine.h
+++ b/media/video/video_decode_engine.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
+#include "media/base/media_export.h"
#include "media/base/video_decoder_config.h"
#include "media/base/video_frame.h"
@@ -30,9 +31,9 @@ struct VideoCodecInfo {
uint32 surface_height;
};
-class VideoDecodeEngine {
+class MEDIA_EXPORT VideoDecodeEngine {
public:
- struct EventHandler {
+ struct MEDIA_EXPORT EventHandler {
public:
virtual ~EventHandler() {}
virtual void OnInitializeComplete(const VideoCodecInfo& info) = 0;