上一页 1 2 3 4 5 6 7 ··· 13 下一页
摘要: 概述 我们以FFmpeg简单使用:视频解码 提取yuv为例,研究一下h264的解码过程。 这里主要涉及两个方面: 1.解析器【ff_h264_parser】:使用av_parser_parse2解析出一帧NALU 2.解码器【ff_h264_decoder】:使用avcodec_send_packe 阅读全文
posted @ 2021-06-02 07:57 Vzf 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 我们以一个acc解码为例看看这两个函数 static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile) { int i, ch; int ret, data_size; // pkt是 阅读全文
posted @ 2021-05-27 18:36 Vzf 阅读(2581) 评论(1) 推荐(2) 编辑
摘要: 解析报文 /** * Parse a packet. * * @param s parser context. 解析器上下文 * @param avctx codec context. 解码器上下文 * @param poutbuf set to pointer to parsed buffer o 阅读全文
posted @ 2021-05-26 16:43 Vzf 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 初始化AVCodecContext /** * Initialize the AVCodecContext to use the given AVCodec. Prior to using this * function the context has to be allocated with av 阅读全文
posted @ 2021-05-26 16:28 Vzf 阅读(640) 评论(0) 推荐(0) 编辑
摘要: 分配解码器上下文 /** * Allocate an AVCodecContext and set its fields to default values. The * resulting struct should be freed with avcodec_free_context(). * 阅读全文
posted @ 2021-05-26 16:10 Vzf 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 查找编码器 AVCodecParserContext *av_parser_init(int codec_id); 实现 AVCodecParserContext *av_parser_init(int codec_id) { AVCodecParserContext *s = NULL; cons 阅读全文
posted @ 2021-05-26 16:00 Vzf 阅读(819) 评论(0) 推荐(0) 编辑
摘要: 实现 实际就是利用了HTTP的分块传输,发送FLV数据,服务器无法知道流长度,所以不会填写Content-Length字段而是携带Transfer-Encoding: chunked字段,这样客户端就会一直接受数据了。 分块传输 编码规则 下面我们来看一下分块传输的编码规则,其实也很简单,同样采用了 阅读全文
posted @ 2021-05-26 14:49 Vzf 阅读(2219) 评论(0) 推荐(0) 编辑
摘要: 查找解码器 /** * Find a registered decoder with a matching codec ID. * * @param id AVCodecID of the requested decoder * @return A decoder if one was found, 阅读全文
posted @ 2021-05-25 19:53 Vzf 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 1. 流程图 2.概述 1. AVCodec *avcodec_find_decoder(enum AVCodecID id) 获取解码器 2. AVCodecParserContext *av_parser_init(int codec_id) 获取解析器 3. AVCodecContext *a 阅读全文
posted @ 2021-05-25 19:42 Vzf 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 1. socket的TIMEOUT #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdlib.h> #include <assert.h 阅读全文
posted @ 2021-05-16 15:06 Vzf 阅读(68) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 13 下一页