# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <assert.h>
#include <time.h>
static int Open (vlc_object_t *);
static void Close (vlc_object_t *);
-vlc_module_begin ();
- set_shortname (_("Dump"));
- set_description (_("Dump"));
- set_category (CAT_INPUT);
- set_subcategory (SUBCAT_INPUT_ACCESS_FILTER);
- set_capability ("access_filter", 0);
- add_shortcut ("dump");
- set_callbacks (Open, Close);
+vlc_module_begin ()
+ set_shortname (N_("Dump"))
+ set_description (N_("Dump"))
+ set_category (CAT_INPUT)
+ set_subcategory (SUBCAT_INPUT_ACCESS_FILTER)
+ set_capability ("access_filter", 0)
+ add_shortcut ("dump")
+ set_callbacks (Open, Close)
add_bool ("dump-force", false, NULL, FORCE_TEXT,
FORCE_LONGTEXT, false);
add_integer ("dump-margin", DEFAULT_MARGIN, NULL, MARGIN_TEXT,
MARGIN_LONGTEXT, false);
-vlc_module_end();
+vlc_module_end ()
static ssize_t Read (access_t *access, uint8_t *buffer, size_t len);
static block_t *Block (access_t *access);
access->pf_control = Control;
access->info = src->info;
- access_sys_t *p_sys = access->p_sys = malloc (sizeof (*p_sys));
- if (p_sys == NULL)
+ access_sys_t *p_sys = access->p_sys = calloc( 1, sizeof (*p_sys) );
+ if( !p_sys )
return VLC_ENOMEM;
- memset (p_sys, 0, sizeof (*p_sys));
+# ifndef UNDER_CE
if ((p_sys->stream = tmpfile ()) == NULL)
+# else
+ char buf[75];
+ if(GetTempFileName("\\Temp\\","vlc",0,buf) || ((p_sys->stream = fopen(buf,"wb+")) ==NULL))
+#endif
{
msg_Err (access, "cannot create temporary file: %m");
free (p_sys);
// and there is an off-by-one in the following sprintf().
return;
- const char *home = access->p_libvlc->psz_homedir;
+ const char *home = config_GetHomeDir();
/* Hmm what about the extension?? */
char filename[strlen (home) + sizeof ("/vlcdump-YYYYYYYYY-MM-DD-HH-MM-SS.ts")];
{
access_t *access = data;
+ (void)varname;
(void)oldval;
(void)obj;