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

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

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cros build Created 4 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
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 <string.h> 10 #include <string.h>
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 if (dqbuf.m.planes[0].bytesused == 0) { 1104 if (dqbuf.m.planes[0].bytesused == 0) {
1105 // This is an empty output buffer returned as part of a flush. 1105 // This is an empty output buffer returned as part of a flush.
1106 free_output_buffers_.push(dqbuf.index); 1106 free_output_buffers_.push(dqbuf.index);
1107 } else { 1107 } else {
1108 DCHECK_GE(dqbuf.timestamp.tv_sec, 0); 1108 DCHECK_GE(dqbuf.timestamp.tv_sec, 0);
1109 output_record.at_client = true; 1109 output_record.at_client = true;
1110 DVLOG(3) << "Dequeue(): returning input_id=" << dqbuf.timestamp.tv_sec 1110 DVLOG(3) << "Dequeue(): returning input_id=" << dqbuf.timestamp.tv_sec
1111 << " as picture_id=" << output_record.picture_id; 1111 << " as picture_id=" << output_record.picture_id;
1112 const media::Picture& picture = 1112 const media::Picture& picture =
1113 media::Picture(output_record.picture_id, dqbuf.timestamp.tv_sec, 1113 media::Picture(output_record.picture_id, dqbuf.timestamp.tv_sec,
1114 gfx::Rect(visible_size_), false); 1114 gfx::Rect(visible_size_), false, false);
1115 pending_picture_ready_.push( 1115 pending_picture_ready_.push(
1116 PictureRecord(output_record.cleared, picture)); 1116 PictureRecord(output_record.cleared, picture));
1117 SendPictureReady(); 1117 SendPictureReady();
1118 output_record.cleared = true; 1118 output_record.cleared = true;
1119 decoder_frames_at_client_++; 1119 decoder_frames_at_client_++;
1120 } 1120 }
1121 output_buffer_queued_count_--; 1121 output_buffer_queued_count_--;
1122 } 1122 }
1123 1123
1124 NotifyFlushDoneIfNeeded(); 1124 NotifyFlushDoneIfNeeded();
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2033
2034 void V4L2VideoDecodeAccelerator::PictureCleared() { 2034 void V4L2VideoDecodeAccelerator::PictureCleared() {
2035 DVLOG(3) << "PictureCleared(). clearing count=" << picture_clearing_count_; 2035 DVLOG(3) << "PictureCleared(). clearing count=" << picture_clearing_count_;
2036 DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current()); 2036 DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current());
2037 DCHECK_GT(picture_clearing_count_, 0); 2037 DCHECK_GT(picture_clearing_count_, 0);
2038 picture_clearing_count_--; 2038 picture_clearing_count_--;
2039 SendPictureReady(); 2039 SendPictureReady();
2040 } 2040 }
2041 2041
2042 } // namespace content 2042 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698