Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(767)

Unified Diff: media/ffmpeg/ffmpeg_common.h

Issue 8341033: Remove DemuxerStream::GetAVStream() once and for all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: now with cmath Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/video_decoder_config.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/ffmpeg/ffmpeg_common.h
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
index 8808f45068578961e9222f847deaa3d4efa1d406..bb01f4f12e3b246a59deab1b81bf3b04e49b6513 100644
--- a/media/ffmpeg/ffmpeg_common.h
+++ b/media/ffmpeg/ffmpeg_common.h
@@ -74,8 +74,12 @@ void AudioDecoderConfigToAVCodecContext(
const AudioDecoderConfig& config,
AVCodecContext* codec_context);
-VideoCodec CodecIDToVideoCodec(CodecID codec_id);
-CodecID VideoCodecToCodecID(VideoCodec video_codec);
+void AVStreamToVideoDecoderConfig(
+ const AVStream* stream,
+ VideoDecoderConfig* config);
+void VideoDecoderConfigToAVCodecContext(
+ const VideoDecoderConfig& config,
+ AVCodecContext* codec_context);
// Converts FFmpeg's channel layout to chrome's ChannelLayout. |channels| can
// be used when FFmpeg's channel layout is not informative in order to make a
@@ -89,12 +93,9 @@ VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format);
// Converts video formats to its corresponding FFmpeg's pixel formats.
PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format);
-// Calculates duration of one frame in the |stream| based on its frame rate.
-base::TimeDelta GetFrameDuration(AVStream* stream);
-
-// Calculates the natural width and height of the video using the video's
-// encoded dimensions and sample_aspect_ratio.
-gfx::Size GetNaturalSize(AVStream* stream);
+// Calculates the duration of one frame based on the frame rate specified by
+// |config|.
+base::TimeDelta GetFrameDuration(const VideoDecoderConfig& config);
// Closes & destroys all AVStreams in the context and then closes &
// destroys the AVFormatContext.
« no previous file with comments | « media/base/video_decoder_config.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698