From: Rich W. <rj...@he...> - 2001-07-20 07:42:19
|
WARNING: This mail is a RFC on changes I want to make to Xine. It will cause breakage of subtitle decoding for anything not read with a DVDNAV style plugin. I'm currently adding the ability to parse SPU packets to the (enhanced) DVD input plugin with a global view to remove the SPU code from Xine and make Xine a clean and wholesome prgram :) (Although note that this will break subtitles on VOBs from HD etc unless read with dvdnav://<path to DVD image>). I propose adding two new event types to Xine to be sent with xine_send_event(): /* Event to send overlay data to Xine */ typedef struct { uint32_t nPTS; uint32_t nFormat; uint8_t *pOverlay[3]; uint8_t *pAlpha; uint16_t start_row, start_col; uint16_t end_row, end_col; } overlay_event_t; /* Event to send clipping data to Xine overlay mechanism */ typedef struct { uint16_t start_row, start_col; uint16_t end_row, end_col; } clip_event_t; Or possibly replacing the uint8_t*'s with buf_element's. The format of the overlay is 3 planes of 8-bit values (a la vo_image_t) and the alpha mask consists of 8-bit alpha values. The overlay code in Xine takes care of syncing the display so that the overlay is only overlayed at the specified PTS. I feel that this is nice and clean in that the SPU palette clut lookup can be kept in the DVD input plugin (IMHO where it belongs) and there is no obvious reason why this can't be used with other subtitle methods (as long as they can be rendered into an YUV image with 8-bit alpha). In particular this should allow the kinnd of subtitles on MicroDVD and VCD to be implemented in the respective plugins. Would people mind if I had a stab at implementing this? On a slight implementation note, I may need to change the input API so that an input plugin can get the xine_t being used at the moment (So it can send/receive events). Rich (who also wishes to point out that new DVD plugins will be checked in to the CVS at dvd.sf.net). -- Rich Wareham http://www.srcf.ucam.org/~rjw57/... ...sc/ -- Linux Software for the Cambridge University Smartcard ...xine/ -- Xine HOWTO |