• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ALOGI函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Java_com_farcore_playerservice_AmPlayer_setglobalalpha

JNIEXPORT jint Java_com_farcore_playerservice_AmPlayer_setglobalalpha(JNIEnv *env, jclass clazz, jint alpha){
    int ret = -1;
    ret = SYS_set_global_alpha(alpha);
    ALOGI("set global alpha is %d",alpha);
    return ret;
}
开发者ID:TeamNostalgia,项目名称:android_device_jxd_s7300b,代码行数:6,代码来源:com_farcore_playerservice_AmPlayer.c


示例2: ALOGE


//.........这里部分代码省略.........

    sp<IMemory> iMem;           // for cblk
    sp<IMemory> bufferMem;
    sp<IAudioRecord> record = audioFlinger->openRecord(input,
                                                       mSampleRate,
                                                       mFormat,
                                                       mChannelMask,
                                                       opPackageName,
                                                       &temp,
                                                       &flags,
                                                       mClientPid,
                                                       tid,
                                                       mClientUid,
                                                       &mSessionId,
                                                       &notificationFrames,
                                                       iMem,
                                                       bufferMem,
                                                       &status);
    ALOGE_IF(originalSessionId != AUDIO_SESSION_ALLOCATE && mSessionId != originalSessionId,
            "session ID changed from %d to %d", originalSessionId, mSessionId);

    if (status != NO_ERROR) {
        ALOGE("AudioFlinger could not create record track, status: %d", status);
        break;
    }
    ALOG_ASSERT(record != 0);

    // AudioFlinger now owns the reference to the I/O handle,
    // so we are no longer responsible for releasing it.

    mAwaitBoost = false;
    if (mFlags & AUDIO_INPUT_FLAG_FAST) {
        if (flags & AUDIO_INPUT_FLAG_FAST) {
            ALOGI("AUDIO_INPUT_FLAG_FAST successful; frameCount %zu", frameCount);
            mAwaitBoost = true;
        } else {
            ALOGW("AUDIO_INPUT_FLAG_FAST denied by server; frameCount %zu", frameCount);
            mFlags = (audio_input_flags_t) (mFlags & ~(AUDIO_INPUT_FLAG_FAST |
                    AUDIO_INPUT_FLAG_RAW));
            continue;   // retry
        }
    }
    mFlags = flags;

    if (iMem == 0) {
        ALOGE("Could not get control block");
        return NO_INIT;
    }
    void *iMemPointer = iMem->pointer();
    if (iMemPointer == NULL) {
        ALOGE("Could not get control block pointer");
        return NO_INIT;
    }
    audio_track_cblk_t* cblk = static_cast<audio_track_cblk_t*>(iMemPointer);

    // Starting address of buffers in shared memory.
    // The buffers are either immediately after the control block,
    // or in a separate area at discretion of server.
    void *buffers;
    if (bufferMem == 0) {
        buffers = cblk + 1;
    } else {
        buffers = bufferMem->pointer();
        if (buffers == NULL) {
            ALOGE("Could not get buffer pointer");
            return NO_INIT;
开发者ID:android-source,项目名称:platform_frameworks_av,代码行数:67,代码来源:AudioRecord.cpp


示例3: wifi_get_status

int wifi_get_status(char *sPattern)
{
	int irtn = 0;
	FILE *pf = NULL;
	char lbuffer[512]={0};
	char *pPtr=NULL;
#if  defined(REALTEK_WFDISPLAY_SIGMA)
	return 1;
#endif
	/*
	//if want to use ETHERNET test,
	return 1;
	*/	
	//1. check role
	int irole = 0;	
	
	ALOGI("[%s:%d]:%s()- \n", __FILE__, __LINE__, __func__);
	irole = wifi_get_role();
	if (irole ==2) {//client
		sprintf(lbuffer, "/usr/local/bin/IMS_Modules/Wfdisplay/scripts/wpa_cli status|grep wpa_state= > /tmp/p2pPeer.txt");
		system(lbuffer);
		pf = fopen( "/tmp/p2pPeer.txt", "r" );
		if (pf!=NULL) {
			memset(lbuffer,0,sizeof(lbuffer));
			fread(lbuffer,1,sizeof(lbuffer),pf);
			ALOGI("[%s:%d]:%s()- wpa status=%s\n", __FILE__, __LINE__, __func__, lbuffer);
			if (strstr(lbuffer,"wpa_state=")!=NULL) {
				pPtr = lbuffer+strlen("wpa_state=");
			//ALOGI("[%s:%d]:%s()- pPtr=%s,sPattern=%s\n", __FILE__, __LINE__, __func__, pPtr,sPattern);
				if (strncmp(pPtr,sPattern,strlen(sPattern))==0) {
				//ALOGI("[%s:%d]:%s()- pPtr=%s\n", __FILE__, __LINE__, __func__, pPtr);
					irtn = 1;
				}
			}
			fclose(pf);
		}
	}
	else if (irole==3) {
		memset(lbuffer,0,sizeof(lbuffer));
		if (1) {
			sprintf(lbuffer, "/usr/local/bin/IMS_Modules/Wfdisplay/scripts/hostapd_cli all_sta |grep dot11RSNAStatsSTAAddress= > /tmp/p2pPeer.txt");
			system(lbuffer);
			NP("tandy:[%s:%d]:%s()- System cmd:%s\n", __FILE__, __LINE__, __func__, lbuffer);
			pf = fopen( "/tmp/p2pPeer.txt", "r" );
			if (pf!=NULL) {
				memset(lbuffer,0,sizeof(lbuffer));
				fread(lbuffer,1,sizeof(lbuffer),pf);
				ALOGI("[%s:%d]:%s()- lbuffer=%s\n", __FILE__, __LINE__, __func__, lbuffer);			
				pPtr = strstr(lbuffer,"dot11RSNAStatsSTAAddress=");
				if (pPtr!=NULL) {
					pPtr += strlen("dot11RSNAStatsSTAAddress=");
					if (*pPtr !=0 && *pPtr!='\n') {
						irtn = 1;				
					}
				}
				fclose(pf);
			}
			else {
				NP("tandy:[%s:%d]:%s()\n", __FILE__, __LINE__, __func__);
			}
		}
	}
	else {//unlnown role
	}
	remove("/tmp/p2pPeer.txt");
	return irtn;
}
开发者ID:Volcanoscar,项目名称:note,代码行数:67,代码来源:wifi_rtsp.cpp


示例4: ALOGI

	HelloWorldService::~HelloWorldService()
	{
		ALOGI("HelloWorldService is destroyed");
	}
开发者ID:imbakn,项目名称:Android-Framework-Service-Helloworld,代码行数:4,代码来源:HelloWorldService.cpp


示例5: strrchr


//.........这里部分代码省略.........
    }

    if (status) {
#ifdef MTK_AOSP_ENHANCEMENT
         //if this still need on ICS
        // set mime type to "bad mime type" for unsupported format, otherwise the file will be included in Gallery/Music
        ALOGE("processFile '%s' - not supported", path);
        client.setMimeType("bad mime type");
        return MEDIA_SCAN_RESULT_SKIPPED;
#else
        return MEDIA_SCAN_RESULT_ERROR;
#endif
    }

    const char *value;
    if ((value = mRetriever->extractMetadata(
                    METADATA_KEY_MIMETYPE)) != NULL) {
        status = client.setMimeType(value);
        if (status) {
            return MEDIA_SCAN_RESULT_ERROR;
        }
    }

    struct KeyMap {
        const char *tag;
        int key;
    };
    static const KeyMap kKeyMap[] = {
        { "tracknumber", METADATA_KEY_CD_TRACK_NUMBER },
        { "discnumber", METADATA_KEY_DISC_NUMBER },
        { "album", METADATA_KEY_ALBUM },
        { "artist", METADATA_KEY_ARTIST },
        { "albumartist", METADATA_KEY_ALBUMARTIST },
        { "composer", METADATA_KEY_COMPOSER },
        { "genre", METADATA_KEY_GENRE },
        { "title", METADATA_KEY_TITLE },
        { "year", METADATA_KEY_YEAR },
        { "duration", METADATA_KEY_DURATION },
        { "writer", METADATA_KEY_WRITER },
        { "compilation", METADATA_KEY_COMPILATION },
        { "isdrm", METADATA_KEY_IS_DRM },
        { "width", METADATA_KEY_VIDEO_WIDTH },
        { "height", METADATA_KEY_VIDEO_HEIGHT },
        /// M: add for the Gallery 6595 new feature -- fancy layout 
        { "rotation", METADATA_KEY_VIDEO_ROTATION },
#ifdef MTK_AOSP_ENHANCEMENT        
/*
#ifdef MTK_S3D_SUPPORT
        {"stereotype",METADATA_KEY_STEREO_3D}, //stereo 3d info
#endif
*/
#ifdef MTK_SLOW_MOTION_VIDEO_SUPPORT
		{"slowMotion_Speed_value",METADATA_KEY_SlowMotion_SpeedValue},
#endif        

        {"is_live_photo",METADATA_KEY_Is_LivePhoto},
#endif
    };
    static const size_t kNumEntries = sizeof(kKeyMap) / sizeof(kKeyMap[0]);

    for (size_t i = 0; i < kNumEntries; ++i) {
        const char *value;
        if ((value = mRetriever->extractMetadata(kKeyMap[i].key)) != NULL) {
#ifdef MTK_AOSP_ENHANCEMENT
#ifdef MTK_DRM_APP
            if (kKeyMap[i].key == METADATA_KEY_IS_DRM) {
                if (isOMADrmDcf) {
                    ALOGD("set METADATA_KEY_IS_DRM to 1 for OMA DRM v1.");
                    value = "1";
                }
            }
#endif
#endif // #ifdef MTK_AOSP_ENHANCEMENT
            status = client.addStringTag(kKeyMap[i].tag, value);
            ALOGD("processFileInternal() : client.addString tag[%s] value[%s]",
                        kKeyMap[i].tag, value);
            if (status != OK) {
                return MEDIA_SCAN_RESULT_ERROR;
            }
#ifdef MTK_AOSP_ENHANCEMENT
            if (kKeyMap[i].key == METADATA_KEY_DURATION) {
                if (!strcasecmp(extension, ".mp3")
                        || !strcasecmp(extension, ".aac")
                        || !strcasecmp(extension, ".amr")
                        || !strcasecmp(extension, ".awb")) {
                    client.addStringTag("isAccurateDuration", "0");
                } else if (!strcasecmp(extension, ".wav")
                        || !strcasecmp(extension, ".ogg")
                        || !strcasecmp(extension, ".oga")) {
                    client.addStringTag("isAccurateDuration", "1");
                }
        }
#endif // #ifdef MTK_AOSP_ENHANCEMENT
    }
    }
#ifdef MTK_AOSP_ENHANCEMENT
	ALOGI("processFileInternal '%s' - return OK", path);
#endif
    return MEDIA_SCAN_RESULT_OK;
}
开发者ID:sztwang,项目名称:TX2_libstagefright,代码行数:101,代码来源:StagefrightMediaScanner.cpp


示例6: ALOGE

/*===========================================================================
 * FUNCTION   : init
 *
 * DESCRIPTION: initialize stream obj
 *
 * PARAMETERS :
 *   @streamInfoBuf: ptr to buf that contains stream info
 *   @stream_cb    : stream data notify callback. Can be NULL if not needed
 *   @userdata     : user data ptr
 *
 * RETURN     : int32_t type of status
 *              NO_ERROR  -- success
 *              none-zero failure code
 *==========================================================================*/
int32_t QCamera3Stream::init(cam_stream_type_t streamType,
                            cam_format_t streamFormat,
                            cam_dimension_t streamDim,
                            uint8_t minNumBuffers,
                            stream_cb_routine stream_cb,
                            void *userdata)
{
    int32_t rc = OK;
    mm_camera_stream_config_t stream_config;

    mHandle = mCamOps->add_stream(mCamHandle, mChannelHandle);
    if (!mHandle) {
        ALOGE("add_stream failed");
        rc = UNKNOWN_ERROR;
        goto done;
    }

    // allocate and map stream info memory
    mStreamInfoBuf = new QCamera3HeapMemory();
    if (mStreamInfoBuf == NULL) {
        ALOGE("%s: no memory for stream info buf obj", __func__);
        rc = -ENOMEM;
        goto err1;
    }
    rc = mStreamInfoBuf->allocate(1, sizeof(cam_stream_info_t), false);
    if (rc < 0) {
        ALOGE("%s: no memory for stream info", __func__);
        rc = -ENOMEM;
        goto err2;
    }

    mStreamInfo =
        reinterpret_cast<cam_stream_info_t *>(mStreamInfoBuf->getPtr(0));
    memset(mStreamInfo, 0, sizeof(cam_stream_info_t));
    mStreamInfo->stream_type = streamType;
    mStreamInfo->fmt = streamFormat;
    mStreamInfo->dim = streamDim;
    mStreamInfo->streaming_mode = CAM_STREAMING_MODE_CONTINUOUS;

    mNumBufs = minNumBuffers;

    rc = mCamOps->map_stream_buf(mCamHandle,
            mChannelHandle, mHandle, CAM_MAPPING_BUF_TYPE_STREAM_INFO,
            0, -1, mStreamInfoBuf->getFd(0), mStreamInfoBuf->getSize(0));
    if (rc < 0) {
        ALOGE("Failed to map stream info buffer");
        goto err3;
    }

    // Configure the stream
    stream_config.stream_info = mStreamInfo;
    stream_config.mem_vtbl = mMemVtbl;
    stream_config.padding_info = mPaddingInfo;
    stream_config.userdata = this;

    switch(streamType) {
        case CAM_STREAM_TYPE_SNAPSHOT:
            stream_config.stream_cb = NULL;
            ALOGI("%s: disabling stream_cb for snapshot", __func__);
            break;
        default:
            stream_config.stream_cb = dataNotifyCB;
            break;
    }


    rc = mCamOps->config_stream(mCamHandle,
            mChannelHandle, mHandle, &stream_config);
    if (rc < 0) {
        ALOGE("Failed to config stream, rc = %d", rc);
        goto err4;
    }

    mDataCB = stream_cb;
    mUserData = userdata;
    return 0;

err4:
    mCamOps->unmap_stream_buf(mCamHandle,
            mChannelHandle, mHandle, CAM_MAPPING_BUF_TYPE_STREAM_INFO, 0, -1);
err3:
    mStreamInfoBuf->deallocate();
err2:
    delete mStreamInfoBuf;
    mStreamInfoBuf = NULL;
    mStreamInfo = NULL;
//.........这里部分代码省略.........
开发者ID:IllusionRom-deprecated,项目名称:android_platform_hardware_qcom_camera,代码行数:101,代码来源:QCamera3Stream.cpp


示例7: ALOGI

JNIEXPORT jint JNICALL Java_com_farcore_playerservice_AmPlayer_playMedia
  (JNIEnv *env, jobject obj,jstring url, jint isloop, jint pMode,jint st){
    
    int pid = -1;    
    jclass clazz = (*env)->GetObjectClass(env, obj);

    gMplayerClazz =(*env)->NewGlobalRef(env,clazz);
    if(gMplayerClazz){
        ALOGI("get mediaplayer class");
    }else{
        ALOGE("can't get mediaplayer class");
        return -100;
    }
    

    
    gPostMid = (*env)->GetStaticMethodID(env, gMplayerClazz, "onUpdateState", "(IIIIIII)V");
    if(gPostMid){
        ALOGI("get update state object id");
    }else{
        ALOGE("failed to get update object id");
        return -101;
    }

    const char * pname = (*env)->GetStringUTFChars(env,url, NULL);     
    if(NULL == pname)
    {
        ALOGE("failed to change jstring to standard string");    
        return -1;
    }

    if(_plCtrl.file_name != NULL){
        free(_plCtrl.file_name);        
    }
    
    memset((void*)&_plCtrl,0,sizeof(play_control_t));     
    
    player_register_update_callback(&_plCtrl.callback_fn,&update_player_info,PLAYER_INFO_POP_INTERVAL);

    _plCtrl.file_name = strndup(pname,FILENAME_LENGTH_MAX);
    _plCtrl.video_index = -1;//MUST
    _plCtrl.audio_index = -1;//MUST
    _plCtrl.hassub = 1;
    if(pMode == 1){
        _plCtrl.nosound = 1;
        SYS_set_tsync_enable(0);//if no sound,can set to be 0
        ALOGI("disable sound");
    }else if(pMode ==2){
        _plCtrl.novideo = 1;
        ALOGI("disable video");
    }
    
    SYS_set_tsync_enable(1);//if no sound,can set to be 0

    if(isloop>0){
        _plCtrl.loop_mode =1;
        ALOGI("set loop mode");
    }
    if(st>0){
        ALOGI("play start position:%d",st);
        _plCtrl.t_pos = st;
    }    
    ALOGI("add a media file to play");
    
    pid=player_start(&_plCtrl,0);
    if(pid<0)
    {
        ALOGI("player start failed!error=%d\n",pid);
        return -1;
    }
    
    (*env)->ReleaseStringUTFChars(env,url, pname);

    return pid;
}
开发者ID:TeamNostalgia,项目名称:android_device_jxd_s7300b,代码行数:75,代码来源:com_farcore_playerservice_AmPlayer.c


示例8: MediaInfoContext_create

jobject MediaInfoContext_create(JNIEnv *env,media_info_t *msgt){
    
    int index = 0;
    jclass meta_cls = MediaInfo_getClass(env);
    if(NULL == meta_cls){            
        ALOGE("failed to get MediaInfo class");
        return NULL;
    }
    if(NULL==msgt){
        ALOGE("set invalid msg info");
        return NULL;
    }
   
    //set file info 
    jmethodID constructor = (*env)->GetMethodID(env, meta_cls, "<init>", "()V");
    
    jobject meta_obj = (*env)->NewObject(env,meta_cls,constructor);
    (*env)->SetIntField(env,meta_obj,\
        (*env)->GetFieldID(env, meta_cls, "seekable", "I"), (int)(msgt->stream_info.seekable));
    jfieldID id_filetype = (*env)->GetFieldID(env, meta_cls, "filetype", "I");
    (*env)->SetIntField(env, meta_obj, id_filetype, (int)(msgt->stream_info.type));

    (*env)->SetLongField(env,meta_obj, (*env)->GetFieldID(env, meta_cls, "filesize", "J"), msgt->stream_info.file_size); 
    (*env)->SetIntField(env,meta_obj, (*env)->GetFieldID(env, meta_cls, "duration", "I"), msgt->stream_info.duration); 
    (*env)->SetIntField(env,meta_obj, (*env)->GetFieldID(env, meta_cls, "drm_check", "I"), msgt->stream_info.drm_check); 
    if (msgt->stream_info.has_video && msgt->stream_info.total_video_num>0) { 
        (*env)->SetIntField(env,meta_obj, (*env)->GetFieldID(env, meta_cls, "width", "I"), msgt->video_info[0]->width); 
        (*env)->SetIntField(env,meta_obj, (*env)->GetFieldID(env, meta_cls, "height", "I"), msgt->video_info[0]->height); 
        (*env)->SetIntField(env,meta_obj, (*env)->GetFieldID(env, meta_cls, "vformat", "I"), msgt->video_info[0]->format);
        
    }
        
    if(msgt->stream_info.has_audio>0 && msgt->stream_info.total_audio_num>0){
        jclass ainfo_cls = AudioMediaInfo_getClass(env);
        jmethodID amid = (*env)->GetMethodID(env,ainfo_cls, "<init>", "()V");
        if(!amid){                
         ALOGE("failed to get audio info constructor");
         return meta_obj;
        }
        jobjectArray ainfoArray = (*env)->NewObjectArray(env,msgt->stream_info.total_audio_num,ainfo_cls, NULL);  
        if(NULL == ainfoArray){                 
        ALOGE("failed to get audio info object");              
        return meta_obj;       
        }

        for(index = 0;index<msgt->stream_info.total_audio_num;index++){
        jobject aobj = (*env)->NewObject(env,ainfo_cls, amid);
        if(NULL ==aobj){
            (*env)->DeleteLocalRef(env,ainfoArray);  
            ALOGE("failed to get audio info object");                 
            return meta_obj;      
        }
        (*env)->SetIntField(env,aobj,\
            (*env)->GetFieldID(env, ainfo_cls, "audio_format", "I"), (int)(msgt->audio_info[index]->aformat));
        /*(*env)->SetIntField(env,aobj,\
            (*env)->GetFieldID(env, ainfo_cls, "audio_channel", "I"), (int)(msgt->audio_info[index]->channel));
        (*env)->SetIntField(env,aobj,\
            (*env)->GetFieldID(env, ainfo_cls, "audio_samplerate", "I"), (int)(msgt->audio_info[index]->sample_rate));
        (*env)->SetIntField(env,aobj,\
            (*env)->GetFieldID(env, ainfo_cls, "bit_rate", "I"), (int)(msgt->audio_info[index]->bit_rate));*/
        (*env)->SetIntField(env,aobj,\
            (*env)->GetFieldID(env, ainfo_cls, "uid", "I"), (int)(msgt->audio_info[index]->id));


        (*env)->SetObjectArrayElement(env,ainfoArray,index, aobj);  
        }  
        (*env)->SetObjectField(env,meta_obj,(*env)->GetFieldID(env, meta_cls, "ainfo", "[Lcom/farcore/playerservice/AudioMediaInfo;"),ainfoArray);
    }

    //for insub num;
    if(msgt->stream_info.total_sub_num>0)
    {
        ALOGI("================== 'in internal subtitle num:%d\n", msgt->stream_info.total_sub_num);
        jclass sub_cls =Intersub_getClass(env);
        (*env)->SetStaticIntField(env,sub_cls,(*env)->GetStaticFieldID(env, sub_cls, "insub_num", "I"),(int)(msgt->stream_info.total_sub_num));
    }
#if 0               
        if(msgt->audio_info[0]->audio_tag!=NULL){

            jclass tag_cls = AudioTagInfo_getClass(env);
            jmethodID tagmid = (*env)->GetMethodID(env,tag_cls, "<init>", "()V");
            if(NULL == tagmid){                
                ALOGE("failed to get tag info constructor"); 
                return meta_obj;
            }
            jobject tagobj = (*env)->NewObject(env,tag_cls, tagmid);
            if(NULL ==tagobj){
                ALOGE("failed to get tag info object");   
                return meta_obj;      
            }        
            jstring title = (*env)->NewStringUTF(env,msgt->audio_info[0]->audio_tag->title);                                
            (*env)->SetObjectField(env,tagobj,
                (*env)->GetFieldID(env, tag_cls, "title", "Ljava/lang/String;"), title);

            jstring album = (*env)->NewStringUTF(env,msgt->audio_info[0]->audio_tag->album);

            (*env)->SetObjectField(env,tagobj,
                (*env)->GetFieldID(env, tag_cls, "album", "Ljava/lang/String;"),album);

            jstring author = (*env)->NewStringUTF(env,msgt->audio_info[0]->audio_tag->author);
//.........这里部分代码省略.........
开发者ID:TeamNostalgia,项目名称:android_device_jxd_s7300b,代码行数:101,代码来源:com_farcore_playerservice_AmPlayer.c


示例9: _media_info_dump

int _media_info_dump(media_info_t* minfo)
{
    int i = 0;
    ALOGI("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
    ALOGI("======||file size:%lld\n",minfo->stream_info.file_size);
    ALOGI("======||file type:%d\n",minfo->stream_info.type); 
    ALOGI("======||has internal subtitle?:%s\n",minfo->stream_info.has_sub>0?"YES!":"NO!");
    ALOGI("======||internal subtile counts:%d\n",minfo->stream_info.total_sub_num);
    ALOGI("======||has video track?:%s\n",minfo->stream_info.has_video>0?"YES!":"NO!");
    ALOGI("======||has audio track?:%s\n",minfo->stream_info.has_audio>0?"YES!":"NO!");    
    ALOGI("======||duration:%d\n",minfo->stream_info.duration);
    ALOGI("======||seekable:%d\n",minfo->stream_info.seekable);
    if(minfo->stream_info.has_video && minfo->stream_info.total_video_num>0)
    {        
        ALOGI("======||video counts:%d\n",minfo->stream_info.total_video_num);
        ALOGI("======||video width:%d\n",minfo->video_info[0]->width);
        ALOGI("======||video height:%d\n",minfo->video_info[0]->height);
        ALOGI("======||video bitrate:%d\n",minfo->video_info[0]->bit_rate);
        ALOGI("======||video format:%d\n",minfo->video_info[0]->format);

    }
    if(minfo->stream_info.has_audio &&minfo->stream_info.total_audio_num> 0)
    {
        ALOGI("======||audio counts:%d\n",minfo->stream_info.total_audio_num);
        
        if(NULL !=minfo->audio_info[0]->audio_tag)
        {
            ALOGI("======||track title:%s",minfo->audio_info[0]->audio_tag->title!=NULL?minfo->audio_info[0]->audio_tag->title:"unknow");   
            ALOGI("\n======||track album:%s",minfo->audio_info[0]->audio_tag->album!=NULL?minfo->audio_info[0]->audio_tag->album:"unknow"); 
            ALOGI("\n======||track author:%s\n",minfo->audio_info[0]->audio_tag->author!=NULL?minfo->audio_info[0]->audio_tag->author:"unknow");
            ALOGI("\n======||track year:%s\n",minfo->audio_info[0]->audio_tag->year!=NULL?minfo->audio_info[0]->audio_tag->year:"unknow");
            ALOGI("\n======||track comment:%s\n",minfo->audio_info[0]->audio_tag->comment!=NULL?minfo->audio_info[0]->audio_tag->comment:"unknow"); 
            ALOGI("\n======||track genre:%s\n",minfo->audio_info[0]->audio_tag->genre!=NULL?minfo->audio_info[0]->audio_tag->genre:"unknow");
            ALOGI("\n======||track copyright:%s\n",minfo->audio_info[0]->audio_tag->copyright!=NULL?minfo->audio_info[0]->audio_tag->copyright:"unknow");  
            ALOGI("\n======||track track:%d\n",minfo->audio_info[0]->audio_tag->track);  
        }
            

        
        for(i = 0;i<minfo->stream_info.total_audio_num;i++)
        {
            ALOGI("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
            ALOGI("======||%d 'st audio track codec type:%d\n",i,minfo->audio_info[i]->aformat);
            ALOGI("======||%d 'st audio track audio_channel:%d\n",i,minfo->audio_info[i]->channel);
            ALOGI("======||%d 'st audio track bit_rate:%d\n",i,minfo->audio_info[i]->bit_rate);
            ALOGI("======||%d 'st audio track audio_samplerate:%d\n",i,minfo->audio_info[i]->sample_rate);
            ALOGI("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
            
        }
        
    }
    if(minfo->stream_info.has_sub &&minfo->stream_info.total_sub_num>0){
        for(i = 0;i<minfo->stream_info.total_sub_num;i++)
        {
            if(0 == minfo->sub_info[i]->internal_external){
                ALOGI("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
                ALOGI("======||%d 'st internal subtitle pid:%d\n",i,minfo->sub_info[i]->id);   
                ALOGI("======||%d 'st internal subtitle language:%s\n",i,minfo->sub_info[i]->sub_language?minfo->sub_info[i]->sub_language:"unknow"); 
                ALOGI("======||%d 'st internal subtitle width:%d\n",i,minfo->sub_info[i]->width); 
                ALOGI("======||%d 'st internal subtitle height:%d\n",i,minfo->sub_info[i]->height); 
                ALOGI("======||%d 'st internal subtitle resolution:%d\n",i,minfo->sub_info[i]->resolution); 
                ALOGI("======||%d 'st internal subtitle subtitle size:%lld\n",i,minfo->sub_info[i]->subtitle_size); 
                ALOGI("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");       
            }
        }
    }
    
    ALOGI("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
    return 0;
}
开发者ID:TeamNostalgia,项目名称:android_device_jxd_s7300b,代码行数:70,代码来源:com_farcore_playerservice_AmPlayer.c


示例10: vp_get_file_handle

int vp_get_file_handle(URLContext *h)
{
	ALOGI("%s\n",__FUNCTION__);
    return (intptr_t) h->priv_data;
}
开发者ID:TeamNostalgia,项目名称:android_device_jxd_s7300b,代码行数:5,代码来源:com_farcore_playerservice_AmPlayer.c


示例11: Java_com_farcore_playerservice_AmPlayer_getosdbpp

JNIEXPORT jint Java_com_farcore_playerservice_AmPlayer_getosdbpp(JNIEnv *env, jclass clazz){
    jint ret = -1;
    ret = SYS_get_osdbpp();
    ALOGI("get osd bpp:%d",ret);
    return ret;
}
开发者ID:TeamNostalgia,项目名称:android_device_jxd_s7300b,代码行数:6,代码来源:com_farcore_playerservice_AmPlayer.c


示例12: getCallingPid

sp<ICamera> CameraService::connect(
        const sp<ICameraClient>& cameraClient, int cameraId) {
    int callingPid = getCallingPid();

    LOG1("CameraService::connect E (pid %d, id %d)", callingPid, cameraId);

    if (!mModule) {
        ALOGE("Camera HAL module not loaded");
        return NULL;
    }

    sp<Client> client;
    if (cameraId < 0 || cameraId >= mNumberOfCameras) {
        ALOGE("CameraService::connect X (pid %d) rejected (invalid cameraId %d).",
            callingPid, cameraId);
        return NULL;
    }

    char value[PROPERTY_VALUE_MAX];
    property_get("sys.secpolicy.camera.disabled", value, "0");
    if (strcmp(value, "1") == 0) {
        // Camera is disabled by DevicePolicyManager.
        ALOGI("Camera is disabled. connect X (pid %d) rejected", callingPid);
        return NULL;
    }

#if defined(BOARD_HAVE_HTC_FFC)
    htcCameraSwitch(cameraId);
#endif

    Mutex::Autolock lock(mServiceLock);
    if (mClient[cameraId] != 0) {
        client = mClient[cameraId].promote();
        if (client != 0) {
            if (cameraClient->asBinder() == client->getCameraClient()->asBinder()) {
                LOG1("CameraService::connect X (pid %d) (the same client)",
                     callingPid);
                return client;
            } else {
                ALOGW("CameraService::connect X (pid %d) rejected (existing client).",
                      callingPid);
                return NULL;
            }
        }
        mClient[cameraId].clear();
    }

    if (mBusy[cameraId]) {
        ALOGW("CameraService::connect X (pid %d) rejected"
                " (camera %d is still busy).", callingPid, cameraId);
        return NULL;
    }

    struct camera_info info;
    if (mModule->get_camera_info(cameraId, &info) != OK) {
        ALOGE("Invalid camera id %d", cameraId);
        return NULL;
    }

    int deviceVersion;
    if (mModule->common.module_api_version == CAMERA_MODULE_API_VERSION_2_0) {
        deviceVersion = info.device_version;
    } else {
        deviceVersion = CAMERA_DEVICE_API_VERSION_1_0;
    }

    switch(deviceVersion) {
      case CAMERA_DEVICE_API_VERSION_1_0:
        client = new CameraClient(this, cameraClient, cameraId,
                info.facing, callingPid, getpid());
        break;
      case CAMERA_DEVICE_API_VERSION_2_0:
        client = new Camera2Client(this, cameraClient, cameraId,
                info.facing, callingPid, getpid());
        break;
      default:
        ALOGE("Unknown camera device HAL version: %d", deviceVersion);
        return NULL;
    }

    if (client->initialize(mModule) != OK) {
        return NULL;
    }

    cameraClient->asBinder()->linkToDeath(this);

    mClient[cameraId] = client;
    LOG1("CameraService::connect X (id %d, this pid is %d)", cameraId, getpid());
    return client;
}
开发者ID:VanillaProject,项目名称:platform_frameworks_av,代码行数:90,代码来源:CameraService.cpp


示例13: mModule

CameraService::CameraService()
:mSoundRef(0), mModule(0)
{
    ALOGI("CameraService started (pid=%d)", getpid());
    gCameraService = this;
}
开发者ID:VanillaProject,项目名称:platform_frameworks_av,代码行数:6,代码来源:CameraService.cpp


示例14: vp_write

int vp_write(URLContext *h, unsigned char *buf, int size)
{	
	AmlogicPlayer_File* af= (AmlogicPlayer_File*)h->priv_data;
	ALOGI("%s\n",__FUNCTION__);
	return -1;
}
开发者ID:TeamNostalgia,项目名称:android_device_jxd_s7300b,代码行数:6,代码来源:com_farcore_playerservice_AmPlayer.c


示例15: wcnss_qmi_get_wlan_address

int wcnss_qmi_get_wlan_address(unsigned char *pBdAddr)
{
    int i = 0;
    struct stat mac_stat;
    int success = 0;

    while (stat(MAC_ADDR_PATH, &mac_stat) && i < MAX_WAIT_COUNT) {
        usleep(WAIT_TIME);
        i++;
    }

    if (i == MAX_WAIT_COUNT) {
        ALOGE("Failed to obtain MAC address from NV\n");
    } else {
        int fd = open(MAC_ADDR_PATH, O_RDONLY);
        if (fd < 0) {
            ALOGE("Failure opening MAC path: %d\n", errno);
        } else {
            char mac_buf[MAC_ADDR_SIZE];
            int ret = read(fd, mac_buf, MAC_ADDR_SIZE);
            if (ret < 0) {
                ALOGE("Failure to read MAC data: %d\n", errno);
            } else {
                /* swap bytes */
                for (i = 0; i < MAC_ADDR_SIZE; i++) {
                    pBdAddr[i] = mac_buf[MAC_ADDR_SIZE - 1 - i];
                }

                ALOGI("Successfully read MAC from NV data");
                success = 1;
            }
            close(fd);
        }
    }

    // Use a previously stored value on failure (if it exists)
    if (!success && !stat(GENMAC_FILE, &mac_stat)) {
        FILE *genmac = fopen(GENMAC_FILE,"r");
        if (fscanf(genmac, "%c%c%c%c%c%c",
                   &pBdAddr[0], &pBdAddr[1], &pBdAddr[2],
                   &pBdAddr[3], &pBdAddr[4], &pBdAddr[5]) == 6) {
            ALOGE("Successfully read local MAC address");
            success = 1;
        }
        fclose(genmac);
    }

    // If that fails as well, randomize a MAC
    if (!success) {
        memcpy(pBdAddr, oneplus_mac_prefix, sizeof(oneplus_mac_prefix));

        // We don't need strong randomness, and if the NV is corrupted
        // any hardware values are suspect, so just seed it with the
        // current time
        srand(time(NULL));

        for (i = sizeof(oneplus_mac_prefix) / sizeof(oneplus_mac_prefix[0]); i < MAC_ADDR_SIZE; i++) {
            pBdAddr[i] = rand() % 255;
        }

        ALOGI("Using randomized MAC address");

        // Store for reuse
        FILE *genmac = fopen(GENMAC_FILE, "w");
        fwrite(pBdAddr, 1, MAC_ADDR_SIZE, genmac);
        fclose(genmac);
    }

    ALOGI("Using MAC address: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx\n",
          pBdAddr[0], pBdAddr[1], pBdAddr[2],
          pBdAddr[3], pBdAddr[4], pBdAddr[5]);

    return SUCCESS;
}
开发者ID:Tu-dou,项目名称:SlimRoms_device_oneplus2,代码行数:74,代码来源:wcnss_oneplus_client.c


示例16: init_transport_bdroid

// This function is used as an alternative to opening the char device directly.
// It is needed as libbt-vendor does the power up/down control for us when we open/close the file descriptor.
int init_transport_bdroid(int on) {

    void *so_handle;
    unsigned char bdaddr[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06};
    int  fd[CH_MAX], powerstate, ret;

    if (on) {
        so_handle = dlopen("libbt-vendor.so", RTLD_NOW);
        if (!so_handle)
        {
           ALOGE("Failed to load vendor component");
           return -1;
        }

        vendor_interface = (bt_vendor_interface_t *) dlsym(so_handle, "BLUETOOTH_VENDOR_LIB_INTERFACE");
        if (!vendor_interface)
        {
            ALOGE("Failed to accesst bt vendor interface");
            return -1;
        }

        vendor_interface->init(&vendor_callbacks, bdaddr);

        ALOGI("Turn On BT power");
        powerstate = BT_VND_PWR_ON;
        ret = vendor_interface->op(BT_VND_OP_POWER_CTRL, &powerstate);
        if (ret < 0)
        {
            ALOGE("Failed to turn on power from  bt vendor interface");
            return -1;
        }
        /*call ANT_USERIAL_OPEN to get ANT handle*/
#ifdef BT_SOC_TYPE_ROME
        ret = vendor_interface->op(BT_VND_OP_ANT_USERIAL_OPEN, fd);
#endif
        ALOGE("ret value: %d", ret);
        if (ret != 1)
        {
            ALOGE("Failed to get fd from  bt vendor interface");
            return -1;
        } else {
            ALOGE("FD: %x", fd[0]);
            return fd[0];
        }
    } else {
        if (vendor_interface) {
            ALOGE("Close and cleanup the interfaces");
#ifdef BT_SOC_TYPE_ROME
            int ret = vendor_interface->op(BT_VND_OP_ANT_USERIAL_CLOSE, NULL);
#endif
            ALOGE("ret value: %d", ret);
            ALOGI("Turn off BT power");
            powerstate = BT_VND_PWR_OFF;
            ret = vendor_interface->op(BT_VND_OP_POWER_CTRL, &powerstate);
            if (ret < 0)
            {
                ALOGE("Failed to turn off power from  bt vendor interface");
                return -1;
            }
            vendor_interface->cleanup();
            vendor_interface = NULL;
            return 0;
        } else {

            ALOGE("Not able to find vendor interface handle");
            return -1;
        }
    }
}
开发者ID:daddy366,项目名称:anarchy-ant-wireless-ant-native,代码行数:71,代码来源:ant_native_chardev.c


示例17: wcnss_write_cal_data

int wcnss_write_cal_data(int fd_dev)
{
	int rcount = 0;
	int size = 0;
	int rc = 0;
	int wcount = 0;
	int fd_file;
	struct stat st;

	char buf[WCNSS_CAL_CHUNK];

	ALOGI("wcnss_write_cal_data trying to write cal");

	rc = stat(WCNSS_CAL_FILE, &st);
	if (rc < 0) {
		ALOGE("Failed to stat cal file : %s",
				strerror(errno));
		goto exit;
	}

	size = st.st_size;

	fd_file = open(WCNSS_CAL_FILE, O_RDONLY);
	if (fd_file < 0) {
		ALOGE("cal file doesn't exist: %s",
				strerror(errno));
		rc = fd_file;
		goto exit;
	}

	/* write the file size first, so that platform driver knows
	 * when it recieves the full data */
	wcount = write(fd_dev, (void *)&size, 4);
	if (wcount != 4) {
		ALOGE("Failed to write to wcnss device : %s",
				strerror(errno));
		rc = wcount;
		goto exit_close;
	}

	do {
		rcount = read(fd_file, (void *)buf, sizeof(buf));
		if (rcount < 0) {
			ALOGE("Failed to read from cal file ; %s",
					strerror(errno));
			rc = rcount;
			goto exit_remove;
		}

		if (!rcount)
			break;

		wcount = write(fd_dev, buf, rcount);
		if (wcount < 0) {
			ALOGE("Failed to write to wcnss device : %s",
				strerror(errno));
			rc = wcount;
			goto exit_close;
		}

	} while (rcount);
	close(fd_file);

	return SUCCESS;

exit_remove:
	close(fd_file);
	remove("WCNSS_CAL_FILE");
	return rc;

exit_close:
	close(fd_file);

exit:
	return rc;
}
开发者ID:InsomniaAOSP,项目名称:android_hardware_qcom_wlan,代码行数:76,代码来源:wcnss_service.c


示例18: defined


//.........这里部分代码省略.........
        mOptions.add(opt);
    }
#endif

    if (executionMode == kEMIntPortable) {
        opt.optionString = "-Xint:portable";
        mOptions.add(opt);
    } else if (executionMode == kEMIntFast) {
        opt.optionString = "-Xint:fast";
        mOptions.add(opt);
#if defined(WITH_JIT)
    } else if (executionMode == kEMJitCompiler) {
        opt.optionString = "-Xint:jit";
        mOptions.add(opt);
#endif
    }

    if (checkDexSum) {
        /* perform additional DEX checksum tests */
        opt.optionString = "-Xcheckdexsum";
        mOptions.add(opt);
    }

    if (logStdio) {
        /* convert stdout/stderr to log messages */
        opt.optionString = "-Xlog-stdio";
        mOptions.add(opt);
    }

    if (enableAssertBuf[4] != '\0') {
        /* accept "all" to mean "all classes and packages" */
        if (strcmp(enableAssertBuf+4, "all") == 0)
            enableAssertBuf[3] = '\0';
        ALOGI("Assertions enabled: '%s'\n", enableAssertBuf);
        opt.optionString = enableAssertBuf;
        mOptions.add(opt);
    } else {
        ALOGV("Assertions disabled\n");
    }

    if (jniOptsBuf[10] != '\0') {
        ALOGI("JNI options: '%s'\n", jniOptsBuf);
        opt.optionString = jniOptsBuf;
        mOptions.add(opt);
    }

    if (stackTraceFileBuf[0] != '\0') {
        static const char* stfOptName = "-Xstacktracefile:";

        stackTraceFile = (char*) malloc(strlen(stfOptName) +
            strlen(stackTraceFileBuf) +1);
        strcpy(stackTraceFile, stfOptName);
        strcat(stackTraceFile, stackTraceFileBuf);
        opt.optionString = stackTraceFile;
        mOptions.add(opt);
    }

    /* extra options; parse this late so it overrides others */
    property_get("dalvik.vm.extra-opts", extraOptsBuf, "");
    parseExtraOpts(extraOptsBuf);

    /* Set the properties for locale */
    {
        char langOption[sizeof("-Duser.language=") + 3];
        char regionOption[sizeof("-Duser.region=") + 3];
        strcpy(langOption, "-Duser.language=");
开发者ID:VanillaProject,项目名称:platform_frameworks_base,代码行数:67,代码来源:AndroidRuntime.cpp


示例19: main

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ALOGV函数代码示例发布时间:2022-05-30
下一篇:
C++ ALOGE_IF函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap