91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

這是一個用Ffmpeg進行h265編解碼的實例,集成了demux,解碼,編碼相關的代碼。

資源截圖

代碼片段和文件信息

/*
?*?Copyright?(c)?2012?Stefano?Sabatini
?*
?*?Permission?is?hereby?granted?free?of?charge?to?any?person?obtaining?a?copy
?*?of?this?software?and?associated?documentation?files?(the?“Software“)?to?deal
?*?in?the?Software?without?restriction?including?without?limitation?the?rights
?*?to?use?copy?modify?merge?publish?distribute?sublicense?and/or?sell
?*?copies?of?the?Software?and?to?permit?persons?to?whom?the?Software?is
?*?furnished?to?do?so?subject?to?the?following?conditions:
?*
?*?The?above?copyright?notice?and?this?permission?notice?shall?be?included?in
?*?all?copies?or?substantial?portions?of?the?Software.
?*
?*?THE?SOFTWARE?IS?PROVIDED?“AS?IS“?WITHOUT?WARRANTY?OF?ANY?KIND?EXPRESS?OR
?*?IMPLIED?INCLUDING?BUT?NOT?LIMITED?TO?THE?WARRANTIES?OF?MERCHANTABILITY
?*?FITNESS?FOR?A?PARTICULAR?PURPOSE?AND?NONINFRINGEMENT.?IN?NO?EVENT?SHALL
?*?THE?AUTHORS?OR?COPYRIGHT?HOLDERS?BE?LIABLE?FOR?ANY?CLAIM?DAMAGES?OR?OTHER
?*?LIABILITY?WHETHER?IN?AN?ACTION?OF?CONTRACT?TORT?OR?OTHERWISE?ARISING?FROM
?*?OUT?OF?OR?IN?CONNECTION?WITH?THE?SOFTWARE?OR?THE?USE?OR?OTHER?DEALINGS?IN
?*?THE?SOFTWARE.
?*/

/**
?*?@file
?*?Demuxing?and?decoding?example.
?*
?*?Show?how?to?use?the?libavformat?and?libavcodec?API?to?demux?and
?*?decode?audio?and?video?data.
?*?@example?demuxing_decoding.c
?*/

#include?
#include?
#include?
#include?

static?AVFormatContext?*fmt_ctx?=?NULL;
static?AVCodecContext?*dec_ctx?=?NULL;
static?AVCodecContext?*video_dec_ctx?=?NULL?*audio_dec_ctx?=?NULL;
static?AVCodecContext?*video_enc_ctx?=?NULL;
static?int?width?height;
static?enum?AVPixelFormat?pix_fmt;
static?AVStream?*video_stream?=?NULL?*audio_stream?=?NULL;
static?const?char?*src_filename?=?NULL;
static?const?char?*dst_filename?=?NULL;
static?const?char?*video_dst_filename?=?NULL;
static?const?char?*audio_dst_filename?=?NULL;
static?const?char?*video_re_encoded_filename?=?NULL;
static?FILE?*video_dst_file?=?NULL;
static?FILE?*audio_dst_file?=?NULL;
static?FILE?*video_re_encode_file?=?NULL;

static?uint8_t?*video_dst_data[4]?=?{NULL};
static?int??????video_dst_linesize[4];
static?int?video_dst_bufsize;

static?int?video_stream_idx?=?-1?audio_stream_idx?=?-1;
static?AVframe?*frame?=?NULL;
static?AVPacket?pkt;
static?int?video_frame_count?=?0;
static?int?audio_frame_count?=?0;

/*?Enable?or?disable?frame?reference?counting.?You?are?not?supposed?to?support
?*?both?paths?in?your?application?but?pick?the?one?most?appropriate?to?your
?*?needs.?Look?for?the?use?of?refcount?in?this?example?to?see?what?are?the
?*?differences?of?API?usage?between?them.?*/
static?int?refcount?=?0;

static?void?pgm_save(unsigned?char?*buf?int?wrap?int?xsize?int?ysize
????????char?*filename)
{
????return;

????FILE?*f;
????int?i;

????f?=?fopen(filename“w“);
????fprintf(f?“P5\n%d?%d\n%d\n“?xsize?ysize?255);
????for?(i?=?0;?i?????????fwrite(buf?+?i?*?wrap?1?xsize?f);
????fclose(f);
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????23690??2019-02-28?13:39??ffmpeg_h265_demuxing_decoding_encoding.c

評論

共有 條評論