commit of missing files in last commit
This commit is contained in:
1 parent
ebd16304b1
commit
55f24015cc
3 files changed
+5
-39
No files matched your search
Binary file not shown.
@@ -105,16 +105,7 @@ typedef ac_package_data* lp_ac_package_data;
|
|||||||
|
|
||||||
void init_info(lp_ac_file_info info)
|
void init_info(lp_ac_file_info info)
|
||||||
{
|
{
|
||||||
info->title[0] = 0;
|
|
||||||
info->author[0] = 0;
|
|
||||||
info->copyright[0] = 0;
|
|
||||||
info->comment[0] = 0;
|
|
||||||
info->album[0] = 0;
|
|
||||||
info->year = -1;
|
|
||||||
info->track = -1;
|
|
||||||
info->genre[0] = 0;
|
|
||||||
info->duration = -1;
|
info->duration = -1;
|
||||||
info->bitrate = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int av_initialized = 0;
|
int av_initialized = 0;
|
||||||
@@ -362,19 +353,6 @@ int CALL_CONVT ac_open(
|
|||||||
//Retrieve stream information
|
//Retrieve stream information
|
||||||
AVFormatContext *ctx = ((lp_ac_data)pacInstance)->pFormatCtx;
|
AVFormatContext *ctx = ((lp_ac_data)pacInstance)->pFormatCtx;
|
||||||
if(avformat_find_stream_info(ctx, NULL) >= 0) {
|
if(avformat_find_stream_info(ctx, NULL) >= 0) {
|
||||||
/*
|
|
||||||
strcpy(pacInstance->info.title, ctx->title);
|
|
||||||
strcpy(pacInstance->info.author, ctx->author);
|
|
||||||
strcpy(pacInstance->info.copyright, ctx->copyright);
|
|
||||||
strcpy(pacInstance->info.comment, ctx->comment);
|
|
||||||
strcpy(pacInstance->info.album, ctx->album);
|
|
||||||
strcpy(pacInstance->info.genre, ctx->genre);
|
|
||||||
|
|
||||||
pacInstance->info.year = ctx->year;
|
|
||||||
pacInstance->info.track = ctx->track;
|
|
||||||
pacInstance->info.bitrate = ctx->bit_rate;
|
|
||||||
*/
|
|
||||||
|
|
||||||
pacInstance->info.duration = ctx->duration * 1000 / AV_TIME_BASE;
|
pacInstance->info.duration = ctx->duration * 1000 / AV_TIME_BASE;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
@@ -658,16 +636,17 @@ double ac_sync_video(lp_ac_package pPackage, lp_ac_decoder pDec, AVFrame *src_fr
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ac_decode_video_package(lp_ac_package pPackage, lp_ac_video_decoder pDecoder, lp_ac_decoder pDec) {
|
int ac_decode_video_package(lp_ac_package pPackage, lp_ac_video_decoder pDecoder, lp_ac_decoder pDec) {
|
||||||
int finished;
|
if (((lp_ac_package_data)pPackage)->ffpackage.size <= 0)
|
||||||
double pts;
|
return 0;
|
||||||
|
|
||||||
|
int finished = 0;
|
||||||
|
double pts = 0;
|
||||||
|
|
||||||
avcodec_decode_video2(
|
avcodec_decode_video2(
|
||||||
pDecoder->pCodecCtx, pDecoder->pFrame, &finished,
|
pDecoder->pCodecCtx, pDecoder->pFrame, &finished,
|
||||||
&(((lp_ac_package_data)pPackage)->ffpackage));
|
&(((lp_ac_package_data)pPackage)->ffpackage));
|
||||||
|
|
||||||
if (finished) {
|
if (finished) {
|
||||||
pts=0;
|
|
||||||
|
|
||||||
if(((lp_ac_package_data)pPackage)->ffpackage.dts == AV_NOPTS_VALUE &&
|
if(((lp_ac_package_data)pPackage)->ffpackage.dts == AV_NOPTS_VALUE &&
|
||||||
*(uint64_t*)pDecoder->pFrame->opaque != AV_NOPTS_VALUE ){
|
*(uint64_t*)pDecoder->pFrame->opaque != AV_NOPTS_VALUE ){
|
||||||
pts = *(uint64_t*)pDecoder->pFrame->opaque;
|
pts = *(uint64_t*)pDecoder->pFrame->opaque;
|
||||||
|
|||||||
@@ -68,21 +68,8 @@ typedef enum _ac_output_format ac_output_format;
|
|||||||
/*Contains information about the whole file/stream that has been opened. Default values are ""
|
/*Contains information about the whole file/stream that has been opened. Default values are ""
|
||||||
for strings and -1 for integer values.*/
|
for strings and -1 for integer values.*/
|
||||||
struct _ac_file_info {
|
struct _ac_file_info {
|
||||||
/*Information about the file*/
|
|
||||||
char title[512];
|
|
||||||
char author[512];
|
|
||||||
char copyright[512];
|
|
||||||
char comment[512];
|
|
||||||
char album[512];
|
|
||||||
int year;
|
|
||||||
int track;
|
|
||||||
char genre[32];
|
|
||||||
|
|
||||||
/*Length of the file*/
|
/*Length of the file*/
|
||||||
int64_t duration;
|
int64_t duration;
|
||||||
|
|
||||||
/*Bitrate*/
|
|
||||||
int bitrate;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _ac_file_info ac_file_info;
|
typedef struct _ac_file_info ac_file_info;
|
||||||
|
|||||||
Reference in new issue
Block a user