当前位置: 首页>>代码示例>>C++>>正文


C++ ADM_error函数代码示例

本文整理汇总了C++中ADM_error函数的典型用法代码示例。如果您正苦于以下问题:C++ ADM_error函数的具体用法?C++ ADM_error怎么用?C++ ADM_error使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ADM_error函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ADM_coreVideoFilterQtGl

/**
    \fn openGlBenchmark
    \brief constructor
*/
openGlBenchmark::openGlBenchmark(  ADM_coreVideoFilter *in,CONFcouple *setup) : ADM_coreVideoFilterQtGl(in,setup)
{
UNUSED_ARG(setup);
        widget->makeCurrent();
        fboY->bind();
        printf("Compiling shader \n");
        glProgramY = new QGLShaderProgram(context);
        ADM_assert(glProgramY);
        if ( !glProgramY->addShaderFromSourceCode(QGLShader::Fragment, myShaderY))
        {
                ADM_error("[GL Render] Fragment log: %s\n", glProgramY->log().toUtf8().constData());
                ADM_assert(0);
        }
        if ( !glProgramY->link())
        {
            ADM_error("[GL Render] Link log: %s\n", glProgramY->log().toUtf8().constData());
            ADM_assert(0);
        }

        if ( !glProgramY->bind())
        {
                ADM_error("[GL Render] Binding FAILED\n");
                ADM_assert(0);
        }

        fboY->release();
        widget->doneCurrent();

}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:33,代码来源:sampleGl.cpp

示例2: ADM_warning

/**
    \fn resetVdpau
*/
bool vdpauVideoFilterDeint::setupVdpau(void)
{
    scaler=NULL;
    secondField=false;
    nextFrame=0;
    if(!admVdpau::isOperationnal())
    {
        ADM_warning("Vdpau not operationnal\n");
        return false;
    }   
    if(VDP_STATUS_OK!=admVdpau::outputSurfaceCreate(VDP_RGBA_FORMAT_B8G8R8A8,
                        info.width,info.height,&outputSurface)) 
    {
        ADM_error("Cannot create outputSurface0\n");
        return false;
    }
    for(int i=0;i<ADM_NB_SURFACES;i++) surfacePool[i]=VDP_INVALID_HANDLE;
    for(int i=0;i<ADM_NB_SURFACES;i++)
    {
        if(VDP_STATUS_OK!=admVdpau::surfaceCreate(   previousFilter->getInfo()->width,
                                                    previousFilter->getInfo()->height,
                                                    &(surfacePool[i]))) 
        {
            ADM_error("Cannot create input Surface %d\n",i);
            goto badInit;
        }
        aprintf("Created surface %d\n",(int)surfacePool[i]);
    }
    // allocate our (dummy) images
    for(int i=0;i<3;i++)
        xslots[i].image=new ADMImageDefault( previousFilter->getInfo()->width, 
                                            previousFilter->getInfo()->height);
                                            
    if(VDP_STATUS_OK!=admVdpau::mixerCreate(previousFilter->getInfo()->width,
                                            previousFilter->getInfo()->height,&mixer,true)) 
    {
        ADM_error("Cannot create mixer\n");
        goto badInit;
    } 
    tempBuffer=new uint8_t[info.width*info.height*4];
    scaler=new ADMColorScalerSimple( info.width,info.height, ADM_COLOR_BGR32A,ADM_COLOR_YV12);

    freeSurface.clear();
    for(int i=0;i<ADM_NB_SURFACES;i++)  
            freeSurface.push_back(surfacePool[i]);

    
    ADM_info("VDPAU setup ok\n");
    if(initGl()==false)
    {
        ADM_error("Cannot setup openGL\n");
        goto badInit;
    }
    ADM_info("VDPAU setup ok\n");
    return true;
badInit:
    cleanupVdpau();
    passThrough=true;
    return false;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:63,代码来源:ADM_vidVdpauFilterDeint.cpp

示例3: ADM_error

/**
    \fn samePicture
    \brief returns the last already decoded picture
*/
bool        ADM_Composer::samePicture(ADMImage *image)
{
      _SEGMENT *seg=_segments.getSegment(_currentSegment);
      _VIDEOS  *ref=_segments.getRefVideo(seg->_reference);

        // Do Pts->ref PTs
uint64_t refPts;
uint64_t segTime;
uint32_t segNo;
    if(false==_segments.convertLinearTimeToSeg(_currentPts,&segNo,&segTime))
    {
          ADM_error("Cannot convert time in samePicture\n");         
          return false;
    }
      ADM_assert(_currentSegment==segNo);
      refPts=segTime+seg->_refStartTimeUs;
      ADMImage *last=ref->_videoCache->getByPts(refPts);
      if(last)
      {
            image->duplicate(last);
            updateImageTiming(seg,image);
            return true;
      }
      ADM_error("Cannot find same image in cache\n"); 
      ADM_info("Looking for PTS=%"PRIu64" ms\n",refPts/1000);
      ref->_videoCache->dump();
      return false;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:32,代码来源:ADM_edRender.cpp

示例4: ADM_copyFile

/**
    \fn ADM_copyFile
*/
uint8_t ADM_copyFile(const char *source, const char *target)
{
    FILE *fin=ADM_fopen(source,"rb");
    if(!fin)
    {
        ADM_error("Cannot open %s for reading\n",source);
        return false;
    }
    FILE *fout=ADM_fopen(target,"wb");
    if(!fout)
    {
        fclose(fin);
        ADM_error("Cannot open %s for writting\n",target);
        return false;
    }
    uint8_t buffer[1024];
    while(!feof(fin))
    {
        int r=fread(buffer,1,1024,fin);
        fwrite(buffer,1,r,fout);
        if(r!=1024) break;
    }

    fclose(fin);
    fclose(fout);
    return true;
}
开发者ID:TotalCaesar659,项目名称:avidemux2,代码行数:30,代码来源:ADM_fileio.cpp

示例5: ADM_info

/**
    \fn init
*/
bool vdpauRender::init( GUI_WindowInfo *window, uint32_t w, uint32_t h, float zoom)
{
    if(!w || !h)
    {
        ADM_info("[VDPAU] Not trying to initialize with zero size dimensions\n");
        return false;
    }
    ADM_info("[Vdpau]Init\n");
    info=*window;
    if(admVdpau::isOperationnal()==false)
    {
        ADM_warning("[Vdpau] Not operationnal\n");
    }
    baseInit(w,h,zoom);
    // Create couple of outputSurface
    surface[0]=surface[1]=VDP_INVALID_HANDLE;
    currentSurface=0;
    
    //
    int widthToUse=admVdpau::dimensionRoundUp(w);
    int heightToUse=admVdpau::dimensionRoundUp(h);
    
    ADM_info("[VDpau] Allocating surfaces %d x%d , %d x %d, %d x x%d\n",w,h,widthToUse,heightToUse,displayWidth,displayHeight);
    
    if(!reallocOutputSurface(displayWidth,displayHeight))
    {
        goto badInit;
    }
    if(VDP_STATUS_OK!=admVdpau::surfaceCreate(widthToUse,heightToUse,&input)) 
    {
        ADM_error("Cannot create input Surface\n");
        goto badInit;
    }
    if(VDP_STATUS_OK!=admVdpau::presentationQueueCreate(&queue)) 
    {
        ADM_error("Cannot create queue\n");
        goto badInit;
    } 
    if(VDP_STATUS_OK!=admVdpau::mixerCreate(widthToUse,heightToUse,&mixer)) 
    {
        ADM_error("Cannot create mixer\n");
        goto badInit;
    } 

    return true;
badInit:
    
    return false;
}
开发者ID:mean00,项目名称:avidemux2,代码行数:52,代码来源:GUI_vdpauRender.cpp

示例6: ADM_initBaseDir

void ADM_initBaseDir(int argc, char *argv[])
{
    char *home = NULL;

    // Get the base directory

    const char* homeEnv = getenv("HOME");

    if (!homeEnv)
    {
        printf("Oops: can't determine $HOME.");
        return;
    }
    // Try to open the .avidemux directory

    strcpy(ADM_basedir, homeEnv);
    AddSeparator(ADM_basedir);

    const char *ADM_DIR_NAME = ".avidemux6";

    strcat(ADM_basedir, ADM_DIR_NAME);
    strcat(ADM_basedir, ADM_SEPARATOR);

    if (ADM_mkdir(ADM_basedir))
    {
        printf("Using %s as base directory for prefs, jobs, etc.\n", ADM_basedir);
    }
    else
    {
        ADM_error("Oops: cannot create the .avidemux directoryi (%s)\n", ADM_basedir);
    }
}
开发者ID:TotalCaesar659,项目名称:avidemux2,代码行数:32,代码来源:ADM_folder_mac.cpp

示例7: ADM_MuxerIndexFromName

bool ADM_Composer::setContainer(const char *cont, CONFcouple *c)
{
	int idx = ADM_MuxerIndexFromName(cont);

	if (idx == -1)
	{
		ADM_error("Cannot find muxer for format=%s\n",cont);
		return false;
	}

	ADM_info("setting container as index %d\n",idx);
	UI_SetCurrentFormat(idx);
	idx = ADM_MuxerIndexFromName(cont);

	bool r = false;

	if(idx != -1)
	{
		r = ADM_mx_setExtraConf(idx, c);
	}

	if (c)
		delete c;

	return r;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:26,代码来源:ADM_editIface.cpp

示例8: TimeToFrame

/**
    \fn TimeToFrame
    \brief return the frameno whose PTS==time
*/
static bool TimeToFrame(_VIDEOS *v,uint64_t time,uint32_t *frame,uint32_t *oflags)
{
    vidHeader *demuxer=v->_aviheader;
    bool warn=false;
    int nb=demuxer->getMainHeader()->dwTotalFrames;
    for(int i=0;i<nb;i++)
    {
        uint64_t pts,dts;
        uint32_t flags;
            demuxer->getPtsDts(i,&pts,&dts);
            demuxer->getFlags(i,&flags);
            if(pts==time)
            {
                *frame=i;
                *oflags=flags;
                return true;
            }
            if(dts!=ADM_NO_PTS && warn==false)
            {
                if(dts>time)
                {
                    ADM_error("We reached frame %d with a PTS of %"PRIu64" when looking for PTS %"PRIu64"\n",
                                            i,dts,time);
                    warn=true;
                }
            }
    }
    return false;
}
开发者ID:AlexanderStohr,项目名称:avidemux2,代码行数:33,代码来源:ADM_segment.cpp

示例9: GUI_Error_HIG

uint8_t asfHeader::open(const char *name)
{
  _fd=ADM_fopen(name,"rb");
  if(!_fd)
  {
    GUI_Error_HIG("File Error.","Cannot open file\n");
    return 0; 
  }
  myName=ADM_strdup(name);
  if(!getHeaders())
  {
    return 0; 
  }
  ADM_info("Stream Video: index=%d, sid=%d\n",(int)_videoIndex,(int)_videoStreamId);
  for(int i=0;i<_nbAudioTrack;i++)
    ADM_info("Stream Audio: index=%d, sid=%d\n",
                (int)_allAudioTracks[i].streamIndex,(int)_allAudioTracks[i].streamIndex);
  buildIndex();
  fseeko(_fd,_dataStartOffset,SEEK_SET);
  _packet=new asfPacket(_fd,_nbPackets,_packetSize,&readQueue,&storageQueue,_dataStartOffset);
  curSeq=1;
  for(int i=0;i<_nbAudioTrack;i++)
  {
        _audioAccess[i]=new asfAudioAccess(this,i);
        _audioStreams[i]=ADM_audioCreateStream(&(_allAudioTracks[i].wavHeader), _audioAccess[i]);
  }
  if(!nbImage)
    {
        ADM_error("No image found \n");
        return 0;
    }
  return 1;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:33,代码来源:ADM_asf.cpp

示例10: av_strerror

/**
 * \fn printError
 * @param s : banner
 * @param er : error code
 */
void AUDMEncoder_Lavcodec::printError(const char *s,int er)
{
    char strer[256]={0};
                av_strerror(er, strer, sizeof(strer));
                ADM_error("[Lavcodec] %s,err : %d %s!\n",s,er,strer);
                
}
开发者ID:TotalCaesar659,项目名称:avidemux2,代码行数:12,代码来源:audioencoder_lavcodec.cpp

示例11: ADM_info

/**
    \fn shiftAudioVideoBy
    \brief shift audio and video so that they start close to zero
*/
bool asfHeader::shiftAudioVideoBy(uint64_t s)
{
    int n=_index.size();
    ADM_info("Shifting by %s\n",ADM_us2plain(s));
    for(int i=0;i<n;i++)
    {
        if(_index[i].pts!=ADM_NO_PTS)
        {
            if(_index[i].pts<s)
            {
                ADM_error("Shifting too big for frame %d PTS: %s\n",i,ADM_us2plain(_index[i].pts));
            }else
                _index[i].pts-=s;
        }
        _index[i].dts=ADM_NO_PTS;
/*
        if(_index[i].dts!=ADM_NO_PTS)
        {
            if(_index[i].dts<s)
            {
                ADM_error("Shifting too big for frame %d DTS: %s\n",i,ADM_us2plain(_index[i].dts));
                _index[i].dts=ADM_NO_PTS;
            }else
                _index[i].dts-=s;
        }
*/
    }
    _shiftUs=s;
    return true;
}
开发者ID:AlexanderStohr,项目名称:avidemux2,代码行数:34,代码来源:ADM_asfHeaders.cpp

示例12: ADM_Audiocodec

ADM_AudiocodecAC3::ADM_AudiocodecAC3( uint32_t fourcc, WAVHeader *info,uint32_t extraLength,uint8_t *extraData)
		:   ADM_Audiocodec(fourcc,*info)
{
    int flags=0;
    
    ADM_assert(fourcc==WAV_AC3);
    ac3_handle=NULL;
    ac3_sample=NULL;
#ifdef ADM_CPU_X86
#define CHK(x,y) if(CpuCaps::has##x()) flags|=MM_ACCEL_X86_##y;
    CHK(MMX,MMX);
    CHK(3DNOW,3DNOW);
    CHK(MMXEXT,MMXEXT);
#endif

    ac3_handle=(void *)a52_init(flags);
    if(!ac3_handle)
    {
        ADM_error("Cannot init a52\n");
        ADM_assert(0);
    }
    ac3_sample=(sample_t *)a52_samples(AC3_HANDLE);
    if(!ac3_sample)
    {
        ADM_warning("Cannot init a52 sample\n");
        ADM_assert(0);
    }

      
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:30,代码来源:ADM_ad_a52.cpp

示例13: ADM_info

/**
    \fn stop
    \brief stop
*/
uint8_t audioDeviceThreaded::stop()
{
 uint32_t maxWait=3*1000; // Should be enough to drain
    ADM_info("[audioDevice]Stopping device...");
    if(stopRequest==AUDIO_DEVICE_STARTED)
    {
        CHANGE_STATE(AUDIO_DEVICE_STOP_REQ);
        while(stopRequest==AUDIO_DEVICE_STOP_REQ && maxWait)
        {
            ADM_usleep(1000);
            maxWait--;
        }
    }
    if(!maxWait)
    {
        ADM_error("Audio device did not stop cleanly\n");
    }
    localStop();
    if(audioBuffer)
    {
        delete [] audioBuffer;
        audioBuffer=NULL;
    }
    if(silence) delete [] silence;
    silence=NULL;
    CHANGE_STATE(AUDIO_DEVICE_STOPPED);
    return 1;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:32,代码来源:ADM_audioDeviceThreaded.cpp

示例14: ADM_info

muxerMp4v2::~muxerMp4v2()
{
    ADM_info("[Mp4v2Muxer] Destroying\n");
    close();
    if(handle)
        ADM_error("MP4V2: File still opened\n");
    currentMuxer=NULL;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:8,代码来源:muxerMp4v2.cpp

示例15: denoise3dhq_jdeserialize

bool  denoise3dhq_jdeserialize(const char *file, const ADM_paramList *tmpl,denoise3dhq *key){
admJsonToCouple json;
CONFcouple *c=json.readFromFile(file);
if(!c) {ADM_error("Cannot read json file");return false;}
bool r= ADM_paramLoadPartial(c,tmpl,key);
delete c;
return r;
};
开发者ID:JanGruuthuse,项目名称:avidemux2,代码行数:8,代码来源:denoise3dHQ_json.cpp


注:本文中的ADM_error函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。