Removed unused structs PeriodInfo and MediaEvent.
Change-Id: I0504853ec555fd161df21e5680d26aab50648052
This commit is contained in:
parent
0a69779f7c
commit
09cdb2bbec
|
@ -21,17 +21,12 @@ namespace media {
|
||||||
|
|
||||||
enum class StreamDataType {
|
enum class StreamDataType {
|
||||||
kUnknown,
|
kUnknown,
|
||||||
kPeriodInfo,
|
|
||||||
kStreamInfo,
|
kStreamInfo,
|
||||||
kMediaSample,
|
kMediaSample,
|
||||||
kTextSample,
|
kTextSample,
|
||||||
kMediaEvent,
|
|
||||||
kSegmentInfo,
|
kSegmentInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO(kqyang): Define these structures.
|
|
||||||
struct PeriodInfo {};
|
|
||||||
struct MediaEvent {};
|
|
||||||
struct SegmentInfo {
|
struct SegmentInfo {
|
||||||
bool is_subsegment = false;
|
bool is_subsegment = false;
|
||||||
bool is_encrypted = false;
|
bool is_encrypted = false;
|
||||||
|
@ -48,22 +43,11 @@ struct StreamData {
|
||||||
size_t stream_index = static_cast<size_t>(-1);
|
size_t stream_index = static_cast<size_t>(-1);
|
||||||
StreamDataType stream_data_type = StreamDataType::kUnknown;
|
StreamDataType stream_data_type = StreamDataType::kUnknown;
|
||||||
|
|
||||||
std::shared_ptr<const PeriodInfo> period_info;
|
|
||||||
std::shared_ptr<const StreamInfo> stream_info;
|
std::shared_ptr<const StreamInfo> stream_info;
|
||||||
std::shared_ptr<const MediaSample> media_sample;
|
std::shared_ptr<const MediaSample> media_sample;
|
||||||
std::shared_ptr<const TextSample> text_sample;
|
std::shared_ptr<const TextSample> text_sample;
|
||||||
std::shared_ptr<const MediaEvent> media_event;
|
|
||||||
std::shared_ptr<const SegmentInfo> segment_info;
|
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(
|
static std::unique_ptr<StreamData> FromStreamInfo(
|
||||||
size_t stream_index, std::shared_ptr<const StreamInfo> stream_info) {
|
size_t stream_index, std::shared_ptr<const StreamInfo> stream_info) {
|
||||||
std::unique_ptr<StreamData> stream_data(new StreamData);
|
std::unique_ptr<StreamData> stream_data(new StreamData);
|
||||||
|
@ -91,15 +75,6 @@ struct StreamData {
|
||||||
return stream_data;
|
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(
|
static std::unique_ptr<StreamData> FromSegmentInfo(
|
||||||
size_t stream_index, std::shared_ptr<const SegmentInfo> segment_info) {
|
size_t stream_index, std::shared_ptr<const SegmentInfo> segment_info) {
|
||||||
std::unique_ptr<StreamData> stream_data(new StreamData);
|
std::unique_ptr<StreamData> stream_data(new StreamData);
|
||||||
|
@ -167,12 +142,6 @@ class MediaHandler {
|
||||||
/// stream_data.stream_index should be the output stream index.
|
/// stream_data.stream_index should be the output stream index.
|
||||||
Status Dispatch(std::unique_ptr<StreamData> stream_data);
|
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.
|
/// Dispatch the stream info to downstream handlers.
|
||||||
Status DispatchStreamInfo(
|
Status DispatchStreamInfo(
|
||||||
size_t stream_index, std::shared_ptr<const StreamInfo> stream_info) {
|
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));
|
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.
|
/// Dispatch the segment info to downstream handlers.
|
||||||
Status DispatchSegmentInfo(
|
Status DispatchSegmentInfo(
|
||||||
size_t stream_index, std::shared_ptr<const SegmentInfo> segment_info) {
|
size_t stream_index, std::shared_ptr<const SegmentInfo> segment_info) {
|
||||||
|
|
Loading…
Reference in New Issue