我一直试图在我的iOS应用程序中实施ffmpeg几周。现在我可以播放几个AVI文件,但其他文件,如flv,wma,mp4 ...播放速度很慢。替代ffmpeg的iOS
我花了很多时间与ffmpeg和opengl,我没有找到解决方案。
我正在寻找其他替代品来播放ios设备上的文件。
有人知道我可以用来播放这些文件的其他库,框架......。不管他们是否有营业执照。
非常感谢,
编辑:
初始化着色器:
shader = [[GLShader alloc] initWithFileName:@"render" attributes:[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:0], @"position",
[NSNumber numberWithInt:1], @"texCoords", nil]
uniforms:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:0], @"sampler0",
[NSNumber numberWithInt:0], @"viewProjectionMatrix",nil]];
render.fsv:
uniform sampler2D sampler0;
varying highp vec2 _texcoord;
void main()
{ gl_FragColor = texture2D(sampler0, _texcoord);}
render.vsf:
attribute vec4 position;
attribute vec2 texCoords;
varying vec4 colorVarying;
varying vec2 _texcoord;
uniform mat4 viewProjectionMatrix;
void main()
{ _texcoord = texCoords;
gl_Position = viewProjectionMatrix * position;}
如何在此代码中实现您的解决方案?
请小心 - _9.1不使用MediaPlayer框架访问音乐库中媒体的应用程序将被拒绝_ – beryllium 2012-02-17 15:45:08
那么,如果它是AVI或WMA,可疑的是它在音乐库中...... – StilesCrisis 2012-02-17 16:51:14