diff --git a/mythplugins/mytharchive/mytharchivehelper/external/pxsup2dast.c b/mythplugins/mytharchive/mytharchivehelper/external/pxsup2dast.c index 8a850fa47c0..72aac1665a3 100644 --- a/mythplugins/mytharchive/mytharchivehelper/external/pxsup2dast.c +++ b/mythplugins/mytharchive/mytharchivehelper/external/pxsup2dast.c @@ -89,15 +89,15 @@ int sup2dast(const char *supfile, const char *ifofile, int delay_ms); struct exc__state { - struct exc__state * prev; - jmp_buf env; + struct exc__state *m_prev; + jmp_buf m_env; }; struct { - struct exc__state * last; - char msgbuf[1024]; - int buflen; + struct exc__state *m_last; + char m_msgbuf[1024]; + int m_buflen; } EXC /* = { 0 }*/ ; // These macros now all take a parameter 'x' to specify a recursion @@ -105,28 +105,28 @@ struct // level of recursion, preventing the compiler from complaining about // shadowed variables. #define exc_try(x) do { struct exc__state exc_s##x; int exc_type##x GCCATTR_UNUSED; \ - exc_s##x.prev = EXC.last; EXC.last = &exc_s##x; if ((exc_type##x = setjmp(exc_s##x.env)) == 0) + exc_s##x.m_prev = EXC.m_last; EXC.m_last = &exc_s##x; if ((exc_type##x = setjmp(exc_s##x.m_env)) == 0) -#define exc_ftry(x) do { struct exc__state exc_s##x, *exc_p##x = EXC.last; \ - int exc_type##x GCCATTR_UNUSED; exc_s##x.prev = EXC.last; \ - EXC.last = &exc_s##x; if ((exc_type##x = setjmp(exc_s##x.env)) == 0) +#define exc_ftry(x) do { struct exc__state exc_s##x, *exc_p##x = EXC.m_last; \ + int exc_type##x GCCATTR_UNUSED; exc_s##x.prev = EXC.m_last; \ + EXC.m_last = &exc_s##x; if ((exc_type##x = setjmp(exc_s##x.env)) == 0) #define exc_catch(x,t) else if ((t) == exc_type##x) -#define exc_end(x) else __exc_throw(exc_type##x); EXC.last = exc_s##x.prev; } while (0) +#define exc_end(x) else __exc_throw(exc_type##x); EXC.m_last = exc_s##x.m_prev; } while (0) -#define exc_return(x) for (EXC.last = exc_p##x;) return +#define exc_return(x) for (EXC.m_last = exc_p##x;) return -#define exc_fthrow(x) for (EXC.last = exc_p##x;) ex_throw +#define exc_fthrow(x) for (EXC.m_last = exc_p##x;) ex_throw #define exc_catchall else -#define exc_endall(x) EXC.last = exc_s##x.prev; } while (0) +#define exc_endall(x) EXC.m_last = exc_s##x.m_prev; } while (0) static void __exc_throw(int type) /* protoadd GCCATTR_NORETURN */ { - struct exc__state * exc_s = EXC.last; - EXC.last = EXC.last->prev; - longjmp(exc_s->env, type); + struct exc__state * exc_s = EXC.m_last; + EXC.m_last = EXC.m_last->m_prev; + longjmp(exc_s->m_env, type); } static void exc_throw(int type, const char * format, ...) @@ -138,35 +138,35 @@ static void exc_throw(int type, const char * format, ...) int err = errno; va_start(ap, format); - unsigned int len = vsnprintf(EXC.msgbuf, sizeof EXC.msgbuf, format, ap); + unsigned int len = vsnprintf(EXC.m_msgbuf, sizeof EXC.m_msgbuf, format, ap); va_end(ap); - if (len >= sizeof EXC.msgbuf) + if (len >= sizeof EXC.m_msgbuf) { - len = sizeof EXC.msgbuf - 1; - EXC.msgbuf[len] = '\0'; + len = sizeof EXC.m_msgbuf - 1; + EXC.m_msgbuf[len] = '\0'; } else { if (format[strlen(format) - 1] == ':') { - int l = snprintf(&EXC.msgbuf[len], sizeof EXC.msgbuf - len, + int l = snprintf(&EXC.m_msgbuf[len], sizeof EXC.m_msgbuf - len, " %s.", strerror(err)); - if (l + len >= sizeof EXC.msgbuf) + if (l + len >= sizeof EXC.m_msgbuf) { - len = sizeof EXC.msgbuf - 1; - EXC.msgbuf[len] = '\0'; + len = sizeof EXC.m_msgbuf - 1; + EXC.m_msgbuf[len] = '\0'; } else len += l; } } - EXC.buflen = len; + EXC.m_buflen = len; } else { - EXC.msgbuf[0] = '\0'; - EXC.buflen = 0; + EXC.m_msgbuf[0] = '\0'; + EXC.m_buflen = 0; } __exc_throw(type); @@ -391,120 +391,120 @@ static void argpalette(const char * arg, /* typedef struct _Png4File Png4File; */ struct _Png4File { - FILE * fh; - int width; - int hleft; - int nibble; - int bufpos; - int chunklen; - eu32 crc; - eu32 adler; - eu8 palettechunk[24]; - eu8 buffer[65536]; + FILE *m_fh; + int m_width; + int m_hleft; + int m_nibble; + int m_bufPos; + int m_chunkLen; + eu32 m_crc; + eu32 m_adler; + eu8 m_paletteChunk[24]; + eu8 m_buffer[65536]; }; static void png4file_init(Png4File * self, eu8 palette[4][3]) { - memcpy(self->palettechunk, "\0\0\0\x0c" "PLTE", 8); - memcpy(self->palettechunk + 8, palette, 12); - self->crc = 0 /*crc32(0, Z_NULL, 0)*/; - self->crc = crc32(self->crc, self->palettechunk + 4, 16); - set_uint32_be(self->palettechunk + 20, self->crc); + memcpy(self->m_paletteChunk, "\0\0\0\x0c" "PLTE", 8); + memcpy(self->m_paletteChunk + 8, palette, 12); + self->m_crc = 0 /*crc32(0, Z_NULL, 0)*/; + self->m_crc = crc32(self->m_crc, self->m_paletteChunk + 4, 16); + set_uint32_be(self->m_paletteChunk + 20, self->m_crc); } static void png4file_open(Png4File * self, const char * filename, int height, int width) { - self->fh = xfopen(filename, "wb"); - self->width = width; - self->hleft = height; - self->nibble = -1; + self->m_fh = xfopen(filename, "wb"); + self->m_width = width; + self->m_hleft = height; + self->m_nibble = -1; - xxfwrite(self->fh, CUS "\x89PNG\r\n\x1a\n" "\0\0\0\x0d", 12); + xxfwrite(self->m_fh, CUS "\x89PNG\r\n\x1a\n" "\0\0\0\x0d", 12); - memcpy(self->buffer, "IHDR", 4); - set_uint32_be(self->buffer + 4, width); - set_uint32_be(self->buffer + 8, height); - memcpy(self->buffer + 12, "\004\003\0\0\0", 5); + memcpy(self->m_buffer, "IHDR", 4); + set_uint32_be(self->m_buffer + 4, width); + set_uint32_be(self->m_buffer + 8, height); + memcpy(self->m_buffer + 12, "\004\003\0\0\0", 5); - eu32 crc = crc32(0, self->buffer, 17); - set_uint32_be(self->buffer + 17, crc); - xxfwrite(self->fh, self->buffer, 21); + eu32 crc = crc32(0, self->m_buffer, 17); + set_uint32_be(self->m_buffer + 17, crc); + xxfwrite(self->m_fh, self->m_buffer, 21); - xxfwrite(self->fh, self->palettechunk, sizeof self->palettechunk); + xxfwrite(self->m_fh, self->m_paletteChunk, sizeof self->m_paletteChunk); /* XXX quick hack, first color transparent. */ - xxfwriteCS(self->fh, "\0\0\0\001" "tRNS" "\0" "\x40\xe6\xd8\x66"); + xxfwriteCS(self->m_fh, "\0\0\0\001" "tRNS" "\0" "\x40\xe6\xd8\x66"); - xxfwrite(self->fh, CUS "\0\0\0\0IDAT" "\x78\001", 10); - self->buffer[0] = '\0'; - self->buffer[5] = '\0'; - self->bufpos = 6; - self->chunklen = 2; /* 78 01, zlib header */ - self->crc = crc32(0, CUS "IDAT" "\x78\001", 6); - self->adler = 1 /* adler32(0, Z_NULL, 0) */; + xxfwrite(self->m_fh, CUS "\0\0\0\0IDAT" "\x78\001", 10); + self->m_buffer[0] = '\0'; + self->m_buffer[5] = '\0'; + self->m_bufPos = 6; + self->m_chunkLen = 2; /* 78 01, zlib header */ + self->m_crc = crc32(0, CUS "IDAT" "\x78\001", 6); + self->m_adler = 1 /* adler32(0, Z_NULL, 0) */; } static void png4file_flush(Png4File * self) { - int l = self->bufpos - 5; - self->chunklen += self->bufpos; - set_uint16_le(self->buffer + 1, l); - set_uint16_le(self->buffer + 3, l ^ 0xffff); - xxfwrite(self->fh, self->buffer, self->bufpos); - self->crc = crc32(self->crc, self->buffer, self->bufpos); - self->adler = adler32(self->adler, self->buffer + 5, self->bufpos - 5); - self->buffer[0] = '\0'; - self->bufpos = 5; + int l = self->m_bufPos - 5; + self->m_chunkLen += self->m_bufPos; + set_uint16_le(self->m_buffer + 1, l); + set_uint16_le(self->m_buffer + 3, l ^ 0xffff); + xxfwrite(self->m_fh, self->m_buffer, self->m_bufPos); + self->m_crc = crc32(self->m_crc, self->m_buffer, self->m_bufPos); + self->m_adler = adler32(self->m_adler, self->m_buffer + 5, self->m_bufPos - 5); + self->m_buffer[0] = '\0'; + self->m_bufPos = 5; } static void png4file_addpixel(Png4File * self, eu8 pixel) { - if (self->nibble < 0) - self->nibble = (pixel << 4); + if (self->m_nibble < 0) + self->m_nibble = (pixel << 4); else { - self->buffer[self->bufpos++] = self->nibble | pixel; - self->nibble = -1; - if (self->bufpos == sizeof self->buffer - 4) + self->m_buffer[self->m_bufPos++] = self->m_nibble | pixel; + self->m_nibble = -1; + if (self->m_bufPos == sizeof self->m_buffer - 4) png4file_flush(self); } } static void png4file_endrow(Png4File * self) { - if (self->nibble >= 0) + if (self->m_nibble >= 0) { - self->buffer[self->bufpos++] = self->nibble; - self->nibble = -1; + self->m_buffer[self->m_bufPos++] = self->m_nibble; + self->m_nibble = -1; } - self->hleft--; - if (self->hleft) - self->buffer[self->bufpos++] = '\0'; + self->m_hleft--; + if (self->m_hleft) + self->m_buffer[self->m_bufPos++] = '\0'; } static void png4file_close(Png4File * self) { eu8 adlerbuf[4]; - self->buffer[0] = 0x01; - if (self->bufpos) + self->m_buffer[0] = 0x01; + if (self->m_bufPos) png4file_flush(self); else { - self->bufpos = 5; + self->m_bufPos = 5; png4file_flush(self); } - set_uint32_be(adlerbuf, self->adler); - xxfwrite(self->fh, adlerbuf, 4); - self->crc = crc32(self->crc, adlerbuf, 4); - xxfwrite_uint32_be(self->fh, self->crc); - xxfwriteCS(self->fh, "\0\0\0\0" "IEND" "\xae\x42\x60\x82"); - xfseek0(self->fh, 70); - xxfwrite_uint32_be(self->fh, self->chunklen + 4 /* adler*/); - fclose(self->fh); - self->fh = NULL; + set_uint32_be(adlerbuf, self->m_adler); + xxfwrite(self->m_fh, adlerbuf, 4); + self->m_crc = crc32(self->m_crc, adlerbuf, 4); + xxfwrite_uint32_be(self->m_fh, self->m_crc); + xxfwriteCS(self->m_fh, "\0\0\0\0" "IEND" "\xae\x42\x60\x82"); + xfseek0(self->m_fh, 70); + xxfwrite_uint32_be(self->m_fh, self->m_chunkLen + 4 /* adler*/); + fclose(self->m_fh); + self->m_fh = NULL; } static eu8 getnibble(eu8 ** data, int * nibble) @@ -617,23 +617,23 @@ static char * pts2ts(fu32 pts, char * rvbuf, bool is_png_filename) struct _BoundStr { - eu8 * p; - int l; + eu8 *m_p; + int m_l; }; static void boundstr_init(BoundStr * bs, eu8 * p, int l) { - bs->p = p; - bs->l = l; + bs->m_p = p; + bs->m_l = l; } static eu8 * boundstr_read(BoundStr * bs, int l) { - if (l > bs->l) + if (l > bs->m_l) exc_throw(IndexError, "XXX IndexError %p.", bs); - eu8 * rp = bs->p; - bs->p += l; - bs->l -= l; + eu8 * rp = bs->m_p; + bs->m_p += l; + bs->m_l -= l; return rp; } @@ -966,7 +966,7 @@ int sup2dast(const char *supfile, const char *ifofile ,int delay_ms) exc_catchall { - if (write(2, EXC.msgbuf, EXC.buflen) != EXC.buflen) + if (write(2, EXC.m_msgbuf, EXC.m_buflen) != EXC.m_buflen) printf("ERROR: write failed"); if (write(2, "\n", 1) != 1) diff --git a/mythplugins/mythgame/mythgame/gamesettings.cpp b/mythplugins/mythgame/mythgame/gamesettings.cpp index 9618caee900..674a5c50b87 100644 --- a/mythplugins/mythgame/mythgame/gamesettings.cpp +++ b/mythplugins/mythgame/mythgame/gamesettings.cpp @@ -6,9 +6,9 @@ #include "gamesettings.h" struct GameTypes { - QString nameStr; - QString idStr; - QString extensions; + QString m_nameStr; + QString m_idStr; + QString m_extensions; }; #define MAX_GAME_TYPES 12 @@ -35,9 +35,9 @@ QString GetGameTypeName(const QString &GameType) for (int i = 0; i < MAX_GAME_TYPES; i++) { - if (GameTypeList[i].idStr == GameType) { + if (GameTypeList[i].m_idStr == GameType) { result = QCoreApplication::translate("(GameTypes)", - GameTypeList[i].nameStr.toUtf8()); + GameTypeList[i].m_nameStr.toUtf8()); break; } } @@ -50,8 +50,8 @@ QString GetGameTypeExtensions(const QString &GameType) for (int i = 0; i < MAX_GAME_TYPES; i++) { - if (GameTypeList[i].idStr == GameType) { - result = GameTypeList[i].extensions; + if (GameTypeList[i].m_idStr == GameType) { + result = GameTypeList[i].m_extensions; break; } } @@ -260,8 +260,8 @@ struct GameType : public MythUIComboBoxSetting for (int i = 0; i < MAX_GAME_TYPES; i++) { addSelection(QCoreApplication::translate("(GameTypes)", - GameTypeList[i].nameStr.toUtf8()), - GameTypeList[i].idStr); + GameTypeList[i].m_nameStr.toUtf8()), + GameTypeList[i].m_idStr); } setValue(0); setHelpText(TR("Type of Game/Emulator. Mostly for informational " diff --git a/mythplugins/mythmusic/mythmusic/avfdecoder.cpp b/mythplugins/mythmusic/mythmusic/avfdecoder.cpp index 53e4f9fb426..9822ec58b25 100644 --- a/mythplugins/mythmusic/mythmusic/avfdecoder.cpp +++ b/mythplugins/mythmusic/mythmusic/avfdecoder.cpp @@ -66,10 +66,10 @@ class ShoutCastMetaParser ShoutCastMetaMap parseMeta(const QString &mdata); private: - QString m_meta_format; - int m_meta_artist_pos {-1}; - int m_meta_title_pos {-1}; - int m_meta_album_pos {-1}; + QString m_metaFormat; + int m_metaArtistPos {-1}; + int m_metaTitlePos {-1}; + int m_metaAlbumPos {-1}; }; void ShoutCastMetaParser::setMetaFormat(const QString &metaformat) @@ -81,24 +81,24 @@ void ShoutCastMetaParser::setMetaFormat(const QString &metaformat) %b - album %r - random bytes */ - m_meta_format = metaformat; + m_metaFormat = metaformat; - m_meta_artist_pos = 0; - m_meta_title_pos = 0; - m_meta_album_pos = 0; + m_metaArtistPos = 0; + m_metaTitlePos = 0; + m_metaAlbumPos = 0; int assign_index = 1; int pos = 0; - pos = m_meta_format.indexOf("%", pos); + pos = m_metaFormat.indexOf("%", pos); while (pos >= 0) { pos++; QChar ch; - if (pos < m_meta_format.length()) - ch = m_meta_format.at(pos); + if (pos < m_metaFormat.length()) + ch = m_metaFormat.at(pos); if (!ch.isNull() && ch == '%') { @@ -107,29 +107,29 @@ void ShoutCastMetaParser::setMetaFormat(const QString &metaformat) else if (!ch.isNull() && (ch == 'r' || ch == 'a' || ch == 'b' || ch == 't')) { if (ch == 'a') - m_meta_artist_pos = assign_index; + m_metaArtistPos = assign_index; if (ch == 'b') - m_meta_album_pos = assign_index; + m_metaAlbumPos = assign_index; if (ch == 't') - m_meta_title_pos = assign_index; + m_metaTitlePos = assign_index; assign_index++; } else LOG(VB_GENERAL, LOG_ERR, QString("ShoutCastMetaParser: malformed metaformat '%1'") - .arg(m_meta_format)); + .arg(m_metaFormat)); - pos = m_meta_format.indexOf("%", pos); + pos = m_metaFormat.indexOf("%", pos); } - m_meta_format.replace("%a", "(.*)"); - m_meta_format.replace("%t", "(.*)"); - m_meta_format.replace("%b", "(.*)"); - m_meta_format.replace("%r", "(.*)"); - m_meta_format.replace("%%", "%"); + m_metaFormat.replace("%a", "(.*)"); + m_metaFormat.replace("%t", "(.*)"); + m_metaFormat.replace("%b", "(.*)"); + m_metaFormat.replace("%r", "(.*)"); + m_metaFormat.replace("%%", "%"); } ShoutCastMetaMap ShoutCastMetaParser::parseMeta(const QString &mdata) @@ -143,24 +143,24 @@ ShoutCastMetaMap ShoutCastMetaParser::parseMeta(const QString &mdata) int title_end_pos = mdata.indexOf("';", title_begin_pos); QString title = mdata.mid(title_begin_pos, title_end_pos - title_begin_pos); QRegExp rx; - rx.setPattern(m_meta_format); + rx.setPattern(m_metaFormat); if (rx.indexIn(title) != -1) { LOG(VB_PLAYBACK, LOG_INFO, QString("ShoutCast: Meta : '%1'") .arg(mdata)); LOG(VB_PLAYBACK, LOG_INFO, QString("ShoutCast: Parsed as: '%1' by '%2'") - .arg(rx.cap(m_meta_title_pos)) - .arg(rx.cap(m_meta_artist_pos))); + .arg(rx.cap(m_metaTitlePos)) + .arg(rx.cap(m_metaArtistPos))); - if (m_meta_title_pos > 0) - result["title"] = rx.cap(m_meta_title_pos); + if (m_metaTitlePos > 0) + result["title"] = rx.cap(m_metaTitlePos); - if (m_meta_artist_pos > 0) - result["artist"] = rx.cap(m_meta_artist_pos); + if (m_metaArtistPos > 0) + result["artist"] = rx.cap(m_metaArtistPos); - if (m_meta_album_pos > 0) - result["album"] = rx.cap(m_meta_album_pos); + if (m_metaAlbumPos > 0) + result["album"] = rx.cap(m_metaAlbumPos); } } @@ -172,9 +172,9 @@ static void myth_av_log(void *ptr, int level, const char* fmt, va_list vl) if (VERBOSE_LEVEL_NONE) return; - static QString full_line(""); - static const int msg_len = 255; - static QMutex string_lock; + static QString s_fullLine(""); + static constexpr int kMsgLen = 255; + static QMutex s_stringLock; uint64_t verbose_mask = VB_GENERAL; LogLevel_t verbose_level = LOG_DEBUG; @@ -207,31 +207,31 @@ static void myth_av_log(void *ptr, int level, const char* fmt, va_list vl) if (!VERBOSE_LEVEL_CHECK(verbose_mask, verbose_level)) return; - string_lock.lock(); - if (full_line.isEmpty() && ptr) { + s_stringLock.lock(); + if (s_fullLine.isEmpty() && ptr) { AVClass* avc = *(AVClass**)ptr; - full_line.sprintf("[%s @ %p] ", avc->item_name(ptr), avc); + s_fullLine.sprintf("[%s @ %p] ", avc->item_name(ptr), avc); } - char str[msg_len+1]; - int bytes = vsnprintf(str, msg_len+1, fmt, vl); + char str[kMsgLen+1]; + int bytes = vsnprintf(str, kMsgLen+1, fmt, vl); // check for truncated messages and fix them - if (bytes > msg_len) + if (bytes > kMsgLen) { LOG(VB_GENERAL, LOG_WARNING, QString("Libav log output truncated %1 of %2 bytes written") - .arg(msg_len).arg(bytes)); - str[msg_len-1] = '\n'; + .arg(kMsgLen).arg(bytes)); + str[kMsgLen-1] = '\n'; } - full_line += QString(str); - if (full_line.endsWith("\n")) + s_fullLine += QString(str); + if (s_fullLine.endsWith("\n")) { - LOG(verbose_mask, verbose_level, full_line.trimmed()); - full_line.truncate(0); + LOG(verbose_mask, verbose_level, s_fullLine.trimmed()); + s_fullLine.truncate(0); } - string_lock.unlock(); + s_stringLock.unlock(); } avfDecoder::avfDecoder(const QString &file, DecoderFactory *d, AudioOutput *o) : @@ -606,8 +606,8 @@ const QString &avfDecoderFactory::extension() const const QString &avfDecoderFactory::description() const { - static QString desc(tr("Internal Decoder")); - return desc; + static QString s_desc(tr("Internal Decoder")); + return s_desc; } Decoder *avfDecoderFactory::create(const QString &file, AudioOutput *output, bool deletable) @@ -615,15 +615,15 @@ Decoder *avfDecoderFactory::create(const QString &file, AudioOutput *output, boo if (deletable) return new avfDecoder(file, this, output); - static avfDecoder *decoder = nullptr; - if (!decoder) + static avfDecoder *s_decoder = nullptr; + if (!s_decoder) { - decoder = new avfDecoder(file, this, output); + s_decoder = new avfDecoder(file, this, output); } else { - decoder->setOutput(output); + s_decoder->setOutput(output); } - return decoder; + return s_decoder; } diff --git a/mythplugins/mythmusic/mythmusic/bumpscope.cpp b/mythplugins/mythmusic/mythmusic/bumpscope.cpp index 4f954a8b9e6..30cea490e8b 100644 --- a/mythplugins/mythmusic/mythmusic/bumpscope.cpp +++ b/mythplugins/mythmusic/mythmusic/bumpscope.cpp @@ -523,9 +523,9 @@ static class BumpScopeFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "BumpScope"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "BumpScope"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory diff --git a/mythplugins/mythmusic/mythmusic/cddb.cpp b/mythplugins/mythmusic/mythmusic/cddb.cpp index 9b78f5ab9ff..6f2c18f3beb 100644 --- a/mythplugins/mythmusic/mythmusic/cddb.cpp +++ b/mythplugins/mythmusic/mythmusic/cddb.cpp @@ -644,14 +644,14 @@ const QString& Dbase::GetDB() // CDDB hello string static const QString& helloID() { - static QString helloID; - if (helloID.isEmpty()) + static QString s_helloId; + if (s_helloId.isEmpty()) { - helloID = getenv("USER"); - if (helloID.isEmpty()) - helloID = "anon"; - helloID += QString("+%1+MythTV+%2+") + s_helloId = getenv("USER"); + if (s_helloId.isEmpty()) + s_helloId = "anon"; + s_helloId += QString("+%1+MythTV+%2+") .arg(gCoreContext->GetHostName()).arg(MYTH_BINARY_VERSION); } - return helloID; + return s_helloId; } diff --git a/mythplugins/mythmusic/mythmusic/cddecoder.cpp b/mythplugins/mythmusic/mythmusic/cddecoder.cpp index 9d42d42afcb..bc5a44288b4 100644 --- a/mythplugins/mythmusic/mythmusic/cddecoder.cpp +++ b/mythplugins/mythmusic/mythmusic/cddecoder.cpp @@ -142,8 +142,8 @@ void CdDecoder::writeBlock() //static QMutex& CdDecoder::getCdioMutex() { - static QMutex mtx(QMutex::Recursive); - return mtx; + static QMutex s_mtx(QMutex::Recursive); + return s_mtx; } // pure virtual @@ -766,15 +766,15 @@ bool CdDecoderFactory::supports(const QString &source) const // pure virtual const QString &CdDecoderFactory::extension() const { - static QString ext(CDEXT); - return ext; + static QString s_ext(CDEXT); + return s_ext; } // pure virtual const QString &CdDecoderFactory::description() const { - static QString desc(tr("Audio CD parser")); - return desc; + static QString s_desc(tr("Audio CD parser")); + return s_desc; } // pure virtual @@ -783,17 +783,17 @@ Decoder *CdDecoderFactory::create(const QString &file, AudioOutput *output, bool if (deletable) return new CdDecoder(file, this, output); - static CdDecoder *decoder; - if (! decoder) + static CdDecoder *s_decoder; + if (! s_decoder) { - decoder = new CdDecoder(file, this, output); + s_decoder = new CdDecoder(file, this, output); } else { - decoder->setURL(file); - decoder->setOutput(output); + s_decoder->setURL(file); + s_decoder->setOutput(output); } - return decoder; + return s_decoder; } diff --git a/mythplugins/mythmusic/mythmusic/mythgoom.cpp b/mythplugins/mythmusic/mythmusic/mythgoom.cpp index 4d283f53044..0eb1cd33dbc 100644 --- a/mythplugins/mythmusic/mythmusic/mythgoom.cpp +++ b/mythplugins/mythmusic/mythmusic/mythgoom.cpp @@ -121,9 +121,9 @@ static class GoomFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "Goom"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "Goom"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory diff --git a/mythplugins/mythmusic/mythmusic/smartplaylist.cpp b/mythplugins/mythmusic/mythmusic/smartplaylist.cpp index bdcc7726c1a..25af3fd234a 100644 --- a/mythplugins/mythmusic/mythmusic/smartplaylist.cpp +++ b/mythplugins/mythmusic/mythmusic/smartplaylist.cpp @@ -32,12 +32,12 @@ using namespace std; struct SmartPLField { - QString name; - QString sqlName; - SmartPLFieldType type; - int minValue; - int maxValue; - int defaultValue; + QString m_name; + QString m_sqlName; + SmartPLFieldType m_type; + int m_minValue; + int m_maxValue; + int m_defaultValue; }; static SmartPLField SmartPLFields[] = @@ -61,10 +61,10 @@ static SmartPLField SmartPLFields[] = struct SmartPLOperator { - QString name; - int noOfArguments; - bool stringOnly; - bool validForBoolean; + QString m_name; + int m_noOfArguments; + bool m_stringOnly; + bool m_validForBoolean; }; static SmartPLOperator SmartPLOperators[] = @@ -89,7 +89,7 @@ static SmartPLOperator *lookupOperator(const QString& name) { for (int x = 0; x < SmartPLOperatorsCount; x++) { - if (SmartPLOperators[x].name == name) + if (SmartPLOperators[x].m_name == name) return &SmartPLOperators[x]; } return nullptr; @@ -99,7 +99,7 @@ static SmartPLField *lookupField(const QString& name) { for (int x = 0; x < SmartPLFieldsCount; x++) { - if (SmartPLFields[x].name == name) + if (SmartPLFields[x].m_name == name) return &SmartPLFields[x]; } return nullptr; @@ -160,7 +160,7 @@ QString getCriteriaSQL(const QString& fieldName, const QString &operatorName, return ""; } - result = Field->sqlName; + result = Field->m_sqlName; SmartPLOperator *Operator = lookupOperator(operatorName); if (!Operator) @@ -169,60 +169,60 @@ QString getCriteriaSQL(const QString& fieldName, const QString &operatorName, } // convert boolean and date values - if (Field->type == ftBoolean) + if (Field->m_type == ftBoolean) { // compilation field uses 0 = false; 1 = true value1 = (value1 == "Yes") ? "1":"0"; value2 = (value2 == "Yes") ? "1":"0"; } - else if (Field->type == ftDate) + else if (Field->m_type == ftDate) { value1 = evaluateDateValue(value1); value2 = evaluateDateValue(value2); } - if (Operator->name == "is equal to") + if (Operator->m_name == "is equal to") { result = result + " = " + formattedFieldValue(value1); } - else if (Operator->name == "is not equal to") + else if (Operator->m_name == "is not equal to") { result = result + " != " + formattedFieldValue(value1); } - else if (Operator->name == "is greater than") + else if (Operator->m_name == "is greater than") { result = result + " > " + formattedFieldValue(value1); } - else if (Operator->name == "is less than") + else if (Operator->m_name == "is less than") { result = result + " < " + formattedFieldValue(value1); } - else if (Operator->name == "starts with") + else if (Operator->m_name == "starts with") { result = result + " LIKE " + formattedFieldValue(value1 + QString("%")); } - else if (Operator->name == "ends with") + else if (Operator->m_name == "ends with") { result = result + " LIKE " + formattedFieldValue(QString("%") + value1); } - else if (Operator->name == "contains") + else if (Operator->m_name == "contains") { result = result + " LIKE " + formattedFieldValue(QString("%") + value1 + "%"); } - else if (Operator->name == "does not contain") + else if (Operator->m_name == "does not contain") { result = result + " NOT LIKE " + formattedFieldValue(QString("%") + value1 + "%"); } - else if (Operator->name == "is between") + else if (Operator->m_name == "is between") { result = result + " BETWEEN " + formattedFieldValue(value1) + " AND " + formattedFieldValue(value2); } - else if (Operator->name == "is set") + else if (Operator->m_name == "is set") { result = result + " IS NOT NULL"; } - else if (Operator->name == "is not set") + else if (Operator->m_name == "is not set") { result = result + " IS NULL"; } @@ -231,7 +231,7 @@ QString getCriteriaSQL(const QString& fieldName, const QString &operatorName, result.clear(); LOG(VB_GENERAL, LOG_ERR, QString("getCriteriaSQL(): invalid operator '%1'") - .arg(Operator->name)); + .arg(Operator->m_name)); } return result; @@ -260,10 +260,10 @@ QString getOrderBySQL(const QString& orderByFields) if (bFirst) { bFirst = false; - result = " ORDER BY " + Field->sqlName + order; + result = " ORDER BY " + Field->m_sqlName + order; } else - result += ", " + Field->sqlName + order; + result += ", " + Field->m_sqlName + order; } } @@ -278,7 +278,7 @@ QString getSQLFieldName(const QString &fieldName) return ""; } - return Field->sqlName; + return Field->m_sqlName; } /* @@ -330,9 +330,9 @@ QString SmartPLCriteriaRow::toString(void) if (PLOperator) { QString result; - if (PLOperator->noOfArguments == 0) + if (PLOperator->m_noOfArguments == 0) result = m_field + " " + m_operator; - else if (PLOperator->noOfArguments == 1) + else if (PLOperator->m_noOfArguments == 1) result = m_field + " " + m_operator + " " + m_value1; else { @@ -397,10 +397,10 @@ bool SmartPlaylistEditor::Create(void) for (int x = 0; x < SmartPLFieldsCount; x++) { - if (SmartPLFields[x].name == "") - new MythUIButtonListItem(m_orderBySelector, SmartPLFields[x].name); + if (SmartPLFields[x].m_name == "") + new MythUIButtonListItem(m_orderBySelector, SmartPLFields[x].m_name); else - new MythUIButtonListItem(m_orderBySelector, SmartPLFields[x].name + " (A)"); + new MythUIButtonListItem(m_orderBySelector, SmartPLFields[x].m_name + " (A)"); } m_limitSpin->SetRange(0, 9999, 10); @@ -1254,7 +1254,7 @@ bool CriteriaRowEditor::Create(void) void CriteriaRowEditor::updateFields(void) { for (int x = 0; x < SmartPLFieldsCount; x++) - new MythUIButtonListItem(m_fieldSelector, SmartPLFields[x].name); + new MythUIButtonListItem(m_fieldSelector, SmartPLFields[x].m_name); m_fieldSelector->SetValue(m_criteriaRow->m_field); } @@ -1262,7 +1262,7 @@ void CriteriaRowEditor::updateFields(void) void CriteriaRowEditor::updateOperators(void) { for (int x = 0; x < SmartPLOperatorsCount; x++) - new MythUIButtonListItem(m_operatorSelector, SmartPLOperators[x].name); + new MythUIButtonListItem(m_operatorSelector, SmartPLOperators[x].m_name); m_operatorSelector->SetValue(m_criteriaRow->m_operator); } @@ -1303,12 +1303,12 @@ void CriteriaRowEditor::saveClicked() m_criteriaRow->m_field = m_fieldSelector->GetValue(); m_criteriaRow->m_operator = m_operatorSelector->GetValue(); - if (Field->type == ftNumeric) + if (Field->m_type == ftNumeric) { m_criteriaRow->m_value1 = m_value1Spinbox->GetValue(); m_criteriaRow->m_value2 = m_value2Spinbox->GetValue(); } - else if (Field->type == ftBoolean || Field->type == ftDate) + else if (Field->m_type == ftBoolean || Field->m_type == ftDate) { m_criteriaRow->m_value1 = m_value1Selector->GetValue(); m_criteriaRow->m_value2 = m_value2Selector->GetValue(); @@ -1335,25 +1335,25 @@ void CriteriaRowEditor::enableSaveButton() if (Field && Operator) { - if (Field->type == ftNumeric || Field->type == ftBoolean) + if (Field->m_type == ftNumeric || Field->m_type == ftBoolean) enabled = true; - else if (Field->type == ftDate) + else if (Field->m_type == ftDate) { - if (Operator->noOfArguments == 0) + if (Operator->m_noOfArguments == 0) enabled = true; - else if (Operator->noOfArguments == 1 && !m_value1Selector->GetValue().isEmpty()) + else if (Operator->m_noOfArguments == 1 && !m_value1Selector->GetValue().isEmpty()) enabled = true; - else if (Operator->noOfArguments == 2 && !m_value1Selector->GetValue().isEmpty() + else if (Operator->m_noOfArguments == 2 && !m_value1Selector->GetValue().isEmpty() && !m_value2Selector->GetValue().isEmpty()) enabled = true; } else // ftString { - if (Operator->noOfArguments == 0) + if (Operator->m_noOfArguments == 0) enabled = true; - else if (Operator->noOfArguments == 1 && !m_value1Edit->GetText().isEmpty()) + else if (Operator->m_noOfArguments == 1 && !m_value1Edit->GetText().isEmpty()) enabled = true; - else if (Operator->noOfArguments == 2 && !m_value1Edit->GetText().isEmpty() + else if (Operator->m_noOfArguments == 2 && !m_value1Edit->GetText().isEmpty() && !m_value2Edit->GetText().isEmpty()) enabled = true; } @@ -1368,7 +1368,7 @@ void CriteriaRowEditor::fieldChanged(void) if (!Field) return; - if (Field->type == ftBoolean) + if (Field->m_type == ftBoolean) { // add yes / no items to combo m_value1Selector->Reset(); @@ -1378,7 +1378,7 @@ void CriteriaRowEditor::fieldChanged(void) new MythUIButtonListItem(m_value2Selector, "No"); new MythUIButtonListItem(m_value2Selector, "Yes"); } - else if (Field->type == ftDate) + else if (Field->m_type == ftDate) { // add a couple of date values to the combo m_value1Selector->Reset(); @@ -1408,7 +1408,7 @@ void CriteriaRowEditor::fieldChanged(void) } // get list of operators valid for this field type - getOperatorList(Field->type); + getOperatorList(Field->m_type); enableSaveButton(); } @@ -1434,42 +1434,42 @@ void CriteriaRowEditor::operatorChanged(void) m_value2Spinbox->Hide(); // show spin edits - if (Field->type == ftNumeric) + if (Field->m_type == ftNumeric) { - if (Operator->noOfArguments >= 1) + if (Operator->m_noOfArguments >= 1) { m_value1Spinbox->Show(); int currentValue = m_value1Spinbox->GetIntValue(); - m_value1Spinbox->SetRange(Field->minValue, Field->maxValue, 1); + m_value1Spinbox->SetRange(Field->m_minValue, Field->m_maxValue, 1); - if (currentValue < Field->minValue || currentValue > Field->maxValue) - m_value1Spinbox->SetValue(Field->defaultValue); + if (currentValue < Field->m_minValue || currentValue > Field->m_maxValue) + m_value1Spinbox->SetValue(Field->m_defaultValue); } - if (Operator->noOfArguments == 2) + if (Operator->m_noOfArguments == 2) { m_value2Spinbox->Show(); int currentValue = m_value2Spinbox->GetIntValue(); - m_value2Spinbox->SetRange(Field->minValue, Field->maxValue, 1); + m_value2Spinbox->SetRange(Field->m_minValue, Field->m_maxValue, 1); - if (currentValue < Field->minValue || currentValue > Field->maxValue) - m_value2Spinbox->SetValue(Field->defaultValue); + if (currentValue < Field->m_minValue || currentValue > Field->m_maxValue) + m_value2Spinbox->SetValue(Field->m_defaultValue); } } - else if (Field->type == ftBoolean) + else if (Field->m_type == ftBoolean) { // only show value1combo m_value1Selector->Show(); } - else if (Field->type == ftDate) + else if (Field->m_type == ftDate) { - if (Operator->noOfArguments >= 1) + if (Operator->m_noOfArguments >= 1) { m_value1Selector->Show(); m_value1Button->Show(); } - if (Operator->noOfArguments == 2) + if (Operator->m_noOfArguments == 2) { m_value2Selector->Show(); m_value2Button->Show(); @@ -1477,13 +1477,13 @@ void CriteriaRowEditor::operatorChanged(void) } else // ftString { - if (Operator->noOfArguments >= 1) + if (Operator->m_noOfArguments >= 1) { m_value1Edit->Show(); m_value1Button->Show(); } - if (Operator->noOfArguments == 2) + if (Operator->m_noOfArguments == 2) { m_value2Edit->Show(); m_value2Button->Show(); @@ -1502,14 +1502,14 @@ void CriteriaRowEditor::getOperatorList(SmartPLFieldType fieldType) for (int x = 0; x < SmartPLOperatorsCount; x++) { // don't add operators that only work with string fields - if (fieldType != ftString && SmartPLOperators[x].stringOnly) + if (fieldType != ftString && SmartPLOperators[x].m_stringOnly) continue; // don't add operators that only work with boolean fields - if (fieldType == ftBoolean && !SmartPLOperators[x].validForBoolean) + if (fieldType == ftBoolean && !SmartPLOperators[x].m_validForBoolean) continue; - new MythUIButtonListItem(m_operatorSelector, SmartPLOperators[x].name); + new MythUIButtonListItem(m_operatorSelector, SmartPLOperators[x].m_name); } // try to set the operatorCombo to the same operator or else the first item @@ -1964,7 +1964,7 @@ void SmartPLOrderByDialog::getOrderByFields(void) { m_orderSelector->Reset(); for (int x = 1; x < SmartPLFieldsCount; x++) - new MythUIButtonListItem(m_orderSelector, SmartPLFields[x].name); + new MythUIButtonListItem(m_orderSelector, SmartPLFields[x].m_name); } /* diff --git a/mythplugins/mythmusic/mythmusic/synaesthesia.cpp b/mythplugins/mythmusic/mythmusic/synaesthesia.cpp index 765398b0e04..47e5535936a 100644 --- a/mythplugins/mythmusic/mythmusic/synaesthesia.cpp +++ b/mythplugins/mythmusic/mythmusic/synaesthesia.cpp @@ -619,9 +619,9 @@ static class SynaesthesiaFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "Synaesthesia"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "Synaesthesia"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory diff --git a/mythplugins/mythmusic/mythmusic/visualize.cpp b/mythplugins/mythmusic/mythmusic/visualize.cpp index 3c2355655ab..051d088393f 100644 --- a/mythplugins/mythmusic/mythmusic/visualize.cpp +++ b/mythplugins/mythmusic/mythmusic/visualize.cpp @@ -515,9 +515,9 @@ static class StereoScopeFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "StereoScope"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "StereoScope"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory @@ -541,9 +541,9 @@ static class MonoScopeFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "MonoScope"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "MonoScope"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory @@ -776,9 +776,9 @@ static class SpectrumFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "Spectrum"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "Spectrum"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory @@ -863,9 +863,9 @@ static class SquaresFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "Squares"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "Squares"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory @@ -1310,9 +1310,9 @@ static class PianoFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "Piano"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "Piano"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory @@ -1503,9 +1503,9 @@ static class AlbumArtFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "AlbumArt"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "AlbumArt"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory @@ -1549,9 +1549,9 @@ static class BlankFactory : public VisFactory public: const QString &name(void) const override // VisFactory { - static QString name = QCoreApplication::translate("Visualizers", - "Blank"); - return name; + static QString s_name = QCoreApplication::translate("Visualizers", + "Blank"); + return s_name; } uint plugins(QStringList *list) const override // VisFactory diff --git a/mythplugins/mythnews/mythnews/mythnewsconfig.cpp b/mythplugins/mythnews/mythnews/mythnewsconfig.cpp index fc5841e8a38..059bc01dd32 100644 --- a/mythplugins/mythnews/mythnews/mythnewsconfig.cpp +++ b/mythplugins/mythnews/mythnews/mythnewsconfig.cpp @@ -24,8 +24,8 @@ class MythNewsConfigPriv { public: - NewsCategory::List categoryList; - QStringList selectedSitesList; + NewsCategory::List m_categoryList; + QStringList m_selectedSitesList; }; // --------------------------------------------------- @@ -75,7 +75,7 @@ void MythNewsConfig::populateSites(void) return; } - m_priv->categoryList.clear(); + m_priv->m_categoryList.clear(); QDomNodeList catList = domDoc.elementsByTagName(QString::fromUtf8("category")); @@ -106,7 +106,7 @@ void MythNewsConfig::populateSites(void) cat.m_siteList.push_back(site); } - m_priv->categoryList.push_back(cat); + m_priv->m_categoryList.push_back(cat); } xmlFile.close(); @@ -151,8 +151,8 @@ void MythNewsConfig::loadData(void) { QMutexLocker locker(&m_lock); - NewsCategory::List::iterator it = m_priv->categoryList.begin(); - for (; it != m_priv->categoryList.end(); ++it) + NewsCategory::List::iterator it = m_priv->m_categoryList.begin(); + for (; it != m_priv->m_categoryList.end(); ++it) { MythUIButtonListItem *item = new MythUIButtonListItem(m_categoriesList, (*it).m_name); diff --git a/mythplugins/mythzoneminder/mythzmserver/zmserver.cpp b/mythplugins/mythzoneminder/mythzmserver/zmserver.cpp index 2ad33cb97ad..918ac718f0d 100644 --- a/mythplugins/mythzoneminder/mythzmserver/zmserver.cpp +++ b/mythplugins/mythzoneminder/mythzmserver/zmserver.cpp @@ -1101,7 +1101,7 @@ void ZMServer::getMonitorStatus(const string &id, const string &type, void ZMServer::handleGetEventFrame(vector tokens) { - static unsigned char buffer[MAX_IMAGE_SIZE]; + static unsigned char s_buffer[MAX_IMAGE_SIZE]; if (tokens.size() != 5) { @@ -1159,7 +1159,7 @@ void ZMServer::handleGetEventFrame(vector tokens) FILE *fd = fopen(filepath.c_str(), "r" ); if (fd != nullptr) { - fileSize = fread(buffer, 1, sizeof(buffer), fd); + fileSize = fread(s_buffer, 1, sizeof(s_buffer), fd); fclose(fd); } else @@ -1176,12 +1176,12 @@ void ZMServer::handleGetEventFrame(vector tokens) ADD_INT(outStr, fileSize) // send the data - send(outStr, buffer, fileSize); + send(outStr, s_buffer, fileSize); } void ZMServer::handleGetAnalysisFrame(vector tokens) { - static unsigned char buffer[MAX_IMAGE_SIZE]; + static unsigned char s_buffer[MAX_IMAGE_SIZE]; char str[100]; if (tokens.size() != 5) @@ -1305,7 +1305,7 @@ void ZMServer::handleGetAnalysisFrame(vector tokens) if ((fd = fopen(frameFile.c_str(), "r" ))) { - fileSize = fread(buffer, 1, sizeof(buffer), fd); + fileSize = fread(s_buffer, 1, sizeof(s_buffer), fd); fclose(fd); if (m_debug) @@ -1315,7 +1315,7 @@ void ZMServer::handleGetAnalysisFrame(vector tokens) ADD_INT(outStr, fileSize) // send the data - send(outStr, buffer, fileSize); + send(outStr, s_buffer, fileSize); return; } } @@ -1326,7 +1326,7 @@ void ZMServer::handleGetAnalysisFrame(vector tokens) if ((fd = fopen(frameFile.c_str(), "r" ))) { - fileSize = fread(buffer, 1, sizeof(buffer), fd); + fileSize = fread(s_buffer, 1, sizeof(s_buffer), fd); fclose(fd); } else @@ -1343,12 +1343,12 @@ void ZMServer::handleGetAnalysisFrame(vector tokens) ADD_INT(outStr, fileSize) // send the data - send(outStr, buffer, fileSize); + send(outStr, s_buffer, fileSize); } void ZMServer::handleGetLiveFrame(vector tokens) { - static unsigned char buffer[MAX_IMAGE_SIZE]; + static unsigned char s_buffer[MAX_IMAGE_SIZE]; // we need to periodically kick the DB connection here to make sure it // stays alive because the user may have left the frontend on the live @@ -1390,7 +1390,7 @@ void ZMServer::handleGetLiveFrame(vector tokens) } // read a frame from the shared memory - int dataSize = getFrame(buffer, sizeof(buffer), monitor); + int dataSize = getFrame(s_buffer, sizeof(s_buffer), monitor); if (m_debug) cout << "Frame size: " << dataSize << endl; @@ -1411,7 +1411,7 @@ void ZMServer::handleGetLiveFrame(vector tokens) ADD_INT(outStr, dataSize) // send the data - send(outStr, buffer, dataSize); + send(outStr, s_buffer, dataSize); } void ZMServer::handleGetFrameList(vector tokens) diff --git a/mythplugins/mythzoneminder/mythzoneminder/zmliveplayer.cpp b/mythplugins/mythzoneminder/mythzoneminder/zmliveplayer.cpp index 96010ad9da8..27a8992bf58 100644 --- a/mythplugins/mythzoneminder/mythzoneminder/zmliveplayer.cpp +++ b/mythplugins/mythzoneminder/mythzoneminder/zmliveplayer.cpp @@ -345,7 +345,7 @@ void ZMLivePlayer::changePlayerMonitor(int playerNo) void ZMLivePlayer::updateFrame() { - static unsigned char buffer[MAX_IMAGE_SIZE]; + static unsigned char s_buffer[MAX_IMAGE_SIZE]; m_frameTimer->stop(); // get a list of monitor id's that need updating @@ -360,7 +360,7 @@ void ZMLivePlayer::updateFrame() for (int x = 0; x < monList.count(); x++) { QString status; - int frameSize = ZMClient::get()->getLiveFrame(monList[x], status, buffer, sizeof(buffer)); + int frameSize = ZMClient::get()->getLiveFrame(monList[x], status, s_buffer, sizeof(s_buffer)); if (frameSize > 0 && !status.startsWith("ERROR")) { @@ -375,7 +375,7 @@ void ZMLivePlayer::updateFrame() p->getMonitor()->status = status; p->updateStatus(); } - p->updateFrame(buffer); + p->updateFrame(s_buffer); } } }