diff options
author | jiguoliang <jiguoliang@localhost.localdomain> | 2011-01-21 11:41:30 +0800 |
---|---|---|
committer | jiguoliang <jiguoliang@localhost.localdomain> | 2011-01-21 11:41:30 +0800 |
commit | 34423a55ce1196bff0f90a2d2d670fc757265bf4 (patch) | |
tree | 47816b466c009999ebc334e11826e679659bf239 | |
parent | c607804954ef1386a3bf2e4ff0399365fe0d6b1d (diff) | |
download | libva-34423a55ce1196bff0f90a2d2d670fc757265bf4.tar.gz |
add the VACodedBufferSegment data structure for the get_frame function
-rw-r--r-- | va/va_fool.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/va/va_fool.c b/va/va_fool.c index be2540b..c8ef90b 100644 --- a/va/va_fool.c +++ b/va/va_fool.c @@ -422,7 +422,7 @@ VAStatus va_FoolMapBuffer ( ) { VABufferType type; - unsigned int size; + unsigned int size,frame_size = 0; unsigned int num_elements; DPY2INDEX(dpy); @@ -443,9 +443,19 @@ VAStatus va_FoolMapBuffer ( /* expect APP to MapBuffer when get the the coded data */ if (*pbuf && (buf_idx == VAEncCodedBufferType)) { /* it is coded buffer */ /* read from a clip */ - va_FoolGetFrame(fool_context[idx].fool_fp_codedclip, - fool_context[idx].frame_buf); - *pbuf = fool_context[idx].frame_buf; + frame_size = va_FoolGetFrame(fool_context[idx].fool_fp_codedclip, + fool_context[idx].frame_buf); + + VACodedBufferSegment *codebuf; + codebuf = malloc(sizeof(VACodedBufferSegment)); + memset(codebuf,0,sizeof(VACodedBufferSegment)); + codebuf->size = frame_size; + codebuf->bit_offset = 0; + codebuf->status = 0; + codebuf->reserved = 0; + codebuf->buf = fool_context[idx].frame_buf; + codebuf->next = NULL; + *pbuf = codebuf; } return 1; /* don't call into driver */ } |