小编ide*_*rge的帖子

保存来自Network Camera RTP Stream的JPEG文件

我有一个RTP Stream插槽,接收来自三星网络摄像机的JPEG流.

我不太了解JPEG格式的工作原理,但我知道这个传入的JFIF或JPEG流给了我JPEG头

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Type-specific |              Fragment Offset                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Type     |       Q       |     Width     |     Height    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

and then 

 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Restart Interval        |F|L|       Restart Count       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

and then in the first packet, there is this header

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      MBZ      |   Precision   |             Length            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Quantization Table Data                    |
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Run Code Online (Sandbox Code Playgroud)

我想我正确地解析了它们,这是一段代码,我如何存储一个JPEG Stream数据包.

    int extraOff=0;
    public bool Decode(byte* data, int offset)
    {
        if (_initialized == false)
        {
            type_specific = data[offset + …
Run Code Online (Sandbox Code Playgroud)

c# jpeg stream rtp frame

18
推荐指数
1
解决办法
5434
查看次数

Google Chrome WebGL Shader编译链接器错误,具有相同名称但不同类型/精度的制服

制服具有相同的名称但不同的类型/精度

这是我在编译着色器时所获得的,只有Windows上的最新Chrome.没有其他的

看着

http://www.cocos2d-x.org/forums/19/topics/39063?r=39258https://code.google.com/p/chromium/issues/detail?id=309527

我尝试为以下两个添加两个highp,它也没有帮助.

VShader:

  "attribute vec3 a_position;                  \n"
  "attribute vec3 a_normal;                    \n"
  "attribute vec2 a_texture;                   \n"

  "uniform mat4 u_mvpMatrix;                   \n"
  "uniform mat3 u_normalMatrix;                \n"
  "uniform vec4 u_lightDir;                    \n"
  "uniform lowp int u_eT;           \n"
  "uniform lowp int u_eL;             \n"
  "uniform vec4 u_colormul;                    \n"

  "varying float v_cf;                \n"
  "varying vec2 v_t;                          \n"
Run Code Online (Sandbox Code Playgroud)

F Shader

  "precision mediump float;                                     \n"
  "uniform vec4 u_color;                                        \n"
  "uniform lowp int u_eT;                            \n"
  "uniform sampler2D u_texture0;                                \n"
  "uniform vec4 u_colormul;                                     \n"

  "varying float v_cf; …
Run Code Online (Sandbox Code Playgroud)

precision shader google-chrome uniform webgl

8
推荐指数
1
解决办法
2048
查看次数

标签 统计

c# ×1

frame ×1

google-chrome ×1

jpeg ×1

precision ×1

rtp ×1

shader ×1

stream ×1

uniform ×1

webgl ×1