diff options
80 files changed, 162 insertions, 245 deletions
diff --git a/content/browser/speech/speech_recognizer_unittest.cc b/content/browser/speech/speech_recognizer_unittest.cc index 76133b3d..d70df62 100644 --- a/content/browser/speech/speech_recognizer_unittest.cc +++ b/content/browser/speech/speech_recognizer_unittest.cc @@ -75,12 +75,11 @@ class SpeechRecognizerTest : public SpeechRecognizerDelegate, // testing::Test methods. virtual void SetUp() { - AudioInputController::set_factory_for_testing( - &audio_input_controller_factory_); + AudioInputController::set_factory(&audio_input_controller_factory_); } virtual void TearDown() { - AudioInputController::set_factory_for_testing(NULL); + AudioInputController::set_factory(NULL); } void FillPacketWithTestWaveform() { diff --git a/media/audio/audio_buffers_state.h b/media/audio/audio_buffers_state.h index 796c081..e3a2faf 100644 --- a/media/audio/audio_buffers_state.h +++ b/media/audio/audio_buffers_state.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,12 +6,11 @@ #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 MEDIA_EXPORT AudioBuffersState { +struct 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 22f6ffe..164b09f 100644 --- a/media/audio/audio_input_controller.h +++ b/media/audio/audio_input_controller.h @@ -35,7 +35,7 @@ // namespace media { -class MEDIA_EXPORT AudioInputController +class AudioInputController : public base::RefCountedThreadSafe<AudioInputController>, public AudioInputStream::AudioInputCallback { public: @@ -99,8 +99,10 @@ class MEDIA_EXPORT 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. - static void set_factory_for_testing(Factory* factory) { factory_ = factory; } - AudioInputStream* stream_for_testing() { return stream_; } +#if defined(UNIT_TEST) + static void set_factory(Factory* factory) { factory_ = factory; } + AudioInputStream* stream() { return stream_; } +#endif // 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 090d97f4..d7ce4db 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_for_testing(); + AudioInputStream* stream = controller->stream(); stream->Stop(); event.Wait(); diff --git a/media/audio/audio_io.h b/media/audio/audio_io.h index 74b5c47..787020c 100644 --- a/media/audio/audio_io.h +++ b/media/audio/audio_io.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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 MEDIA_EXPORT AudioOutputStream { +class 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 MEDIA_EXPORT AudioSourceCallback { + class AudioSourceCallback { public: virtual ~AudioSourceCallback() {} @@ -104,7 +104,7 @@ class MEDIA_EXPORT AudioOutputStream { // Models an audio sink receiving recorded audio from the audio driver. class AudioInputStream { public: - class MEDIA_EXPORT AudioInputCallback { + class AudioInputCallback { public: virtual ~AudioInputCallback() {} diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h index d80026d..29cc23d 100644 --- a/media/audio/audio_manager.h +++ b/media/audio/audio_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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 MEDIA_EXPORT AudioManager { +class 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_manager_base.h b/media/audio/audio_manager_base.h index fb4c51e..239ac5c 100644 --- a/media/audio/audio_manager_base.h +++ b/media/audio/audio_manager_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -13,7 +13,7 @@ class AudioOutputDispatcher; // AudioManagerBase provides AudioManager functions common for all platforms. -class MEDIA_EXPORT AudioManagerBase : public AudioManager { +class AudioManagerBase : public AudioManager { public: // Name of the generic "default" device. static const char kDefaultDeviceName[]; diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h index ac4fea7..29fb0a7 100644 --- a/media/audio/audio_output_controller.h +++ b/media/audio/audio_output_controller.h @@ -49,7 +49,7 @@ class Task; // namespace media { -class MEDIA_EXPORT AudioOutputController +class 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 7a4d019..18e1b28 100644 --- a/media/audio/audio_output_dispatcher.h +++ b/media/audio/audio_output_dispatcher.h @@ -33,7 +33,7 @@ class AudioOutputStream; class MessageLoop; -class MEDIA_EXPORT AudioOutputDispatcher +class 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 c9f7d6f..4835cc8 100644 --- a/media/audio/audio_output_proxy.h +++ b/media/audio/audio_output_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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 MEDIA_EXPORT AudioOutputProxy : public AudioOutputStream { +class 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 5c86990..26204b0 100644 --- a/media/audio/audio_parameters.h +++ b/media/audio/audio_parameters.h @@ -7,11 +7,10 @@ #include "base/basictypes.h" #include "media/base/audio_decoder_config.h" -#include "media/base/media_export.h" -struct MEDIA_EXPORT AudioParameters { +struct AudioParameters { // Compare is useful when AudioParameters is used as a key in std::map. - class MEDIA_EXPORT Compare { + class Compare { public: bool operator()(const AudioParameters& a, const AudioParameters& b) const; }; @@ -20,7 +19,7 @@ struct MEDIA_EXPORT AudioParameters { AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples. AUDIO_PCM_LOW_LATENCY, // Linear PCM, low latency requested. AUDIO_MOCK, // Creates a dummy AudioOutputStream object. - AUDIO_LAST_FORMAT // Only used for validation of format.y + AUDIO_LAST_FORMAT // Only used for validation of format. }; // Telephone quality sample rate, mostly for speech-only audio. diff --git a/media/audio/audio_util.h b/media/audio/audio_util.h index a78fdf1..0d65e19 100644 --- a/media/audio/audio_util.h +++ b/media/audio/audio_util.h @@ -8,7 +8,6 @@ #include <vector> #include "base/basictypes.h" -#include "media/base/media_export.h" namespace media { @@ -27,11 +26,11 @@ namespace media { // formats. // The buffer is modified in-place to avoid memory management, as this // function may be called in performance critical code. -MEDIA_EXPORT bool AdjustVolume(void* buf, - size_t buflen, - int channels, - int bytes_per_sample, - float volume); +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 @@ -46,11 +45,11 @@ MEDIA_EXPORT 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. -MEDIA_EXPORT bool FoldChannels(void* buf, - size_t buflen, - int channels, - int bytes_per_sample, - float volume); +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 @@ -71,12 +70,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() -MEDIA_EXPORT void InterleaveFloatToInt16(const std::vector<float*>& source, - int16* destination, - size_t number_of_frames); +void InterleaveFloatToInt16(const std::vector<float*>& source, + int16* destination, + size_t number_of_frames); // Returns the default audio hardware sample-rate. -MEDIA_EXPORT double GetAudioHardwareSampleRate(); +double GetAudioHardwareSampleRate(); } // namespace media diff --git a/media/audio/fake_audio_output_stream.h b/media/audio/fake_audio_output_stream.h index ac53db5..82453ef 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 MEDIA_EXPORT FakeAudioOutputStream : public AudioOutputStream { +class FakeAudioOutputStream : public AudioOutputStream { public: static AudioOutputStream* MakeFakeStream(const AudioParameters& params); static FakeAudioOutputStream* GetLastFakeStream(); diff --git a/media/audio/linux/alsa_output.h b/media/audio/linux/alsa_output.h index 8d61148..4f6e8da 100644 --- a/media/audio/linux/alsa_output.h +++ b/media/audio/linux/alsa_output.h @@ -46,7 +46,7 @@ class AlsaWrapper; class AudioManagerLinux; class MessageLoop; -class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream { +class AlsaPcmOutputStream : public AudioOutputStream { public: // String for the generic "default" ALSA device that has the highest // compatibility and chance of working. @@ -219,7 +219,4 @@ class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream { DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); }; -MEDIA_EXPORT std::ostream& operator<<(std::ostream& os, - AlsaPcmOutputStream::InternalState); - #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ diff --git a/media/audio/linux/alsa_wrapper.h b/media/audio/linux/alsa_wrapper.h index efe93d0..1fe1992 100644 --- a/media/audio/linux/alsa_wrapper.h +++ b/media/audio/linux/alsa_wrapper.h @@ -9,9 +9,8 @@ #include <alsa/asoundlib.h> #include "base/basictypes.h" -#include "media/base/media_export.h" -class MEDIA_EXPORT AlsaWrapper { +class AlsaWrapper { public: AlsaWrapper(); virtual ~AlsaWrapper(); diff --git a/media/audio/linux/audio_manager_linux.h b/media/audio/linux/audio_manager_linux.h index 1c9cab6..6e06091 100644 --- a/media/audio/linux/audio_manager_linux.h +++ b/media/audio/linux/audio_manager_linux.h @@ -14,7 +14,7 @@ class AlsaPcmOutputStream; class AlsaWrapper; -class MEDIA_EXPORT AudioManagerLinux : public AudioManagerBase { +class AudioManagerLinux : public AudioManagerBase { public: AudioManagerLinux(); diff --git a/media/audio/simple_sources.h b/media/audio/simple_sources.h index de70601..5ea1fee 100644 --- a/media/audio/simple_sources.h +++ b/media/audio/simple_sources.h @@ -11,8 +11,7 @@ #include "media/base/seekable_buffer.h" // An audio source that produces a pure sinusoidal tone. -class MEDIA_EXPORT SineWaveAudioSource - : public AudioOutputStream::AudioSourceCallback { +class SineWaveAudioSource : public AudioOutputStream::AudioSourceCallback { public: enum Format { FORMAT_8BIT_LINEAR_PCM, @@ -40,7 +39,7 @@ class MEDIA_EXPORT SineWaveAudioSource // Defines an interface for pushing audio output. In contrast, the interfaces // defined by AudioSourceCallback are pull model only. -class MEDIA_EXPORT PushAudioOutput { +class PushAudioOutput { public: virtual ~PushAudioOutput() {} @@ -57,7 +56,7 @@ class MEDIA_EXPORT 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 MEDIA_EXPORT PushSource +class 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 c4a76a2..34ff831 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 MEDIA_EXPORT AsyncDataSourceFactoryBase : public DataSourceFactory { +class AsyncDataSourceFactoryBase : public DataSourceFactory { public: AsyncDataSourceFactoryBase(); virtual ~AsyncDataSourceFactoryBase(); @@ -64,7 +64,7 @@ class MEDIA_EXPORT AsyncDataSourceFactoryBase : public DataSourceFactory { virtual DataSourceFactory* Clone() const = 0; protected: - class MEDIA_EXPORT BuildRequest { + class BuildRequest { public: BuildRequest(const std::string& url, BuildCallback* callback); virtual ~BuildRequest(); diff --git a/media/base/buffers.h b/media/base/buffers.h index a97d8dd..8c5c219 100644 --- a/media/base/buffers.h +++ b/media/base/buffers.h @@ -30,15 +30,13 @@ #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. -MEDIA_EXPORT extern const base::TimeDelta kNoTimestamp; +extern const base::TimeDelta kNoTimestamp; -class MEDIA_EXPORT StreamSample - : public base::RefCountedThreadSafe<StreamSample> { +class StreamSample : public base::RefCountedThreadSafe<StreamSample> { public: // Returns the timestamp of this buffer in microseconds. base::TimeDelta GetTimestamp() const { @@ -78,7 +76,7 @@ class MEDIA_EXPORT StreamSample }; -class MEDIA_EXPORT Buffer : public StreamSample { +class 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 336ffb7..4948829 100644 --- a/media/base/callback.h +++ b/media/base/callback.h @@ -24,11 +24,10 @@ #include "base/callback_old.h" #include "base/memory/scoped_ptr.h" #include "base/task.h" -#include "media/base/media_export.h" namespace media { -class MEDIA_EXPORT AutoCallbackRunner { +class 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 7dd1ec8..3fa84ba 100644 --- a/media/base/channel_layout.h +++ b/media/base/channel_layout.h @@ -5,8 +5,6 @@ #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, @@ -86,6 +84,6 @@ enum Channels { extern const int kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX]; // Returns the number of channels in a given ChannelLayout. -MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout); +int ChannelLayoutToChannelCount(ChannelLayout layout); #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_ diff --git a/media/base/clock.h b/media/base/clock.h index 0acf71b..fb45b95 100644 --- a/media/base/clock.h +++ b/media/base/clock.h @@ -8,7 +8,6 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/time.h" -#include "media/base/media_export.h" namespace media { @@ -25,7 +24,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 MEDIA_EXPORT Clock { +class 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 d2ead5b..799960d 100644 --- a/media/base/composite_data_source_factory.h +++ b/media/base/composite_data_source_factory.h @@ -13,8 +13,7 @@ namespace media { -class MEDIA_EXPORT CompositeDataSourceFactory - : public AsyncDataSourceFactoryBase { +class CompositeDataSourceFactory : public AsyncDataSourceFactoryBase { public: CompositeDataSourceFactory(); virtual ~CompositeDataSourceFactory(); diff --git a/media/base/composite_filter.h b/media/base/composite_filter.h index 8e1ec4a..38d52c8 100644 --- a/media/base/composite_filter.h +++ b/media/base/composite_filter.h @@ -15,7 +15,7 @@ class MessageLoop; namespace media { -class MEDIA_EXPORT CompositeFilter : public Filter { +class CompositeFilter : public Filter { public: explicit CompositeFilter(MessageLoop* message_loop); diff --git a/media/base/data_buffer.h b/media/base/data_buffer.h index de1eb35..2e9551a 100644 --- a/media/base/data_buffer.h +++ b/media/base/data_buffer.h @@ -15,7 +15,7 @@ namespace media { -class MEDIA_EXPORT DataBuffer : public Buffer { +class 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 598f9d1..2b696fa 100644 --- a/media/base/djb2.h +++ b/media/base/djb2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// 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. @@ -6,7 +6,6 @@ #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. @@ -35,7 +34,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. -MEDIA_EXPORT uint32 DJB2Hash(const void* buf, size_t len, uint32 seed); +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 97e7232..aadd2f1d 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 MEDIA_EXPORT FilterCollection { +class FilterCollection { public: FilterCollection(); ~FilterCollection(); diff --git a/media/base/filter_factories.h b/media/base/filter_factories.h index 4e34c0f..5286b3f 100644 --- a/media/base/filter_factories.h +++ b/media/base/filter_factories.h @@ -8,7 +8,6 @@ #include<string> #include "base/callback_old.h" -#include "media/base/media_export.h" #include "media/base/pipeline_status.h" namespace media { @@ -16,7 +15,7 @@ namespace media { class DataSource; // Asynchronous factory interface for building DataSource objects. -class MEDIA_EXPORT DataSourceFactory { +class DataSourceFactory { public: // Ownership of the DataSource is transferred through this callback. typedef Callback2<PipelineStatus, DataSource*>::Type BuildCallback; @@ -34,7 +33,7 @@ class MEDIA_EXPORT DataSourceFactory { class Demuxer; // Asynchronous factory interface for building Demuxer objects. -class MEDIA_EXPORT DemuxerFactory { +class 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 510e333..4bdad9f 100644 --- a/media/base/filter_host.h +++ b/media/base/filter_host.h @@ -22,7 +22,7 @@ namespace media { -class MEDIA_EXPORT FilterHost { +class 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 f0c95ff..1ce8682 100644 --- a/media/base/filters.h +++ b/media/base/filters.h @@ -32,7 +32,6 @@ #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" @@ -68,12 +67,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. -MEDIA_EXPORT void ResetAndRunCB(FilterStatusCB* cb, PipelineStatus status); +void ResetAndRunCB(FilterStatusCB* cb, PipelineStatus status); // Used for updating pipeline statistics. typedef Callback1<const PipelineStatistics&>::Type StatisticsCallback; -class MEDIA_EXPORT Filter : public base::RefCountedThreadSafe<Filter> { +class Filter : public base::RefCountedThreadSafe<Filter> { public: Filter(); @@ -131,7 +130,7 @@ class MEDIA_EXPORT Filter : public base::RefCountedThreadSafe<Filter> { DISALLOW_COPY_AND_ASSIGN(Filter); }; -class MEDIA_EXPORT DataSource : public Filter { +class DataSource : public Filter { public: typedef Callback1<size_t>::Type ReadCallback; static const size_t kReadError = static_cast<size_t>(-1); @@ -156,8 +155,7 @@ class MEDIA_EXPORT DataSource : public Filter { virtual void SetPreload(Preload preload) = 0; }; -class MEDIA_EXPORT DemuxerStream - : public base::RefCountedThreadSafe<DemuxerStream> { +class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> { public: typedef base::Callback<void(Buffer*)> ReadCallback; @@ -185,7 +183,7 @@ class MEDIA_EXPORT DemuxerStream virtual ~DemuxerStream(); }; -class MEDIA_EXPORT Demuxer : public Filter { +class 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; @@ -198,7 +196,7 @@ class MEDIA_EXPORT Demuxer : public Filter { }; -class MEDIA_EXPORT VideoDecoder : public Filter { +class VideoDecoder : public Filter { public: // Initialize a VideoDecoder with the given DemuxerStream, executing the // callback upon completion. @@ -247,7 +245,7 @@ class MEDIA_EXPORT VideoDecoder : public Filter { }; -class MEDIA_EXPORT AudioDecoder : public Filter { +class AudioDecoder : public Filter { public: // Initialize a AudioDecoder with the given DemuxerStream, executing the // callback upon completion. @@ -282,7 +280,7 @@ class MEDIA_EXPORT AudioDecoder : public Filter { }; -class MEDIA_EXPORT VideoRenderer : public Filter { +class VideoRenderer : public Filter { public: // Initialize a VideoRenderer with the given VideoDecoder, executing the // callback upon completion. @@ -295,7 +293,7 @@ class MEDIA_EXPORT VideoRenderer : public Filter { }; -class MEDIA_EXPORT AudioRenderer : public Filter { +class 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 4ef0966..bce1e23b 100644 --- a/media/base/h264_bitstream_converter.h +++ b/media/base/h264_bitstream_converter.h @@ -6,14 +6,13 @@ #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 MEDIA_EXPORT H264BitstreamConverter { +class H264BitstreamConverter { public: H264BitstreamConverter(); ~H264BitstreamConverter(); diff --git a/media/base/media.h b/media/base/media.h index 54e9662..6bbad4c 100644 --- a/media/base/media.h +++ b/media/base/media.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,8 +8,6 @@ #ifndef MEDIA_BASE_MEDIA_H_ #define MEDIA_BASE_MEDIA_H_ -#include "media/base/media_export.h" - class FilePath; namespace media { @@ -25,11 +23,11 @@ namespace media { // of the process. // // Returns true if everything was successfully initialized, false otherwise. -MEDIA_EXPORT bool InitializeMediaLibrary(const FilePath& module_dir); +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. -MEDIA_EXPORT bool IsMediaLibraryInitialized(); +bool IsMediaLibraryInitialized(); // Attempts to initialize OpenMAX library. // diff --git a/media/base/media_export.h b/media/base/media_export.h deleted file mode 100644 index 58a99d3..0000000 --- a/media/base/media_export.h +++ /dev/null @@ -1,29 +0,0 @@ -// 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_log.h b/media/base/media_log.h index 2bf7ccc..fcf0c31 100644 --- a/media/base/media_log.h +++ b/media/base/media_log.h @@ -7,12 +7,11 @@ #pragma once #include "base/memory/ref_counted.h" -#include "media/base/media_export.h" #include "media/base/media_log_event.h" namespace media { -class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> { +class MediaLog : public base::RefCountedThreadSafe<MediaLog> { public: // Return a string to represent an EventType. diff --git a/media/base/media_switches.h b/media/base/media_switches.h index 72005df..dcef120 100644 --- a/media/base/media_switches.h +++ b/media/base/media_switches.h @@ -8,7 +8,6 @@ #define MEDIA_BASE_MEDIA_SWITCHES_H_ #include "build/build_config.h" -#include "media/base/media_export.h" namespace switches { @@ -17,8 +16,8 @@ extern const char kAlsaOutputDevice[]; extern const char kAlsaInputDevice[]; #endif -MEDIA_EXPORT extern const char kEnableAdaptive[]; -MEDIA_EXPORT extern const char kVideoThreads[]; +extern const char kEnableAdaptive[]; +extern const char kVideoThreads[]; } // namespace switches diff --git a/media/base/message_loop_factory.h b/media/base/message_loop_factory.h index 7227840..35078ed 100644 --- a/media/base/message_loop_factory.h +++ b/media/base/message_loop_factory.h @@ -10,14 +10,13 @@ #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 MEDIA_EXPORT MessageLoopFactory { +class 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 f5b5c06..821cd66 100644 --- a/media/base/message_loop_factory_impl.h +++ b/media/base/message_loop_factory_impl.h @@ -13,7 +13,7 @@ namespace media { -class MEDIA_EXPORT MessageLoopFactoryImpl : public MessageLoopFactory { +class MessageLoopFactoryImpl : public MessageLoopFactory { public: MessageLoopFactoryImpl(); diff --git a/media/base/pipeline.h b/media/base/pipeline.h index 9488526..9686bb6 100644 --- a/media/base/pipeline.h +++ b/media/base/pipeline.h @@ -21,7 +21,7 @@ class TimeDelta; namespace media { -MEDIA_EXPORT extern const char kRawMediaScheme[]; +extern const char kRawMediaScheme[]; struct PipelineStatistics { PipelineStatistics() : @@ -39,7 +39,7 @@ struct PipelineStatistics { class FilterCollection; -class MEDIA_EXPORT Pipeline : public base::RefCountedThreadSafe<Pipeline> { +class 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 d8b4da2..caf4e19f 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 MEDIA_EXPORT PipelineStatusNotification { +class PipelineStatusNotification { public: PipelineStatusNotification(); ~PipelineStatusNotification(); @@ -91,7 +91,7 @@ class MEDIA_EXPORT 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 MEDIA_EXPORT PipelineImpl : public Pipeline, public FilterHost { +class 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 5e7f3be..11a3dbc 100644 --- a/media/base/pts_heap.h +++ b/media/base/pts_heap.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,11 +31,10 @@ #include <vector> #include "base/time.h" -#include "media/base/media_export.h" namespace media { -class MEDIA_EXPORT PtsHeap { +class PtsHeap { public: PtsHeap(); ~PtsHeap(); diff --git a/media/base/pts_stream.h b/media/base/pts_stream.h index 095ae7f..f3a6e95 100644 --- a/media/base/pts_stream.h +++ b/media/base/pts_stream.h @@ -25,7 +25,7 @@ namespace media { class StreamSample; -class MEDIA_EXPORT PtsStream { +class PtsStream { public: PtsStream(); ~PtsStream(); diff --git a/media/base/seekable_buffer.h b/media/base/seekable_buffer.h index b32abfe..cad9be5 100644 --- a/media/base/seekable_buffer.h +++ b/media/base/seekable_buffer.h @@ -41,7 +41,7 @@ namespace media { -class MEDIA_EXPORT SeekableBuffer { +class 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 07ce514..779646f 100644 --- a/media/base/state_matrix.h +++ b/media/base/state_matrix.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,11 +8,10 @@ #include <map> #include "base/logging.h" -#include "media/base/media_export.h" namespace media { -class MEDIA_EXPORT StateMatrix { +class StateMatrix { public: StateMatrix(); ~StateMatrix(); diff --git a/media/base/video_decoder_config.h b/media/base/video_decoder_config.h index 31aa12c..a077312 100644 --- a/media/base/video_decoder_config.h +++ b/media/base/video_decoder_config.h @@ -7,7 +7,6 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "media/base/media_export.h" namespace media { @@ -26,7 +25,7 @@ enum VideoCodec { // that uses said codec in the same CL. }; -class MEDIA_EXPORT VideoDecoderConfig { +class 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 50ea32b..529b9ee 100644 --- a/media/base/video_frame.h +++ b/media/base/video_frame.h @@ -9,7 +9,7 @@ namespace media { -class MEDIA_EXPORT VideoFrame : public StreamSample { +class 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 7ffef74..fa40984 100644 --- a/media/base/video_util.h +++ b/media/base/video_util.h @@ -6,7 +6,6 @@ #define MEDIA_BASE_VIDEO_UTIL_H_ #include "base/basictypes.h" -#include "media/base/media_export.h" namespace media { @@ -16,12 +15,9 @@ class VideoFrame; // source and destinations dimensions. // // NOTE: rows is *not* the same as height! -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); +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); } // namespace media diff --git a/media/base/yuv_convert.h b/media/base/yuv_convert.h index 20ba0aa..12dab83 100644 --- a/media/base/yuv_convert.h +++ b/media/base/yuv_convert.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,7 +93,6 @@ 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 dec47df..5ac0607 100644 --- a/media/ffmpeg/ffmpeg_common.h +++ b/media/ffmpeg/ffmpeg_common.h @@ -12,7 +12,6 @@ #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. @@ -55,15 +54,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. -MEDIA_EXPORT base::TimeDelta ConvertFromTimeBase(const AVRational& time_base, - int64 timestamp); +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. -MEDIA_EXPORT int64 ConvertToTimeBase(const AVRational& time_base, - const base::TimeDelta& timestamp); +int64 ConvertToTimeBase(const AVRational& time_base, + const base::TimeDelta& timestamp); VideoCodec CodecIDToVideoCodec(CodecID codec_id); CodecID VideoCodecToCodecID(VideoCodec video_codec); @@ -81,9 +80,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. -MEDIA_EXPORT bool GetSeekTimeAfter(AVStream* stream, - const base::TimeDelta& timestamp, - base::TimeDelta* seek_time); +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. @@ -98,12 +97,12 @@ MEDIA_EXPORT 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| -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); +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 7c16c4b..ed37467 100644 --- a/media/ffmpeg/file_protocol.h +++ b/media/ffmpeg/file_protocol.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,9 +8,7 @@ #ifndef MEDIA_FFMPEG_FILE_PROTOCOL_H_ #define MEDIA_FFMPEG_FILE_PROTOCOL_H_ -#include "media/base/media_export.h" - struct URLProtocol; -MEDIA_EXPORT extern URLProtocol kFFmpegFileProtocol; +extern URLProtocol kFFmpegFileProtocol; #endif // MEDIA_FFMPEG_FILE_PROTOCOL_H_ diff --git a/media/filters/adaptive_demuxer.h b/media/filters/adaptive_demuxer.h index 2a52b11..73fd7b6 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 MEDIA_EXPORT AdaptiveDemuxerFactory : public DemuxerFactory { +class AdaptiveDemuxerFactory : public DemuxerFactory { public: // Takes a reference to |demuxer_factory|. AdaptiveDemuxerFactory(DemuxerFactory* delegate_factory); @@ -260,11 +260,6 @@ class MEDIA_EXPORT 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 a6fcf79..3d8b31a 100644 --- a/media/filters/adaptive_demuxer_unittest.cc +++ b/media/filters/adaptive_demuxer_unittest.cc @@ -8,6 +8,10 @@ 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 6a3fd89..88a484c 100644 --- a/media/filters/audio_file_reader.h +++ b/media/filters/audio_file_reader.h @@ -18,7 +18,7 @@ namespace media { class FFmpegURLProtocol; -class MEDIA_EXPORT AudioFileReader { +class 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 e35e209..f6ead0d 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 MEDIA_EXPORT AudioRendererAlgorithmBase { +class 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 88fd305..ac98f684 100644 --- a/media/filters/audio_renderer_algorithm_ola.h +++ b/media/filters/audio_renderer_algorithm_ola.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,8 +19,7 @@ namespace media { -class MEDIA_EXPORT AudioRendererAlgorithmOLA - : public AudioRendererAlgorithmBase { +class AudioRendererAlgorithmOLA : public AudioRendererAlgorithmBase { public: AudioRendererAlgorithmOLA(); virtual ~AudioRendererAlgorithmOLA(); diff --git a/media/filters/audio_renderer_base.h b/media/filters/audio_renderer_base.h index 5305c7b..1882743 100644 --- a/media/filters/audio_renderer_base.h +++ b/media/filters/audio_renderer_base.h @@ -27,7 +27,7 @@ namespace media { -class MEDIA_EXPORT AudioRendererBase : public AudioRenderer { +class AudioRendererBase : public AudioRenderer { public: AudioRendererBase(); virtual ~AudioRendererBase(); diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h index f52913d..1e33822 100644 --- a/media/filters/audio_renderer_impl.h +++ b/media/filters/audio_renderer_impl.h @@ -24,7 +24,7 @@ namespace media { -class MEDIA_EXPORT AudioRendererImpl +class AudioRendererImpl : public AudioRendererBase, public AudioOutputStream::AudioSourceCallback { public: diff --git a/media/filters/bitstream_converter.h b/media/filters/bitstream_converter.h index d7b553f..a1ca3c6 100644 --- a/media/filters/bitstream_converter.h +++ b/media/filters/bitstream_converter.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,7 +14,6 @@ #include "base/basictypes.h" #include "base/gtest_prod_util.h" -#include "media/base/media_export.h" // FFmpeg types. struct AVBitStreamFilterContext; @@ -23,7 +22,7 @@ struct AVPacket; namespace media { -class MEDIA_EXPORT BitstreamConverter { +class BitstreamConverter { public: BitstreamConverter() {} virtual ~BitstreamConverter() {} @@ -54,7 +53,7 @@ class IdentityBitstreamConverter : public BitstreamConverter { DISALLOW_COPY_AND_ASSIGN(IdentityBitstreamConverter); }; -class MEDIA_EXPORT FFmpegBitstreamConverter : public BitstreamConverter { +class 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 298fecd..84e224d 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 MEDIA_EXPORT ChunkDemuxer : public Demuxer { +class 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 6eba933..a3d004a 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 MEDIA_EXPORT ChunkDemuxerFactory : public DemuxerFactory { +class 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 1025083..72978bc 100644 --- a/media/filters/ffmpeg_audio_decoder.h +++ b/media/filters/ffmpeg_audio_decoder.h @@ -14,8 +14,7 @@ namespace media { // Forward declaration for scoped_ptr_malloc. class ScopedPtrAVFree; -class MEDIA_EXPORT FFmpegAudioDecoder - : public DecoderBase<AudioDecoder, Buffer> { +class 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 7dea4b5..4ab7690 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 MEDIA_EXPORT FFmpegDemuxer : public Demuxer, public FFmpegURLProtocol { +class 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 37a5f43..b467d75 100644 --- a/media/filters/ffmpeg_demuxer_factory.h +++ b/media/filters/ffmpeg_demuxer_factory.h @@ -15,7 +15,7 @@ class MessageLoop; namespace media { -class MEDIA_EXPORT FFmpegDemuxerFactory : public DemuxerFactory { +class 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 c51000a..a98c502 100644 --- a/media/filters/ffmpeg_glue.h +++ b/media/filters/ffmpeg_glue.h @@ -31,11 +31,10 @@ #include "base/memory/singleton.h" #include "base/synchronization/lock.h" -#include "media/base/media_export.h" namespace media { -class MEDIA_EXPORT FFmpegURLProtocol { +class FFmpegURLProtocol { public: FFmpegURLProtocol() { } @@ -65,7 +64,7 @@ class MEDIA_EXPORT FFmpegURLProtocol { DISALLOW_COPY_AND_ASSIGN(FFmpegURLProtocol); }; -class MEDIA_EXPORT FFmpegGlue { +class 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 e27cc60..69d8e4c 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 MEDIA_EXPORT FFmpegH264BitstreamConverter : public BitstreamConverter { +class 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 7458ff7..fbf6210 100644 --- a/media/filters/ffmpeg_video_decoder.h +++ b/media/filters/ffmpeg_video_decoder.h @@ -19,7 +19,7 @@ namespace media { class VideoDecodeEngine; -class MEDIA_EXPORT FFmpegVideoDecoder +class FFmpegVideoDecoder : public VideoDecoder, public VideoDecodeEngine::EventHandler { public: diff --git a/media/filters/file_data_source.h b/media/filters/file_data_source.h index d463f4d..10e61aa 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 MEDIA_EXPORT FileDataSource : public DataSource { +class 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 94b056c..18c0587 100644 --- a/media/filters/file_data_source_factory.h +++ b/media/filters/file_data_source_factory.h @@ -9,7 +9,7 @@ namespace media { -class MEDIA_EXPORT FileDataSourceFactory : public DataSourceFactory { +class 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 7a5c468..7bad5e3 100644 --- a/media/filters/in_memory_url_protocol.h +++ b/media/filters/in_memory_url_protocol.h @@ -5,9 +5,10 @@ #ifndef MEDIA_FILTERS_IN_MEMORY_URL_PROTOCOL_H_ #define MEDIA_FILTERS_IN_MEMORY_URL_PROTOCOL_H_ -#include "base/basictypes.h" #include "media/filters/ffmpeg_glue.h" +#include "base/basictypes.h" + namespace media { // Simple FFmpegURLProtocol that reads from a buffer. @@ -15,7 +16,7 @@ namespace media { // buffer pointer passed into the constructor // needs to remain valid for the entire lifetime of // this object. -class MEDIA_EXPORT InMemoryUrlProtocol : public FFmpegURLProtocol { +class 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 f330c77..28e79b5 100644 --- a/media/filters/null_audio_renderer.h +++ b/media/filters/null_audio_renderer.h @@ -23,7 +23,7 @@ namespace media { -class MEDIA_EXPORT NullAudioRenderer +class 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 3dd12bc..d4a064c 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 MEDIA_EXPORT VideoRendererBase +class VideoRendererBase : public VideoRenderer, public base::PlatformThread::Delegate { public: diff --git a/media/media.gyp b/media/media.gyp index e1d1bd0..d93ad41 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -9,7 +9,7 @@ 'targets': [ { 'target_name': 'media', - 'type': '<(component)', + 'type': 'static_library', 'dependencies': [ 'yuv_convert', '../base/base.gyp:base', @@ -17,10 +17,6 @@ '../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': [ '..', @@ -108,7 +104,6 @@ 'base/h264_bitstream_converter.cc', 'base/h264_bitstream_converter.h', 'base/media.h', - 'base/media_export.h', 'base/media_log.cc', 'base/media_log.h', 'base/media_log_event.h', @@ -397,7 +392,6 @@ 'dependencies': [ 'media', 'media_test_support', - 'yuv_convert', '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../base/base.gyp:test_support_base', @@ -506,7 +500,6 @@ 'type': 'executable', 'dependencies': [ 'media', - 'yuv_convert', '../base/base.gyp:base', '../skia/skia.gyp:skia', ], @@ -553,9 +546,7 @@ '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', @@ -607,7 +598,6 @@ 'type': 'executable', 'dependencies': [ 'media', - 'yuv_convert', '../base/base.gyp:base', ], 'include_dirs': [ @@ -633,7 +623,6 @@ 'type': 'executable', 'dependencies': [ 'media', - 'yuv_convert', '../base/base.gyp:base', '../ui/gfx/gl/gl.gyp:gl', ], @@ -700,7 +689,6 @@ '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 d73000d..582e55f 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 MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice { +class 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 5069fc4..a2d4ddd 100644 --- a/media/video/capture/video_capture_device.h +++ b/media/video/capture/video_capture_device.h @@ -16,11 +16,10 @@ #include <string> #include "base/time.h" -#include "media/base/media_export.h" namespace media { -class MEDIA_EXPORT VideoCaptureDevice { +class VideoCaptureDevice { public: struct Name { diff --git a/media/video/capture/video_capture_proxy.h b/media/video/capture/video_capture_proxy.h index 8be8474..3e51fd4 100644 --- a/media/video/capture/video_capture_proxy.h +++ b/media/video/capture/video_capture_proxy.h @@ -25,8 +25,7 @@ namespace media { // state from the "main thread" is fundamentally racy. Instead this class keeps // track of the state every time it is called by the VideoCapture (on the VC // thread), and forwards that information to the main thread. -class MEDIA_EXPORT VideoCaptureHandlerProxy - : public VideoCapture::EventHandler { +class VideoCaptureHandlerProxy : public VideoCapture::EventHandler { public: struct VideoCaptureState { VideoCaptureState() : started(false), width(0), height(0), frame_rate(0) {} diff --git a/media/video/ffmpeg_video_decode_engine.h b/media/video/ffmpeg_video_decode_engine.h index ebea8df..32eac45 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 MEDIA_EXPORT FFmpegVideoDecodeEngine : public VideoDecodeEngine { +class FFmpegVideoDecodeEngine : public VideoDecodeEngine { public: FFmpegVideoDecodeEngine(); virtual ~FFmpegVideoDecodeEngine(); diff --git a/media/video/picture.h b/media/video/picture.h index e3ecb9e..10cf47c 100644 --- a/media/video/picture.h +++ b/media/video/picture.h @@ -6,7 +6,6 @@ #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" @@ -14,7 +13,7 @@ namespace media { // A picture buffer that is composed of a GLES2 texture. // This is the media-namespace equivalent of PP_PictureBuffer_Dev. -class MEDIA_EXPORT PictureBuffer { +class PictureBuffer { public: PictureBuffer(int32 id, gfx::Size size, uint32 texture_id); @@ -43,7 +42,7 @@ class MEDIA_EXPORT PictureBuffer { // A decoded picture frame. // This is the media-namespace equivalent of PP_Picture_Dev. -class MEDIA_EXPORT Picture { +class 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 799dca7..7ce1785 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 MEDIA_EXPORT VideoDecodeAccelerator +class 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 43af3cb..fb6933d 100644 --- a/media/video/video_decode_engine.h +++ b/media/video/video_decode_engine.h @@ -7,7 +7,6 @@ #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" @@ -31,9 +30,9 @@ struct VideoCodecInfo { uint32 surface_height; }; -class MEDIA_EXPORT VideoDecodeEngine { +class VideoDecodeEngine { public: - struct MEDIA_EXPORT EventHandler { + struct EventHandler { public: virtual ~EventHandler() {} virtual void OnInitializeComplete(const VideoCodecInfo& info) = 0; diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index f814e4f..3524188 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -213,6 +213,15 @@ 'host/plugin/host_plugin.rc', ], }], + ['target_arch=="arm"', { + 'dependencies': [ + '../third_party/libvpx/libvpx.gyp:libvpx_lib', + ], + }, { + 'dependencies': [ + '../third_party/libvpx/libvpx.gyp:libvpx', + ], + }], ], }, # end of target 'remoting_host_plugin' { @@ -335,19 +344,12 @@ ], 'conditions': [ ['target_arch=="arm"', { - 'dependencies': [ - '../third_party/libvpx/libvpx.gyp:libvpx_lib', - ], 'sources!': [ 'base/decoder_vp8.cc', 'base/decoder_vp8.h', 'base/encoder_vp8.cc', 'base/encoder_vp8.h', ], - }, { - 'dependencies': [ - '../third_party/libvpx/libvpx.gyp:libvpx', - ], }], ], }, # end of target 'remoting_base' diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index ef333b32..0344333 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -104,9 +104,8 @@ 'type': 'static_library', 'dependencies': [ '<(DEPTH)/base/base.gyp:base_i18n', - '<(DEPTH)/base/base.gyp:base_static', + '<(DEPTH)/base/base.gyp:base_static', '<(DEPTH)/gpu/gpu.gyp:gles2_implementation', - '<(DEPTH)/media/media.gyp:yuv_convert', '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/ppapi/ppapi.gyp:ppapi_c', '<(DEPTH)/ppapi/ppapi_internal.gyp:ppapi_shared', |