Lines Matching refs:buffer

249 function protoDecoder(buffer, fileType, fileName, store) {  argument
250 var decoded = fileType.decoderParams.protoType.decode(buffer);
259 let blobUrl = URL.createObjectURL(new Blob([buffer], { type: fileType.dataType.mime }));
263 function videoDecoder(buffer, fileType, fileName, store) { argument
264 let [data, timeline] = fileType.decoderParams.videoDecoder(buffer);
299 function decodedFile(fileType, buffer, fileName, store) { argument
300 return [fileType, fileType.decoder(buffer, fileType, fileName, store)];
303 function detectAndDecode(buffer, fileName, store) { argument
304 if (arrayStartsWith(buffer, LAYER_TRACE_MAGIC_NUMBER)) {
305 return decodedFile(FILE_TYPES['layers_trace'], buffer, fileName, store);
307 if (arrayStartsWith(buffer, WINDOW_TRACE_MAGIC_NUMBER)) {
308 return decodedFile(FILE_TYPES['window_trace'], buffer, fileName, store);
310 if (arrayStartsWith(buffer, MPEG4_MAGIC_NMBER)) {
311 return decodedFile(FILE_TYPES['screen_recording'], buffer, fileName, store);
313 if (arrayStartsWith(buffer, WAYLAND_TRACE_MAGIC_NUMBER)) {
314 return decodedFile(FILE_TYPES['wl_trace'], buffer, fileName, store);
316 if (arrayStartsWith(buffer, PROTO_LOG_MAGIC_NUMBER)) {
317 return decodedFile(FILE_TYPES['proto_log'], buffer, fileName, store);
319 if (arrayStartsWith(buffer, SYSTEM_UI_MAGIC_NUMBER)) {
320 return decodedFile(FILE_TYPES['system_ui_trace'], buffer, fileName, store);
322 if (arrayStartsWith(buffer, LAUNCHER_MAGIC_NUMBER)) {
323 return decodedFile(FILE_TYPES['launcher_trace'], buffer, fileName, store);
327 return decodedFile(FILE_TYPES[name], buffer, fileName, store);