Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: content/common/gpu/media/vaapi_h264_decoder.cc

Issue 10855142: VAVDA: properly mark outputted pictures. (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <dlfcn.h> 5 #include <dlfcn.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 DVLOG(3) << "Will output from VASurface " << it->second->va_surface_id() 1499 DVLOG(3) << "Will output from VASurface " << it->second->va_surface_id()
1500 << " to texture id " << it->second->texture_id(); 1500 << " to texture id " << it->second->texture_id();
1501 1501
1502 return it->second->Sync(); 1502 return it->second->Sync();
1503 } 1503 }
1504 1504
1505 bool VaapiH264Decoder::OutputPic(H264Picture* pic) { 1505 bool VaapiH264Decoder::OutputPic(H264Picture* pic) {
1506 // No longer need to keep POC->surface mapping, since for decoder this POC 1506 // No longer need to keep POC->surface mapping, since for decoder this POC
1507 // is finished with. When the client returns this surface via 1507 // is finished with. When the client returns this surface via
1508 // ReusePictureBuffer(), it will be marked back as available for use. 1508 // ReusePictureBuffer(), it will be marked back as available for use.
1509 DCHECK(!pic->outputted);
1510 pic->outputted = true;
1509 DecodeSurface* dec_surface = UnassignSurfaceFromPoC(pic->pic_order_cnt); 1511 DecodeSurface* dec_surface = UnassignSurfaceFromPoC(pic->pic_order_cnt);
1510 if (!dec_surface) 1512 if (!dec_surface)
1511 return false; 1513 return false;
1512 1514
1513 // Notify the client that a picture can be output. The decoded picture may 1515 // Notify the client that a picture can be output. The decoded picture may
1514 // not be synced with texture contents yet at this point. The client has 1516 // not be synced with texture contents yet at this point. The client has
1515 // to use PutPicToTexture() to ensure that. 1517 // to use PutPicToTexture() to ensure that.
1516 DVLOG(4) << "Posting output task for input_id: " << dec_surface->input_id() 1518 DVLOG(4) << "Posting output task for input_id: " << dec_surface->input_id()
1517 << "output_id: " << dec_surface->picture_buffer_id(); 1519 << "output_id: " << dec_surface->picture_buffer_id();
1518 output_pic_cb_.Run(dec_surface->input_id(), 1520 output_pic_cb_.Run(dec_surface->input_id(),
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 VAAPI_SyncSurface && 2164 VAAPI_SyncSurface &&
2163 VAAPI_BeginPicture && 2165 VAAPI_BeginPicture &&
2164 VAAPI_RenderPicture && 2166 VAAPI_RenderPicture &&
2165 VAAPI_EndPicture && 2167 VAAPI_EndPicture &&
2166 VAAPI_CreateBuffer && 2168 VAAPI_CreateBuffer &&
2167 VAAPI_DestroyBuffer && 2169 VAAPI_DestroyBuffer &&
2168 VAAPI_ErrorStr; 2170 VAAPI_ErrorStr;
2169 } 2171 }
2170 2172
2171 } // namespace content 2173 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698