static GtkMenu *create_video_menu( intf_thread_t *p_intf ) { vlc_object_t *p_object = get_vout(p_intf); input_thread_t *p_input = get_input(p_intf);; vlc_object_t *p_objects[SIZE_LIST]; const char *ppsz_varnames[SIZE_LIST]; int index = 0; PUSH_INPUTVAR( "video-es" ); PUSH_INPUTVAR( "spu-es" ); PUSH_VAR( "fullscreen" ); PUSH_VAR( "video-wallpaper" ); PUSH_VAR( "video-snapshot" ); PUSH_VAR( "zoom" ); PUSH_VAR( "autoscale" ); PUSH_VAR( "aspect-ratio" ); PUSH_VAR( "crop" ); PUSH_VAR( "deinterlace" ); PUSH_VAR( "deinterlace-mode" ); PUSH_VAR( "postprocess" ); GtkWidget *menu = gtk_menu_new(); return Populate( p_intf, GTK_MENU(menu), ppsz_varnames, p_objects, index ); }
static int InputAutoMenuBuilder( input_thread_t *p_object, QVector<vlc_object_t *> &objects, QVector<const char *> &varnames ) { PUSH_VAR( "bookmark" ); PUSH_VAR( "title" ); PUSH_VAR( "chapter" ); PUSH_VAR( "navigation" ); PUSH_VAR( "program" ); return VLC_SUCCESS; }
static int AudioAutoMenuBuilder( audio_output_t *p_object, input_thread_t *p_input, QVector<vlc_object_t *> &objects, QVector<const char *> &varnames ) { PUSH_INPUTVAR( "audio-es" ); PUSH_VAR( "stereo-mode" ); PUSH_VAR( "device" ); PUSH_VAR( "visual" ); return VLC_SUCCESS; }
static int AudioAutoMenuBuilder( aout_instance_t *p_object, input_thread_t *p_input, vector<vlc_object_t *> &objects, vector<const char *> &varnames ) { PUSH_INPUTVAR( "audio-es" ); PUSH_VAR( "audio-channels" ); PUSH_VAR( "audio-device" ); PUSH_VAR( "visual" ); return VLC_SUCCESS; }
/******************************************************************** * * function : AwaitEvent( int event ) * * * return : (int) result * ******************************************************************* int AwaitEvent( int event) */ int AwaitEvent( int eventType ) { int returnValue; PUSH_MAGIC; PUSH_VAR( eventType ); PUSH_RET_VAL; PUSH_VAR( AWAITEVENT_SYS_CALL ); INTERRUPT_SOFT; POP( 1 ); POP_RET_VAL( returnValue ); CHECK_MAGIC; return returnValue; }
int Delay(int duration) { int returnValue; PUSH_MAGIC; PUSH_VAR(duration); PUSH_RET_VAL; PUSH_VAR(DELAY_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL( returnValue ); POP( 1 ); CHECK_MAGIC; return returnValue; }
int WakeUp(int tid) { int returnValue; PUSH_MAGIC; PUSH_VAR(tid); PUSH_RET_VAL; PUSH_VAR(WAKE_UP_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL( returnValue ); POP( 1 ); CHECK_MAGIC; return returnValue; }
int DelayUntil(int specfiedFutureTime) { int returnValue; PUSH_MAGIC; PUSH_VAR(specfiedFutureTime); PUSH_RET_VAL; PUSH_VAR(DELAY_UNTIL_SYS_CALL); INTERRUPT_SOFT; POP( 1 ); POP_RET_VAL( returnValue ); CHECK_MAGIC; return returnValue; }
/******************************************************************** * * function : Pass() * * * return : NO * ******************************************************************* */ void Pass( void ) { PUSH_MAGIC; PUSH_VAR(PASS_SYS_CALL); INTERRUPT_SOFT; CHECK_MAGIC; }
/******************************************************************** * * function : Exit() * * * return : NO * ******************************************************************* */ void Exit( void ) { PUSH_MAGIC; PUSH_VAR(EXIT_SYS_CALL); INTERRUPT_SOFT; CHECK_MAGIC; }
char Get( int port ) { int returnValue; PUSH_MAGIC; PUSH_VAR(port); PUSH_RET_VAL; PUSH_VAR(GET_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(1); CHECK_MAGIC; return returnValue; }
/******************************************************************** * * function : ValidPid( int pid ) * * * return : (int) non zero or zero * ******************************************************************* */ int ValidPid( int pid) { int returnValue; PUSH_MAGIC; PUSH_VAR(pid); PUSH_RET_VAL; PUSH_VAR(VALIDPID_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(1); CHECK_MAGIC; return returnValue; }
static GtkMenu *create_audio_menu( intf_thread_t *p_intf ) { vlc_object_t *p_object = get_aout(p_intf); input_thread_t *p_input = get_input(p_intf);; vlc_object_t *p_objects[SIZE_LIST]; const char *ppsz_varnames[SIZE_LIST]; int index = 0; PUSH_INPUTVAR( "audio-es" ); PUSH_VAR( "audio-channels" ); PUSH_VAR( "audio-device" ); PUSH_VAR( "visual" ); GtkWidget *menu = gtk_menu_new(); return Populate( p_intf, GTK_MENU(menu), ppsz_varnames, p_objects, index ); }
static GtkMenu *create_input_menu( intf_thread_t *p_intf ) { input_thread_t *p_object = get_input(p_intf); vlc_object_t *p_objects[SIZE_LIST]; const char *ppsz_varnames[SIZE_LIST]; int index = 0; PUSH_VAR( "bookmark" ); PUSH_VAR( "title" ); PUSH_VAR( "chapter" ); PUSH_VAR( "navigation" ); PUSH_VAR( "program" ); GtkWidget *menu = gtk_menu_new(); return Populate( p_intf, GTK_MENU(menu), ppsz_varnames, p_objects, index ); }
/******************************************************************** * * function : void AbsMem(int) * * get absolute memeory address of the task * pTask->pData * ******************************************************************* *xdelay */ int GetAbsMem( int tid ) { int returnValue; PUSH_MAGIC; PUSH_VAR(tid); PUSH_RET_VAL; PUSH_VAR(GET_ABS_MEM_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(1); CHECK_MAGIC; return returnValue; }
/* // // Read : Blocking serial read // returns number of inputted data // if some other call came first // return EMPTY(-1) // // // this call should be called by only one task // this is not good but for the time being.... // if there is one task who called this first // this just return EMPTY(-1) // */ int Read(void * _data, int port) { int returnValue; PUSH_MAGIC; PUSH_VAR(port); PUSH_VAR(_data); PUSH_RET_VAL; PUSH_VAR(READ_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(2); CHECK_MAGIC; return returnValue; }
int Create( char* ptrFile,int priority ) { int returnValue; PUSH_MAGIC; PUSH_VAR(priority); PUSH_VAR(ptrFile); PUSH_RET_VAL; PUSH_VAR(CREATE_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(2); /* pop the number of inputted parameter */ CHECK_MAGIC; return returnValue; }
/******************************************************************** * * function : Receive( void *ptrMsg, int msgLen) * * * !!! you can assign the sender pid or if you do not have * particular sender you just put UNIV_SEND(defined in sysCall.h) * * return : (int) value of the PID of sender * ******************************************************************* */ int Receive( void *ptrMsg, int msgLen) { int returnValue; PUSH_MAGIC; PUSH_VAR(msgLen); PUSH_VAR(ptrMsg); PUSH_RET_VAL; PUSH_VAR(RECEIVE_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(2); /* pop the number of inputted parameter */ CHECK_MAGIC; return returnValue; }
char Put( char _data, int port ) { int returnValue; int data = _data; PUSH_MAGIC; PUSH_VAR(port); PUSH_VAR(data); PUSH_RET_VAL; PUSH_VAR(PUT_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(2); CHECK_MAGIC; return returnValue; }
char Write( void * _data, int len, int port ) { int returnValue; PUSH_MAGIC; PUSH_VAR(port); PUSH_VAR(len); PUSH_VAR(_data); PUSH_RET_VAL; PUSH_VAR(WRITE_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(3); CHECK_MAGIC; return returnValue; }
/******************************************************************** * * function : MyTid() * * * return : (int) process id * ******************************************************************* */ int MyTid( void ) { int returnValue; PUSH_MAGIC; PUSH_RET_VAL; PUSH_VAR(MYPID_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); CHECK_MAGIC; return returnValue; }
/******************************************************************** * * function : UpTime() * * * return : (int) kernel operation time * ******************************************************************* */ int UpTime( void ) { int returnValue; PUSH_MAGIC; PUSH_RET_VAL; PUSH_VAR(UPTIME_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); CHECK_MAGIC; return returnValue; }
/******************************************************************** * * function : Reply( int pid, char *ptrMsg, int msgLen) * * * return : (int) * ******************************************************************* */ int Reply( int pid, void *ptrMsg, int msgLen) { int returnValue; PUSH_MAGIC; PUSH_VAR(msgLen); PUSH_VAR(ptrMsg); PUSH_VAR(pid); PUSH_RET_VAL; PUSH_VAR(REPLY_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(3); /* pop the number of inputted parameter */ CHECK_MAGIC; return returnValue; }
static int VideoAutoMenuBuilder( vout_thread_t *p_object, input_thread_t *p_input, vector<vlc_object_t *> &objects, vector<const char *> &varnames ) { PUSH_INPUTVAR( "video-es" ); PUSH_INPUTVAR( "spu-es" ); PUSH_VAR( "fullscreen" ); PUSH_VAR( "video-on-top" ); #ifdef WIN32 PUSH_VAR( "directx-wallpaper" ); #endif PUSH_VAR( "video-snapshot" ); PUSH_VAR( "zoom" ); PUSH_VAR( "autoscale" ); PUSH_VAR( "aspect-ratio" ); PUSH_VAR( "crop" ); PUSH_VAR( "deinterlace" ); PUSH_VAR( "postprocess" ); return VLC_SUCCESS; }
/******************************************************************** * * function : MyParentTid() * * * return : (int) parent process id * ******************************************************************* */ int MyParentTid( void ) { int returnValue; PUSH_MAGIC; PUSH_RET_VAL; PUSH_VAR(PARENTPID_SYS_CALL) INTERRUPT_SOFT; POP_RET_VAL(returnValue); CHECK_MAGIC; return returnValue; }
/******************************************************************** * * function : MyPriority() * * * return : (int) process priority * ******************************************************************* */ int MyPriority( void ) { int returnValue; PUSH_MAGIC; PUSH_RET_VAL; PUSH_VAR(MYPRIORITY_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); CHECK_MAGIC; return returnValue; }
QMenu *QVLCMenu::RebuildNavigMenu( intf_thread_t *p_intf, QMenu *menu ) { /* */ input_thread_t *p_object; vector<vlc_object_t *> objects; vector<const char *> varnames; /* Get the input and hold it */ p_object = THEMIM->getInput(); InputAutoMenuBuilder( p_object, objects, varnames ); menu->addSeparator(); /* Title and so on */ PUSH_VAR( "prev-title" ); PUSH_VAR( "next-title" ); PUSH_VAR( "prev-chapter" ); PUSH_VAR( "next-chapter" ); EnableStaticEntries( menu, (p_object != NULL ) ); return Populate( p_intf, menu, varnames, objects ); }
/******************************************************************** * * function : Send( int tidSend, void *ptrIn, int inLen, * void *ptrOut, int outLen) * * * return : (int) value of the real size of received buffer message * ******************************************************************* */ int Send( int tidSend, void *ptrIn, int inLen, void *ptrOut, int outLen) { int returnValue; PUSH_MAGIC; PUSH_VAR(outLen); PUSH_VAR(ptrOut); PUSH_VAR(inLen); PUSH_VAR(ptrIn); PUSH_VAR(tidSend); PUSH_RET_VAL; PUSH_VAR(SEND_SYS_CALL); INTERRUPT_SOFT; POP_RET_VAL(returnValue); POP(5); /* pop the number of inputted parameter */ CHECK_MAGIC; return returnValue; }