diff --git a/packager/media/base/media_handler.h b/packager/media/base/media_handler.h index 92997148a6..0074dbc6b8 100644 --- a/packager/media/base/media_handler.h +++ b/packager/media/base/media_handler.h @@ -21,17 +21,12 @@ namespace media { enum class StreamDataType { kUnknown, - kPeriodInfo, kStreamInfo, kMediaSample, kTextSample, - kMediaEvent, kSegmentInfo, }; -// TODO(kqyang): Define these structures. -struct PeriodInfo {}; -struct MediaEvent {}; struct SegmentInfo { bool is_subsegment = false; bool is_encrypted = false; @@ -48,22 +43,11 @@ struct StreamData { size_t stream_index = static_cast(-1); StreamDataType stream_data_type = StreamDataType::kUnknown; - std::shared_ptr period_info; std::shared_ptr stream_info; std::shared_ptr media_sample; std::shared_ptr text_sample; - std::shared_ptr media_event; std::shared_ptr segment_info; - static std::unique_ptr FromPeriodInfo( - size_t stream_index, std::shared_ptr period_info) { - std::unique_ptr stream_data(new StreamData); - stream_data->stream_index = stream_index; - stream_data->stream_data_type = StreamDataType::kPeriodInfo; - stream_data->period_info = std::move(period_info); - return stream_data; - } - static std::unique_ptr FromStreamInfo( size_t stream_index, std::shared_ptr stream_info) { std::unique_ptr stream_data(new StreamData); @@ -91,15 +75,6 @@ struct StreamData { return stream_data; } - static std::unique_ptr FromMediaEvent( - size_t stream_index, std::shared_ptr media_event) { - std::unique_ptr stream_data(new StreamData); - stream_data->stream_index = stream_index; - stream_data->stream_data_type = StreamDataType::kMediaEvent; - stream_data->media_event = std::move(media_event); - return stream_data; - } - static std::unique_ptr FromSegmentInfo( size_t stream_index, std::shared_ptr segment_info) { std::unique_ptr stream_data(new StreamData); @@ -167,12 +142,6 @@ class MediaHandler { /// stream_data.stream_index should be the output stream index. Status Dispatch(std::unique_ptr stream_data); - /// Dispatch the period info to downstream handlers. - Status DispatchPeriodInfo( - size_t stream_index, std::shared_ptr period_info) { - return Dispatch(StreamData::FromPeriodInfo(stream_index, period_info)); - } - /// Dispatch the stream info to downstream handlers. Status DispatchStreamInfo( size_t stream_index, std::shared_ptr stream_info) { @@ -192,12 +161,6 @@ class MediaHandler { return Dispatch(StreamData::FromTextSample(stream_index, text_sample)); } - /// Dispatch the media event to downstream handlers. - Status DispatchMediaEvent( - size_t stream_index, std::shared_ptr media_event) { - return Dispatch(StreamData::FromMediaEvent(stream_index, media_event)); - } - /// Dispatch the segment info to downstream handlers. Status DispatchSegmentInfo( size_t stream_index, std::shared_ptr segment_info) {