#ifndef DYNAMIC_OVERLAY_H
#define DYNAMIC_OVERLAY_H 1
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_filter.h>
/*****************************************************************************
struct text_style_t fontstyle; /*< text style */
- vlc_bool_t b_visible; /*< visibility flag of overlay */
+ bool b_visible; /*< visibility flag of overlay */
} commandparams_t;
+typedef int (*parser_func_t)(char *psz_command, char *psz_end, commandparams_t *p_params );
+typedef int (*execute_func_t)( filter_t *p_filter, const commandparams_t *p_params, commandparams_t *p_results );
+typedef int (*unparse_func_t)( const commandparams_t *p_results, buffer_t *p_output );
+
typedef struct commanddesc_t
{
- const char *psz_command;
- vlc_bool_t b_atomic;
- int ( *pf_parser ) ( char *psz_command, char *psz_end,
- commandparams_t *p_params );
- int ( *pf_execute ) ( filter_t *p_filter, const commandparams_t *p_params,
- commandparams_t *p_results );
- int ( *pf_unparse ) ( const commandparams_t *p_results,
- buffer_t *p_output );
+ char *psz_command;
+ bool b_atomic;
+ parser_func_t pf_parser;
+ execute_func_t pf_execute;
+ unparse_func_t pf_unparse;
} commanddesc_t;
+typedef struct commanddesc_static_t
+{
+ const char *psz_command;
+ bool b_atomic;
+ parser_func_t pf_parser;
+ execute_func_t pf_execute;
+ unparse_func_t pf_unparse;
+} commanddesc_static_t;
+
+
typedef struct command_t
{
struct commanddesc_t *p_command;
{
int i_x, i_y;
int i_alpha;
- vlc_bool_t b_active;
+ bool b_active;
video_format_t format;
- struct text_style_t fontstyle;
+ struct text_style_t *p_fontstyle;
union {
picture_t *p_pic;
char *p_text;
commanddesc_t **pp_commands; /* array of commands */
size_t i_commands;
- vlc_bool_t b_updated, b_atomic;
+ bool b_updated, b_atomic;
queue_t atomic, pending, processed;
list_t overlays;
+
+ vlc_mutex_t lock; /* lock to protect psz_inputfile and psz_outputfile */
};
#endif