mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 462957 - Stubs for buffered for WebM and raw video. r=roc a=blocking2.0
This commit is contained in:
parent
03731903d8
commit
659abab890
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user