summaryrefslogtreecommitdiffstats
path: root/media/ffmpeg/ffmpeg_common.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 06:53:57 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 06:53:57 +0000
commit3e21bd00219f2dd475f36cad70c7e8e5a6c90a4e (patch)
treea666f584af965358e59dbb99d51f4e1ede810f61 /media/ffmpeg/ffmpeg_common.h
parent80afbdbf6432bae199da3ef53dc02de7160585cc (diff)
downloadchromium_src-3e21bd00219f2dd475f36cad70c7e8e5a6c90a4e.zip
chromium_src-3e21bd00219f2dd475f36cad70c7e8e5a6c90a4e.tar.gz
chromium_src-3e21bd00219f2dd475f36cad70c7e8e5a6c90a4e.tar.bz2
Create media.dll / libmedia.so.
This is a re-attempt at landing http://codereview.chromium.org/7572040, now with a DEPS roll to pick up the changes made to ffmpeg by http://codereview.chromium.org/7778004/ so that media_unittests run properly on Linux. TBR=fischman Review URL: http://codereview.chromium.org/7775004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg/ffmpeg_common.h')
-rw-r--r--media/ffmpeg/ffmpeg_common.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
index 5ac0607..dec47df 100644
--- a/media/ffmpeg/ffmpeg_common.h
+++ b/media/ffmpeg/ffmpeg_common.h
@@ -12,6 +12,7 @@
#include "base/memory/singleton.h"
#include "base/time.h"
#include "media/base/channel_layout.h"
+#include "media/base/media_export.h"
#include "media/video/video_decode_engine.h"
// Include FFmpeg header files.
@@ -54,15 +55,15 @@ class ScopedPtrAVFreePacket {
// For example if |timestamp| equals 11025 and |time_base| equals {1, 44100}
// then the return value will be a base::TimeDelta for 0.25 seconds since that
// is how much time 11025/44100ths of a second represents.
-base::TimeDelta ConvertFromTimeBase(const AVRational& time_base,
- int64 timestamp);
+MEDIA_EXPORT base::TimeDelta ConvertFromTimeBase(const AVRational& time_base,
+ int64 timestamp);
// Converts a base::TimeDelta into an int64 timestamp in |time_base| units.
// For example if |timestamp| is 0.5 seconds and |time_base| is {1, 44100}, then
// the return value will be 22050 since that is how many 1/44100ths of a second
// represent 0.5 seconds.
-int64 ConvertToTimeBase(const AVRational& time_base,
- const base::TimeDelta& timestamp);
+MEDIA_EXPORT int64 ConvertToTimeBase(const AVRational& time_base,
+ const base::TimeDelta& timestamp);
VideoCodec CodecIDToVideoCodec(CodecID codec_id);
CodecID VideoCodecToCodecID(VideoCodec video_codec);
@@ -80,9 +81,9 @@ base::TimeDelta GetFrameDuration(AVStream* stream);
// Returns true if a valid seek point was found after |timestamp| and
// |seek_time| was set. Returns false if a seek point could not be
// found or the parameters are invalid.
-bool GetSeekTimeAfter(AVStream* stream,
- const base::TimeDelta& timestamp,
- base::TimeDelta* seek_time);
+MEDIA_EXPORT bool GetSeekTimeAfter(AVStream* stream,
+ const base::TimeDelta& timestamp,
+ base::TimeDelta* seek_time);
// Get the number of bytes required to play the stream over a specified
// time range. This is an estimate based on the available index data.
@@ -97,12 +98,12 @@ bool GetSeekTimeAfter(AVStream* stream,
// |range_end| - The end time for the range covered by |bytes|. This may be
// different than |end_time| if the index doesn't have data for
// that exact time. |range_end| >= |end_time|
-bool GetStreamByteCountOverRange(AVStream* stream,
- const base::TimeDelta& start_time,
- const base::TimeDelta& end_time,
- int64* bytes,
- base::TimeDelta* range_start,
- base::TimeDelta* range_end);
+MEDIA_EXPORT bool GetStreamByteCountOverRange(AVStream* stream,
+ const base::TimeDelta& start_time,
+ const base::TimeDelta& end_time,
+ int64* bytes,
+ base::TimeDelta* range_start,
+ base::TimeDelta* range_end);
// Calculates the width and height of the video surface using the video's
// encoded dimensions and sample_aspect_ratio.