Commit 72da138a authored by RJ Ascani's avatar RJ Ascani Committed by Commit Bot

[Fuchsia] Transition to OnStreamFailed2 event

The fuchsia.media.StreamProcessor protocol is soft-transitioning the
OnStreamFailed event to include an error code for the failure reason.
This CL is the first stage of that soft-transition by updating the
FuchsiaVideoDecoder to use a temporary OnStreamFailed2 event that
includes the new error code.

Change-Id: Ie7901d306e851751be4de98680ba89e980bb6b97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752351Reviewed-by: default avatarWez <wez@chromium.org>
Commit-Queue: RJ Ascani <rjascani@google.com>
Cr-Commit-Position: refs/heads/master@{#686561}
parent 5c981f78
...@@ -338,7 +338,8 @@ class FuchsiaVideoDecoder : public VideoDecoder { ...@@ -338,7 +338,8 @@ class FuchsiaVideoDecoder : public VideoDecoder {
private: private:
// Event handlers for |codec_|. // Event handlers for |codec_|.
void OnStreamFailed(uint64_t stream_lifetime_ordinal); void OnStreamFailed(uint64_t stream_lifetime_ordinal,
fuchsia::media::StreamError error);
void OnInputConstraints( void OnInputConstraints(
fuchsia::media::StreamBufferConstraints input_constraints); fuchsia::media::StreamBufferConstraints input_constraints);
void OnFreeInputPacket(fuchsia::media::PacketHeader free_input_packet); void OnFreeInputPacket(fuchsia::media::PacketHeader free_input_packet);
...@@ -506,7 +507,7 @@ void FuchsiaVideoDecoder::Initialize(const VideoDecoderConfig& config, ...@@ -506,7 +507,7 @@ void FuchsiaVideoDecoder::Initialize(const VideoDecoderConfig& config,
OnError(); OnError();
}); });
codec_.events().OnStreamFailed = codec_.events().OnStreamFailed2 =
fit::bind_member(this, &FuchsiaVideoDecoder::OnStreamFailed); fit::bind_member(this, &FuchsiaVideoDecoder::OnStreamFailed);
codec_.events().OnInputConstraints = codec_.events().OnInputConstraints =
fit::bind_member(this, &FuchsiaVideoDecoder::OnInputConstraints); fit::bind_member(this, &FuchsiaVideoDecoder::OnInputConstraints);
...@@ -578,7 +579,8 @@ int FuchsiaVideoDecoder::GetMaxDecodeRequests() const { ...@@ -578,7 +579,8 @@ int FuchsiaVideoDecoder::GetMaxDecodeRequests() const {
return input_buffers_.size() + 1; return input_buffers_.size() + 1;
} }
void FuchsiaVideoDecoder::OnStreamFailed(uint64_t stream_lifetime_ordinal) { void FuchsiaVideoDecoder::OnStreamFailed(uint64_t stream_lifetime_ordinal,
fuchsia::media::StreamError error) {
if (stream_lifetime_ordinal_ != stream_lifetime_ordinal) { if (stream_lifetime_ordinal_ != stream_lifetime_ordinal) {
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment