[MPlayer-cvslog] r21851 - trunk/subreader.c

reimar subversion at mplayerhq.hu
Sun Jan 7 13:06:48 CET 2007


Author: reimar
Date: Sun Jan  7 13:06:48 2007
New Revision: 21851

Modified:
   trunk/subreader.c

Log:
Document sub_add_text and sub_clear_text


Modified: trunk/subreader.c
==============================================================================
--- trunk/subreader.c	(original)
+++ trunk/subreader.c	Sun Jan  7 13:06:48 2007
@@ -2255,6 +2255,17 @@
 }
 
 #define MAX_SUBLINE 512
+/**
+ * \brief parse text and append it to subtitle in sub
+ * \param sub subtitle struct to add text to
+ * \param txt text to parse
+ * \param len length of text in txt
+ * \param endpts pts at which this subtitle text should be removed again
+ *
+ * <> and {} are interpreted as comment delimiters, "\n", "\N", '\n', '\r'
+ * and '\0' are interpreted as newlines, duplicate, leading and trailing
+ * newlines are ignored.
+ */
 void sub_add_text(subtitle *sub, const char *txt, int len, double endpts) {
   int comment = 0;
   int double_newline = 1; // ignore newlines at the beginning
@@ -2307,6 +2318,13 @@
 }
 
 #define MP_NOPTS_VALUE (-1LL<<63)
+/**
+ * \brief remove outdated subtitle lines.
+ * \param sub subtitle struct to modify
+ * \param pts current pts. All lines with endpts <= this will be removed.
+ *            Use MP_NOPTS_VALUE to remove all lines
+ * \return 1 if sub was modified, 0 otherwise.
+ */
 int sub_clear_text(subtitle *sub, double pts) {
   int i = 0;
   int changed = 0;



More information about the MPlayer-cvslog mailing list