Removed unused structs PeriodInfo and MediaEvent.

Change-Id: I0504853ec555fd161df21e5680d26aab50648052
This commit is contained in:
Kamesh Devarakonda 2017-11-07 16:56:45 -05:00
parent 0a69779f7c
commit 09cdb2bbec
1 changed files with 0 additions and 37 deletions

View File

@ -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<size_t>(-1);
StreamDataType stream_data_type = StreamDataType::kUnknown;
std::shared_ptr<const PeriodInfo> period_info;
std::shared_ptr<const StreamInfo> stream_info;
std::shared_ptr<const MediaSample> media_sample;
std::shared_ptr<const TextSample> text_sample;
std::shared_ptr<const MediaEvent> media_event;
std::shared_ptr<const SegmentInfo> segment_info;
static std::unique_ptr<StreamData> FromPeriodInfo(
size_t stream_index, std::shared_ptr<const PeriodInfo> period_info) {
std::unique_ptr<StreamData> 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<StreamData> FromStreamInfo(
size_t stream_index, std::shared_ptr<const StreamInfo> stream_info) {
std::unique_ptr<StreamData> stream_data(new StreamData);
@ -91,15 +75,6 @@ struct StreamData {
return stream_data;
}
static std::unique_ptr<StreamData> FromMediaEvent(
size_t stream_index, std::shared_ptr<const MediaEvent> media_event) {
std::unique_ptr<StreamData> 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<StreamData> FromSegmentInfo(
size_t stream_index, std::shared_ptr<const SegmentInfo> segment_info) {
std::unique_ptr<StreamData> 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<StreamData> stream_data);
/// Dispatch the period info to downstream handlers.
Status DispatchPeriodInfo(
size_t stream_index, std::shared_ptr<const PeriodInfo> 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<const StreamInfo> 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<const MediaEvent> 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<const SegmentInfo> segment_info) {