MCPcopy Create free account
hub / github.com/defold/defold / GetStream

Function GetStream

engine/gamesys/src/gamesys/scripts/script_buffer.cpp:433–440  ·  view source on GitHub ↗

gets a stream from a buffer * * Get a specified stream from a buffer. * * @name buffer.get_stream * @param buffer [type:buffer] the buffer to get the stream from * @param stream_name [type:hash|string] the stream name * @return stream [type:bufferstream] the data stream */

Source from the content-addressed store, hash-verified

431 * @return stream [type:bufferstream] the data stream
432 */
433 static int GetStream(lua_State* L)
434 {
435 DM_LUA_STACK_CHECK(L, 1);
436 dmBuffer::HBuffer hbuffer = dmScript::CheckBufferUnpack(L, 1);
437 dmhash_t stream_name = dmScript::CheckHashOrString(L, 2);
438 PushStream(L, 1, hbuffer, stream_name);
439 return 1;
440 }
441
442 // Offsets and count is in "value type"
443 template<typename T>

Callers 6

PushStreamFunction · 0.70
CopyBufferFunction · 0.70
FillAndApplyStreamFunction · 0.50
BuildBufferFunction · 0.50
TEST_FFunction · 0.50
TEST_PFunction · 0.50

Calls 3

CheckBufferUnpackFunction · 0.85
CheckHashOrStringFunction · 0.85
PushStreamFunction · 0.85

Tested by 2

TEST_FFunction · 0.40
TEST_PFunction · 0.40