Merge branch 'ni/mp' into ni/cst-next

Conflicts:
	data/icons/shutdown.jpg
	data/icons/start.jpg
	data/locale/Makefile.am
	data/locale/deutsch.locale
	data/locale/english.locale
	lib/libdvbsub/dvbsub.cpp
	lib/libdvbsub/dvbsubtitle.cpp
	lib/libtuxtxt/tuxtxt.cpp
	lib/libtuxtxt/tuxtxt.h
	src/gui/dboxinfo.cpp
	src/gui/movieplayer.cpp
	src/gui/streaminfo2.cpp
	src/gui/themes.cpp
	src/neutrino.cpp
	src/neutrino_menue.cpp
	src/nhttpd/Makefile.am
	src/system/flashtool.cpp


Origin commit data
------------------
Branch: ni/coolstream
Commit: 161347db29
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-26 (Fri, 26 Aug 2016)



------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-08-26 19:13:47 +02:00
220 changed files with 7577 additions and 1615 deletions

View File

@@ -1,4 +1,6 @@
/* tuxtxt_common.h
* for license info see the other tuxtxt files
*/
#include <sys/ioctl.h>
#include <fcntl.h>
#include <pthread.h>
@@ -15,6 +17,7 @@
tuxtxt_cache_struct tuxtxt_cache;
static pthread_mutex_t tuxtxt_cache_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t tuxtxt_cache_biglock = PTHREAD_MUTEX_INITIALIZER;
int tuxtxt_get_zipsize(int p,int sp)
{
tstCachedPage* pg = tuxtxt_cache.astCachetable[p][sp];
@@ -350,6 +353,7 @@ int tuxtxt_GetSubPage(int page, int subpage, int offset)
void tuxtxt_clear_cache(void)
{
pthread_mutex_lock(&tuxtxt_cache_biglock);
pthread_mutex_lock(&tuxtxt_cache_lock);
int clear_page, clear_subpage, d26;
tuxtxt_cache.maxadippg = -1;
@@ -413,6 +417,7 @@ void tuxtxt_clear_cache(void)
printf("TuxTxt cache cleared\n");
#endif
pthread_mutex_unlock(&tuxtxt_cache_lock);
pthread_mutex_unlock(&tuxtxt_cache_biglock);
}
/******************************************************************************
* init_demuxer *
@@ -540,6 +545,7 @@ void tuxtxt_allocate_cache(int magazine)
// Lock here as we have a possible race here with
// tuxtxt_clear_cache(). We should not be allocating and
// freeing at the same time.
// *** this is probably worked around by tuxtxt_cacehe_biglock now *** --seife
pthread_mutex_lock(&tuxtxt_cache_lock);
/* check cachetable and allocate memory if needed */
@@ -612,6 +618,13 @@ void *tuxtxt_CacheThread(void * /*arg*/)
continue;
}
/* this "big hammer lock" is a hack: it avoids a crash if
* tuxtxt_clear_cache() is called while the cache thread is in the
* middle of the following loop, leading to tuxtxt_cache.current_page[]
* etc. being set to -1 and tuxtxt_cache.astCachetable[] etc. being set
* to NULL
* it probably also avoids the possible race in tuxtxt_allocate_cache() */
pthread_mutex_lock(&tuxtxt_cache_biglock);
/* analyze it */
for (line = 0; line < readcnt/0x2e /*4*/; line++)
{
@@ -1053,6 +1066,7 @@ void *tuxtxt_CacheThread(void * /*arg*/)
printf("line %d row %X %X, continue\n", line, vtx_rowbyte[0], vtx_rowbyte[1]);
#endif
}
pthread_mutex_unlock(&tuxtxt_cache_biglock);
}
pthread_exit(NULL);