mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Create a hasBits() method that tells whether there's currently bits available or not.
This commit is contained in:
+1
-4
@@ -62,10 +62,7 @@ const uchar* MediaImpl::getBits()
|
||||
_bitsChanged = false;
|
||||
|
||||
// Return data.
|
||||
if (_currentFrameSample == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return _data;
|
||||
return (hasBits() ? _data : NULL);
|
||||
}
|
||||
|
||||
QString MediaImpl::getUri() const
|
||||
|
||||
@@ -98,6 +98,9 @@ public:
|
||||
*/
|
||||
const uchar* getBits();
|
||||
|
||||
/// Returns true iff bits have started flowing (ie. if there is at least a first sample available).
|
||||
bool hasBits() const { return (_currentFrameSample != NULL); }
|
||||
|
||||
/// Returns true iff bits have changed since last call to getBits().
|
||||
bool bitsHaveChanged() const { return _bitsChanged; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user