| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/video/capture/mac/coremedia_glue.h" | 5 #include "media/base/mac/coremedia_glue.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #import <Foundation/Foundation.h> |
| 8 | 9 |
| 9 #include "base/logging.h" | 10 #include "base/logging.h" |
| 10 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 11 | 12 |
| 12 namespace { | 13 namespace { |
| 13 | 14 |
| 14 // This class is used to retrieve some CoreMedia library functions. It must be | 15 // This class is used to retrieve some CoreMedia library functions. It must be |
| 15 // used as a LazyInstance so that it is initialised once and in a thread-safe | 16 // used as a LazyInstance so that it is initialised once and in a thread-safe |
| 16 // way. Normally no work is done in constructors: LazyInstance is an exception. | 17 // way. Normally no work is done in constructors: LazyInstance is an exception. |
| 17 class CoreMediaLibraryInternal { | 18 class CoreMediaLibraryInternal { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 .cm_format_description_get_media_sub_type_method()(desc); | 106 .cm_format_description_get_media_sub_type_method()(desc); |
| 106 } | 107 } |
| 107 | 108 |
| 108 // static | 109 // static |
| 109 CoreMediaGlue::CMVideoDimensions | 110 CoreMediaGlue::CMVideoDimensions |
| 110 CoreMediaGlue::CMVideoFormatDescriptionGetDimensions( | 111 CoreMediaGlue::CMVideoFormatDescriptionGetDimensions( |
| 111 CMVideoFormatDescriptionRef videoDesc) { | 112 CMVideoFormatDescriptionRef videoDesc) { |
| 112 return g_coremedia_handle.Get() | 113 return g_coremedia_handle.Get() |
| 113 .cm_video_format_description_get_dimensions_method()(videoDesc); | 114 .cm_video_format_description_get_dimensions_method()(videoDesc); |
| 114 } | 115 } |
| OLD | NEW |