# include <config.h>
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_input.h>
#include <vlc_charset.h>
static void Close (vlc_object_t *);
vlc_module_begin();
- set_shortname (_("MMap"));
- set_description (_("Memory-mapped file input"));
+ set_shortname (N_("MMap"));
+ set_description (N_("Memory-mapped file input"));
set_category (CAT_INPUT);
set_subcategory (SUBCAT_INPUT_ACCESS);
- set_capability ("access2", 52);
+ set_capability ("access", 52);
add_shortcut ("file");
set_callbacks (Open, Close);
- add_bool ("file-mmap", VLC_TRUE, NULL,
- FILE_MMAP_TEXT, FILE_MMAP_LONGTEXT, VLC_TRUE);
+ add_bool ("file-mmap", true, NULL,
+ FILE_MMAP_TEXT, FILE_MMAP_LONGTEXT, true);
vlc_module_end();
static block_t *Block (access_t *);
/* Really at end of file then */
if ((uint64_t)p_access->info.i_pos >= (uint64_t)p_access->info.i_size)
{
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
msg_Dbg (p_access, "at end of memory mapped file");
return NULL;
}
if (addr == MAP_FAILED)
{
msg_Err (p_access, "memory mapping failed (%m)");
- intf_UserFatal (p_access, VLC_FALSE, _("File reading failed"),
+ intf_UserFatal (p_access, false, _("File reading failed"),
_("VLC could not read the file."));
msleep (INPUT_ERROR_SLEEP);
return NULL;
#endif
p_access->info.i_pos = i_pos;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
return VLC_SUCCESS;
}
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
- *((vlc_bool_t *)va_arg (args, vlc_bool_t *)) = VLC_TRUE;
+ *((bool *)va_arg (args, bool *)) = true;
return VLC_SUCCESS;
case ACCESS_GET_MTU: