当前位置: 首页 > news >正文

wordpress网站统计做网站大概要多少钱

wordpress网站统计,做网站大概要多少钱,最热门的网页游戏排行,aso具体优化FFmpeg是一个开源的音视频处理库#xff0c;提供了丰富的API用于音视频的编解码、转码、过滤、播放等操作。 一、使用FFmpeg API解码涉及到的函数及一般流程如下#xff1a; 1. av_register_all(): 注册所有的编解码器和格式。 av_register_all(); 2. avformat_open_inpu…FFmpeg是一个开源的音视频处理库提供了丰富的API用于音视频的编解码、转码、过滤、播放等操作。 一、使用FFmpeg API解码涉及到的函数及一般流程如下 1. av_register_all(): 注册所有的编解码器和格式。 av_register_all(); 2. avformat_open_input(): 打开输入文件流并获取文件流的格式信息。 AVFormatContext *fmt_ctx NULL; if (avformat_open_input(fmt_ctx, input_file, NULL, NULL) 0) {// 打开文件失败 } 3. avformat_find_stream_info(): 获取流的详细信息。   if (avformat_find_stream_info(fmt_ctx, NULL) 0) {// 获取流信息失败 } 4. avcodec_find_decoder(): 查找解码器。   AVCodec *codec avcodec_find_decoder(stream-codecpar-codec_id); if (!codec) {// 找不到解码器 } 5. avcodec_open2(): 打开解码器。   AVCodecContext *codec_ctx avcodec_alloc_context3(codec); if (avcodec_open2(codec_ctx, codec, NULL) 0) {// 打开解码器失败 } 6. av_read_frame(): 读取一帧音视频数据。   AVPacket packet; while (av_read_frame(fmt_ctx, packet) 0) {// 处理音视频数据av_packet_unref(packet); } 7. avcodec_send_packet()和avcodec_receive_frame(): 解码音视频数据。   AVFrame *frame av_frame_alloc(); while (av_read_frame(fmt_ctx, packet) 0) {if (packet.stream_index audio_stream_index) {// 解码音频数据avcodec_send_packet(codec_ctx, packet);while (avcodec_receive_frame(codec_ctx, frame) 0) {// 处理解码后的音频帧}} else if (packet.stream_index video_stream_index) {// 解码视频数据avcodec_send_packet(codec_ctx, packet);while (avcodec_receive_frame(codec_ctx, frame) 0) {// 处理解码后的视频帧}}av_packet_unref(packet); } 二、与解码类似编码的流程一般为 8. avformat_alloc_output_context2(): 创建输出格式上下文。   AVFormatContext *out_fmt_ctx NULL; if (avformat_alloc_output_context2(out_fmt_ctx, NULL, NULL, output_file) 0) {// 创建输出格式上下文失败 } 9. avcodec_find_encoder(): 查找编码器。   AVCodec *encoder avcodec_find_encoder(AV_CODEC_ID_H264); if (!encoder) {// 找不到编码器 } 10. avcodec_open2(): 打开编码器。   AVCodecContext *encoder_ctx avcodec_alloc_context3(encoder); if (avcodec_open2(encoder_ctx, encoder, NULL) 0) {// 打开编码器失败 } 11. avformat_write_header(): 写入输出文件的头部信息。   if (avformat_write_header(out_fmt_ctx, NULL) 0) {// 写入头部信息失败 } 12. avcodec_send_frame()和avcodec_receive_packet(): 编码音视频数据。   AVPacket encoded_packet; while (av_read_frame(fmt_ctx, packet) 0) {if (packet.stream_index audio_stream_index) {// 编码音频数据avcodec_send_frame(encoder_ctx, frame);while (avcodec_receive_packet(encoder_ctx, encoded_packet) 0) {// 处理编码后的音频数据}} else if (packet.stream_index video_stream_index) {// 编码视频数据avcodec_send_frame(encoder_ctx, frame);while (avcodec_receive_packet(encoder_ctx, encoded_packet) 0) {// 处理编码后的视频数据}}av_packet_unref(packet); } 13. av_write_frame()和av_write_trailer(): 写入编码后的音视频数据。   if (av_write_frame(out_fmt_ctx, encoded_packet) 0) {// 写入音视频数据失败 } 三、解码和编码结束后都要及时释放内存 14. avformat_close_input(): 关闭输入文件。   avformat_close_input(fmt_ctx); 15. avcodec_free_context(): 释放编解码器上下文。   avcodec_free_context(codec_ctx); 16. av_frame_free(): 释放帧对象。   av_frame_free(frame); 17. avformat_free_context(): 释放格式上下文。   avformat_free_context(fmt_ctx); 了解这些常用API及流程对使用FFmpeg开发将大有裨益。
http://www.w-s-a.com/news/85207/

相关文章:

  • ppt做长图网站wordpress文章页面图片自动适应
  • 做泌尿科网站价格京东商城网站建设教程
  • 像网站的ppt怎么做的移动app与网站建设的区别
  • 怎么建个人网站网站收录有什么用
  • 广州市医院网站建设广州头条新闻最近一周
  • 广州移动 网站设计中国交通建设监理协网站
  • 甘肃省第八建设集团公司网站wordpress topnews
  • 公司网站建设维保协议wordpress会员可看
  • 合肥百度网站排名优化深圳集团网站开发公司
  • 可以直接打开网站的方法手机回收站
  • 山西免费网站制作中天建设集团有限公司第九建设公司
  • 好的网站有哪些企业微信开发者工具
  • 网站通栏代码老外做的中国汉字网站
  • 东莞公司建站哪个更便宜wordpress宝塔伪静态
  • 六安网站建设价格做网站好吗
  • 中小企业网站建设咨询湖南省邵阳建设局网站
  • 分类网站一天做几条合适南安网络推广
  • 案例学 网页设计与网站建设百度竞价关键词出价技巧
  • 做公司网站要那些资料南雄网站建设
  • 自己做的网站发布到网上视频播放不了网页游戏奥奇传说
  • 网站效果用什么软件做品牌网站建设等高端服务
  • 四川省成华区建设局网站网站专业制作
  • 网站建设如何开票网站后台怎么做超链接
  • 教育网站设计方案建设网站技术公司电话号码
  • 建网站要定制还是第三方系统传奇网站模板psd
  • 免费搭建企业网站什么叫网站定位
  • 网站建设cms程序员培训班
  • 网站seo技术wordpress editor ios
  • 红酒网站设计成立公司需要哪些手续
  • 广州做网站哪个好网站建网站建设网站站网站