Bug 1309163: Add BitReader::BitsLeft method. r=gerald

MozReview-Commit-ID: 9HOunJRb1ht

--HG--
extra : rebase_source : 6d71fb2afd90fc061b53bbb7285e5eada3bfea4a
This commit is contained in:
Jean-Yves Avenard 2016-10-24 17:22:05 +11:00
parent c028a5f875
commit 11d2736751
2 changed files with 8 additions and 0 deletions

View File

@ -101,4 +101,10 @@ BitReader::BitCount() const
return mSize * 8 - mBitReader->numBitsLeft(); return mSize * 8 - mBitReader->numBitsLeft();
} }
size_t
BitReader::BitsLeft() const
{
return mBitReader->numBitsLeft();
}
} // namespace mp4_demuxer } // namespace mp4_demuxer

View File

@ -34,6 +34,8 @@ public:
// Return the number of bits parsed so far; // Return the number of bits parsed so far;
size_t BitCount() const; size_t BitCount() const;
// Return the number of bits left.
size_t BitsLeft() const;
private: private:
nsAutoPtr<stagefright::ABitReader> mBitReader; nsAutoPtr<stagefright::ABitReader> mBitReader;