| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef MEDIA_FFMPEG_FFMPEG_COMMON_H_ | 5 #ifndef MEDIA_FFMPEG_FFMPEG_COMMON_H_ |
| 6 #define MEDIA_FFMPEG_FFMPEG_COMMON_H_ | 6 #define MEDIA_FFMPEG_FFMPEG_COMMON_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 // Used for FFmpeg error codes. | 10 // Used for FFmpeg error codes. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // Converts FFmpeg's pixel formats to its corresponding supported video format. | 137 // Converts FFmpeg's pixel formats to its corresponding supported video format. |
| 138 MEDIA_EXPORT VideoPixelFormat | 138 MEDIA_EXPORT VideoPixelFormat |
| 139 AVPixelFormatToVideoPixelFormat(AVPixelFormat pixel_format); | 139 AVPixelFormatToVideoPixelFormat(AVPixelFormat pixel_format); |
| 140 | 140 |
| 141 // Converts video formats to its corresponding FFmpeg's pixel formats. | 141 // Converts video formats to its corresponding FFmpeg's pixel formats. |
| 142 AVPixelFormat VideoPixelFormatToAVPixelFormat(VideoPixelFormat video_format); | 142 AVPixelFormat VideoPixelFormatToAVPixelFormat(VideoPixelFormat video_format); |
| 143 | 143 |
| 144 ColorSpace AVColorSpaceToColorSpace(AVColorSpace color_space, | 144 ColorSpace AVColorSpaceToColorSpace(AVColorSpace color_space, |
| 145 AVColorRange color_range); | 145 AVColorRange color_range); |
| 146 | 146 |
| 147 // Convert FFmpeg UTC representation (YYYY-MM-DD HH:MM:SS) to base::Time. | 147 // Convert FFmpeg UTC representation (YYYY-MM-DDTHH:MM:SS.xxxxxxZ) to |
| 148 // base::Time. |
| 148 // Returns true and sets |*out| if |date_utc| contains a valid | 149 // Returns true and sets |*out| if |date_utc| contains a valid |
| 149 // date string. Otherwise returns fals and timeline_offset is unmodified. | 150 // date string. Otherwise returns false and |out| is unmodified. |
| 150 MEDIA_EXPORT bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out); | 151 MEDIA_EXPORT bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out); |
| 151 | 152 |
| 152 // Returns a 32-bit hash for the given codec name. See the VerifyUmaCodecHashes | 153 // Returns a 32-bit hash for the given codec name. See the VerifyUmaCodecHashes |
| 153 // unit test for more information and code for generating the histogram XML. | 154 // unit test for more information and code for generating the histogram XML. |
| 154 MEDIA_EXPORT int32_t HashCodecName(const char* codec_name); | 155 MEDIA_EXPORT int32_t HashCodecName(const char* codec_name); |
| 155 | 156 |
| 156 } // namespace media | 157 } // namespace media |
| 157 | 158 |
| 158 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ | 159 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ |
| OLD | NEW |