Index: media/base/test_helpers.h |
diff --git a/media/base/test_helpers.h b/media/base/test_helpers.h |
index 7eebfd9fb0232fed0c993f326fb242cffc9ba02c..89a64689e79588c968eab4ce64e912d3aa887dde 100644 |
--- a/media/base/test_helpers.h |
+++ b/media/base/test_helpers.h |
@@ -21,6 +21,7 @@ class TimeDelta; |
namespace media { |
class AudioBuffer; |
+class DecoderBuffer; |
// Return a callback that expects to be run once. |
base::Closure NewExpectedClosure(); |
@@ -128,6 +129,18 @@ scoped_refptr<AudioBuffer> MakePlanarAudioBuffer( |
int frames, |
base::TimeDelta start_time); |
+// Create a fake video DecoderBuffer for testing purpose. The buffer contains |
+// part of video decoder config info embedded so that the testing code can do |
+// some sanity check. |
+scoped_refptr<DecoderBuffer> CreateFakeVideoBufferForTest( |
+ const VideoDecoderConfig& config, |
+ base::TimeDelta timestamp, |
+ base::TimeDelta duration); |
+ |
+// Verify if a fake video DecoderBuffer is valid. |
+bool VerifyFakeVideoBufferForTest(const scoped_refptr<DecoderBuffer>& buffer, |
+ const VideoDecoderConfig& config); |
+ |
} // namespace media |
#endif // MEDIA_BASE_TEST_HELPERS_H_ |