Skip to content

Commit

Permalink
videotoolbox: sync mode
Browse files Browse the repository at this point in the history
  • Loading branch information
xinzhengzhang committed Jan 5, 2017
1 parent 02f5d97 commit 25d2dbb
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 218 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static bool GetVTBPicture(Ijk_VideoToolBox_Opaque* context, AVFrame* pVTBPicture
return true;
}

void QueuePicture(Ijk_VideoToolBox_Opaque* ctx) {
static void QueuePicture(Ijk_VideoToolBox_Opaque* ctx) {
AVFrame picture = {0};
if (true == GetVTBPicture(ctx, &picture)) {
AVRational tb = ctx->ffp->is->video_st->time_base;
Expand All @@ -336,7 +336,7 @@ void QueuePicture(Ijk_VideoToolBox_Opaque* ctx) {
}


void VTDecoderCallback(void *decompressionOutputRefCon,
static void VTDecoderCallback(void *decompressionOutputRefCon,
void *sourceFrameRefCon,
OSStatus status,
VTDecodeInfoFlags infoFlags,
Expand Down Expand Up @@ -511,7 +511,7 @@ void VTDecoderCallback(void *decompressionOutputRefCon,
}


void vtbsession_destroy(Ijk_VideoToolBox_Opaque *context)
static void vtbsession_destroy(Ijk_VideoToolBox_Opaque *context)
{
if (!context)
return;
Expand All @@ -526,7 +526,7 @@ void vtbsession_destroy(Ijk_VideoToolBox_Opaque *context)
}
}

VTDecompressionSessionRef vtbsession_create(Ijk_VideoToolBox_Opaque* context)
static VTDecompressionSessionRef vtbsession_create(Ijk_VideoToolBox_Opaque* context)
{
FFPlayer *ffp = context->ffp;
int ret = 0;
Expand Down Expand Up @@ -1186,6 +1186,7 @@ static int vtbformat_init(VTBFormatDesc *fmt_desc, AVCodecParameters *codecpar)
if (ret)
goto fail;
assert(context_vtb->fmt_desc.fmt_desc);
vtbformat_destroy(&context_vtb->fmt_desc);

context_vtb->vt_session = vtbsession_create(context_vtb);
if (context_vtb->vt_session == NULL)
Expand Down
Loading

0 comments on commit 25d2dbb

Please sign in to comment.