MCPcopy Create free account
hub / github.com/apache/brpc / ReadAMFNumber

Function ReadAMFNumber

src/brpc/amf.cpp:315–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315bool ReadAMFNumber(double* val, AMFInputStream* stream) {
316 uint8_t marker;
317 if (stream->cut_u8(&marker) != 1u) {
318 LOG(ERROR) << "stream is not long enough";
319 return false;
320 }
321 if ((AMFMarker)marker == AMF_MARKER_NUMBER) {
322 if (stream->cut_u64((uint64_t*)val) != 8u) {
323 LOG(ERROR) << "stream is not long enough";
324 return false;
325 }
326 return true;
327 }
328 LOG(ERROR) << "Expected number, actually " << marker2str(marker);
329 return false;
330}
331
332bool ReadAMFUint32(uint32_t* val, AMFInputStream* stream) {
333 double d;

Callers 8

ReadAMFUint32Function · 0.85
OnCreateStreamMethod · 0.85
OnPlayMethod · 0.85
OnReleaseStreamMethod · 0.85
OnFCPublishMethod · 0.85
OnFCUnpublishMethod · 0.85
OnSeekMethod · 0.85
OnPauseMethod · 0.85

Calls 3

marker2strFunction · 0.85
cut_u8Method · 0.80
cut_u64Method · 0.80

Tested by

no test coverage detected