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