Chromium Code Reviews| Index: media/cast/cast_sender.h |
| diff --git a/media/cast/cast_sender.h b/media/cast/cast_sender.h |
| index 1ccebd1bb5d8bec1130f3dbf2b788e05300157f5..01f6d7074f7e5ab7700cb1c4e16eb0b018fb3080 100644 |
| --- a/media/cast/cast_sender.h |
| +++ b/media/cast/cast_sender.h |
| @@ -21,6 +21,10 @@ |
| #include "media/cast/cast_environment.h" |
| #include "media/cast/net/cast_transport_sender.h" |
| +namespace gfx { |
| +class Size; |
| +} |
| + |
| namespace media { |
| class VideoFrame; |
| @@ -40,14 +44,17 @@ class VideoFrameInput : public base::RefCountedThreadSafe<VideoFrameInput> { |
| // frames offer performance benefits, such as memory copy elimination. The |
| // format is guaranteed to be I420 or NV12. |
| // |
| - // Not every encoder supports this method. Use |ShouldCreateOptimizedFrame| |
| - // to determine if you can and should use this method. Calling |
| - // this method when |ShouldCreateOptimizedFrame| is false will CHECK. |
| - virtual scoped_refptr<VideoFrame> CreateOptimizedFrame( |
| - base::TimeDelta timestamp) = 0; |
| + // Not every encoder supports this method. Use |CanCreateOptimizedFrames| to |
| + // determine if you can and should use this method. |
| + // |
| + // Even if |CanCreateOptimizedFrames| indicates support, there are transient |
| + // conditions during a session where optimized frames cannot be provided. In |
| + // this case, the caller must be able to handle a nullptr return value. |
|
hubbe
2015/02/11 00:47:53
And do what?
Should the caller create an un-optimi
miu
2015/02/11 02:14:23
Done.
|
| + virtual scoped_refptr<VideoFrame> MaybeCreateOptimizedFrame( |
|
hubbe
2015/02/11 00:47:54
I think the "Maybe" is redundant.
miu
2015/02/11 02:14:23
I put it in there for two reasons: 1) The naming s
|
| + const gfx::Size& frame_size, base::TimeDelta timestamp) = 0; |
| // Returns true if the encoder supports creating optimized frames. |
| - virtual bool SupportsCreateOptimizedFrame() const = 0; |
| + virtual bool CanCreateOptimizedFrames() const = 0; |
| protected: |
| virtual ~VideoFrameInput() {} |