| OLD | NEW |
| 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 "media/gpu/vt_video_decode_accelerator_mac.h" | 5 #include "media/gpu/vt_video_decode_accelerator_mac.h" |
| 6 | 6 |
| 7 #include <CoreVideo/CoreVideo.h> | 7 #include <CoreVideo/CoreVideo.h> |
| 8 #include <OpenGL/CGLIOSurface.h> | 8 #include <OpenGL/CGLIOSurface.h> |
| 9 #include <OpenGL/gl.h> | 9 #include <OpenGL/gl.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 return; | 637 return; |
| 638 } | 638 } |
| 639 | 639 |
| 640 // ConfigureDecoder() calls NotifyError() on failure. | 640 // ConfigureDecoder() calls NotifyError() on failure. |
| 641 if (!ConfigureDecoder()) | 641 if (!ConfigureDecoder()) |
| 642 return; | 642 return; |
| 643 } | 643 } |
| 644 } | 644 } |
| 645 | 645 |
| 646 // If no IDR has been seen yet, skip decoding. | 646 // If no IDR has been seen yet, skip decoding. |
| 647 if (has_slice && (!session_ || waiting_for_idr_) && config_changed_) { | 647 if (has_slice && waiting_for_idr_) { |
| 648 if (!missing_idr_logged_) { | 648 if (!missing_idr_logged_) { |
| 649 LOG(ERROR) << "Illegal attempt to decode without IDR. " | 649 LOG(ERROR) << "Illegal attempt to decode without IDR. " |
| 650 << "Discarding decode requests until next IDR."; | 650 << "Discarding decode requests until next IDR."; |
| 651 missing_idr_logged_ = true; | 651 missing_idr_logged_ = true; |
| 652 } | 652 } |
| 653 has_slice = false; | 653 has_slice = false; |
| 654 } | 654 } |
| 655 | 655 |
| 656 // If there is nothing to decode, drop the bitstream buffer by returning an | 656 // If there is nothing to decode, drop the bitstream buffer by returning an |
| 657 // empty frame. | 657 // empty frame. |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 SupportedProfile profile; | 1139 SupportedProfile profile; |
| 1140 profile.profile = supported_profile; | 1140 profile.profile = supported_profile; |
| 1141 profile.min_resolution.SetSize(16, 16); | 1141 profile.min_resolution.SetSize(16, 16); |
| 1142 profile.max_resolution.SetSize(4096, 2160); | 1142 profile.max_resolution.SetSize(4096, 2160); |
| 1143 profiles.push_back(profile); | 1143 profiles.push_back(profile); |
| 1144 } | 1144 } |
| 1145 return profiles; | 1145 return profiles; |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 } // namespace media | 1148 } // namespace media |
| OLD | NEW |