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

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

Issue 967693002: Clang fixes for chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years, 9 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 | « content/common/gpu/media/h264_decoder.cc ('k') | content/common/gpu/media/vp8_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <fcntl.h> 5 #include <fcntl.h>
6 #include <linux/videodev2.h> 6 #include <linux/videodev2.h>
7 #include <poll.h> 7 #include <poll.h>
8 #include <sys/eventfd.h> 8 #include <sys/eventfd.h>
9 #include <sys/ioctl.h> 9 #include <sys/ioctl.h>
10 #include <sys/mman.h> 10 #include <sys/mman.h>
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 : cleared(cleared), picture(picture) { 233 : cleared(cleared), picture(picture) {
234 } 234 }
235 235
236 V4L2SliceVideoDecodeAccelerator::PictureRecord::~PictureRecord() { 236 V4L2SliceVideoDecodeAccelerator::PictureRecord::~PictureRecord() {
237 } 237 }
238 238
239 class V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator 239 class V4L2SliceVideoDecodeAccelerator::V4L2H264Accelerator
240 : public H264Decoder::H264Accelerator { 240 : public H264Decoder::H264Accelerator {
241 public: 241 public:
242 V4L2H264Accelerator(V4L2SliceVideoDecodeAccelerator* v4l2_dec); 242 V4L2H264Accelerator(V4L2SliceVideoDecodeAccelerator* v4l2_dec);
243 virtual ~V4L2H264Accelerator() override; 243 ~V4L2H264Accelerator() override;
244 244
245 // H264Decoder::H264Accelerator implementation. 245 // H264Decoder::H264Accelerator implementation.
246 scoped_refptr<H264Picture> CreateH264Picture() override; 246 scoped_refptr<H264Picture> CreateH264Picture() override;
247 247
248 bool SubmitFrameMetadata(const media::H264SPS* sps, 248 bool SubmitFrameMetadata(const media::H264SPS* sps,
249 const media::H264PPS* pps, 249 const media::H264PPS* pps,
250 const H264DPB& dpb, 250 const H264DPB& dpb,
251 const H264Picture::Vector& ref_pic_listp0, 251 const H264Picture::Vector& ref_pic_listp0,
252 const H264Picture::Vector& ref_pic_listb0, 252 const H264Picture::Vector& ref_pic_listb0,
253 const H264Picture::Vector& ref_pic_listb1, 253 const H264Picture::Vector& ref_pic_listb1,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 DISALLOW_COPY_AND_ASSIGN(V4L2VP8Accelerator); 316 DISALLOW_COPY_AND_ASSIGN(V4L2VP8Accelerator);
317 }; 317 };
318 318
319 // Codec-specific subclasses of software decoder picture classes. 319 // Codec-specific subclasses of software decoder picture classes.
320 // This allows us to keep decoders oblivious of our implementation details. 320 // This allows us to keep decoders oblivious of our implementation details.
321 class V4L2H264Picture : public H264Picture { 321 class V4L2H264Picture : public H264Picture {
322 public: 322 public:
323 V4L2H264Picture(const scoped_refptr< 323 V4L2H264Picture(const scoped_refptr<
324 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>& dec_surface); 324 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>& dec_surface);
325 virtual ~V4L2H264Picture() override;
326 325
327 V4L2H264Picture* AsV4L2H264Picture() override { return this; } 326 V4L2H264Picture* AsV4L2H264Picture() override { return this; }
328 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface> 327 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>
329 dec_surface() { 328 dec_surface() {
330 return dec_surface_; 329 return dec_surface_;
331 } 330 }
332 331
333 private: 332 private:
333 ~V4L2H264Picture() override;
334
334 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface> 335 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>
335 dec_surface_; 336 dec_surface_;
336 337
337 DISALLOW_COPY_AND_ASSIGN(V4L2H264Picture); 338 DISALLOW_COPY_AND_ASSIGN(V4L2H264Picture);
338 }; 339 };
339 340
340 V4L2H264Picture::V4L2H264Picture(const scoped_refptr< 341 V4L2H264Picture::V4L2H264Picture(const scoped_refptr<
341 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>& dec_surface) 342 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>& dec_surface)
342 : dec_surface_(dec_surface) { 343 : dec_surface_(dec_surface) {
343 } 344 }
344 345
345 V4L2H264Picture::~V4L2H264Picture() { 346 V4L2H264Picture::~V4L2H264Picture() {
346 } 347 }
347 348
348 class V4L2VP8Picture : public VP8Picture { 349 class V4L2VP8Picture : public VP8Picture {
349 public: 350 public:
350 V4L2VP8Picture(const scoped_refptr< 351 V4L2VP8Picture(const scoped_refptr<
351 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>& dec_surface); 352 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>& dec_surface);
352 virtual ~V4L2VP8Picture() override;
353 353
354 V4L2VP8Picture* AsV4L2VP8Picture() override { return this; } 354 V4L2VP8Picture* AsV4L2VP8Picture() override { return this; }
355 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface> 355 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>
356 dec_surface() { 356 dec_surface() {
357 return dec_surface_; 357 return dec_surface_;
358 } 358 }
359 359
360 private: 360 private:
361 ~V4L2VP8Picture() override;
362
361 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface> 363 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>
362 dec_surface_; 364 dec_surface_;
363 365
364 DISALLOW_COPY_AND_ASSIGN(V4L2VP8Picture); 366 DISALLOW_COPY_AND_ASSIGN(V4L2VP8Picture);
365 }; 367 };
366 368
367 V4L2VP8Picture::V4L2VP8Picture(const scoped_refptr< 369 V4L2VP8Picture::V4L2VP8Picture(const scoped_refptr<
368 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>& dec_surface) 370 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface>& dec_surface)
369 : dec_surface_(dec_surface) { 371 : dec_surface_(dec_surface) {
370 } 372 }
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 DCHECK_GT(picture_clearing_count_, 0); 2471 DCHECK_GT(picture_clearing_count_, 0);
2470 picture_clearing_count_--; 2472 picture_clearing_count_--;
2471 SendPictureReady(); 2473 SendPictureReady();
2472 } 2474 }
2473 2475
2474 bool V4L2SliceVideoDecodeAccelerator::CanDecodeOnIOThread() { 2476 bool V4L2SliceVideoDecodeAccelerator::CanDecodeOnIOThread() {
2475 return true; 2477 return true;
2476 } 2478 }
2477 2479
2478 } // namespace content 2480 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/h264_decoder.cc ('k') | content/common/gpu/media/vp8_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698