diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-10-17 17:43:41 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-10-17 17:43:41 +0000 |
commit | 3bb1499e2dd8f9e63494259343968ae71060f6cb (patch) | |
tree | 208a51acd986b4f60aa90e6a61771e9633bbf44f /src/input/input_file.c | |
parent | 76450053c7fa0b7dac22b5a0d77c287ac1410fca (diff) | |
download | xine-lib-3bb1499e2dd8f9e63494259343968ae71060f6cb.tar.gz xine-lib-3bb1499e2dd8f9e63494259343968ae71060f6cb.tar.bz2 |
move open_plugin function (used to create new plugin instances) from the plugin info
struct to the plugin class struct
small nerby change in libffmpeg decoder plugin:
access to video_out/audio_out in decoders should now be done via the
appropriate members in xine_stream_t
CVS patchset: 2843
CVS date: 2002/10/17 17:43:41
Diffstat (limited to 'src/input/input_file.c')
-rw-r--r-- | src/input/input_file.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/input/input_file.c b/src/input/input_file.c index 365950ecc..123610682 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -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_file.c,v 1.62 2002/10/16 14:09:13 guenter Exp $ + * $Id: input_file.c,v 1.63 2002/10/17 17:43:43 mroi Exp $ */ #ifdef HAVE_CONFIG_H @@ -234,13 +234,13 @@ static void file_plugin_dispose (input_plugin_t *this_gen ) { free (this); } -static void *open_plugin (void *cls_gen, xine_stream_t *stream, - const void *data) { +static input_plugin_t *open_plugin (input_class_t *cls_gen, xine_stream_t *stream, + const char *data) { file_input_class_t *cls = (file_input_class_t *) cls_gen; file_input_plugin_t *this; - char *mrl = strdup ((char *) data); FILE *sub; + char *mrl = strdup(data); char *filename, *subtitle; int fh; @@ -288,7 +288,7 @@ static void *open_plugin (void *cls_gen, xine_stream_t *stream, this->input_plugin.get_optional_data = file_plugin_get_optional_data; this->input_plugin.dispose = file_plugin_dispose; - return this; + return &this->input_plugin; } @@ -808,6 +808,7 @@ static void *init_plugin (xine_t *xine, void *data) { this->config = xine->config; config = xine->config; + this->input_class.open_plugin = open_plugin; this->input_class.get_dir = file_class_get_dir; this->input_class.get_description = file_class_get_description; this->input_class.get_autoplay_list = NULL; @@ -844,7 +845,7 @@ static void *init_plugin (xine_t *xine, void *data) { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 9, "file", XINE_VERSION_CODE, NULL, init_plugin, open_plugin }, + { PLUGIN_INPUT, 9, "file", XINE_VERSION_CODE, NULL, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |