Mercurial > libdvdnav.hg
diff decoder.h @ 114:b6834e6359cf src
big libdvdnav cleanup, quoting the ChangeLog:
* some bugfixes
* code cleanup
* build process polishing
* more sensible event order in get_next_block to ensure useful event delivery
* VOBU level resume
* fixed: seeking in a multiangle feature briefly showed the wrong angle
author | mroi |
---|---|
date | Thu, 20 Feb 2003 15:32:21 +0000 |
parents | e106f51eb8f5 |
children | 5897ff629f7c |
line wrap: on
line diff
--- a/decoder.h Mon Jan 13 13:33:45 2003 +0000 +++ b/decoder.h Thu Feb 20 15:32:21 2003 +0000 @@ -30,9 +30,7 @@ #include <dvdread/ifo_types.h> /* vm_cmd_t */ -/* Uncomment for tracing */ -#define TRACE - +/* link command types */ typedef enum { LinkNoLink = 0, @@ -76,6 +74,7 @@ PlayThis } link_cmd_t; +/* a link's data set */ typedef struct { link_cmd_t command; uint16_t data1; @@ -83,6 +82,7 @@ uint16_t data3; } link_t; +/* the VM registers */ typedef struct { uint16_t SPRM[24]; uint16_t GPRM[16]; @@ -90,18 +90,28 @@ struct timeval GPRM_time[16]; /* For counter mode */ } registers_t; -typedef struct -{ +/* a VM command data set */ +typedef struct { uint64_t instruction; uint64_t examined; registers_t *registers; } command_t; +/* the big VM function, executing the given commands and writing + * the link where to continue, the return value indicates if a jump + * has been performed */ int vmEval_CMD(vm_cmd_t commands[], int num_commands, registers_t *registers, link_t *return_values); -void vmPrint_LINK(link_t value); -void vmPrint_registers( registers_t *registers ); +/* extracts some bits from the command */ uint32_t vm_getbits(command_t* command, int start, int count); +#ifdef TRACE +/* for debugging: prints a link in readable form */ +void vmPrint_LINK(link_t value); + +/* for debugging: dumps VM registers */ +void vmPrint_registers( registers_t *registers ); +#endif + #endif /* DECODER_H_INCLUDED */