Run 'clang-format' over stream_info
Ran 'clang-format' over stream_info.h and stream_info.cc so that later changes can focus on the actual changes and not the formatting. Change-Id: I8a75fe0f88db533f4a811d65dabd023033f07bda
This commit is contained in:
parent
e0ce59aa91
commit
740724f8cf
|
@ -14,11 +14,16 @@
|
||||||
namespace shaka {
|
namespace shaka {
|
||||||
namespace media {
|
namespace media {
|
||||||
|
|
||||||
StreamInfo::StreamInfo(StreamType stream_type, int track_id,
|
StreamInfo::StreamInfo(StreamType stream_type,
|
||||||
uint32_t time_scale, uint64_t duration, Codec codec,
|
int track_id,
|
||||||
|
uint32_t time_scale,
|
||||||
|
uint64_t duration,
|
||||||
|
Codec codec,
|
||||||
const std::string& codec_string,
|
const std::string& codec_string,
|
||||||
const uint8_t* codec_config, size_t codec_config_size,
|
const uint8_t* codec_config,
|
||||||
const std::string& language, bool is_encrypted)
|
size_t codec_config_size,
|
||||||
|
const std::string& language,
|
||||||
|
bool is_encrypted)
|
||||||
: stream_type_(stream_type),
|
: stream_type_(stream_type),
|
||||||
track_id_(track_id),
|
track_id_(track_id),
|
||||||
time_scale_(time_scale),
|
time_scale_(time_scale),
|
||||||
|
@ -38,10 +43,8 @@ std::string StreamInfo::ToString() const {
|
||||||
return base::StringPrintf(
|
return base::StringPrintf(
|
||||||
"type: %s\n codec_string: %s\n time_scale: %d\n duration: "
|
"type: %s\n codec_string: %s\n time_scale: %d\n duration: "
|
||||||
"%" PRIu64 " (%.1f seconds)\n is_encrypted: %s\n",
|
"%" PRIu64 " (%.1f seconds)\n is_encrypted: %s\n",
|
||||||
(stream_type_ == kStreamAudio ? "Audio" : "Video"),
|
(stream_type_ == kStreamAudio ? "Audio" : "Video"), codec_string_.c_str(),
|
||||||
codec_string_.c_str(),
|
time_scale_, duration_, static_cast<double>(duration_) / time_scale_,
|
||||||
time_scale_, duration_,
|
|
||||||
static_cast<double>(duration_) / time_scale_,
|
|
||||||
is_encrypted_ ? "true" : "false");
|
is_encrypted_ ? "true" : "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,10 +60,16 @@ class StreamInfo {
|
||||||
public:
|
public:
|
||||||
StreamInfo() = default;
|
StreamInfo() = default;
|
||||||
|
|
||||||
StreamInfo(StreamType stream_type, int track_id, uint32_t time_scale,
|
StreamInfo(StreamType stream_type,
|
||||||
uint64_t duration, Codec codec, const std::string& codec_string,
|
int track_id,
|
||||||
const uint8_t* codec_config, size_t codec_config_size,
|
uint32_t time_scale,
|
||||||
const std::string& language, bool is_encrypted);
|
uint64_t duration,
|
||||||
|
Codec codec,
|
||||||
|
const std::string& codec_string,
|
||||||
|
const uint8_t* codec_config,
|
||||||
|
size_t codec_config_size,
|
||||||
|
const std::string& language,
|
||||||
|
bool is_encrypted);
|
||||||
|
|
||||||
virtual ~StreamInfo();
|
virtual ~StreamInfo();
|
||||||
|
|
||||||
|
@ -95,7 +101,9 @@ class StreamInfo {
|
||||||
|
|
||||||
void set_duration(uint64_t duration) { duration_ = duration; }
|
void set_duration(uint64_t duration) { duration_ = duration; }
|
||||||
void set_codec(Codec codec) { codec_ = codec; }
|
void set_codec(Codec codec) { codec_ = codec; }
|
||||||
void set_codec_config(const std::vector<uint8_t>& data) { codec_config_ = data; }
|
void set_codec_config(const std::vector<uint8_t>& data) {
|
||||||
|
codec_config_ = data;
|
||||||
|
}
|
||||||
void set_codec_string(const std::string& codec_string) {
|
void set_codec_string(const std::string& codec_string) {
|
||||||
codec_string_ = codec_string;
|
codec_string_ = codec_string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue