Skip to content

Instantly share code, notes, and snippets.

View kenmux's full-sized avatar

Kenmux Lee kenmux

View GitHub Profile
@jusonqiu
jusonqiu / m2mjpeg_adpcm.c
Last active March 30, 2020 09:18
FFMPEG把普通视频解码成yuv同时编成mjpeg, 把音频解码成pcm并调整参数。 初始化编码器和解码器 配置编码器 编码与解码 调整帧率.
/******************************************************************************
* Copyright (C) 2015 All rights reserved.
*
* File: m2mjpeg_adpcm.c
* Author: Zhaosheng Qiu <[email protected]>
* Time: 2015/06/29
* Descriptions:
*
******************************************************************************/
#include <stdio.h>
@snikch
snikch / gist:3661188
Created September 6, 2012 23:16
Find the current top view controller for your iOS application
- (UIViewController *)topViewController{
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)rootViewController
{
if (rootViewController.presentedViewController == nil) {
return rootViewController;
}