Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP3, Ogg/Vorbis and Flac playback #54

Merged
merged 5 commits into from Nov 8, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Update from Gecko upstream

  • Loading branch information...
philn committed Nov 7, 2017
commit 49799ed2046f5859fa3b7333b32dbf817aec9b42
@@ -751,7 +751,7 @@ class gfxPrefs final
DECL_GFX_PREF(Live, "webgl.enable-webgl2", WebGL2Enabled, bool, true);
DECL_GFX_PREF(Live, "webgl.force-enabled", WebGLForceEnabled, bool, false);
DECL_GFX_PREF(Once, "webgl.force-layers-readback", WebGLForceLayersReadback, bool, false);
DECL_GFX_PREF(Live, "webgl.force-index-validation", WebGLForceIndexValidation, bool, false);
DECL_GFX_PREF(Live, "webgl.force-index-validation", WebGLForceIndexValidation, int32_t, 0);
DECL_GFX_PREF(Live, "webgl.lose-context-on-memory-pressure", WebGLLoseContextOnMemoryPressure, bool, false);
DECL_GFX_PREF(Live, "webgl.max-warnings-per-context", WebGLMaxWarningsPerContext, uint32_t, 32);
DECL_GFX_PREF(Live, "webgl.min_capability_mode", WebGLMinCapabilityMode, bool, false);
@@ -543,6 +543,7 @@ enum HistogramID : uint32_t {
MOZ_SQLITE_PLACES_READ_MAIN_THREAD_MS,
MOZ_SQLITE_COOKIES_OPEN_READAHEAD_MS,
MOZ_SQLITE_COOKIES_READ_MS,
MOZ_SQLITE_COOKIES_OLD_SCHEMA,
MOZ_SQLITE_COOKIES_BLOCK_MAIN_THREAD_MS,
MOZ_SQLITE_COOKIES_READ_MAIN_THREAD_MS,
MOZ_SQLITE_WEBAPPS_READ_MS,
@@ -746,11 +746,16 @@ class UnscaledFont : public SupportsThreadSafeWeakPtr<UnscaledFont>

typedef void (*FontFileDataOutput)(const uint8_t *aData, uint32_t aLength, uint32_t aIndex,
void *aBaton);
typedef void (*WRFontDescriptorOutput)(const uint8_t *aData, uint32_t aLength, uint32_t aIndex,
void *aBaton);
typedef void (*FontInstanceDataOutput)(const uint8_t* aData, uint32_t aLength, void* aBaton);
typedef void (*FontDescriptorOutput)(const uint8_t* aData, uint32_t aLength, void* aBaton);
typedef void (*FontDescriptorOutput)(const uint8_t* aData, uint32_t aLength, uint32_t aIndex,
void* aBaton);

virtual bool GetFontFileData(FontFileDataOutput, void *) { return false; }

virtual bool GetWRFontDescriptor(WRFontDescriptorOutput, void *) { return false; }

virtual bool GetFontInstanceData(FontInstanceDataOutput, void *) { return false; }

virtual bool GetFontDescriptor(FontDescriptorOutput, void *) { return false; }
@@ -1565,7 +1570,7 @@ class GFX2D_API Factory
* data retrieved from ScaledFont::GetFontDescriptor.
*/
static already_AddRefed<UnscaledFont>
CreateUnscaledFontFromFontDescriptor(FontType aType, const uint8_t* aData, uint32_t aDataLength);
CreateUnscaledFontFromFontDescriptor(FontType aType, const uint8_t* aData, uint32_t aDataLength, uint32_t aIndex);

/**
* This creates a scaled font with an associated cairo_scaled_font_t, and
@@ -410,10 +410,21 @@ MP4TrackDemuxer::Seek(const media::TimeUnit& aTime)
mIterator->Seek(seekTime.ToMicroseconds());

// Check what time we actually seeked to.
mQueuedSample = GetNextSample();
if (mQueuedSample) {
seekTime = mQueuedSample->mTime;
}
do {
RefPtr<MediaRawData> sample = GetNextSample();
if (!sample) {
return SeekPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_END_OF_STREAM,
__func__);
}
if (!sample->Size()) {
// This sample can't be decoded, continue searching.
continue;
}
if (sample->mKeyframe) {
mQueuedSample = sample;
seekTime = mQueuedSample->mTime;
}
} while (!mQueuedSample);

SetNextKeyFrameTime();

@@ -447,7 +447,7 @@ Moof::Moof(Box& aBox, Trex& aTrex, Mvhd& aMvhd, Mdhd& aMdhd, Edts& aEdts, Sinf&
int64_t endDecodeTime = decodeOffset.isOk() & offsetOffset.isOk() ?
decodeOffset.unwrap() + offsetOffset.unwrap() : 0;
int64_t decodeDuration = endDecodeTime - mIndex[0].mDecodeTime;
double adjust = (double)decodeDuration / presentationDuration;
double adjust = !!presentationDuration ? (double)decodeDuration / presentationDuration : 0;
int64_t dtsOffset = mIndex[0].mDecodeTime;
int64_t compositionDuration = 0;
// Adjust the dts, ensuring that the new adjusted dts will never be greater
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.