本文整理汇总了C++中INFOLOG函数的典型用法代码示例。如果您正苦于以下问题:C++ INFOLOG函数的具体用法?C++ INFOLOG怎么用?C++ INFOLOG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了INFOLOG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: closeFile
void cRecPlayer::scan()
{
struct stat s;
closeFile();
m_totalLength = 0;
m_fileOpen = -1;
m_totalFrames = 0;
cleanup();
for(int i = 0; ; i++) // i think we only need one possible loop
{
fileNameFromIndex(i);
if(stat(m_fileName, &s) == -1) {
break;
}
cSegment* segment = new cSegment();
segment->start = m_totalLength;
segment->end = segment->start + s.st_size;
m_segments.Append(segment);
m_totalLength += s.st_size;
INFOLOG("File %i found, size: %llu, totalLength now %llu", i, s.st_size, m_totalLength);
}
m_totalFrames = m_indexFile->Last();
INFOLOG("total frames: %u", m_totalFrames);
}
示例2: INFOLOG
std::vector<QString> CoreMidiDriver::getOutputPortList()
{
INFOLOG( "retrieving output list" );
OSStatus err = noErr;
std::vector<QString> cmPortList;
cmSources = MIDIGetNumberOfSources();
INFOLOG ( "Getting number of MIDI sources . . .\n" );
unsigned i;
for ( i = 0; i < cmSources; i++ ) {
CFStringRef H2MidiNames;
cmH2Src = MIDIGetSource( i );
if ( cmH2Src == NULL ) {
ERRORLOG( "Could not open input device" );
}
if ( cmH2Src ) {
err = MIDIObjectGetStringProperty( cmH2Src, kMIDIPropertyName, &H2MidiNames );
INFOLOG ( "Getting MIDI object string property . . .\n" );
char cmName[ 64 ];
CFStringGetCString( H2MidiNames, cmName, 64, kCFStringEncodingASCII );
INFOLOG ( "Getting MIDI object name . . .\n" );
QString h2MidiPortName = cmName;
cmPortList.push_back( h2MidiPortName );
}
CFRelease( H2MidiNames );
}
return cmPortList;
}
示例3: while
bool DVBAPI::ProcessArgs(int argc, char *argv[])
{
static struct option long_options[] = {
{ "offset", required_argument, NULL, 'o' },
{ "disable-exp", no_argument, NULL, 'd' },
{ NULL }
};
int c, option_index = 0;
while ((c = getopt_long(argc, argv, "o:d", long_options, &option_index)) != -1)
{
switch (c)
{
case 'o':
AdapterIndexOffset = atoi(optarg);
INFOLOG("Using value %d as the adapter index offset", AdapterIndexOffset);
break;
case 'd':
CheckExpiredCW = false;
INFOLOG("CW expiration check is disabled");
break;
default:
return false;
}
}
return true;
}
示例4: IsReady
void cLiveStreamer::sendStreamPacket(sStreamPacket *pkt)
{
bool bReady = IsReady();
if(!bReady || pkt == NULL || pkt->size == 0)
return;
// Send stream information as the first packet on startup
if (IsStarting() && bReady)
{
// wait for first I-Frame (if enabled)
if(m_waitforiframe && pkt->frametype != cStreamInfo::ftIFRAME) {
return;
}
INFOLOG("streaming of channel started");
m_last_tick.Set(0);
m_requestStreamChange = true;
m_startup = false;
}
// send stream change on demand
if(m_requestStreamChange)
sendStreamChange();
// if a audio or video packet was sent, the signal is restored
if(m_SignalLost && (pkt->content == cStreamInfo::scVIDEO || pkt->content == cStreamInfo::scAUDIO)) {
INFOLOG("signal restored");
sendStatus(XVDR_STREAM_STATUS_SIGNALRESTORED);
m_SignalLost = false;
m_requestStreamChange = true;
m_last_tick.Set(0);
return;
}
if(m_SignalLost)
return;
// initialise stream packet
MsgPacket* packet = new MsgPacket(XVDR_STREAM_MUXPKT, XVDR_CHANNEL_STREAM);
packet->disablePayloadCheckSum();
// write stream data
packet->put_U16(pkt->pid);
packet->put_S64(pkt->pts);
packet->put_S64(pkt->dts);
if(m_protocolVersion >= 5) {
packet->put_U32(pkt->duration);
}
// write frame type into unused header field clientid
packet->setClientID((uint16_t)pkt->frametype);
// write payload into stream packet
packet->put_U32(pkt->size);
packet->put_Blob(pkt->data, pkt->size);
m_Queue->Add(packet);
m_last_tick.Set(0);
}
示例5: if
bool RoboTVServerConfig::Parse(const char* Name, const char* Value) {
if(!strcasecmp(Name, "TimeShiftDir")) {
LiveQueue::setTimeShiftDir(Value);
}
else if(!strcasecmp(Name, "MaxTimeShiftSize")) {
LiveQueue::setBufferSize(strtoull(Value, NULL, 10));
}
else if(!strcasecmp(Name, "PiconsURL")) {
piconsUrl = Value;
}
else if(!strcasecmp(Name, "ReorderCmd")) {
reorderCmd = Value;
}
else if(!strcasecmp(Name, "EpgImageUrl")) {
INFOLOG("EPG images template URL: %s", Value);
epgImageUrl = Value;
}
else if(!strcasecmp(Name, "SeriesFolder")) {
INFOLOG("Folder for TV shows: %s", Value);
seriesFolder = Value;
}
else if(!strcasecmp(Name, "FilterChannels")) {
filterChannels = (strcmp(Value, "true") == 0);
}
else {
return false;
}
return true;
}
示例6: INFOLOG
// return 0: ok
// return 1: cannot activate client
// return 2: cannot connect output port
// return 3: Jack server not running
// return 4: output port = NULL
int JackOutput::connect()
{
INFOLOG( "connect" );
if ( jack_activate ( client ) ) {
Hydrogen::get_instance()->raiseError( Hydrogen::JACK_CANNOT_ACTIVATE_CLIENT );
return 1;
}
bool connect_output_ports = m_bConnectOutFlag;
memset( track_output_ports_L, 0, sizeof(track_output_ports_L) );
memset( track_output_ports_R, 0, sizeof(track_output_ports_R) );
#ifdef H2CORE_HAVE_LASH
if ( Preferences::get_instance()->useLash() ){
LashClient* lashClient = LashClient::get_instance();
if (lashClient && lashClient->isConnected())
{
// infoLog("[LASH] Sending Jack client name to LASH server");
lashClient->sendJackClientName();
if (!lashClient->isNewProject())
{
connect_output_ports = false;
}
}
}
#endif
if ( connect_output_ports ) {
// if ( m_bConnectOutFlag ) {
// connect the ports
if ( jack_connect( client, jack_port_name( output_port_1 ), output_port_name_1.toLocal8Bit() ) == 0 &&
jack_connect ( client, jack_port_name( output_port_2 ), output_port_name_2.toLocal8Bit() ) == 0 ) {
return 0;
}
INFOLOG( "Could not connect so saved out-ports. Connecting to first pair of in-ports" );
const char ** portnames = jack_get_ports ( client, NULL, NULL, JackPortIsInput );
if ( !portnames || !portnames[0] || !portnames[1] ) {
ERRORLOG( "Could't locate two Jack input port" );
Hydrogen::get_instance()->raiseError( Hydrogen::JACK_CANNOT_CONNECT_OUTPUT_PORT );
return 2;
}
if ( jack_connect( client, jack_port_name( output_port_1 ), portnames[0] ) != 0 ||
jack_connect( client, jack_port_name( output_port_2 ), portnames[1] ) != 0 ) {
ERRORLOG( "Could't connect to first pair of Jack input ports" );
Hydrogen::get_instance()->raiseError( Hydrogen::JACK_CANNOT_CONNECT_OUTPUT_PORT );
return 2;
}
free( portnames );
}
return 0;
}
示例7: cThread
cVNSIServer::cVNSIServer(int listenPort) : cThread("VNSI Server")
{
m_ServerPort = listenPort;
Start();
INFOLOG("VNSI Server started");
INFOLOG("Channel streaming timeout: %i seconds", VNSIServerConfig.stream_timeout);
return;
}
示例8: INFOLOG
void cTSDemuxer::SetVideoInformation(int FpsScale, int FpsRate, int Height, int Width, float Aspect, int num, int den)
{
// check for sane picture information
if(Width < 320 || Height < 240 || num <= 0 || den <= 0 || Aspect < 0)
return;
// only register changed video information
if(Width == m_width && Height == m_height && Aspect == m_aspect)
return;
INFOLOG("--------------------------------------");
INFOLOG("NEW PICTURE INFORMATION:");
INFOLOG("Picture Width: %i", Width);
INFOLOG("Picture Height: %i", Height);
if(num != 1 || den != 1)
INFOLOG("Pixel Aspect: %i:%i", num, den);
if(Aspect == 0)
INFOLOG("Unknown Display Aspect Ratio");
else
INFOLOG("Display Aspect Ratio: %.2f", Aspect);
INFOLOG("--------------------------------------");
m_fpsscale = FpsScale;
m_fpsrate = FpsRate;
m_height = Height;
m_width = Width;
m_aspect = Aspect;
m_parsed = true;
m_Streamer->RequestStreamChange();
}
示例9: LengthSize
void SCCAMSlot::CaInfo(int tcid, int cid)
{
int cn = 0;
for (int i = 0; caids[i]; i++)
cn += 2;
int n = cn + 8 + LengthSize(cn);
unsigned char *p;
if (!(p = frame.GetBuff(n + 1 + LengthSize(n))))
return;
*p++ = 0xa0;
SetSize(n, p);
*p++ = tcid;
*p++ = 0x90;
*p++ = 0x02;
*p++ = cid >> 8;
*p++ = cid & 0xff;
*p++ = 0x9f;
*p++ = 0x80;
*p++ = (unsigned char) AOT_CA_INFO;
SetSize(cn, p);
for (int i = 0; caids[i]; i++)
{
*p++ = caids[i] >> 8;
*p++ = caids[i] & 0xff;
}
frame.Put();
INFOLOG("%s: %i.%i sending CA info", __FUNCTION__, cardIndex, slot);
}
示例10: QDialog
SoundLibraryImportDialog::SoundLibraryImportDialog( QWidget* pParent )
: QDialog( pParent )
, Object( __class_name )
{
setupUi( this );
INFOLOG( "INIT" );
setWindowTitle( trUtf8( "Sound Library import" ) );
setFixedSize( width(), height() );
QStringList headers;
headers << trUtf8( "Sound library" ) << trUtf8( "Status" );
QTreeWidgetItem* header = new QTreeWidgetItem( headers );
m_pDrumkitTree->setHeaderItem( header );
m_pDrumkitTree->header()->resizeSection( 0, 200 );
connect( m_pDrumkitTree, SIGNAL( currentItemChanged ( QTreeWidgetItem*, QTreeWidgetItem* ) ), this, SLOT( soundLibraryItemChanged( QTreeWidgetItem*, QTreeWidgetItem* ) ) );
SoundLibraryNameLbl->setText( "" );
SoundLibraryInfoLbl->setText( "" );
DownloadBtn->setEnabled( false );
InstallBtn->setEnabled (false );
updateRepositoryCombo();
// force a new update
//on_UpdateListBtn_clicked();
}
示例11: INFOLOG
bool cPluginVNSIServer::Start(void)
{
INFOLOG("Starting vnsi server at port=%d\n", VNSIServerConfig.listen_port);
Server = new cVNSIServer(VNSIServerConfig.listen_port);
return true;
}
示例12: sizeof
void CoreAudioDriver::retrieveBufferSize(void)
{
UInt32 dataSize = 0;
OSStatus err = 0;
AudioObjectPropertyAddress propertyAddress = {
kAudioDevicePropertyBufferFrameSize,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster
};
dataSize = sizeof( m_nBufferSize );
err = AudioObjectGetPropertyData(m_outputDevice,
&propertyAddress,
0,
NULL,
&dataSize,
( void * )&m_nBufferSize
);
if ( err != noErr ) {
ERRORLOG( "get BufferSize error" );
}
INFOLOG( QString( "Buffersize: %1" ).arg( m_nBufferSize ) );
}
示例13: Get
void cParser::Parse(unsigned char *data, int datasize, bool pusi)
{
// get available data
int length = 0;
uint8_t* buffer = Get(length);
// do we have a sync ?
int framesize = 0;
if(length > m_headersize && buffer != NULL && CheckAlignmentHeader(buffer, framesize))
{
if(framesize > 0 && length >= framesize)
{
ParsePayload(buffer, framesize);
SendPayload(buffer, framesize);
m_curPTS = PtsAdd(m_curPTS, m_duration);
m_curDTS = PtsAdd(m_curDTS, m_duration);
Del(framesize);
}
PutData(data, datasize, pusi);
return;
}
// try to find sync
int offset = FindAlignmentOffset(buffer, length, 0, framesize);
if(offset != -1)
{
INFOLOG("sync found at offset %i (streamtype: %s / %i bytes in buffer / framesize: %i bytes)", offset, m_demuxer->TypeName(), Available(), framesize);
Del(offset);
}
PutData(data, datasize, pusi);
}
示例14: ERRORLOG
bool LoginController::processLogin(MsgPacket* request, MsgPacket* response) {
m_protocolVersion = request->getProtocolVersion();
m_compressionLevel = request->get_U8();
const char* clientName = request->get_String();
m_statusInterfaceEnabled = request->get_U8();
if(m_protocolVersion > ROBOTV_PROTOCOLVERSION || m_protocolVersion < 7) {
ERRORLOG("Client '%s' has unsupported protocol version '%u', terminating client", clientName, m_protocolVersion);
return false;
}
INFOLOG("Welcome client '%s' with protocol version '%u'", clientName, m_protocolVersion);
// Send the login reply
time_t timeNow = time(NULL);
struct tm* timeStruct = localtime(&timeNow);
int timeOffset = timeStruct->tm_gmtoff;
response->setProtocolVersion(m_protocolVersion);
response->put_U32(timeNow);
response->put_S32(timeOffset);
response->put_String("roboTV VDR Server");
response->put_String(ROBOTV_VERSION);
m_loggedIn = true;
return true;
}
示例15: INFOLOG
void SndioMidiDriver::open()
{
char midiDevice[32];
INFOLOG("SndioMidiDriver::open");
snprintf(midiDevice, 32, (Preferences::get_instance()->m_sMidiPortName).toAscii());
if (strncmp(midiDevice, "", 1) == 0 ||
strncmp(midiDevice, "None", 5) == 0 ||
strncmp(midiDevice, "default", 8) == 0)
hdl = mio_open(NULL, MIO_IN, 0);
else
hdl = mio_open(midiDevice, MIO_IN, 0);
if (!hdl) {
ERRORLOG("mio_open failed");
m_bRunning = false;
return;
}
m_bRunning = true;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_create(&SndioMidiDriverThread, &attr, SndioMidiDriver_thread, ( void* )this);
}