Bug 462957 - Stubs for buffered for WebM and raw video. r=roc a=blocking2.0

This commit is contained in:
Chris Pearce 2010-08-05 19:40:35 +12:00
Родитель 03731903d8
Коммит 659abab890
5 изменённых файлов: 19 добавлений и 1 удалений

Просмотреть файл

@ -300,3 +300,8 @@ PRInt64 nsRawReader::FindEndTime(PRInt64 aEndTime)
{
return -1;
}
nsresult nsRawReader::GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime)
{
return NS_OK;
}

Просмотреть файл

@ -113,6 +113,7 @@ public:
virtual nsresult ReadMetadata();
virtual nsresult Seek(PRInt64 aTime, PRInt64 aStartTime, PRInt64 aEndTime);
virtual PRInt64 FindEndTime(PRInt64 aEndOffset);
virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime);
private:
PRBool ReadFromStream(nsMediaStream *aStream, PRUint8 *aBuf,

Просмотреть файл

@ -41,10 +41,17 @@ function ended(e) {
return false;
}
// Only support for buffered is available for Ogg and WAV.
// Eventually we'll support WebM as well.
function supportsBuffered(type) {
var s = type.toLowerCase();
return /ogg$/.test(s) || /wav$/.test(s)
}
for (var i=0; i<gSeekTests.length; ++i) {
var v = document.createElement('video');
var test = gSeekTests[i];
if (!v.canPlayType(test.type))
if (!v.canPlayType(test.type) || !supportsBuffered(test.type))
continue;
v.src = test.name;
v._name = test.name;

Просмотреть файл

@ -670,3 +670,7 @@ nsresult nsWebMReader::Seek(PRInt64 aTarget, PRInt64 aStartTime, PRInt64 aEndTim
return NS_OK;
}
nsresult nsWebMReader::GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime)
{
return NS_OK;
}

Просмотреть файл

@ -125,6 +125,7 @@ public:
virtual nsresult ReadMetadata();
virtual nsresult Seek(PRInt64 aTime, PRInt64 aStartTime, PRInt64 aEndTime);
virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime);
private:
// Value passed to NextPacket to determine if we are reading a video or an