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 // Used for FFmpeg error codes. | 8 // Used for FFmpeg error codes. |
9 #include <cerrno> | 9 #include <cerrno> |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 MEDIA_EXPORT base::TimeDelta ConvertFromTimeBase(const AVRational& time_base, | 65 MEDIA_EXPORT base::TimeDelta ConvertFromTimeBase(const AVRational& time_base, |
66 int64 timestamp); | 66 int64 timestamp); |
67 | 67 |
68 // Converts a base::TimeDelta into an int64 timestamp in |time_base| units. | 68 // Converts a base::TimeDelta into an int64 timestamp in |time_base| units. |
69 // For example if |timestamp| is 0.5 seconds and |time_base| is {1, 44100}, then | 69 // For example if |timestamp| is 0.5 seconds and |time_base| is {1, 44100}, then |
70 // the return value will be 22050 since that is how many 1/44100ths of a second | 70 // the return value will be 22050 since that is how many 1/44100ths of a second |
71 // represent 0.5 seconds. | 71 // represent 0.5 seconds. |
72 MEDIA_EXPORT int64 ConvertToTimeBase(const AVRational& time_base, | 72 MEDIA_EXPORT int64 ConvertToTimeBase(const AVRational& time_base, |
73 const base::TimeDelta& timestamp); | 73 const base::TimeDelta& timestamp); |
74 | 74 |
75 void AVCodecContextToAudioDecoderConfig( | 75 void AVCodecContextToAudioDecoderConfig( |
ddorwin
2013/03/10 21:29:39
Should this be local to the .cc file now?
fgalligan1
2013/03/12 00:42:42
Done.
| |
76 const AVCodecContext* codec_context, | 76 const AVCodecContext* codec_context, |
77 bool is_encrypted, | |
78 AudioDecoderConfig* config); | |
79 void AVStreamToAudioDecoderConfig( | |
80 const AVStream* stream, | |
77 AudioDecoderConfig* config); | 81 AudioDecoderConfig* config); |
78 void AudioDecoderConfigToAVCodecContext( | 82 void AudioDecoderConfigToAVCodecContext( |
79 const AudioDecoderConfig& config, | 83 const AudioDecoderConfig& config, |
80 AVCodecContext* codec_context); | 84 AVCodecContext* codec_context); |
81 | 85 |
82 void AVStreamToVideoDecoderConfig( | 86 void AVStreamToVideoDecoderConfig( |
83 const AVStream* stream, | 87 const AVStream* stream, |
84 VideoDecoderConfig* config); | 88 VideoDecoderConfig* config); |
85 void VideoDecoderConfigToAVCodecContext( | 89 void VideoDecoderConfigToAVCodecContext( |
86 const VideoDecoderConfig& config, | 90 const VideoDecoderConfig& config, |
(...skipping 13 matching lines...) Expand all Loading... | |
100 | 104 |
101 // Converts an FFmpeg video codec ID into its corresponding supported codec id. | 105 // Converts an FFmpeg video codec ID into its corresponding supported codec id. |
102 VideoCodec CodecIDToVideoCodec(CodecID codec_id); | 106 VideoCodec CodecIDToVideoCodec(CodecID codec_id); |
103 | 107 |
104 // Converts an FFmpeg audio codec ID into its corresponding supported codec id. | 108 // Converts an FFmpeg audio codec ID into its corresponding supported codec id. |
105 AudioCodec CodecIDToAudioCodec(CodecID codec_id); | 109 AudioCodec CodecIDToAudioCodec(CodecID codec_id); |
106 | 110 |
107 } // namespace media | 111 } // namespace media |
108 | 112 |
109 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ | 113 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ |
OLD | NEW |