7 #ifndef PACKAGER_MEDIA_CHUNKING_CUE_ALIGNMENT_HANDLER_
8 #define PACKAGER_MEDIA_CHUNKING_CUE_ALIGNMENT_HANDLER_
13 #include <packager/media/base/media_handler.h>
14 #include <packager/media/chunking/sync_point_queue.h>
37 std::shared_ptr<const StreamInfo> info;
40 std::list<std::unique_ptr<StreamData>> samples;
42 bool to_be_flushed =
false;
44 double max_text_sample_end_time_seconds = 0;
48 std::list<std::unique_ptr<StreamData>> cues;
52 Status InitializeInternal()
override;
53 Status Process(std::unique_ptr<StreamData> data)
override;
54 Status OnFlushRequest(
size_t stream_index)
override;
57 Status OnStreamInfo(std::unique_ptr<StreamData> data);
59 Status OnVideoSample(std::unique_ptr<StreamData> sample);
60 Status OnNonVideoSample(std::unique_ptr<StreamData> sample);
61 Status OnSample(std::unique_ptr<StreamData> sample);
64 Status UseNewSyncPoint(std::shared_ptr<const CueEvent> new_sync);
67 bool EveryoneWaitingAtHint()
const;
70 Status AcceptSample(std::unique_ptr<StreamData> sample,
71 StreamState* stream_state);
74 Status RunThroughSamples(StreamState* stream);
77 std::deque<StreamState> stream_states_;
All the methods that are virtual are virtual for mocking.