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