From e9f402a3287723d7ca1f40bbbc7821bcc47aec46 Mon Sep 17 00:00:00 2001 From: Kongqun Yang Date: Thu, 7 May 2015 14:06:16 -0700 Subject: [PATCH] Drop media::event namespace Change-Id: I736a645a604a22ef5ce969aeb7533e003a386172 --- packager/app/packager_main.cc | 4 ---- packager/media/base/muxer.cc | 2 +- packager/media/base/muxer.h | 6 +++--- packager/media/event/mpd_notify_muxer_listener.cc | 2 -- packager/media/event/mpd_notify_muxer_listener.h | 2 -- packager/media/event/muxer_listener.h | 3 --- packager/media/event/muxer_listener_internal.cc | 2 -- packager/media/event/muxer_listener_internal.h | 2 -- .../media/event/vod_media_info_dump_muxer_listener.cc | 2 -- .../media/event/vod_media_info_dump_muxer_listener.h | 2 -- .../event/vod_media_info_dump_muxer_listener_unittest.cc | 2 -- packager/media/formats/mp4/mp4_muxer.cc | 2 +- packager/media/formats/mp4/segmenter.cc | 2 +- packager/media/formats/mp4/segmenter.h | 9 +++------ 14 files changed, 9 insertions(+), 33 deletions(-) diff --git a/packager/app/packager_main.cc b/packager/app/packager_main.cc index 2e9f1aeaac..8be8a8fc18 100644 --- a/packager/app/packager_main.cc +++ b/packager/app/packager_main.cc @@ -65,10 +65,6 @@ enum ExitStatus { namespace edash_packager { namespace media { -using event::MpdNotifyMuxerListener; -using event::MuxerListener; -using event::VodMediaInfoDumpMuxerListener; - // Demux, Mux(es) and worker thread used to remux a source file/stream. class RemuxJob : public base::SimpleThread { public: diff --git a/packager/media/base/muxer.cc b/packager/media/base/muxer.cc index 65f69e817f..8e084e7169 100644 --- a/packager/media/base/muxer.cc +++ b/packager/media/base/muxer.cc @@ -79,7 +79,7 @@ void Muxer::Cancel() { cancelled_ = true; } -void Muxer::SetMuxerListener(scoped_ptr muxer_listener) { +void Muxer::SetMuxerListener(scoped_ptr muxer_listener) { muxer_listener_ = muxer_listener.Pass(); } diff --git a/packager/media/base/muxer.h b/packager/media/base/muxer.h index d91926c21a..ddf0fd282c 100644 --- a/packager/media/base/muxer.h +++ b/packager/media/base/muxer.h @@ -60,7 +60,7 @@ class Muxer { /// Set a MuxerListener event handler for this object. /// @param muxer_listener should not be NULL. - void SetMuxerListener(scoped_ptr muxer_listener); + void SetMuxerListener(scoped_ptr muxer_listener); const std::vector& streams() const { return streams_; } @@ -84,7 +84,7 @@ class Muxer { double crypto_period_duration_in_seconds() const { return crypto_period_duration_in_seconds_; } - event::MuxerListener* muxer_listener() { return muxer_listener_.get(); } + MuxerListener* muxer_listener() { return muxer_listener_.get(); } base::Clock* clock() { return clock_; } private: @@ -113,7 +113,7 @@ class Muxer { double crypto_period_duration_in_seconds_; bool cancelled_; - scoped_ptr muxer_listener_; + scoped_ptr muxer_listener_; // An external injected clock, can be NULL. base::Clock* clock_; diff --git a/packager/media/event/mpd_notify_muxer_listener.cc b/packager/media/event/mpd_notify_muxer_listener.cc index 8a4651ecb3..e786b076fb 100644 --- a/packager/media/event/mpd_notify_muxer_listener.cc +++ b/packager/media/event/mpd_notify_muxer_listener.cc @@ -17,7 +17,6 @@ namespace edash_packager { namespace media { -namespace event { MpdNotifyMuxerListener::MpdNotifyMuxerListener(MpdNotifier* mpd_notifier) : mpd_notifier_(mpd_notifier), notification_id_(0) { @@ -103,6 +102,5 @@ void MpdNotifyMuxerListener::OnNewSegment(uint64_t start_time, notification_id_, start_time, duration, segment_file_size); } -} // namespace event } // namespace media } // namespace edash_packager diff --git a/packager/media/event/mpd_notify_muxer_listener.h b/packager/media/event/mpd_notify_muxer_listener.h index 68f7ec4e05..0ca94ac166 100644 --- a/packager/media/event/mpd_notify_muxer_listener.h +++ b/packager/media/event/mpd_notify_muxer_listener.h @@ -22,7 +22,6 @@ class MediaInfo; class MpdNotifier; namespace media { -namespace event { class MpdNotifyMuxerListener : public MuxerListener { public: @@ -66,7 +65,6 @@ class MpdNotifyMuxerListener : public MuxerListener { DISALLOW_COPY_AND_ASSIGN(MpdNotifyMuxerListener); }; -} // namespace event } // namespace media } // namespace edash_packager diff --git a/packager/media/event/muxer_listener.h b/packager/media/event/muxer_listener.h index ae93c962f4..846faff178 100644 --- a/packager/media/event/muxer_listener.h +++ b/packager/media/event/muxer_listener.h @@ -19,8 +19,6 @@ namespace media { class StreamInfo; struct MuxerOptions; -namespace event { - class MuxerListener { public: enum ContainerType { @@ -75,7 +73,6 @@ class MuxerListener { MuxerListener() {}; }; -} // namespace event } // namespace media } // namespace edash_packager diff --git a/packager/media/event/muxer_listener_internal.cc b/packager/media/event/muxer_listener_internal.cc index 927eb901ea..6c5b77dc06 100644 --- a/packager/media/event/muxer_listener_internal.cc +++ b/packager/media/event/muxer_listener_internal.cc @@ -16,7 +16,6 @@ namespace edash_packager { namespace media { -namespace event { namespace internal { namespace { @@ -242,6 +241,5 @@ bool AddContentProtectionElements(MuxerListener::ContainerType container_type, } } // namespace internal -} // namespace event } // namespace media } // namespace edash_packager diff --git a/packager/media/event/muxer_listener_internal.h b/packager/media/event/muxer_listener_internal.h index 9fa5e9cc3f..8348057536 100644 --- a/packager/media/event/muxer_listener_internal.h +++ b/packager/media/event/muxer_listener_internal.h @@ -23,7 +23,6 @@ namespace media { class StreamInfo; struct MuxerOptions; -namespace event { namespace internal { /// @param[out] media_info points to the MediaInfo object to be filled. @@ -56,7 +55,6 @@ bool AddContentProtectionElements(MuxerListener::ContainerType container_type, MediaInfo* media_info); } // namespace internal -} // namespace event } // namespace media } // namespace edash_packager #endif // MEDIA_EVENT_MUXER_LISTENER_INTERNAL_H_ diff --git a/packager/media/event/vod_media_info_dump_muxer_listener.cc b/packager/media/event/vod_media_info_dump_muxer_listener.cc index 8a8e135d41..4e786da5a4 100644 --- a/packager/media/event/vod_media_info_dump_muxer_listener.cc +++ b/packager/media/event/vod_media_info_dump_muxer_listener.cc @@ -17,7 +17,6 @@ namespace edash_packager { namespace media { -namespace event { VodMediaInfoDumpMuxerListener::VodMediaInfoDumpMuxerListener( const std::string& output_file_name) @@ -110,6 +109,5 @@ bool VodMediaInfoDumpMuxerListener::SerializeMediaInfoToFile() { return true; } -} // namespace event } // namespace media } // namespace edash_packager diff --git a/packager/media/event/vod_media_info_dump_muxer_listener.h b/packager/media/event/vod_media_info_dump_muxer_listener.h index 09d67eea54..d17c390d5b 100644 --- a/packager/media/event/vod_media_info_dump_muxer_listener.h +++ b/packager/media/event/vod_media_info_dump_muxer_listener.h @@ -24,7 +24,6 @@ namespace edash_packager { class MediaInfo; namespace media { -namespace event { class VodMediaInfoDumpMuxerListener : public MuxerListener { public: @@ -68,7 +67,6 @@ class VodMediaInfoDumpMuxerListener : public MuxerListener { DISALLOW_COPY_AND_ASSIGN(VodMediaInfoDumpMuxerListener); }; -} // namespace event } // namespace media } // namespace edash_packager diff --git a/packager/media/event/vod_media_info_dump_muxer_listener_unittest.cc b/packager/media/event/vod_media_info_dump_muxer_listener_unittest.cc index 10ab513556..7f11b2c5ab 100644 --- a/packager/media/event/vod_media_info_dump_muxer_listener_unittest.cc +++ b/packager/media/event/vod_media_info_dump_muxer_listener_unittest.cc @@ -24,7 +24,6 @@ const bool kEnableEncryption = true; namespace edash_packager { namespace media { -namespace event { namespace { struct VideoStreamInfoParameters { @@ -285,6 +284,5 @@ TEST_F(VodMediaInfoDumpMuxerListenerTest, EncryptedStream_Normal) { ASSERT_NO_FATAL_FAILURE(ExpectTempFileToEqual(kExpectedProtobufOutput)); } -} // namespace event } // namespace media } // namespace edash_packager diff --git a/packager/media/formats/mp4/mp4_muxer.cc b/packager/media/formats/mp4/mp4_muxer.cc index e9f0063a9d..96709d6194 100644 --- a/packager/media/formats/mp4/mp4_muxer.cc +++ b/packager/media/formats/mp4/mp4_muxer.cc @@ -247,7 +247,7 @@ void MP4Muxer::FireOnMediaStartEvent() { muxer_listener()->OnMediaStart(options(), stream_info_vec, timescale, - event::MuxerListener::kContainerMp4, + MuxerListener::kContainerMp4, encryption_key_source() != NULL); } diff --git a/packager/media/formats/mp4/segmenter.cc b/packager/media/formats/mp4/segmenter.cc index 1fb757cec4..eefac71ffd 100644 --- a/packager/media/formats/mp4/segmenter.cc +++ b/packager/media/formats/mp4/segmenter.cc @@ -128,7 +128,7 @@ Segmenter::Segmenter(const MuxerOptions& options, Segmenter::~Segmenter() { STLDeleteElements(&fragmenters_); } Status Segmenter::Initialize(const std::vector& streams, - event::MuxerListener* muxer_listener, + MuxerListener* muxer_listener, KeySource* encryption_key_source, uint32_t max_sd_pixels, double clear_lead_in_seconds, diff --git a/packager/media/formats/mp4/segmenter.h b/packager/media/formats/mp4/segmenter.h index ea573df5ac..9fdaa9ec46 100644 --- a/packager/media/formats/mp4/segmenter.h +++ b/packager/media/formats/mp4/segmenter.h @@ -23,10 +23,7 @@ class BufferWriter; class KeySource; class MediaSample; class MediaStream; - -namespace event { class MuxerListener; -} // namespace event namespace mp4 { @@ -64,7 +61,7 @@ class Segmenter { /// @param crypto_period_duration specifies crypto period duration in seconds. /// @return OK on success, an error status otherwise. Status Initialize(const std::vector& streams, - event::MuxerListener* muxer_listener, + MuxerListener* muxer_listener, KeySource* encryption_key_source, uint32_t max_sd_pixels, double clear_lead_in_seconds, @@ -101,7 +98,7 @@ class Segmenter { Movie* moov() { return moov_.get(); } BufferWriter* fragment_buffer() { return fragment_buffer_.get(); } SegmentIndex* sidx() { return sidx_.get(); } - event::MuxerListener* muxer_listener() { return muxer_listener_; } + MuxerListener* muxer_listener() { return muxer_listener_; } private: virtual Status DoInitialize() = 0; @@ -125,7 +122,7 @@ class Segmenter { std::map stream_map_; bool segment_initialized_; bool end_of_segment_; - event::MuxerListener* muxer_listener_; + MuxerListener* muxer_listener_; DISALLOW_COPY_AND_ASSIGN(Segmenter); };