QVisu
Qt-based visualization for smart homes
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vlc_common.h File Reference
#include "vlc_config.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <inttypes.h>
#include <stddef.h>
#include <stdbool.h>
#include "vlc_mtime.h"
#include "vlc_threads.h"
#include <vlc_arrays.h>
#include "vlc_messages.h"
#include "vlc_objects.h"
#include "vlc_variables.h"
#include "vlc_main.h"
#include "vlc_configuration.h"

Go to the source code of this file.

Classes

union  vlc_value_t
 
struct  vlc_list_t
 

Macros

#define VLC_GCC_VERSION(maj, min)   (0)
 
#define VLC_DEPRECATED
 
#define VLC_FORMAT(x, y)
 
#define VLC_FORMAT_ARG(x)
 
#define VLC_MALLOC
 
#define VLC_NORETURN
 
#define VLC_USED
 
#define likely(p)   (!!(p))
 
#define unlikely(p)   (!!(p))
 
#define VLC_EXTERN
 
#define VLC_EXPORT
 
#define VLC_API   VLC_EXTERN VLC_EXPORT
 
#define VLC_FOURCC(a, b, c, d)
 
#define VLC_TWOCC(a, b)   ( (uint16_t)(a) | ( (uint16_t)(b) << 8 ) )
 
#define vlc_fourcc_to_char(a, b)   vlc_fourcc_to_char( (vlc_fourcc_t)(a), (char *)(b) )
 
#define VLC_SUCCESS   (-0)
 
#define VLC_EGENERIC   (-1)
 
#define VLC_ENOMEM   (-2)
 
#define VLC_ETIMEOUT   (-3)
 
#define VLC_ENOMOD   (-4)
 
#define VLC_ENOOBJ   (-5)
 
#define VLC_ENOVAR   (-6)
 
#define VLC_EBADVAR   (-7)
 
#define VLC_ENOITEM   (-8)
 
#define VLC_COMMON_MEMBERS
 
#define VLC_OBJECT(x)   ((vlc_object_t *)(x))
 
#define CEIL(n, d)   ( ((n) / (d)) + ( ((n) % (d)) ? 1 : 0) )
 
#define PAD(n, d)   ( ((n) % (d)) ? ((((n) / (d)) + 1) * (d)) : (n) )
 
#define __MAX(a, b)   ( ((a) > (b)) ? (a) : (b) )
 
#define __MIN(a, b)   ( ((a) < (b)) ? (a) : (b) )
 
#define VLC_CLIP(v, min, max)   __MIN(__MAX((v), (min)), (max))
 
#define clz8(x)   (clz(x) - ((sizeof(unsigned) - sizeof (uint8_t)) * 8))
 
#define clz16(x)   (clz(x) - ((sizeof(unsigned) - sizeof (uint16_t)) * 8))
 
#define clz32(x)   (clz(x) - ((sizeof(unsigned) - sizeof (uint32_t)) * 8))
 
#define FREENULL(a)   do { free( a ); a = NULL; } while(0)
 
#define EMPTY_STR(str)   (!str || !*str)
 
#define hton16(i)   bswap16(i)
 
#define hton32(i)   bswap32(i)
 
#define hton64(i)   bswap64(i)
 
#define ntoh16(i)   hton16(i)
 
#define ntoh32(i)   hton32(i)
 
#define ntoh64(i)   hton64(i)
 
#define GetWBE(p)   U16_AT(p)
 
#define GetDWBE(p)   U32_AT(p)
 
#define GetQWBE(p)   U64_AT(p)
 
#define VLC_UNUSED(x)   (void)(x)
 
#define vlc_free(base)   free(base)
 
#define vlc_pgettext(ctx, id)   vlc_pgettext_aux( ctx "\004" id, id )
 
#define DIR_SEP_CHAR   '/'
 
#define DIR_SEP   "/"
 
#define PATH_SEP_CHAR   ':'
 
#define PATH_SEP   ":"
 
#define LICENSE_MSG
 

Typedefs

typedef int64_t mtime_t
 
typedef uint32_t vlc_fourcc_t
 
typedef struct vlc_list_t vlc_list_t
 
typedef struct vlc_object_t vlc_object_t
 
typedef struct libvlc_int_t libvlc_int_t
 
typedef struct date_t date_t
 
typedef struct playlist_t playlist_t
 
typedef struct playlist_item_t playlist_item_t
 
typedef struct services_discovery_t services_discovery_t
 
typedef struct
services_discovery_sys_t 
services_discovery_sys_t
 
typedef struct playlist_add_t playlist_add_t
 
typedef struct module_t module_t
 
typedef struct module_config_t module_config_t
 
typedef struct config_category_t config_category_t
 
typedef struct input_thread_t input_thread_t
 
typedef struct input_item_t input_item_t
 
typedef struct input_item_node_t input_item_node_t
 
typedef struct access_t access_t
 
typedef struct access_sys_t access_sys_t
 
typedef struct stream_t stream_t
 
typedef struct stream_sys_t stream_sys_t
 
typedef struct demux_t demux_t
 
typedef struct demux_sys_t demux_sys_t
 
typedef struct es_out_t es_out_t
 
typedef struct es_out_id_t es_out_id_t
 
typedef struct es_out_sys_t es_out_sys_t
 
typedef struct seekpoint_t seekpoint_t
 
typedef struct info_t info_t
 
typedef struct info_category_t info_category_t
 
typedef struct input_attachment_t input_attachment_t
 
typedef struct audio_format_t audio_format_t
 
typedef struct video_format_t video_format_t
 
typedef struct subs_format_t subs_format_t
 
typedef struct es_format_t es_format_t
 
typedef struct video_palette_t video_palette_t
 
typedef struct audio_output audio_output_t
 
typedef struct aout_sys_t aout_sys_t
 
typedef audio_format_t audio_sample_format_t
 
typedef struct vout_thread_t vout_thread_t
 
typedef video_format_t video_frame_format_t
 
typedef struct picture_t picture_t
 
typedef struct picture_sys_t picture_sys_t
 
typedef struct spu_t spu_t
 
typedef struct subpicture_t subpicture_t
 
typedef struct subpicture_region_t subpicture_region_t
 
typedef struct image_handler_t image_handler_t
 
typedef struct sout_instance_t sout_instance_t
 
typedef struct sout_input_t sout_input_t
 
typedef struct
sout_packetizer_input_t 
sout_packetizer_input_t
 
typedef struct sout_access_out_t sout_access_out_t
 
typedef struct
sout_access_out_sys_t 
sout_access_out_sys_t
 
typedef struct sout_mux_t sout_mux_t
 
typedef struct sout_mux_sys_t sout_mux_sys_t
 
typedef struct sout_stream_t sout_stream_t
 
typedef struct sout_stream_sys_t sout_stream_sys_t
 
typedef struct config_chain_t config_chain_t
 
typedef struct session_descriptor_t session_descriptor_t
 
typedef struct decoder_t decoder_t
 
typedef struct decoder_sys_t decoder_sys_t
 
typedef struct decoder_synchro_t decoder_synchro_t
 
typedef struct encoder_t encoder_t
 
typedef struct encoder_sys_t encoder_sys_t
 
typedef struct filter_t filter_t
 
typedef struct filter_sys_t filter_sys_t
 
typedef struct virtual_socket_t v_socket_t
 
typedef struct vlc_url_t vlc_url_t
 
typedef struct iso639_lang_t iso639_lang_t
 
typedef struct block_t block_t
 
typedef struct block_fifo_t block_fifo_t
 
typedef struct md5_s md5_t
 
typedef struct xml_t xml_t
 
typedef struct xml_sys_t xml_sys_t
 
typedef struct xml_reader_t xml_reader_t
 
typedef struct xml_reader_sys_t xml_reader_sys_t
 
typedef struct vod_t vod_t
 
typedef struct vod_sys_t vod_sys_t
 
typedef struct vod_media_t vod_media_t
 
typedef struct vlm_t vlm_t
 
typedef struct vlm_message_t vlm_message_t
 
typedef struct vlc_meta_t vlc_meta_t
 
typedef struct input_stats_t input_stats_t
 
typedef struct update_t update_t
 
typedef int(* vlc_callback_t )(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
 

Enumerations

enum  playlist_command_t {
  PLAYLIST_PLAY, PLAYLIST_VIEWPLAY, PLAYLIST_PAUSE, PLAYLIST_STOP,
  PLAYLIST_SKIP
}
 

Functions

VLC_API char const * vlc_error (int) VLC_USED
 
VLC_API bool vlc_ureduce (unsigned *, unsigned *, uint64_t, uint64_t, uint64_t)
 
VLC_API void vlc_tdestroy (void *, void(*)(void *))
 
VLC_API char * vlc_gettext (const char *msgid) VLC_FORMAT_ARG(1)
 
VLC_API char * vlc_ngettext (const char *s, const char *p, unsigned long n) VLC_FORMAT_ARG(1) VLC_FORMAT_ARG(2)
 
VLC_API const char * VLC_CompileBy (void) VLC_USED
 
VLC_API const char * VLC_CompileHost (void) VLC_USED
 
VLC_API const char * VLC_Compiler (void) VLC_USED
 

Detailed Description

This file is a collection of common definitions and types

Macro Definition Documentation

#define LICENSE_MSG
Value:
_("This program comes with NO WARRANTY, to the extent permitted by " \
"law.\nYou may redistribute it under the terms of the GNU General " \
"Public License;\nsee the file named COPYING for details.\n" \
"Written by the VideoLAN team; see the AUTHORS file.\n")
#define VLC_COMMON_MEMBERS
Value:
\ \
const char *psz_object_type; \
\
/* Messages header */ \
char *psz_header; \
int i_flags; \
\
/* Object properties */ \
bool b_force; \
\
/* Stuff related to the libvlc structure */ \
libvlc_int_t *p_libvlc; \
\
vlc_object_t * p_parent; \
\ \
#define VLC_EBADVAR   (-7)

Bad variable value

#define VLC_EGENERIC   (-1)

Unspecified error

#define VLC_ENOITEM   (-8)

Item not found

#define VLC_ENOMEM   (-2)

Not enough memory

#define VLC_ENOMOD   (-4)

Module not found

#define VLC_ENOOBJ   (-5)

Object not found

#define VLC_ENOVAR   (-6)

Variable not found

#define VLC_ETIMEOUT   (-3)

Timeout

#define VLC_FOURCC (   a,
  b,
  c,
 
)
Value:
( ((uint32_t)a) | ( ((uint32_t)b) << 8 ) \
| ( ((uint32_t)c) << 16 ) | ( ((uint32_t)d) << 24 ) )
#define VLC_SUCCESS   (-0)

No error

Typedef Documentation

typedef int64_t mtime_t

High precision date or time interval

Store a high precision date or time interval. The maximum precision is the microsecond, and a 64 bits integer is used to avoid overflows (maximum time interval is then 292271 years, which should be long enough for any video). Dates are stored as microseconds since a common date (usually the epoch). Note that date and time intervals can be manipulated using regular arithmetic operators, and that no special functions are required.

typedef uint32_t vlc_fourcc_t

The vlc_fourcc_t type.

See http://www.webartz.com/fourcc/ for a very detailed list.

Enumeration Type Documentation

Playlist commands

Enumerator
PLAYLIST_PLAY 

No arg. res=can fail

PLAYLIST_VIEWPLAY 

arg1= playlist_item_t*,

PLAYLIST_PAUSE 

arg2 = playlist_item_t* , res=can fail No arg res=can fail

PLAYLIST_STOP 

No arg res=can fail

PLAYLIST_SKIP 

arg1=int, res=can fail