Create a hasBits() method that tells whether there's currently bits available or not.

This commit is contained in:
Tats
2016-02-17 15:53:55 -05:00
parent 0e2baa4d76
commit d62343ee95
2 changed files with 4 additions and 4 deletions
+1 -4
View File
@@ -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
+3
View File
@@ -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; }