shithub: libdvdcss

Download patch

ref: b3ef727c420cdd6ddb54c57f8c02b5871c3b36db
parent: 1c1f814cb73f791e4dc997a4b66f81a0b2f0beaf
author: Olivier Rolland <billl@users.sourceforge.net>
date: Fri Jul 11 13:23:25 EDT 2008

* src/libdvdcss.c: add dvdcss_is_scrambled() function, 
   Olivier Rolland.


--- a/src/dvdcss/dvdcss.h
+++ b/src/dvdcss/dvdcss.h
@@ -88,6 +88,8 @@
                                int i_flags );
 LIBDVDCSS_EXPORT char *   dvdcss_error ( dvdcss_t );
 
+LIBDVDCSS_EXPORT int      dvdcss_is_scrambled ( dvdcss_t );
+
 
 /*
  * Deprecated stuff.
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -795,4 +795,16 @@
     return _dvdcss_title( dvdcss, i_block );
 }
 
+/**
+ * \brief Return 1 if the DVD is scrambled, 0 otherwise.
+ *
+ * \param dvdcss a \e libdvdcss instance.
+ * \return 1 if the DVD is scrambled, 0 otherwise.
+ *
+ * This function returns whether the DVD is scrambled.
+ */
+LIBDVDCSS_EXPORT int dvdcss_is_scrambled ( dvdcss_t dvdcss )
+{
+    return dvdcss->b_scrambled;
+}