TensorFlow.js的官方文档提到它使用WebGL访问GPU。WebGL是否仅用于渲染或计算?
我需要从示例 MPEG-TS 文件中获取 PIDS,我尝试使用读取文件fopen()并以十六进制格式获取数据。现在我一直在寻找整个数据中的 PID 字节。谁能帮我吗?
我使用了以下代码:
#include <stdio.h>
#include <string.h>
void main()
{
FILE *myfile;
FILE *output;
int i=0,j;
unsigned int buffer;
int o;
myfile=fopen("screen.ts","rb");
output = fopen("output2.txt","w");
do{
o=fread(&buffer, 2, 1, myfile);
if(o!=1)
break;
printf("%d: ",i);
printf("%x\n",buffer);
fprintf(output,"%x ",buffer);
i++;
}while(1);
}
Run Code Online (Sandbox Code Playgroud)
我从文件中获取了数据,现在我需要找到数据中的“PID”字节。