mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
change 'long long' tom int64_t'
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@293 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: c3db76408a
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-02-07 (Sun, 07 Feb 2010)
This commit is contained in:
@@ -103,7 +103,7 @@ int CAlphaSetup::exec(CMenuTarget* parent, const std::string &)
|
||||
int selected = 0;
|
||||
// int max = 1;
|
||||
|
||||
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings
|
||||
::TIMING_MENU]);
|
||||
|
||||
bool loop=true;
|
||||
|
@@ -55,11 +55,11 @@ typedef std::pair<unsigned char, CPosList> CTitle2PosItem;
|
||||
class CAudiofileExt : public CAudiofile
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CAudiofileExt();
|
||||
|
||||
CAudiofileExt(std::string name, CFile::FileType type);
|
||||
|
||||
|
||||
CAudiofileExt(const CAudiofileExt& src);
|
||||
|
||||
void operator=(const CAudiofileExt& src);
|
||||
@@ -80,7 +80,7 @@ class RandomNumber
|
||||
|
||||
int operator()(int n)
|
||||
{
|
||||
return ((long long)n * rand() / RAND_MAX);
|
||||
return ((int64_t)n * rand() / RAND_MAX);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -207,9 +207,9 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
void getFileInfoToDisplay(std::string& fileInfo, CAudiofileExt &file);
|
||||
|
||||
void printSearchTree();
|
||||
|
||||
|
||||
void buildSearchTree();
|
||||
|
||||
|
||||
unsigned char getFirstChar(CAudiofileExt &file);
|
||||
|
||||
void printTimevalDiff(timeval &start, timeval &end);
|
||||
@@ -225,7 +225,7 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
* Example:
|
||||
* absFilename: /mnt/audio/A/abc.mp3
|
||||
* fromDir: /mnt/audio/B
|
||||
* => ../A/abc.mp3 will be returned
|
||||
* => ../A/abc.mp3 will be returned
|
||||
* @param fromDir the directory from where we want to
|
||||
* access the file
|
||||
* @param absFilename the file we want to access in a
|
||||
@@ -235,8 +235,8 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
*/
|
||||
std::string absPath2Rel(const std::string& fromDir,
|
||||
const std::string& absFilename);
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Asks the user if the file filename should be overwritten or not
|
||||
* @param filename the name of the file
|
||||
* @return true if file should be overwritten, false otherwise
|
||||
@@ -248,7 +248,7 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
bool shufflePlaylist(void);
|
||||
bool playNext(bool allow_rotate = false);
|
||||
bool playPrev(bool allow_rotate = false);
|
||||
|
||||
|
||||
public:
|
||||
CAudioPlayerGui(bool inetmode = false);
|
||||
~CAudioPlayerGui();
|
||||
|
@@ -253,7 +253,7 @@ const CBookmark * CBookmarkManager::getBookmark(CMenuTarget* parent)
|
||||
|
||||
int res = -1;
|
||||
|
||||
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||
uint32_t msg;
|
||||
uint32_t data;
|
||||
|
||||
|
@@ -34,7 +34,7 @@ class CCAMMenuHandler : public CMenuTarget
|
||||
private:
|
||||
CHintBox * hintBox;
|
||||
cDvbCi * ci;
|
||||
unsigned long long timeoutEnd;
|
||||
uint64_t timeoutEnd;
|
||||
//int slot;
|
||||
int doMenu(int slot);
|
||||
int doMainMenu();
|
||||
|
@@ -24,7 +24,7 @@ int ts_pidbandwidth (OPTION *opt)
|
||||
int dmxfd;
|
||||
struct timeval tv,last_tv, first_tv;
|
||||
int pid;
|
||||
unsigned long long b_total;
|
||||
uint64_t b_total;
|
||||
long b;
|
||||
long packets_bad;
|
||||
long packets_total;
|
||||
@@ -113,7 +113,7 @@ int ts_pidbandwidth (OPTION *opt)
|
||||
b_len = read(pfd.fd, buf, sizeof(buf));
|
||||
gettimeofday (&tv, NULL);
|
||||
|
||||
|
||||
|
||||
if (b_len >= TS_LEN) {
|
||||
b_start = sync_ts (buf, b_len);
|
||||
} else {
|
||||
@@ -134,7 +134,7 @@ int ts_pidbandwidth (OPTION *opt)
|
||||
// -- calc bandwidth
|
||||
|
||||
{
|
||||
unsigned long long bit_s;
|
||||
uint64_t bit_s;
|
||||
long d_tim_ms;
|
||||
int packets;
|
||||
|
||||
@@ -142,36 +142,36 @@ int ts_pidbandwidth (OPTION *opt)
|
||||
packets_total += packets;
|
||||
|
||||
|
||||
// output on different verbosity levels
|
||||
// output on different verbosity levels
|
||||
// -- current bandwidth
|
||||
d_tim_ms = delta_time_ms (&tv, &last_tv);
|
||||
if (d_tim_ms <= 0) d_tim_ms = 1; // ignore usecs
|
||||
if (d_tim_ms <= 0) d_tim_ms = 1; // ignore usecs
|
||||
|
||||
out (3, "packets read: %3d/(%ld) d_time: %2ld.%03ld s = ",
|
||||
packets, packets_total, d_tim_ms / 1000UL, d_tim_ms % 1000UL);
|
||||
|
||||
// -- current bandwidth in kbit/sec
|
||||
// --- cast to unsigned long long so it doesn't overflow as
|
||||
// --- cast to uint64_t so it doesn't overflow as
|
||||
// --- early, add time / 2 before division for correct rounding
|
||||
bit_s = (((unsigned long long)b * 8000ULL) + ((unsigned long long)d_tim_ms / 2ULL))
|
||||
/ (unsigned long long)d_tim_ms;
|
||||
bit_s = (((uint64_t)b * 8000ULL) + ((uint64_t)d_tim_ms / 2ULL))
|
||||
/ (uint64_t)d_tim_ms;
|
||||
|
||||
out (1, "%5llu.%03llu kbit/s", bit_s / 1000ULL, bit_s % 1000ULL);
|
||||
|
||||
|
||||
// -- average bandwidth
|
||||
d_tim_ms = delta_time_ms (&tv,&first_tv);
|
||||
if (d_tim_ms <= 0) d_tim_ms = 1; // ignore usecs
|
||||
if (d_tim_ms <= 0) d_tim_ms = 1; // ignore usecs
|
||||
|
||||
bit_s = ((b_total * 8000ULL) + ((unsigned long long)d_tim_ms / 2ULL))
|
||||
/ (unsigned long long)d_tim_ms;
|
||||
bit_s = ((b_total * 8000ULL) + ((uint64_t)d_tim_ms / 2ULL))
|
||||
/ (uint64_t)d_tim_ms;
|
||||
|
||||
last_avg.kb_sec = (unsigned long) (bit_s / 1000ULL);
|
||||
last_avg.b_sec = (unsigned long) (bit_s % 1000ULL);
|
||||
|
||||
out (2, " (Avrg: %5lu.%03lu kbit/s)", last_avg.kb_sec, last_avg.b_sec);
|
||||
|
||||
|
||||
|
||||
// -- bad packet(s) check in buffer
|
||||
{
|
||||
int bp;
|
||||
|
@@ -167,7 +167,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
||||
while (!istheend)
|
||||
{
|
||||
|
||||
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd_MS(250);
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS(250);
|
||||
msg = CRCInput::RC_nokey;
|
||||
|
||||
while (!(msg == CRCInput::RC_timeout) && (!(msg == CRCInput::RC_home)))
|
||||
|
@@ -920,7 +920,7 @@ int CMovieBrowser::exec(const char* path)
|
||||
if ( timeout == -1 )
|
||||
timeout = g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER];
|
||||
|
||||
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
|
||||
|
||||
if(m_settings.remount == true)
|
||||
{
|
||||
@@ -1195,7 +1195,7 @@ void CMovieBrowser::refreshMovieInfo(void)
|
||||
std::string lname;
|
||||
if(g_PicViewer->GetLogoName(m_movieSelectionHandler->epgEpgId >>16, m_movieSelectionHandler->epgChannel, lname))
|
||||
g_PicViewer->DisplayImage(lname, lx, ly, PIC_W, PIC_H);
|
||||
|
||||
|
||||
if(logo_ok) {
|
||||
#if 0
|
||||
lx = m_cBoxFrameInfo.iX+m_cBoxFrameInfo.iWidth - picw -10;
|
||||
|
@@ -142,7 +142,7 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
lastsnr = lastsig = -1;
|
||||
|
||||
neutrino_msg_t msg;
|
||||
unsigned long long maxb, minb, lastb, tmp_rate;
|
||||
uint64_t maxb, minb, lastb, tmp_rate;
|
||||
int cnt = 0,i=0;
|
||||
uint16_t ssig, ssnr;
|
||||
uint32_t ber;
|
||||
@@ -156,7 +156,7 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
while (1) {
|
||||
neutrino_msg_data_t data;
|
||||
|
||||
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd_MS (100);
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS (100);
|
||||
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd);
|
||||
|
||||
ssig = frontend->getSignalStrength();
|
||||
@@ -696,7 +696,7 @@ long delta_time_ms (struct timeval *tv, struct timeval *last_tv)
|
||||
return timeval_to_ms (tv) - timeval_to_ms (last_tv);
|
||||
}
|
||||
|
||||
unsigned long long b_total;
|
||||
uint64_t b_total;
|
||||
static cDemux * dmx;
|
||||
|
||||
int CStreamInfo2::ts_setup ()
|
||||
@@ -749,15 +749,15 @@ int CStreamInfo2::update_rate ()
|
||||
if (d_tim_ms <= 0)
|
||||
d_tim_ms = 1; // ignore usecs
|
||||
|
||||
bit_s = (((unsigned long long) b * 8000ULL) + ((unsigned long long) d_tim_ms / 2ULL))
|
||||
/ (unsigned long long) d_tim_ms;
|
||||
bit_s = (((uint64_t) b * 8000ULL) + ((uint64_t) d_tim_ms / 2ULL))
|
||||
/ (uint64_t) d_tim_ms;
|
||||
|
||||
d_tim_ms = delta_time_ms (&tv, &first_tv);
|
||||
if (d_tim_ms <= 0)
|
||||
d_tim_ms = 1; // ignore usecs
|
||||
|
||||
abit_s = ((b_total * 8000ULL) + ((unsigned long long) d_tim_ms / 2ULL))
|
||||
/ (unsigned long long) d_tim_ms;
|
||||
abit_s = ((b_total * 8000ULL) + ((uint64_t) d_tim_ms / 2ULL))
|
||||
/ (uint64_t) d_tim_ms;
|
||||
|
||||
last_tv.tv_sec = tv.tv_sec;
|
||||
last_tv.tv_usec = tv.tv_usec;
|
||||
|
@@ -42,7 +42,7 @@ class CStreamInfo2 : public CMenuTarget
|
||||
int hheight,iheight,sheight; // head/info/small font height
|
||||
|
||||
int max_height; // Frambuffer 0.. max
|
||||
int max_width;
|
||||
int max_width;
|
||||
|
||||
int yypos;
|
||||
int paint_mode;
|
||||
@@ -67,7 +67,7 @@ class CStreamInfo2 : public CMenuTarget
|
||||
unsigned long sig, old_sig, max_sig, min_sig;
|
||||
unsigned long snr, old_snr, max_snr, min_snr;
|
||||
} signal;
|
||||
|
||||
|
||||
struct bitrate {
|
||||
unsigned int short_average, max_short_average, min_short_average;
|
||||
} rate;
|
||||
@@ -76,9 +76,9 @@ class CStreamInfo2 : public CMenuTarget
|
||||
|
||||
int dvrfd, dmxfd;
|
||||
struct timeval tv, last_tv, first_tv;
|
||||
unsigned long long bit_s;
|
||||
unsigned long long abit_s;
|
||||
unsigned long long b_total;
|
||||
uint64_t bit_s;
|
||||
uint64_t abit_s;
|
||||
uint64_t b_total;
|
||||
|
||||
int update_rate();
|
||||
int ts_setup();
|
||||
|
@@ -99,7 +99,7 @@ int CLcdControler::exec(CMenuTarget* parent, const std::string &)
|
||||
CLCD::getInstance()->setAutoDimm(0); // autodimm deactivated to control and see the real settings
|
||||
paint();
|
||||
|
||||
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||
|
||||
bool loop=true;
|
||||
while (loop)
|
||||
|
Reference in New Issue
Block a user