void Browser::output_formatCB(Widget , XtPointer , XtPointer ) { #ifdef Comment UIVDATA *uivdata; XtVaGetValues(w, XmNuserData, &uivdata, NULL); set_watch(uivdata->text); if(w == uivdata->ascii_w) uivdata->output_format = ASCII; else if(w == uivdata->hex8_w) uivdata->output_format = HEX8; else if(w == uivdata->hex16_w) uivdata->output_format = HEX16; else if(w == uivdata->hex32_w) uivdata->output_format = HEX32; else if(w == uivdata->float_w) uivdata->output_format = FLOAT; else if(w == uivdata->double_w) uivdata->output_format = DOUBLE; setPageNum(uivdata, uivdata->page_num); reset_cursor(uivdata->text); #endif }
/* * System call for the user to interact with the module */ asmlinkage int my_sys_watch(const char * const dirname, int option) { int errno = -EINVAL; char *kern_dirname = NULL; if (_NUM_WATCH_ == option) { errno = num_watch(); goto OUT; } /* Check for NULL pointers or invalid values */ if (NULL == dirname) { errno = -EINVAL; goto OUT; } kern_dirname = my_get_from_user(dirname); if (NULL == kern_dirname) { goto OUT; } if (path_filter(kern_dirname)) { errno = -EINVAL; goto OUT; } switch (option) { case _SET_WATCH_: errno = set_watch(kern_dirname); if (errno < 0) { goto OUT; } if (sys_call_table[__NR_write] != my_sys_write) { orig_sys_write = sys_call_table[__NR_write]; sys_call_table[__NR_write] = my_sys_write; } break; case _REM_WATCH_: errno = rem_watch(kern_dirname); break; case _NUM_CHANGES_: errno = num_changes(kern_dirname); break; case _FLUSH_WATCH_: errno = flush_watch(kern_dirname); break; } OUT: if (kern_dirname) { kfree(kern_dirname); kern_dirname = NULL; } return errno; }
static demuxer_t *demux_isdbt_open(demuxer_t * demuxer) { sh_video_t *shv; sh_audio_t *sha; char* filename; int ret; LOGE("demux_isdbt_open in\n"); // char audio_context[20] = {0x2b,0x10,0x88,0x00}; // char audio_context[20] = {0x11,0x90,}; /* Fix me lator BTLSYS */ char audio_context[20] = {0x13,0x10,0x88,0x00}; //48k //char audio_context[20] = {0x16,0x10,0x88,0x00}; //24k //char audio_context[20] = {0xeb,0x09,0x88,0x00}; //Audio object type :AAC LC(Low complexity) //uint8_t vcodecinfo[] = {0x00, 0x00, 0x01, 0x67, 0x42, 0xe0, 0x0d, 0x96, 0x52, 0x02, 0x83, 0xf4, 0x90, 0x08, 0x00, 0x00, 0x01, 0x68, 0xce, 0x38, 0x80}; uint8_t vcodecinfo[] = {0x00, 0x00, 0x01, 0x67, 0x42, 0xe0, 0x0d, 0x99, 0xa0, 0x68, 0x7e, 0xc0, 0x5a, 0x83, 0x03, 0x03, 0x78, 0x00, 0x00, 0x1f, 0x48, 0x00, 0x07, 0x53, 0x04, 0x00, 0x00, 0x01, 0x68, 0xce, 0x3c, 0x80}; // demuxer->video->id =-2; // LOGE("DEMUX OPEN, AUDIO_ID: %d, VIDEO_ID: %d, SUBTITLE_ID: %d,\n", // demuxer->audio->id, demuxer->video->id, demuxer->sub->id); mp_msg(MSGT_DEMUX, MSGL_V, "DEMUX OPEN, AUDIO_ID: %d, VIDEO_ID: %d, SUBTITLE_ID: %d,\n", demuxer->audio->id, demuxer->video->id, demuxer->sub->id); demuxer->type= DEMUXER_TYPE_ISDBT; demuxer->file_format= DEMUXER_TYPE_ISDBT; // stream_reset(demuxer->stream); filename=demuxer->filename; if( strncmp(filename, "mtv:", strlen("mtv:") ) == 0 ) LOGE("file name is :%s \n",filename); LOGE("demux_isdbt_open in111 %s\n",demuxer->filename); mFreq = 0; mFreq = GetIntValue( filename, "freq" ); if( mFreq <= 0 ) LOGE("error get freq!\n"); else LOGE("get freq is : %d\n",mFreq ); mChannel = 0; mChannel =GetIntValue(filename, "channel"); if( mChannel < 0 ) LOGE("error get channel num!\n"); else LOGE("get channel num is : %d\n",mChannel); demuxer->seekable = 0; #if 1 LOGE("demux_isdbt_open in222\n"); sha = new_sh_audio_aid(demuxer, 1, 64,NULL); LOGE("demux_isdbt_open in333\n"); if(sha) { sha->format = AUDIO_AAC; sha->ds = demuxer->audio; sha->samplerate = 24000; //sha->samplerate = 48000; sha->samplesize = 2; sha->channels = 2; #if 1 sha->wf = (WAVEFORMATEX *) malloc(sizeof (WAVEFORMATEX) + 4); sha->wf->cbSize = 4; sha->wf->nChannels = 2; memcpy(sha->wf + 1, audio_context, 4); #else sha->wf = (WAVEFORMATEX *) malloc(sizeof (WAVEFORMATEX) + 2); sha->wf->cbSize = 2; memcpy(sha->wf + 1, audio_context, 2); #endif demuxer->audio->id = 64; sha->ds = demuxer->audio; demuxer->audio->sh = sha; } #endif #if 1 shv = new_sh_video_vid(demuxer, 0, 80); if(shv) { shv->format = VIDEO_AVC; //shv->format = VIDEO_H264; shv->ds = demuxer->video; shv->bih = (BITMAPINFOHEADER *) calloc(1, sizeof(BITMAPINFOHEADER) + 25); shv->bih->biSize= sizeof(BITMAPINFOHEADER); // BTL , 110308 --> no meaning #if 0 shv->fps=24; // we probably won't even care about fps shv->frametime = 1.0f/shv->fps; #endif shv->bih->biWidth = 320; // no video display //shv->bih->biWidth = 416; //shv->bih->biHeight = 240; shv->bih->biHeight = 180; demuxer->video->id = 80; shv->ds = demuxer->video; demuxer->video->sh = shv; } #endif demuxer->movi_start = 0; /* 5 th try */ for (int i=0 ; i < 5 ; i++) { ret = isdbt_tv_set_channel(mFreq,mChannel); LOGE("demux_isdbt_open() ret %d", ret); if (ret == 0) break; } if (ret != 0) return NULL; //isdbt_get_video_data_buffer(demuxer->video); #if 0 //dmesg set_watch((void *)&demuxer->v_streams[47]); #endif // LOGE("demux_isdbt_open out"); return demuxer; }