summaryrefslogtreecommitdiff
path: root/src/post/planar/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/post/planar/pp.c')
-rw-r--r--src/post/planar/pp.c58
1 files changed, 18 insertions, 40 deletions
diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c
index e658dadd0..6dbd74ac9 100644
--- a/src/post/planar/pp.c
+++ b/src/post/planar/pp.c
@@ -20,9 +20,11 @@
* plugin for ffmpeg libpostprocess
*/
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
+#include <config.h>
+
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
#include <pthread.h>
#ifdef HAVE_FFMPEG_AVUTIL_H
@@ -107,23 +109,18 @@ static xine_post_api_descr_t * get_param_descr (void) {
}
static char * get_help (void) {
- char *help1 =
- _("FFmpeg libpostprocess plugin.\n"
- "\n"
- "Parameters\n"
- "\n");
-
- char *help2 =
- _("\n"
- "* libpostprocess (C) Michael Niedermayer\n"
- );
static char *help = NULL;
if( !help ) {
- help = malloc( strlen(help1) + strlen(help2) + strlen(pp_help) + 1);
- strcpy(help, help1);
- strcat(help, pp_help);
- strcat(help, help2);
+ asprintf(&help, "%s%s%s",
+ _("FFmpeg libpostprocess plugin.\n"
+ "\n"
+ "Parameters\n"
+ "\n"),
+ pp_help,
+ _("\n"
+ "* libpostprocess (C) Michael Niedermayer\n")
+ );
}
return help;
}
@@ -140,9 +137,6 @@ static xine_post_api_t post_api = {
static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target);
-static char *pp_get_identifier(post_class_t *class_gen);
-static char *pp_get_description(post_class_t *class_gen);
-static void pp_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void pp_dispose(post_plugin_t *this_gen);
@@ -156,15 +150,15 @@ static int pp_draw(vo_frame_t *frame, xine_stream_t *stream);
void *pp_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = pp_open_plugin;
- class->get_identifier = pp_get_identifier;
- class->get_description = pp_get_description;
- class->dispose = pp_class_dispose;
+ class->identifier = "pp";
+ class->description = N_("plugin for ffmpeg libpostprocess");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -226,22 +220,6 @@ static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *pp_get_identifier(post_class_t *class_gen)
-{
- return "pp";
-}
-
-static char *pp_get_description(post_class_t *class_gen)
-{
- return "plugin for ffmpeg libpostprocess";
-}
-
-static void pp_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void pp_dispose(post_plugin_t *this_gen)
{
post_plugin_pp_t *this = (post_plugin_pp_t *)this_gen;