Drop media::event namespace

Change-Id: I736a645a604a22ef5ce969aeb7533e003a386172
This commit is contained in:
Kongqun Yang 2015-05-07 14:06:16 -07:00
parent 71e39e40ad
commit e9f402a328
14 changed files with 9 additions and 33 deletions

View File

@ -65,10 +65,6 @@ enum ExitStatus {
namespace edash_packager { namespace edash_packager {
namespace media { namespace media {
using event::MpdNotifyMuxerListener;
using event::MuxerListener;
using event::VodMediaInfoDumpMuxerListener;
// Demux, Mux(es) and worker thread used to remux a source file/stream. // Demux, Mux(es) and worker thread used to remux a source file/stream.
class RemuxJob : public base::SimpleThread { class RemuxJob : public base::SimpleThread {
public: public:

View File

@ -79,7 +79,7 @@ void Muxer::Cancel() {
cancelled_ = true; cancelled_ = true;
} }
void Muxer::SetMuxerListener(scoped_ptr<event::MuxerListener> muxer_listener) { void Muxer::SetMuxerListener(scoped_ptr<MuxerListener> muxer_listener) {
muxer_listener_ = muxer_listener.Pass(); muxer_listener_ = muxer_listener.Pass();
} }

View File

@ -60,7 +60,7 @@ class Muxer {
/// Set a MuxerListener event handler for this object. /// Set a MuxerListener event handler for this object.
/// @param muxer_listener should not be NULL. /// @param muxer_listener should not be NULL.
void SetMuxerListener(scoped_ptr<event::MuxerListener> muxer_listener); void SetMuxerListener(scoped_ptr<MuxerListener> muxer_listener);
const std::vector<MediaStream*>& streams() const { return streams_; } const std::vector<MediaStream*>& streams() const { return streams_; }
@ -84,7 +84,7 @@ class Muxer {
double crypto_period_duration_in_seconds() const { double crypto_period_duration_in_seconds() const {
return crypto_period_duration_in_seconds_; 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_; } base::Clock* clock() { return clock_; }
private: private:
@ -113,7 +113,7 @@ class Muxer {
double crypto_period_duration_in_seconds_; double crypto_period_duration_in_seconds_;
bool cancelled_; bool cancelled_;
scoped_ptr<event::MuxerListener> muxer_listener_; scoped_ptr<MuxerListener> muxer_listener_;
// An external injected clock, can be NULL. // An external injected clock, can be NULL.
base::Clock* clock_; base::Clock* clock_;

View File

@ -17,7 +17,6 @@
namespace edash_packager { namespace edash_packager {
namespace media { namespace media {
namespace event {
MpdNotifyMuxerListener::MpdNotifyMuxerListener(MpdNotifier* mpd_notifier) MpdNotifyMuxerListener::MpdNotifyMuxerListener(MpdNotifier* mpd_notifier)
: mpd_notifier_(mpd_notifier), notification_id_(0) { : 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); notification_id_, start_time, duration, segment_file_size);
} }
} // namespace event
} // namespace media } // namespace media
} // namespace edash_packager } // namespace edash_packager

View File

@ -22,7 +22,6 @@ class MediaInfo;
class MpdNotifier; class MpdNotifier;
namespace media { namespace media {
namespace event {
class MpdNotifyMuxerListener : public MuxerListener { class MpdNotifyMuxerListener : public MuxerListener {
public: public:
@ -66,7 +65,6 @@ class MpdNotifyMuxerListener : public MuxerListener {
DISALLOW_COPY_AND_ASSIGN(MpdNotifyMuxerListener); DISALLOW_COPY_AND_ASSIGN(MpdNotifyMuxerListener);
}; };
} // namespace event
} // namespace media } // namespace media
} // namespace edash_packager } // namespace edash_packager

View File

@ -19,8 +19,6 @@ namespace media {
class StreamInfo; class StreamInfo;
struct MuxerOptions; struct MuxerOptions;
namespace event {
class MuxerListener { class MuxerListener {
public: public:
enum ContainerType { enum ContainerType {
@ -75,7 +73,6 @@ class MuxerListener {
MuxerListener() {}; MuxerListener() {};
}; };
} // namespace event
} // namespace media } // namespace media
} // namespace edash_packager } // namespace edash_packager

View File

@ -16,7 +16,6 @@
namespace edash_packager { namespace edash_packager {
namespace media { namespace media {
namespace event {
namespace internal { namespace internal {
namespace { namespace {
@ -242,6 +241,5 @@ bool AddContentProtectionElements(MuxerListener::ContainerType container_type,
} }
} // namespace internal } // namespace internal
} // namespace event
} // namespace media } // namespace media
} // namespace edash_packager } // namespace edash_packager

View File

@ -23,7 +23,6 @@ namespace media {
class StreamInfo; class StreamInfo;
struct MuxerOptions; struct MuxerOptions;
namespace event {
namespace internal { namespace internal {
/// @param[out] media_info points to the MediaInfo object to be filled. /// @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); MediaInfo* media_info);
} // namespace internal } // namespace internal
} // namespace event
} // namespace media } // namespace media
} // namespace edash_packager } // namespace edash_packager
#endif // MEDIA_EVENT_MUXER_LISTENER_INTERNAL_H_ #endif // MEDIA_EVENT_MUXER_LISTENER_INTERNAL_H_

View File

@ -17,7 +17,6 @@
namespace edash_packager { namespace edash_packager {
namespace media { namespace media {
namespace event {
VodMediaInfoDumpMuxerListener::VodMediaInfoDumpMuxerListener( VodMediaInfoDumpMuxerListener::VodMediaInfoDumpMuxerListener(
const std::string& output_file_name) const std::string& output_file_name)
@ -110,6 +109,5 @@ bool VodMediaInfoDumpMuxerListener::SerializeMediaInfoToFile() {
return true; return true;
} }
} // namespace event
} // namespace media } // namespace media
} // namespace edash_packager } // namespace edash_packager

View File

@ -24,7 +24,6 @@ namespace edash_packager {
class MediaInfo; class MediaInfo;
namespace media { namespace media {
namespace event {
class VodMediaInfoDumpMuxerListener : public MuxerListener { class VodMediaInfoDumpMuxerListener : public MuxerListener {
public: public:
@ -68,7 +67,6 @@ class VodMediaInfoDumpMuxerListener : public MuxerListener {
DISALLOW_COPY_AND_ASSIGN(VodMediaInfoDumpMuxerListener); DISALLOW_COPY_AND_ASSIGN(VodMediaInfoDumpMuxerListener);
}; };
} // namespace event
} // namespace media } // namespace media
} // namespace edash_packager } // namespace edash_packager

View File

@ -24,7 +24,6 @@ const bool kEnableEncryption = true;
namespace edash_packager { namespace edash_packager {
namespace media { namespace media {
namespace event {
namespace { namespace {
struct VideoStreamInfoParameters { struct VideoStreamInfoParameters {
@ -285,6 +284,5 @@ TEST_F(VodMediaInfoDumpMuxerListenerTest, EncryptedStream_Normal) {
ASSERT_NO_FATAL_FAILURE(ExpectTempFileToEqual(kExpectedProtobufOutput)); ASSERT_NO_FATAL_FAILURE(ExpectTempFileToEqual(kExpectedProtobufOutput));
} }
} // namespace event
} // namespace media } // namespace media
} // namespace edash_packager } // namespace edash_packager

View File

@ -247,7 +247,7 @@ void MP4Muxer::FireOnMediaStartEvent() {
muxer_listener()->OnMediaStart(options(), muxer_listener()->OnMediaStart(options(),
stream_info_vec, stream_info_vec,
timescale, timescale,
event::MuxerListener::kContainerMp4, MuxerListener::kContainerMp4,
encryption_key_source() != NULL); encryption_key_source() != NULL);
} }

View File

@ -128,7 +128,7 @@ Segmenter::Segmenter(const MuxerOptions& options,
Segmenter::~Segmenter() { STLDeleteElements(&fragmenters_); } Segmenter::~Segmenter() { STLDeleteElements(&fragmenters_); }
Status Segmenter::Initialize(const std::vector<MediaStream*>& streams, Status Segmenter::Initialize(const std::vector<MediaStream*>& streams,
event::MuxerListener* muxer_listener, MuxerListener* muxer_listener,
KeySource* encryption_key_source, KeySource* encryption_key_source,
uint32_t max_sd_pixels, uint32_t max_sd_pixels,
double clear_lead_in_seconds, double clear_lead_in_seconds,

View File

@ -23,10 +23,7 @@ class BufferWriter;
class KeySource; class KeySource;
class MediaSample; class MediaSample;
class MediaStream; class MediaStream;
namespace event {
class MuxerListener; class MuxerListener;
} // namespace event
namespace mp4 { namespace mp4 {
@ -64,7 +61,7 @@ class Segmenter {
/// @param crypto_period_duration specifies crypto period duration in seconds. /// @param crypto_period_duration specifies crypto period duration in seconds.
/// @return OK on success, an error status otherwise. /// @return OK on success, an error status otherwise.
Status Initialize(const std::vector<MediaStream*>& streams, Status Initialize(const std::vector<MediaStream*>& streams,
event::MuxerListener* muxer_listener, MuxerListener* muxer_listener,
KeySource* encryption_key_source, KeySource* encryption_key_source,
uint32_t max_sd_pixels, uint32_t max_sd_pixels,
double clear_lead_in_seconds, double clear_lead_in_seconds,
@ -101,7 +98,7 @@ class Segmenter {
Movie* moov() { return moov_.get(); } Movie* moov() { return moov_.get(); }
BufferWriter* fragment_buffer() { return fragment_buffer_.get(); } BufferWriter* fragment_buffer() { return fragment_buffer_.get(); }
SegmentIndex* sidx() { return sidx_.get(); } SegmentIndex* sidx() { return sidx_.get(); }
event::MuxerListener* muxer_listener() { return muxer_listener_; } MuxerListener* muxer_listener() { return muxer_listener_; }
private: private:
virtual Status DoInitialize() = 0; virtual Status DoInitialize() = 0;
@ -125,7 +122,7 @@ class Segmenter {
std::map<const MediaStream*, uint32_t> stream_map_; std::map<const MediaStream*, uint32_t> stream_map_;
bool segment_initialized_; bool segment_initialized_;
bool end_of_segment_; bool end_of_segment_;
event::MuxerListener* muxer_listener_; MuxerListener* muxer_listener_;
DISALLOW_COPY_AND_ASSIGN(Segmenter); DISALLOW_COPY_AND_ASSIGN(Segmenter);
}; };