1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_CAST_SENDER_SENDER_ENCODED_FRAME_H_
6 #define MEDIA_CAST_SENDER_SENDER_ENCODED_FRAME_H_
8 #include "media/cast/net/cast_transport_config.h"
13 // Extends EncodedFrame with additional fields used within the sender-side of
15 struct SenderEncodedFrame
: public EncodedFrame
{
17 ~SenderEncodedFrame() final
;
19 // The amount of real-world time it took to encode the frame, divided by the
20 // maximum amount of time allowed. Example: For the software VP8 encoder,
21 // this would be the elapsed encode time (according to the base::TimeTicks
22 // clock) divided by the VideoFrame's duration.
24 // Meaningful values are non-negative, with 0.0 [impossibly] representing 0%
25 // utilization, 1.0 representing 100% utilization, and values greater than 1.0
26 // indicating the encode time took longer than the media duration of the
27 // frame. Negative values indicate the field was not computed.
29 // TODO(miu): Rename to encoder_cpu_utilization.
30 double deadline_utilization
;
32 // The amount of "lossiness" needed to encode the frame within the targeted
33 // bandwidth. More-complex frame content and/or lower target encode bitrates
34 // will cause this value to rise.
36 // Meaningful values are non-negative, with 0.0 indicating the frame is very
37 // simple and/or the target encode bitrate is very large, 1.0 indicating the
38 // frame contains very complex content and/or the target encode bitrate is
39 // very small, and values greater than 1.0 indicating the encoder cannot
40 // encode the frame within the target bitrate (even at its lowest quality
41 // setting). Negative values indicate the field was not computed.
43 // TODO(miu): Rename to idealized_bitrate_utilization.
44 double lossy_utilization
;
50 #endif // MEDIA_CAST_SENDER_SENDER_ENCODED_FRAME_H_