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

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

Issue 426873004: Pass decoded picture size from VDA to client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android build Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <errno.h> 6 #include <errno.h>
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <linux/videodev2.h> 8 #include <linux/videodev2.h>
9 #include <poll.h> 9 #include <poll.h>
10 #include <sys/eventfd.h> 10 #include <sys/eventfd.h>
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 DCHECK_NE(output_record.picture_id, -1); 1084 DCHECK_NE(output_record.picture_id, -1);
1085 output_record.at_device = false; 1085 output_record.at_device = false;
1086 if (dqbuf.m.planes[0].bytesused + dqbuf.m.planes[1].bytesused == 0) { 1086 if (dqbuf.m.planes[0].bytesused + dqbuf.m.planes[1].bytesused == 0) {
1087 // This is an empty output buffer returned as part of a flush. 1087 // This is an empty output buffer returned as part of a flush.
1088 free_output_buffers_.push(dqbuf.index); 1088 free_output_buffers_.push(dqbuf.index);
1089 } else { 1089 } else {
1090 DCHECK_GE(dqbuf.timestamp.tv_sec, 0); 1090 DCHECK_GE(dqbuf.timestamp.tv_sec, 0);
1091 output_record.at_client = true; 1091 output_record.at_client = true;
1092 DVLOG(3) << "Dequeue(): returning input_id=" << dqbuf.timestamp.tv_sec 1092 DVLOG(3) << "Dequeue(): returning input_id=" << dqbuf.timestamp.tv_sec
1093 << " as picture_id=" << output_record.picture_id; 1093 << " as picture_id=" << output_record.picture_id;
1094 const media::Picture& picture = 1094 const media::Picture& picture = media::Picture(
1095 media::Picture(output_record.picture_id, dqbuf.timestamp.tv_sec); 1095 output_record.picture_id, dqbuf.timestamp.tv_sec, frame_buffer_size_);
1096 pending_picture_ready_.push( 1096 pending_picture_ready_.push(
1097 PictureRecord(output_record.cleared, picture)); 1097 PictureRecord(output_record.cleared, picture));
1098 SendPictureReady(); 1098 SendPictureReady();
1099 output_record.cleared = true; 1099 output_record.cleared = true;
1100 decoder_frames_at_client_++; 1100 decoder_frames_at_client_++;
1101 } 1101 }
1102 output_buffer_queued_count_--; 1102 output_buffer_queued_count_--;
1103 } 1103 }
1104 1104
1105 NotifyFlushDoneIfNeeded(); 1105 NotifyFlushDoneIfNeeded();
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 gfx::Size new_size(base::checked_cast<int>(format.fmt.pix_mp.width), 1932 gfx::Size new_size(base::checked_cast<int>(format.fmt.pix_mp.width),
1933 base::checked_cast<int>(format.fmt.pix_mp.height)); 1933 base::checked_cast<int>(format.fmt.pix_mp.height));
1934 if (frame_buffer_size_ != new_size) { 1934 if (frame_buffer_size_ != new_size) {
1935 DVLOG(3) << "IsResolutionChangeNecessary(): Resolution change detected"; 1935 DVLOG(3) << "IsResolutionChangeNecessary(): Resolution change detected";
1936 return true; 1936 return true;
1937 } 1937 }
1938 return false; 1938 return false;
1939 } 1939 }
1940 1940
1941 } // namespace content 1941 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | content/common/gpu/media/vaapi_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698