本文整理汇总了C++中eWarning函数的典型用法代码示例。如果您正苦于以下问题:C++ eWarning函数的具体用法?C++ eWarning怎么用?C++ eWarning使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eWarning函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: eWarning
gSDLDC::gSDLDC()
{
if (SDL_Init(SDL_INIT_VIDEO) < 0)
{
eWarning("Could not initialize SDL: %s", SDL_GetError());
return;
}
m_screen = SDL_SetVideoMode(720, 576, 32, SDL_HWSURFACE);
if (!m_screen)
{
eWarning("Could not create SDL surface: %s", SDL_GetError());
return;
}
m_instance=this;
m_surface.type = 0;
m_surface.x = m_screen->w;
m_surface.y = m_screen->h;
m_surface.bpp = m_screen->format->BitsPerPixel;
m_surface.bypp = m_screen->format->BytesPerPixel;
m_surface.stride = m_screen->pitch;
m_surface.data = m_screen->pixels;
m_surface.clut.colors=256;
m_surface.clut.data=new gRGB[m_surface.clut.colors];
m_pixmap = new gPixmap(&m_surface);
memset(m_surface.clut.data, 0, sizeof(*m_surface.clut.data)*m_surface.clut.colors);
}
示例2: ASSERT
RESULT eServiceXine::start()
{
if (m_state == stError)
return -1;
ASSERT(m_state == stIdle);
ASSERT(stream);
if (!xine_open(stream, m_filename.c_str()))
{
eWarning("xine_open failed!");
return -1;
}
if (!xine_play(stream, 0, 0))
{
eWarning("xine_play failed!");
return -1;
}
m_state = stRunning;
m_event(this, evStart);
return 0;
}
示例3: while
void eDVBPESReader::data(int)
{
while (1)
{
uint8_t buffer[16384];
int r;
r = ::read(m_fd, buffer, 16384);
if (!r)
return;
if(r < 0)
{
if (errno == EAGAIN || errno == EINTR) /* ok */
return;
eWarning("ERROR reading PES (fd=%d) - %m", m_fd);
return;
}
if (m_active)
m_read(buffer, r);
else
eWarning("PES reader not active");
if (r != 16384)
break;
}
}
示例4: m_filename
eServiceXine::eServiceXine(const char *filename): m_filename(filename), m_pump(eApp, 1)
{
m_state = stError;
stream = 0;
event_queue = 0;
ao_port = 0;
vo_port = 0;
// if ((vo_port = xine_open_video_driver(xine, "fb", XINE_VISUAL_TYPE_FB, NULL)) == NULL)
if ((vo_port = xine_open_video_driver(xine, "none", XINE_VISUAL_TYPE_NONE, NULL)) == NULL)
{
eWarning("cannot open xine video driver");
}
if ((ao_port = xine_open_audio_driver(xine , "alsa", NULL)) == NULL)
{
eWarning("cannot open xine audio driver");
}
stream = xine_stream_new(xine, ao_port, vo_port);
event_queue = xine_event_new_queue(stream);
xine_event_create_listener_thread(event_queue, eventListenerWrap, this);
// CONNECT(m_pump.recv_msg, eServiceXine::gstPoll);
m_state = stIdle;
}
示例5: eXine
eXine()
{
/* this should be done once. */
if(!xine_check_version(1, 1, 0))
{
int major, minor, sub;
xine_get_version (&major, &minor, &sub);
eWarning("Require xine library version 1.1.0, found %d.%d.%d.\n",
major, minor,sub);
return;
} else {
int major, minor, sub;
eDebug("Built with xine library %d.%d.%d (%s)\n",
XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION, XINE_VERSION);
xine_get_version (&major, &minor, &sub);
eDebug("Found xine library version: %d.%d.%d (%s).\n",
major, minor, sub, xine_get_version_string());
}
xine = xine_new();
xine_engine_set_param(xine, XINE_ENGINE_PARAM_VERBOSITY, 1);
xine_init(xine);
}
示例6: eWarning
RESULT eDVBPESReader::start(int pid)
{
RESULT res;
if (m_fd < 0)
return -ENODEV;
m_notifier->start();
#if HAVE_DVB_API_VERSION < 3
dmxPesFilterParams flt;
flt.pesType = DMX_PES_OTHER;
#else
dmx_pes_filter_params flt;
flt.pes_type = DMX_PES_OTHER;
#endif
flt.pid = pid;
flt.input = DMX_IN_FRONTEND;
flt.output = DMX_OUT_TAP;
flt.flags = DMX_IMMEDIATE_START;
res = ::ioctl(m_fd, DMX_SET_PES_FILTER, &flt);
if (res)
eWarning("PES filter: DMX_SET_PES_FILTER - %m");
if (!res)
m_active = 1;
return res;
}
示例7: rand
void eDVBSectionReader::data(int)
{
__u8 data[4096]; // max. section size
int r;
r = ::read(fd, data, 4096);
#if FUZZING
int j;
for (j = 0; j < r; ++j)
{
if (!(rand()%FUZZING_PROPABILITY))
data[j] ^= rand();
}
#endif
if(r < 0)
{
eWarning("ERROR reading section - %m\n");
return;
}
if (checkcrc)
{
// this check should never happen unless the driver is crappy!
unsigned int c;
if ((c = crc32((unsigned)-1, data, r)))
{
eDebug("crc32 failed! is %x\n", c);
return;
}
}
if (active)
read(data);
else
eDebug("data.. but not active");
}
示例8: eWarning
void eWidgetDesktop::makeCompatiblePixmap(gPixmap &pm)
{
if (m_comp_mode != cmImmediate)
return;
// eDebug("[widgetDesktop] make compatible pixmap of %p", &pm);
if (!m_screen.m_dc)
{
eWarning("[eWidgetDesktop] no DC to make pixmap compatible with!");
return;
}
ePtr<gPixmap> target_pixmap;
m_screen.m_dc->getPixmap(target_pixmap);
if (!target_pixmap) {
eDebug("[eWidgetDesktop] no target pixmap! assuming bpp > 8 for accelerated graphics.");
return;
}
if (target_pixmap->surface && target_pixmap->surface->bpp > 8)
return;
ePtr<gDC> pixmap_dc = new gDC(&pm);
gPainter pixmap_painter(pixmap_dc);
pixmap_painter.mergePalette(target_pixmap);
}
示例9: avahi_client_callback
static void avahi_client_callback(AvahiClient *client, AvahiClientState state, void *d)
{
eDebug("[Avahi] client state: %d", state);
switch(state)
{
case AVAHI_CLIENT_S_RUNNING:
/* The server has startup successfully and registered its host
* name on the network, register all our services */
avahi_client_try_register_all();
break;
case AVAHI_CLIENT_FAILURE:
/* Problem? Maybe we have to re-register everything? */
eWarning("[Avahi] Client failure: %s\n", avahi_strerror(avahi_client_errno(client)));
break;
case AVAHI_CLIENT_S_COLLISION:
/* Let's drop our registered services. When the server is back
* in AVAHI_SERVER_RUNNING state we will register them
* again with the new host name. */
case AVAHI_CLIENT_S_REGISTERING:
/* The server records are now being established. This
* might be caused by a host name change. We need to wait
* for our own records to register until the host name is
* properly esatblished. */
avahi_client_reset_all();
break;
case AVAHI_CLIENT_CONNECTING:
/* No action... */
break;
}
}
示例10: memset
RESULT eDVBPESReader::start(int pid)
{
RESULT res;
if (m_fd < 0)
return -ENODEV;
m_notifier->start();
dmx_pes_filter_params flt;
memset(&flt, 0, sizeof(flt));
flt.pes_type = DMX_PES_OTHER;
flt.pid = pid;
flt.input = DMX_IN_FRONTEND;
flt.output = DMX_OUT_TAP;
flt.flags = DMX_IMMEDIATE_START;
res = ::ioctl(m_fd, DMX_SET_PES_FILTER, &flt);
if (res)
eWarning("PES filter: DMX_SET_PES_FILTER - %m");
if (!res)
m_active = 1;
return res;
}
示例11: defined
void gPixmap::fill(const gRegion ®ion, const gRGB &color)
{
unsigned int i;
for (i=0; i<region.rects.size(); ++i)
{
const eRect &area = region.rects[i];
if ((area.height()<=0) || (area.width()<=0))
continue;
if (surface->bpp == 32)
{
__u32 col;
col = color.argb();
#if defined(__sh__)
if((col&0xFF000000) == 0xFF000000)
col = 0xFF000000;
#endif
col^=0xFF000000;
if (surface->data_phys && gAccel::getInstance())
if (!gAccel::getInstance()->fill(surface, area, col))
continue;
for (int y=area.top(); y<area.bottom(); y++)
{
__u32 *dst=(__u32*)(((__u8*)surface->data)+y*surface->stride+area.left()*surface->bypp);
int x=area.width();
while (x--)
*dst++=col;
}
} else
eWarning("couldn't rgbfill %d bpp", surface->bpp);
}
}
示例12: eWarning
void eDVBSectionReader::data(int)
{
uint8_t data[4096]; // max. section size
int r;
r = ::read(fd, data, 4096);
if(r < 0)
{
eWarning("ERROR reading section - %m\n");
return;
}
if (checkcrc)
{
// this check should never happen unless the driver is crappy!
unsigned int c;
if ((c = crc32((unsigned)-1, data, r)))
{
//eDebug("[eDVBSectionReader] section crc32 failed! is %x\n", c);
return;
}
}
if (active)
read(data);
else
eDebug("data.. but not active");
}
示例13: eDebug
RESULT eDVBPESReader::start(int pid)
{
RESULT res;
if (m_fd < 0)
return -ENODEV;
eDebug("[eDVBPESReader] DMX_SET_PES_FILTER pid=%04x", pid);
m_notifier->start();
dmx_pes_filter_params flt;
flt.pes_type = DMX_PES_OTHER;
flt.pid = pid;
flt.input = DMX_IN_FRONTEND;
flt.output = DMX_OUT_TAP;
flt.flags = DMX_IMMEDIATE_START;
res = ::ioctl(m_fd, DMX_SET_PES_FILTER, &flt);
if (res)
eWarning("[eDVBPESReader] DMX_SET_PES_FILTER pid=%04x: %m", pid);
if (!res)
m_active = 1;
return res;
}
示例14: eWarning
void eWidgetDesktop::makeCompatiblePixmap(gPixmap &pm)
{
if (m_comp_mode != cmImmediate)
return;
// eDebug("widgetDesktop: make compatible pixmap of %p", &pm);
if (!m_screen.m_dc)
{
eWarning("eWidgetDesktop: no DC to make pixmap compatible with!");
return;
}
ePtr<gPixmap> target_pixmap;
m_screen.m_dc->getPixmap(target_pixmap);
ASSERT(target_pixmap);
if (target_pixmap->surface && target_pixmap->surface->bpp > 8)
return;
ePtr<gDC> pixmap_dc = new gDC(&pm);
gPainter pixmap_painter(pixmap_dc);
pixmap_painter.mergePalette(target_pixmap);
}
示例15: peer_remove
static void peer_remove(const char *name)
{
eWarning("REMOVE Peer %s", name);
PeerMapping::iterator it = peers.find(std::string(name));
if (it != peers.end())
peers.erase(it);
}