summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-08-21 00:37:26 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-08-21 00:37:26 +0000
commitfa630d674955c0a6ea29d1427081e200223b85cc (patch)
tree3a696b538dfcfa9e8ed81244f2f7549380df97ac /src/input
parent44d393d0d8b4ff75e76e21860386ce5c145d304a (diff)
downloadxine-lib-fa630d674955c0a6ea29d1427081e200223b85cc.tar.gz
xine-lib-fa630d674955c0a6ea29d1427081e200223b85cc.tar.bz2
RIP Input Plugin
CVS patchset: 5300 CVS date: 2003/08/21 00:37:26
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_dvd.c11
-rw-r--r--src/input/input_http.c11
-rw-r--r--src/input/input_plugin.h10
3 files changed, 27 insertions, 5 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 8c7290ddc..9fe9805dd 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_dvd.c,v 1.166 2003/06/29 10:57:08 mroi Exp $
+ * $Id: input_dvd.c,v 1.167 2003/08/21 00:37:26 miguelfreitas Exp $
*
*/
@@ -255,7 +255,11 @@ static uint32_t dvd_plugin_get_capabilities (input_plugin_t *this_gen) {
trace_print("Called\n");
- return INPUT_CAP_BLOCK |
+ return INPUT_CAP_BLOCK |
+ /* TODO: figure out if there is any "allow copying" flag on DVD.
+ * maybe set INPUT_CAP_RIP_FORBIDDEN only for encrypted media?
+ */
+ INPUT_CAP_RIP_FORBIDDEN |
#if CAN_SEEK
(this->seekable ? INPUT_CAP_SEEKABLE : 0) |
#endif
@@ -1732,6 +1736,9 @@ static void *init_class (xine_t *xine, void *data) {
/*
* $Log: input_dvd.c,v $
+ * Revision 1.167 2003/08/21 00:37:26 miguelfreitas
+ * RIP Input Plugin
+ *
* Revision 1.166 2003/06/29 10:57:08 mroi
* on some DVDs, the first highlight information (which button to highlight) will
* arrive before the first SPU packet, therefore the SPU decoder has not yet been
diff --git a/src/input/input_http.c b/src/input/input_http.c
index 7ac5e8b59..ea87ccbe7 100644
--- a/src/input/input_http.c
+++ b/src/input/input_http.c
@@ -19,7 +19,7 @@
*
* input plugin for http network streams
*
- * $Id: input_http.c,v 1.62 2003/06/19 14:46:03 guenter Exp $
+ * $Id: input_http.c,v 1.63 2003/08/21 00:37:29 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -541,8 +541,15 @@ static off_t http_plugin_get_length (input_plugin_t *this_gen) {
}
static uint32_t http_plugin_get_capabilities (input_plugin_t *this_gen) {
+ http_input_plugin_t *this = (http_input_plugin_t *) this_gen;
+ uint32_t caps = INPUT_CAP_PREVIEW;
+
+ /* Nullsoft asked to not allow saving streaming nsv files */
+ if (this->filename &&
+ !strncmp(this->filename + strlen(this->filename) - 4, ".nsv", 4))
+ caps |= INPUT_CAP_RIP_FORBIDDEN;
- return INPUT_CAP_PREVIEW;
+ return caps;
}
static uint32_t http_plugin_get_blocksize (input_plugin_t *this_gen) {
diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h
index 99fb1d738..4377ae51a 100644
--- a/src/input/input_plugin.h
+++ b/src/input/input_plugin.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_plugin.h,v 1.50 2003/07/03 00:58:51 andruil Exp $
+ * $Id: input_plugin.h,v 1.51 2003/08/21 00:37:29 miguelfreitas Exp $
*/
#ifndef HAVE_INPUT_PLUGIN_H
@@ -265,6 +265,14 @@ struct input_plugin_s {
#define INPUT_CAP_CHAPTERS 0x00000080
+/*
+ * INPUT_CAP_RIP_FORBIDDEN:
+ * means that rip/disk saving must not be used.
+ * (probably at author's request)
+ */
+
+#define INPUT_CAP_RIP_FORBIDDEN 0x00000100
+
#define INPUT_IS_SEEKABLE(input) (((input)->get_capabilities(input) & INPUT_CAP_SEEKABLE) != 0)
#define INPUT_OPTIONAL_UNSUPPORTED 0