iOS 使用 GLES 绘制文字

EAGLContext *contextGL;
contextGL = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
    if (contextGL == nil) {
        NSLog(@"wangsijie, failed to create EAGLContext");
    } else {
        NSLog(@"wangsijie, create EAGLContext OK");
    }
    
    CGRect rectGL = CGRectMake(100, 100, 150, 100);
    GLKView *viewGL = [[GLKView alloc] initWithFrame:rectGL];
    viewGL.context = contextGL;
    viewGL.enableSetNeedsDisplay = NO;
    [self.view addSubview:viewGL];
    [viewGL setDelegate:self];
    CADisplayLink *displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(render:)];
    [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
    
    [viewGL setTag:9];
    [self.mediaControl2 addSubview:viewGL];


- (void)glkView:(GLKView *)view drawInRect:(CGRect)rect {
    UIGraphicsBeginImageContext(_mediaControl2.currentTimeLabel.bounds.size);
    [_mediaControl2.currentTimeLabel.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *layerImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    CIContext *ciContext = [CIContext contextWithEAGLContext:contextGL];
    CIImage *ciImage = [[CIImage alloc] initWithImage:layerImage];
    [ciContext drawImage:ciImage inRect:CGRectMake(0, 0, 150, 100) fromRect:[ciImage extent]];
    
    //glClearColor(1.0, 0.0, 0.0, 1.0);
    //glClear(GL_COLOR_BUFFER_BIT);
}

- (void)render:(CADisplayLink*)displayLink {
    GLKView *view = [self.mediaControl2 viewWithTag:9];
    [view display];
}

wordpress 迁移-域名更改

wordpress文件复制到新服务器

旧数据库导入

修改数据库

请查考这里

修改wordpress配置

  • 编辑wp-config.php文件
  • 在”define”语句后,插入 define(‘RELOCATE’,true);
  • 打开wp-login.php页面
  • 正常登陆

在正常登录后台后检查 “设置 -> 常规选项” 中检查 “wordpress地址”和”站点地址” 是否正确。 最后也是最重要的一点,重置”固定链接”。如果你曾经修改过wordpress的”固定链接”样式,则必须重置成”朴素”样式。否则首页上的所有链接都会返还404 。

All Done!

ref:http://www.wordpress.la/codex-更改网站URL.html ref:https://wordpress.org/support/topic/moved-site-to-different-host-now-getting-404-error ref:http://www.wordpress.la/codex-迁移WordPress.html

H264 SPS & PPS

Alt none

NALU Type Array

NSString * const naluTypesStrings[] =
{
    @"0: Unspecified (non-VCL)",
    @"1: Coded slice of a non-IDR picture (VCL)",    // P frame
    @"2: Coded slice data partition A (VCL)",
    @"3: Coded slice data partition B (VCL)",
    @"4: Coded slice data partition C (VCL)",
    @"5: Coded slice of an IDR picture (VCL)",      // I frame
    @"6: Supplemental enhancement information (SEI) (non-VCL)",
    @"7: Sequence parameter set (non-VCL)",         // SPS parameter
    @"8: Picture parameter set (non-VCL)",          // PPS parameter
    @"9: Access unit delimiter (non-VCL)",
    @"10: End of sequence (non-VCL)",
    @"11: End of stream (non-VCL)",
    @"12: Filler data (non-VCL)",
    @"13: Sequence parameter set extension (non-VCL)",
    @"14: Prefix NAL unit (non-VCL)",
    @"15: Subset sequence parameter set (non-VCL)",
    @"16: Reserved (non-VCL)",
    @"17: Reserved (non-VCL)",
    @"18: Reserved (non-VCL)",
    @"19: Coded slice of an auxiliary coded picture without partitioning (non-VCL)",
    @"20: Coded slice extension (non-VCL)",
    @"21: Coded slice extension for depth view components (non-VCL)",
    @"22: Reserved (non-VCL)",
    @"23: Reserved (non-VCL)",
    @"24: STAP-A Single-time aggregation packet (non-VCL)",
    @"25: STAP-B Single-time aggregation packet (non-VCL)",
    @"26: MTAP16 Multi-time aggregation packet (non-VCL)",
    @"27: MTAP24 Multi-time aggregation packet (non-VCL)",
    @"28: FU-A Fragmentation unit (non-VCL)",
    @"29: FU-B Fragmentation unit (non-VCL)",
    @"30: Unspecified (non-VCL)",
    @"31: Unspecified (non-VCL)",
};

ref:here

iOS SizeClass

Alt none