/usr/include/mjpegtools/mplex/aunitbuffer.hpp is in libmjpegtools-dev 1:2.1.0+debian-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | #ifndef __AUNITBUFFER_H__
#define __AUNITBUFFER_H__
#include <deque>
#include "mjpeg_logging.h"
#include "aunit.hpp"
class AUStream
{
public:
AUStream() {}
~AUStream()
{
for( std::deque<AUnit *>::iterator i = buf.begin(); i != buf.end(); ++i )
delete *i;
}
void Append( AUnit &rec )
{
if( buf.size() >= BUF_SIZE_SANITY )
mjpeg_error_exit1( "INTERNAL ERROR: AU buffer overflow" );
buf.push_back( new AUnit(rec) );
}
inline AUnit *Next( )
{
if( buf.size()==0 )
{
return 0;
}
else
{
AUnit *res = buf.front();
buf.pop_front();
return res;
}
}
inline void DropLast()
{
if( buf.empty() )
mjpeg_error_exit1( "INTERNAL ERROR: droplast empty AU buffer" );
buf.pop_back();
}
inline AUnit *Lookahead( unsigned int n)
{
return buf.size() <= n ? 0 : buf[n];
}
inline unsigned int MaxAULookahead() const { return buf.size(); }
private:
static const unsigned int BUF_SIZE_SANITY = 1000;
std::deque<AUnit *> buf;
};
#endif // __AUSTREAM_H__
|