mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 17:37:30 +09:00
Issue #2357 - WebM demuxer can't tell when a video wants to be transparent.
Required to have an alpha channel (which in the strange world of graphics seems to refer to transparency, and not experimental code) in WebM videos. Straight port of Firefox 53 implementation, adapted slightly for a couple of patches previously taken without this. Ref: BZ 1320829
This commit is contained in:
parent
ef54fc458c
commit
71cc0ef940
5 changed files with 66 additions and 6 deletions
|
|
@ -215,6 +215,7 @@ public:
|
|||
, mRotation(aOther.mRotation)
|
||||
, mBitDepth(aOther.mBitDepth)
|
||||
, mImageRect(aOther.mImageRect)
|
||||
, mAlphaPresent(aOther.mAlphaPresent)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -238,6 +239,16 @@ public:
|
|||
return MakeUnique<VideoInfo>(*this);
|
||||
}
|
||||
|
||||
void SetAlpha(bool aAlphaPresent)
|
||||
{
|
||||
mAlphaPresent = aAlphaPresent;
|
||||
}
|
||||
|
||||
bool HasAlpha() const
|
||||
{
|
||||
return mAlphaPresent;
|
||||
}
|
||||
|
||||
nsIntRect ImageRect() const
|
||||
{
|
||||
if (mImageRect.width < 0 || mImageRect.height < 0) {
|
||||
|
|
@ -312,6 +323,9 @@ private:
|
|||
// mImage may be cropped; currently only used with the WebM container.
|
||||
// A negative width or height indicate that no cropping is to occur.
|
||||
nsIntRect mImageRect;
|
||||
|
||||
// Indicates whether or not frames may contain alpha information.
|
||||
bool mAlphaPresent = false;
|
||||
};
|
||||
|
||||
class AudioInfo : public TrackInfo {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue