diff --git a/packager/media/base/media_handler_test_base.cc b/packager/media/base/media_handler_test_base.cc index d4a92ae2fb..32ba2cfd29 100644 --- a/packager/media/base/media_handler_test_base.cc +++ b/packager/media/base/media_handler_test_base.cc @@ -126,16 +126,16 @@ std::unique_ptr MediaHandlerTestBase::GetSegmentInfoStreamData( return stream_data; } -void MediaHandlerTestBase::SetUpGraph(int num_inputs, - int num_outputs, +void MediaHandlerTestBase::SetUpGraph(size_t num_inputs, + size_t num_outputs, std::shared_ptr handler) { // Input handler is not really used anywhere but just to satisfy one input // one output restriction for the encryption handler. auto input_handler = std::make_shared(); - for (int i = 0; i < num_inputs; ++i) + for (size_t i = 0; i < num_inputs; ++i) ASSERT_OK(input_handler->SetHandler(i, handler)); // All outputs are routed to |next_handler_|. - for (int i = 0; i < num_outputs; ++i) + for (size_t i = 0; i < num_outputs; ++i) ASSERT_OK(handler->SetHandler(i, next_handler_)); } diff --git a/packager/media/base/media_handler_test_base.h b/packager/media/base/media_handler_test_base.h index 5ea2b58603..bdf9274f18 100644 --- a/packager/media/base/media_handler_test_base.h +++ b/packager/media/base/media_handler_test_base.h @@ -112,8 +112,8 @@ class MediaHandlerTestBase : public ::testing::Test { bool is_subsegment); /// Setup a graph using |handler| with |num_inputs| and |num_outputs|. - void SetUpGraph(int num_inputs, - int num_outputs, + void SetUpGraph(size_t num_inputs, + size_t num_outputs, std::shared_ptr handler); /// @return the output stream data vector from handler. diff --git a/packager/media/trick_play/trick_play_handler.cc b/packager/media/trick_play/trick_play_handler.cc index af6d2f1b23..b73af1795b 100644 --- a/packager/media/trick_play/trick_play_handler.cc +++ b/packager/media/trick_play/trick_play_handler.cc @@ -105,7 +105,7 @@ Status TrickPlayHandler::OnFlushRequest(size_t input_stream_index) { } Status TrickPlayHandler::ProcessCachedStreamData( - int output_stream_index, + size_t output_stream_index, std::deque>* cached_stream_data) { while (!cached_stream_data->empty()) { Status status = @@ -119,7 +119,7 @@ Status TrickPlayHandler::ProcessCachedStreamData( } Status TrickPlayHandler::ProcessOneStreamData( - int output_stream_index, + size_t output_stream_index, const std::shared_ptr& stream_data) { uint32_t trick_play_rate = trick_play_options_.trick_play_rates[output_stream_index - 1]; diff --git a/packager/media/trick_play/trick_play_handler.h b/packager/media/trick_play/trick_play_handler.h index a3cf94d3f8..55999f0e99 100644 --- a/packager/media/trick_play/trick_play_handler.h +++ b/packager/media/trick_play/trick_play_handler.h @@ -50,11 +50,8 @@ class TrickPlayHandler : public MediaHandler { // Process the cached stream data for one trick play stream. // The cached data is dispatched to the |output_stream_index|. - // The |current_dts| is for updating the duration of key frames, - // so that there is no gap between consecutive key frames. When - // |current_dts| = -1, the original duration of the key frame is used. Status ProcessCachedStreamData( - int output_stream_index, + size_t output_stream_index, std::deque>* cached_stream_data); // Process a single stream data. Depending on the stream data type, some @@ -62,7 +59,7 @@ class TrickPlayHandler : public MediaHandler { // Decoding timestamp for current key media sample. It is used for calculating // the duration of previous key media sample, to make sure there is no gap // between two key media samples. - Status ProcessOneStreamData(int output_stream_index, + Status ProcessOneStreamData(size_t output_stream_index, const std::shared_ptr& stream_data); const TrickPlayOptions trick_play_options_;