Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: media/base/video_decoder.h

Issue 805193006: Fix VideoDecoderShim to return correct decode_id for all codecs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/video_decoder.h
diff --git a/media/base/video_decoder.h b/media/base/video_decoder.h
index d7e7a791de3d168668476cbdbd73aae22dd90ef4..74adcda3c46571ab5e5a3b09392605ee474bb7da 100644
--- a/media/base/video_decoder.h
+++ b/media/base/video_decoder.h
@@ -55,6 +55,11 @@ class MEDIA_EXPORT VideoDecoder {
// |status_cb| upon completion. |output_cb| is called for each output frame
// decoded by Decode().
//
+ // If |low_delay| is true then the decoder is not allowed to queue frames
+ // internally, i.e. every frame must be returned as soon as it is decoded.
+ // Currently this flag is necessary only for FFmpegDecoder. Other decoders
+ // do not need to delay frames.
xhwang 2015/01/16 23:50:09 I am still a bit concerned about this change in th
Sergey Ulanov 2015/01/20 23:52:26 There are two separate issues: frame reordering an
xhwang 2015/01/21 23:05:04 Thanks for the detailed clarification. I think my
+ //
// Note:
// 1) The VideoDecoder will be reinitialized if it was initialized before.
// Upon reinitialization, all internal buffered frames will be dropped.
@@ -78,8 +83,9 @@ class MEDIA_EXPORT VideoDecoder {
// called again).
//
// After decoding is finished the decoder calls |output_cb| specified in
- // Initialize() for each decoded frame. |output_cb| may be called before or
- // after |decode_cb|.
+ // Initialize() for each decoded frame. In general |output_cb| may be called
+ // before or after |decode_cb|, but software decoders in low-delay mode must
+ // call |output_cb| for all frames in |buffer| before calling |decode_cb|.
xhwang 2015/01/16 23:50:09 I think it makes sense to require |decode_cb| to b
Sergey Ulanov 2015/01/20 23:52:26 Reworded this comment.
//
// If |buffer| is an EOS buffer then the decoder must be flushed, i.e.
// |output_cb| must be called for each frame pending in the queue and

Powered by Google App Engine
This is Rietveld 408576698