Go to the documentation of this file.
23 #ifndef LIBVLC_VOUT_INTERNAL_SNAPSHOT_H
24 #define LIBVLC_VOUT_INTERNAL_SNAPSHOT_H
void vlc_cond_broadcast(vlc_cond_t *cond)
Wakes up all threads waiting on a condition variable.
Definition: threads.c:280
@ VLC_OPENGL
Definition: vlc_opengl.h:45
#define VLC_CODEC_UNKNOWN
Definition: vlc_fourcc.h:27
Definition: vout_private.h:34
void vlc_mutex_init(vlc_mutex_t *mtx)
Initializes a fast mutex.
Definition: threads.c:123
struct vlc_video_context * offscreen_vctx_out
Definition: vlc_opengl.h:67
int height
Definition: opengl.c:182
int() var_Create(vlc_object_t *p_this, const char *psz_name, int i_type)
Creates a VLC object variable.
Definition: variables.c:291
char * vout_snapshot_GetDirectory(void)
This function will return the directory used for snapshots.
Definition: snapshot.c:158
#define VLC_VAR_SETVALUE
Set the value of this variable without triggering any callbacks.
Definition: vlc_variables.h:87
video_frame_format_t format
The properties of the picture.
Definition: vlc_picture.h:125
picture_t * picture_Clone(picture_t *picture)
Perform a shallow picture copy.
Definition: picture.c:453
module_config_t * config_FindConfig(const char *name)
Looks up a configuration item.
Definition: core.c:452
void vout_snapshot_Destroy(vout_snapshot_t *snap)
Definition: snapshot.c:67
#define VLC_VAR_CLEARCHOICES
Definition: vlc_variables.h:98
struct vout_display_cfg::@275 display
Display properties.
picture chaining helpers
Definition: vlc_picture.h:177
Window object.
Definition: vlc_vout_window.h:353
int vlc_stat(const char *filename, struct stat *buf)
Finds file/inode information - like stat().
Definition: filesystem.c:173
#define VLC_VAR_SETTEXT
Definition: vlc_variables.h:89
static char * str_format(vlc_player_t *player, input_item_t *item, const char *fmt)
Definition: vlc_strings.h:229
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:227
int vout_snapshot_SaveImage(char **name, int *sequential, const block_t *image, vout_thread_t *p_vout, const vout_snapshot_save_cfg_t *cfg)
This function will write an image to the disk an return the file name created.
Definition: snapshot.c:163
vlc_gl_t * vlc_gl_Create(const struct vout_display_cfg *restrict cfg, unsigned flags, const char *name)
Definition: opengl.c:56
#define DIR_SEP
Definition: vlc_common.h:1221
#define VLC_VAR_DOINHERIT
Creation flag.
Definition: vlc_variables.h:69
const char ** list_text
Human-readable names for list values.
Definition: vlc_configuration.h:102
static const char deinterlace_modes[][9]
Definition: interlacing.c:41
@ VLC_OPENGL_ES2
Definition: vlc_opengl.h:46
int request_count
Definition: snapshot.c:69
size_t i_buffer
Payload length.
Definition: vlc_block.h:122
static void vlc_picture_chain_Append(vlc_picture_chain_t *chain, picture_t *pic)
Append a picture to a picture chain.
Definition: vlc_picture.h:251
struct tm * gmtime_r(const time_t *, struct tm *)
#define VLC_VAR_ADDCHOICE
Definition: vlc_variables.h:96
bool has_deint
Definition: vout_private.h:38
vout_window_owner_t owner
Definition: vlc_vout_window.h:412
const int * i
Table of possible integer choices.
Definition: vlc_configuration.h:100
#define vlc_module_load(ctx, cap, name, strict,...)
Definition: vlc_modules.h:99
void vout_window_Delete(vout_window_t *window)
Deletes a window.
Definition: window.c:121
static bool vlc_atomic_rc_dec(vlc_atomic_rc_t *rc)
Decrement the RC and return true if it reaches 0.
Definition: vlc_atomic.h:61
module_value_t orig
Default value.
Definition: vlc_configuration.h:91
void(* release_current)(vlc_gl_t *)
Definition: vlc_opengl.h:75
static void picture_Release(picture_t *picture)
Decrements the picture reference count.
Definition: vlc_picture.h:368
void vout_InitInterlacingSupport(vout_thread_t *vout, vout_thread_private_t *sys)
Definition: interlacing.c:93
static char * var_GetNonEmptyString(vlc_object_t *p_obj, const char *psz_name)
Definition: vlc_variables.h:447
void() var_AddCallback(vlc_object_t *p_this, const char *psz_name, vlc_callback_t pf_callback, void *p_data)
Registers a callback for a variable.
Definition: variables.c:801
void vout_snapshot_End(vout_snapshot_t *)
Definition: snapshot.c:80
#define VLC_VAR_BOOL
Definition: vlc_variables.h:49
vlc_gl_t * vlc_gl_CreateOffscreen(vlc_object_t *parent, struct vlc_decoder_device *device, unsigned width, unsigned height, unsigned flags, const char *name)
Definition: opengl.c:100
char * psz
Definition: vlc_configuration.h:62
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:106
#define _(str)
Definition: vlc_fixups.h:374
char * prefix_fmt
Definition: snapshot.h:63
bool is_sequential
Definition: snapshot.h:59
static char * var_InheritString(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:705
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:474
static void vlc_gl_Resize(vlc_gl_t *gl, unsigned w, unsigned h)
Definition: vlc_opengl.h:139
#define ARRAY_SIZE(x)
Definition: vlc_arrays.h:178
int width
Definition: opengl.c:181
#define VLC_VAR_INTEGER
Definition: vlc_variables.h:50
#define VLC_VAR_STRING
Definition: vlc_variables.h:51
void(* resized)(struct vout_window_t *, unsigned width, unsigned height, vout_window_ack_cb cb, void *opaque)
Callback for window size changes.
Definition: vlc_vout_window.h:219
void vout_ControlChangeInterlacing(vout_thread_t *vout, bool set)
Definition: video_output.c:684
void vout_ReinitInterlacingSupport(vout_thread_t *vout, vout_thread_private_t *sys)
Definition: interlacing.c:150
const char * vlc_gettext(const char *msgid)
In-tree plugins share their gettext domain with LibVLC.
Definition: textdomain.c:79
bool vlc_gl_surface_CheckSize(vlc_gl_t *gl, unsigned *restrict width, unsigned *restrict height)
Checks if the dimensions of the surface used by the OpenGL context have changed (since the previous c...
Definition: opengl.c:272
Video picture.
Definition: vlc_picture.h:120
int asprintf(char **, const char *,...)
void vout_SetInterlacingState(vout_thread_t *vout, vout_thread_private_t *sys, bool is_interlaced)
Definition: interlacing.c:156
int() var_Change(vlc_object_t *p_this, const char *psz_name, int i_action,...)
Performs a special action on a variable.
Definition: variables.c:423
int64_t i_int
Definition: vlc_common.h:459
void vout_snapshot_Set(vout_snapshot_t *, const video_format_t *, picture_t *)
It set the picture used to create the snapshots.
Definition: snapshot.c:133
Mutex.
Definition: vlc_threads.h:225
Definition: snapshot.h:58
long tv_nsec
Definition: vlc_fixups.h:445
picture_t *(* swap_offscreen)(vlc_gl_t *)
Definition: vlc_opengl.h:63
vlc_tick_t date
Definition: vout_private.h:39
struct vout_window_t * window
Window.
Definition: vlc_vout_display.h:95
static int vlc_gl_start(void *func, bool forced, va_list ap)
Definition: opengl.c:42
void(* swap)(vlc_gl_t *)
Definition: vlc_opengl.h:58
vlc_gl_t * vlc_gl_surface_Create(vlc_object_t *obj, const vout_window_cfg_t *cfg, struct vout_window_t **restrict wp)
Definition: opengl.c:203
static char * var_GetString(vlc_object_t *p_obj, const char *psz_name)
Get a string value.
Definition: vlc_variables.h:437
FILE * vlc_fopen(const char *filename, const char *mode)
Opens a FILE pointer.
Definition: filesystem.c:49
char * config_GetUserDir(vlc_userdir_t type)
Definition: specific.c:273
void filename_sanitize(char *str)
Sanitize a file name.
Definition: strings.c:915
vlc_mutex_t lock
Definition: snapshot.c:65
module_t * module
Definition: vlc_opengl.h:53
vout_snapshot_t * vout_snapshot_New(void)
Definition: snapshot.c:52
static int var_SetString(vlc_object_t *p_obj, const char *psz_name, const char *psz_string)
Set the value of a string variable.
Definition: vlc_variables.h:345
vlc_tick_t vlc_tick_now(void)
Precision monotonic clock.
Definition: thread.c:261
vlc_picture_chain_t pics
Definition: snapshot.c:70
time_t tv_sec
Definition: vlc_fixups.h:444
static int DeinterlaceCallback(vlc_object_t *object, char const *cmd, vlc_value_t oldval, vlc_value_t newval, void *data)
Definition: interlacing.c:64
void vout_window_Disable(vout_window_t *window)
Disables a window.
Definition: window.c:113
bool is_interlaced
Definition: vout_private.h:37
bool vout_snapshot_IsRequested(vout_snapshot_t *)
It tells if they are pending snapshot request.
Definition: snapshot.c:120
static void vlc_atomic_rc_inc(vlc_atomic_rc_t *rc)
Increment the RC.
Definition: vlc_atomic.h:52
#define TIME_UTC
Definition: vlc_fixups.h:253
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
@ VLC_PICTURES_DIR
Definition: vlc_configuration.h:318
char * format
Definition: snapshot.h:62
vlc_atomic_rc_t rc
Definition: opengl.c:57
User configuration for a video output display (vout_display_t)
Definition: vlc_vout_display.h:94
int timespec_get(struct timespec *, int)
Decoder context struct.
Definition: vlc_codec.h:566
int sequence
Definition: snapshot.h:60
void vlc_objres_clear(vlc_object_t *obj)
Releases all resources of an object.
Definition: objres.c:84
bool offscreen_vflip
Definition: vlc_opengl.h:70
vlc_fourcc_t offscreen_chroma_out
Definition: vlc_opengl.h:66
char * vout_snapshot_GetDirectory(void)
This function will return the directory used for snapshots.
Definition: snapshot.c:158
unsigned width
Intended pixel width of the window.
Definition: vlc_vout_window.h:168
static int var_SetBool(vlc_object_t *p_obj, const char *psz_name, bool b)
Set the value of an boolean variable.
Definition: vlc_variables.h:308
static char * var_CreateGetString(vlc_object_t *p_obj, const char *psz_name)
Create a string variable with inherit and get its value.
Definition: vlc_variables.h:562
Definition: vlc_opengl.h:49
unsigned height
Requested display pixel height (0 by default).
Definition: vlc_vout_display.h:100
char * psz_string
Definition: vlc_common.h:462
vlc_mutex_t lock
Definition: opengl.c:183
struct vlc_decoder_device * device
Definition: vlc_opengl.h:65
void vout_snapshot_End(vout_snapshot_t *snap)
Definition: snapshot.c:80
picture_t * vout_snapshot_Get(vout_snapshot_t *, vlc_tick_t timeout)
Definition: snapshot.c:94
struct vlc_gl_surface vlc_gl_surface_t
struct vout_thread_private_t::@128 interlacing
void(* destroy)(vlc_gl_t *)
Definition: vlc_opengl.h:78
VLC object common members.
Definition: vlc_objects.h:43
bool vout_snapshot_IsRequested(vout_snapshot_t *snap)
It tells if they are pending snapshot request.
Definition: snapshot.c:120
Configuration item.
Definition: vlc_configuration.h:76
#define VLC_UNUSED(x)
Definition: vlc_common.h:1105
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:472
char * strdup(const char *)
const struct vout_window_callbacks * cbs
Callbacks.
Definition: vlc_vout_window.h:315
vout_window_t * vout_window_New(vlc_object_t *obj, const char *module, const vout_window_owner_t *owner)
Creates a new window.
Definition: window.c:62
Window (desired) configuration.
Definition: vlc_vout_window.h:148
#define vlc_custom_create(o, s, n)
Definition: libvlc.h:117
#define VLC_TICK_FROM_SEC(sec)
Definition: vlc_tick.h:52
static bool var_GetBool(vlc_object_t *p_obj, const char *psz_name)
Get a boolean value.
Definition: vlc_variables.h:390
void vlc_mutex_lock(vlc_mutex_t *mtx)
Acquires a mutex.
Definition: threads.c:158
vlc_decoder_device * vlc_decoder_device_Hold(vlc_decoder_device *device)
Hold a decoder device.
Definition: decoder_helpers.c:204
const char name[16]
Definition: httpd.c:1268
int vout_window_Enable(vout_window_t *window, const vout_window_cfg_t *restrict cfg)
Definition: window.c:100
union module_config_t::@194 list
Possible choices.
void(* vout_window_ack_cb)(struct vout_window_t *, void *)
Callback prototype for window event acknowledgement.
Definition: vlc_vout_window.h:180
void vlc_gl_Release(vlc_gl_t *gl)
Definition: opengl.c:165
void vout_snapshot_Set(vout_snapshot_t *snap, const video_format_t *fmt, picture_t *picture)
It set the picture used to create the snapshots.
Definition: snapshot.c:133
Condition variable.
Definition: vlc_threads.h:349
vlc_cond_t wait
Definition: snapshot.c:66
picture_t * vout_snapshot_Get(vout_snapshot_t *snap, vlc_tick_t timeout)
Definition: snapshot.c:94
static bool vlc_picture_chain_IsEmpty(const vlc_picture_chain_t *chain)
Check whether a picture chain holds pictures or not.
Definition: vlc_picture.h:198
static int var_SetInteger(vlc_object_t *p_obj, const char *psz_name, int64_t i)
Set the value of an integer variable.
Definition: vlc_variables.h:293
void *(* get_proc_address)(vlc_gl_t *, const char *)
Definition: vlc_opengl.h:77
void vlc_gl_surface_Destroy(vlc_gl_t *gl)
Definition: opengl.c:294
Window event callbacks structure.
Definition: vlc_vout_window.h:197
static int64_t var_GetInteger(vlc_object_t *p_obj, const char *psz_name)
Get an integer value.
Definition: vlc_variables.h:374
uint16_t list_count
Choices count.
Definition: vlc_configuration.h:96
vlc_gl_api_type
Definition: vlc_opengl.h:44
int vout_snapshot_SaveImage(char **name, int *sequential, const block_t *image, vout_thread_t *p_vout, const vout_snapshot_save_cfg_t *cfg)
This function will write an image to the disk an return the file name created.
Definition: snapshot.c:163
Window callbacks and opaque data.
Definition: vlc_vout_window.h:314
const char ** psz
Table of possible string choices.
Definition: vlc_configuration.h:99
void vlc_gl_Hold(vlc_gl_t *gl)
Definition: opengl.c:159
struct tm * localtime_r(const time_t *, struct tm *)
static void vlc_gl_surface_ResizeNotify(vout_window_t *surface, unsigned width, unsigned height, vout_window_ack_cb cb, void *opaque)
Definition: opengl.c:186
#define vlc_object_delete(obj)
Definition: vlc_objects.h:136
bool is_available
Definition: snapshot.c:68
#define likely(p)
Predicted true condition.
Definition: vlc_common.h:218
char * path
Definition: snapshot.h:61
static bool DeinterlaceIsModeValid(const char *mode)
Definition: interlacing.c:55
Definition: vlc_fixups.h:443
uint8_t * p_buffer
Payload start.
Definition: vlc_block.h:121
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition: vlc_objects.h:70
int vlc_mutex_trylock(vlc_mutex_t *mtx)
Tries to acquire a mutex.
Definition: threads.c:178
Video output thread descriptor.
Definition: vlc_vout.h:55
void vlc_cond_init(vlc_cond_t *cond)
Initializes a condition variable.
Definition: threads.c:234
int(* make_current)(vlc_gl_t *)
Definition: vlc_opengl.h:74
int vlc_cond_timedwait(vlc_cond_t *cond, vlc_mutex_t *mutex, vlc_tick_t deadline)
Waits on a condition variable up to a certain date.
Definition: threads.c:349
static void vlc_atomic_rc_init(vlc_atomic_rc_t *rc)
Init the RC to 1.
Definition: vlc_atomic.h:46
Definition: snapshot.c:43
vout_snapshot_t * vout_snapshot_New(void)
Definition: snapshot.c:52
static picture_t * vlc_picture_chain_PopFront(vlc_picture_chain_t *chain)
Pop the front of a picture chain.
Definition: vlc_picture.h:218
VLC value structure.
Definition: vlc_common.h:457
void vlc_mutex_unlock(vlc_mutex_t *mtx)
Releases a mutex.
Definition: threads.c:209
unsigned height
Intended pixel height of the window.
Definition: vlc_vout_window.h:173
union vout_window_t::@279 display
Display server (mandatory)
Definition: vlc_atomic.h:41
Definition: vlc_block.h:117
#define msg_Err(p_this,...)
Definition: vlc_messages.h:102
enum vlc_gl_api_type api_type
Definition: vlc_opengl.h:106
void vout_snapshot_Destroy(vout_snapshot_t *)
Definition: snapshot.c:67
void * sys
Opaque data / private pointer for callbacks.
Definition: vlc_vout_window.h:316
struct vout_window_t * surface
Definition: vlc_opengl.h:60
unsigned width
Requested display pixel width (0 by default).
Definition: vlc_vout_display.h:99
vlc_gl_t gl
Definition: opengl.c:56
static void vlc_picture_chain_Init(vlc_picture_chain_t *chain)
Initializes or reset a picture chain.
Definition: vlc_picture.h:187