mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
APM: Support distributed tracing by Tencent Cloud APM. v5.0.63
This commit is contained in:
parent
736c661808
commit
3e2f8622f8
49 changed files with 4989 additions and 719 deletions
|
@ -136,6 +136,26 @@ srs_error_t SrsProtobufVarints::encode(SrsBuffer* b, uint64_t v)
|
|||
return err;
|
||||
}
|
||||
|
||||
int SrsProtobufFixed64::sizeof_int(uint64_t v)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
srs_error_t SrsProtobufFixed64::encode(SrsBuffer* b, uint64_t v)
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
if (!b->require(8)) {
|
||||
return srs_error_new(ERROR_PB_NO_SPACE, "require 8 only %d byte", b->left());
|
||||
}
|
||||
|
||||
// Encode values in little-endian byte order,
|
||||
// see https://developers.google.com/protocol-buffers/docs/encoding#non-varint_numbers
|
||||
b->write_le8bytes((int64_t)v);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
// See Go protowire.SizeBytes of package google.golang.org/protobuf/encoding/protowire
|
||||
int SrsProtobufString::sizeof_string(const std::string& v)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue