VLC  4.0.0-dev
interrupt.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * interrupt.h:
3  *****************************************************************************
4  * Copyright (C) 2015 RĂ©mi Denis-Courmont
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19  *****************************************************************************/
20 
21 /** @ingroup interrupt */
22 #ifndef LIBVLC_INPUT_SIGNAL_H
23 # define LIBVLC_INPUT_SIGNAL_H 1
24 
25 # include <stdatomic.h>
26 
27 # include <vlc_interrupt.h>
28 
31 
33 {
36  atomic_bool killed;
37  void (*callback)(void *);
38  void *data;
39 };
40 #endif
decoder_Destroy
void decoder_Destroy(decoder_t *p_dec)
Destroy a decoder and reset the structure.
Definition: decoder_helpers.c:70
video_format_t::i_bmask
uint32_t i_bmask
color masks for RGB chroma
Definition: vlc_es.h:369
vlc_mutex_init
void vlc_mutex_init(vlc_mutex_t *mtx)
Initializes a fast mutex.
Definition: threads.c:123
image_handler_t::pf_write
block_t *(* pf_write)(image_handler_t *, picture_t *, const video_format_t *, const video_format_t *)
Definition: vlc_image.h:46
count
size_t count
Definition: core.c:401
sout_EncoderCreate
#define sout_EncoderCreate(o, s)
Definition: vlc_sout.h:232
picture_fifo_Delete
void picture_fifo_Delete(picture_fifo_t *fifo)
It destroys a fifo created by picture_fifo_New.
Definition: picture_fifo.c:121
vlc_es.h
vlc_interrupt_sem
static void vlc_interrupt_sem(void *opaque)
Definition: interrupt.c:192
decoder_owner::p_image
image_handler_t * p_image
Definition: image.c:56
cookie_has_attribute
static bool cookie_has_attribute(const char *cookie, const char *attr)
Definition: httpcookies.c:70
VLC_CODEC_BPG
#define VLC_CODEC_BPG
Definition: vlc_fourcc.h:443
VIDEO_ES
@ VIDEO_ES
Definition: vlc_es.h:603
vlc_filter_operations::filter_video
picture_t *(* filter_video)(filter_t *, picture_t *)
Filter a picture (video filter)
Definition: vlc_filter.h:89
vlc_stream_Block
block_t * vlc_stream_Block(stream_t *s, size_t size)
Read data into a block.
Definition: stream.c:729
ImageReadUrl
static picture_t * ImageReadUrl(image_handler_t *, const char *, video_format_t *)
Definition: image.c:285
vlc_interrupt_forward_start
void vlc_interrupt_forward_start(vlc_interrupt_t *to, void *data[2])
Enables forwarding of interruption.
Definition: interrupt.c:256
picture_fifo_Pop
picture_t * picture_fifo_Pop(picture_fifo_t *fifo)
It retreives a picture_t from the fifo.
Definition: picture_fifo.c:75
vlc_stream_GetSize
static int vlc_stream_GetSize(stream_t *s, uint64_t *size)
Get the size of the stream.
Definition: vlc_stream.h:331
decoder_Init
void decoder_Init(decoder_t *p_dec, const es_format_t *restrict p_fmt)
Definition: decoder_helpers.c:37
es_format_t::video
video_format_t video
description of video format
Definition: vlc_es.h:646
vlc_sem_wait_i11e
int vlc_sem_wait_i11e(vlc_sem_t *sem)
Interruptible variant of vlc_sem_wait().
Definition: interrupt.c:197
vlc_cleanup_push
#define vlc_cleanup_push(routine, arg)
Registers a thread cancellation handler.
Definition: vlc_threads.h:1010
vlc_http.h
video_format_Copy
static int video_format_Copy(video_format_t *p_dst, const video_format_t *p_src)
Copy video_format_t including the palette.
Definition: vlc_es.h:415
strcasecmp
int strcasecmp(const char *, const char *)
psz_name
const char * psz_name
Definition: text_style.c:53
picture_GetVideoContext
static vlc_video_context * picture_GetVideoContext(picture_t *pic)
Definition: vlc_picture.h:160
CreateEncoder
static encoder_t * CreateEncoder(vlc_object_t *, const video_format_t *, const video_format_t *)
Definition: image.c:709
vlc_interrupt::data
void * data
Definition: interrupt.h:38
vlc_array_remove
static void vlc_array_remove(vlc_array_t *ar, size_t idx)
Definition: vlc_arrays.h:353
filter_t::vctx_in
vlc_video_context * vctx_in
Definition: vlc_filter.h:225
unlikely
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:227
vlc_interrupt_kill
void vlc_interrupt_kill(vlc_interrupt_t *ctx)
Marks the interruption context as "killed".
Definition: interrupt.c:177
vlc_common.h
vlc_sendmsg
ssize_t vlc_sendmsg(int fd, const struct msghdr *msg, int flags)
Sends a socket message.
Definition: filesystem.c:374
DeleteEncoder
static void DeleteEncoder(encoder_t *)
Definition: image.c:761
vlc_messages.h
vlc_interrupt_finish
static int vlc_interrupt_finish(vlc_interrupt_t *ctx)
Cleans up after an interruptible wait: waits for any pending invocations of the callback previously r...
Definition: interrupt.c:140
VLC_CODEC_RGB15
#define VLC_CODEC_RGB15
Definition: vlc_fourcc.h:343
filter_t::p_module
module_t * p_module
Definition: vlc_filter.h:220
video_format_t::i_y_offset
unsigned int i_y_offset
start offset of visible area
Definition: vlc_es.h:357
vlc_sendmsg_i11e
ssize_t vlc_sendmsg_i11e(int fd, const struct msghdr *msg, int flags)
Definition: interrupt.c:499
video_format_t::i_sar_num
unsigned int i_sar_num
sample/pixel aspect ratio
Definition: vlc_es.h:363
block_t::i_buffer
size_t i_buffer
Payload length.
Definition: vlc_block.h:122
vlc_interrupt.h
video_format_Clean
static void video_format_Clean(video_format_t *p_src)
Cleanup and free palette of this video_format_t.
Definition: vlc_es.h:469
module_need_var
#define module_need_var(a, b, c)
Definition: vlc_modules.h:123
pollfd::fd
int fd
Definition: vlc_fixups.h:419
CreateConverter
static filter_t * CreateConverter(vlc_object_t *, const es_format_t *, struct vlc_video_context *, const video_format_t *)
Definition: image.c:771
vlc_poll_i11e_wake
static void vlc_poll_i11e_wake(void *opaque)
Definition: interrupt.c:282
encoder_t::pf_encode_video
block_t *(* pf_encode_video)(encoder_t *, picture_t *)
Definition: vlc_codec.h:257
decoder_t::cbs
const struct decoder_owner_callbacks * cbs
Definition: vlc_codec.h:200
vlc_network.h
picture_Release
static void picture_Release(picture_t *picture)
Decrements the picture reference count.
Definition: vlc_picture.h:368
pollfd
Definition: vlc_fixups.h:417
decoder_t::pf_decode
int(* pf_decode)(decoder_t *, block_t *p_block)
Definition: vlc_codec.h:150
cookie_get_attribute_value
static char * cookie_get_attribute_value(const char *cookie, const char *attr)
Definition: httpcookies.c:47
filter_t::fmt_in
es_format_t fmt_in
Definition: vlc_filter.h:224
video_format_t
video format description
Definition: vlc_es.h:350
video_format_t::i_gmask
uint32_t i_gmask
Definition: vlc_es.h:369
vlc_array_append
static int vlc_array_append(vlc_array_t *ar, void *elem)
Definition: vlc_arrays.h:335
VLC_MALLOC
#define VLC_MALLOC
Heap allocated result function annotation.
Definition: vlc_common.h:167
msg_Dbg
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:106
vlc_http_cookies_fetch
char * vlc_http_cookies_fetch(vlc_http_cookie_jar_t *p_jar, bool secure, const char *host, const char *path)
Returns a cookie value that match the given URL.
Definition: httpcookies.c:351
es_format_Clean
void es_format_Clean(es_format_t *fmt)
This function will clean up a es_format_t and release all associated resources.
Definition: es_format.c:509
decoder_t
Definition: vlc_codec.h:101
vlc_stream_NewURL
#define vlc_stream_NewURL(a, b)
Definition: vlc_stream.h:422
psz_ext
const char psz_ext[7]
Definition: image.c:586
dec_get_owner
static struct decoder_owner * dec_get_owner(decoder_t *p_dec)
Definition: image.c:57
poll
int poll(struct pollfd *, unsigned, int)
vlc_ascii_strcasecmp
static int vlc_ascii_strcasecmp(const char *psz1, const char *psz2)
Compare two ASCII strings ignoring case.
Definition: vlc_strings.h:60
VLC_EGENERIC
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:474
ARRAY_SIZE
#define ARRAY_SIZE(x)
Definition: vlc_arrays.h:178
es_format_Init
void es_format_Init(es_format_t *fmt, int i_cat, vlc_fourcc_t i_codec)
This function will initialize a es_format_t structure.
Definition: es_format.c:409
video_format_t::transfer
video_transfer_func_t transfer
transfer function
Definition: vlc_es.h:373
vlc_mwait_i11e
int vlc_mwait_i11e(vlc_tick_t deadline)
Interruptible variant of vlc_tick_wait().
Definition: interrupt.c:225
vlc_interrupt_unregister
int vlc_interrupt_unregister(void)
Definition: interrupt.c:166
es_format_InitFromVideo
void es_format_InitFromVideo(es_format_t *p_es, const video_format_t *p_fmt)
This function will initialize a es_format_t structure from a video_format_t.
Definition: es_format.c:430
cookie_path_matches
static bool cookie_path_matches(const http_cookie_t *cookie, const char *uripath)
Definition: httpcookies.c:139
VLC_CODEC_PNM
#define VLC_CODEC_PNM
Definition: vlc_fourcc.h:451
vlc_read_i11e
ssize_t vlc_read_i11e(int fd, void *buf, size_t count)
Wrapper for read() that returns the EINTR error upon VLC I/O interruption.
Definition: interrupt.c:449
vlc_write_i11e
ssize_t vlc_write_i11e(int fd, const void *buf, size_t count)
Wrapper for write() that returns the EINTR error upon VLC I/O interruption.
Definition: interrupt.c:462
image_Type2Fourcc
vlc_fourcc_t image_Type2Fourcc(const char *)
Definition: image.c:613
cookie_domain_matches
static bool cookie_domain_matches(const http_cookie_t *cookie, const char *host)
Definition: httpcookies.c:104
picture_t
Video picture.
Definition: vlc_picture.h:120
asprintf
int asprintf(char **, const char *,...)
vlc_cond_signal
void vlc_cond_signal(vlc_cond_t *cond)
Wakes up one thread waiting on a condition variable.
Definition: threads.c:253
video_format_FixRgb
void video_format_FixRgb(video_format_t *p_fmt)
This function will fill all RGB shift from RGB masks.
Definition: es_format.c:37
vlc_mutex_t
Mutex.
Definition: vlc_threads.h:225
video_format_t::primaries
video_color_primaries_t primaries
color primaries
Definition: vlc_es.h:372
VLCDEC_SUCCESS
#define VLCDEC_SUCCESS
Definition: vlc_codec.h:126
strndup
char * strndup(const char *, size_t)
CreateDecoder
static decoder_t * CreateDecoder(image_handler_t *, const es_format_t *)
Definition: image.c:671
image_HandlerCreate
image_handler_t * image_HandlerCreate(vlc_object_t *p_this)
Create an image_handler_t instance.
Definition: image.c:93
filter_t::fmt_out
es_format_t fmt_out
Definition: vlc_filter.h:228
vlc_http_cookies_store
bool vlc_http_cookies_store(vlc_http_cookie_jar_t *p_jar, const char *cookies, const char *host, const char *path)
Parse a value of an incoming Set-Cookie header and append the cookie to the cookie jar if appropriate...
Definition: httpcookies.c:296
video_format_t::i_frame_rate
unsigned int i_frame_rate
frame rate numerator
Definition: vlc_es.h:366
video_format_t::space
video_color_space_t space
YCbCr color space.
Definition: vlc_es.h:374
vlc_http_cookies_new
vlc_http_cookie_jar_t * vlc_http_cookies_new(void)
Definition: httpcookies.c:271
cookie_default_path
static char * cookie_default_path(const char *request_path)
Definition: httpcookies.c:162
msg_Warn
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:104
cookie_get_domain
static char * cookie_get_domain(const char *cookie)
Definition: httpcookies.c:90
filter_Close
static void filter_Close(filter_t *p_filter)
Definition: vlc_filter.h:244
decoder_t::p_module
module_t * p_module
Definition: vlc_codec.h:106
ImageWriteUrl
static int ImageWriteUrl(image_handler_t *, picture_t *, const video_format_t *, const video_format_t *, const char *)
Definition: image.c:464
vlc_assert_unreachable
#define vlc_assert_unreachable()
Impossible branch assertion.
Definition: vlc_common.h:253
picture_fifo_New
picture_fifo_t * picture_fifo_New(void)
It creates an empty picture_fifo_t.
Definition: picture_fifo.c:58
vlc_array_t
Definition: vlc_arrays.h:258
vlc_fopen
FILE * vlc_fopen(const char *filename, const char *mode)
Opens a FILE pointer.
Definition: filesystem.c:49
vlc_savecancel
int vlc_savecancel(void)
Disables thread cancellation.
Definition: thread.c:183
VLC_CODEC_PGM
#define VLC_CODEC_PGM
Definition: vlc_fourcc.h:439
interrupt.h
decoder_owner_callbacks
Definition: vlc_codec.h:47
video_format_t::i_width
unsigned int i_width
picture width
Definition: vlc_es.h:354
VLC_CODEC_PCX
#define VLC_CODEC_PCX
Definition: vlc_fourcc.h:452
vlc_tick_now
vlc_tick_t vlc_tick_now(void)
Precision monotonic clock.
Definition: thread.c:261
COLOR_PRIMARIES_UNDEF
@ COLOR_PRIMARIES_UNDEF
Definition: vlc_es.h:268
VLC_CODEC_RGB32
#define VLC_CODEC_RGB32
Definition: vlc_fourcc.h:349
http_cookie_t
struct http_cookie_t http_cookie_t
video_format_t::i_x_offset
unsigned int i_x_offset
start offset of visible area
Definition: vlc_es.h:356
vlc_array_count
static size_t vlc_array_count(vlc_array_t *p_array)
Definition: vlc_arrays.h:277
filter_t
Structure describing a filter.
Definition: vlc_filter.h:215
es_format_t
Definition: vlc_es.h:617
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
vlc_mwait_i11e_wake
static void vlc_mwait_i11e_wake(void *opaque)
Definition: interrupt.c:212
POLLOUT
#define POLLOUT
Definition: vlc_fixups.h:415
image_handler_t::p_converter
filter_t * p_converter
Definition: vlc_image.h:59
vlc_strings.h
vlc_filter.h
es_format_t::i_cat
enum es_format_category_e i_cat
ES category.
Definition: vlc_es.h:619
vlc_interrupt_cleanup
static void vlc_interrupt_cleanup(void *opaque)
Definition: interrupt.c:172
vlc_strerror_c
const char * vlc_strerror_c(int errnum)
Definition: error.c:34
vlc_decoder_device
Decoder context struct.
Definition: vlc_codec.h:566
decoder_t::fmt_in
es_format_t fmt_in
Definition: vlc_codec.h:110
vlc_interrupt_deinit
void vlc_interrupt_deinit(vlc_interrupt_t *)
Deinitializes an interruption context.
Definition: interrupt.c:71
VLC_CODEC_PNG
#define VLC_CODEC_PNG
Definition: vlc_fourcc.h:437
filter_t::ops
const struct vlc_filter_operations * ops
Definition: vlc_filter.h:238
VLC_CODEC_SVG
#define VLC_CODEC_SVG
Definition: vlc_fourcc.h:449
vlc_close
int vlc_close(int fd)
Closes a file descriptor.
Definition: filesystem.c:91
vlc_interrupt::lock
vlc_mutex_t lock
Definition: interrupt.h:34
encoder_t
Definition: vlc_codec.h:242
pollfd::events
short events
Definition: vlc_fixups.h:420
recvmsg
ssize_t recvmsg(int, struct msghdr *, int)
vlc_interrupt_var
static thread_local vlc_interrupt_t * vlc_interrupt_var
Definition: interrupt.c:46
decoder_owner_callbacks::video
struct decoder_owner_callbacks::@182::@184 video
vlc_interrupt_deinit
void vlc_interrupt_deinit(vlc_interrupt_t *ctx)
Deinitializes an interruption context.
Definition: interrupt.c:71
VLC_CODEC_PGMYUV
#define VLC_CODEC_PGMYUV
Definition: vlc_fourcc.h:440
stream_t
stream_t definition
Definition: vlc_stream.h:46
VLC_CODEC_GIF
#define VLC_CODEC_GIF
Definition: vlc_fourcc.h:447
vlc_killed
bool vlc_killed(void)
Checks if the interruption context was "killed".
Definition: interrupt.c:185
block_t::i_pts
vlc_tick_t i_pts
Definition: vlc_block.h:129
ImageRead
static picture_t * ImageRead(image_handler_t *, block_t *, const es_format_t *, video_format_t *)
Definition: image.c:141
ImageQueueVideo
static void ImageQueueVideo(decoder_t *p_dec, picture_t *p_pic)
Read an image.
Definition: image.c:135
vlc_cleanup_pop
#define vlc_cleanup_pop()
Unregisters the last cancellation handler.
Definition: vlc_threads.h:1018
encoder_t::fmt_in
es_format_t fmt_in
Definition: vlc_codec.h:251
POLLIN
#define POLLIN
Definition: vlc_fixups.h:414
psz_mime
const char * psz_mime
Definition: image.c:634
image_HandlerDelete
void image_HandlerDelete(image_handler_t *p_image)
Delete the image_handler_t instance.
Definition: image.c:116
vlc_interrupt_create
vlc_interrupt_t * vlc_interrupt_create(void)
Creates an interruption context.
Definition: interrupt.c:59
vlc_tick_wait
#define vlc_tick_wait(d)
Definition: vlc_threads.h:903
vlc_ascii_strncasecmp
static int vlc_ascii_strncasecmp(const char *psz1, const char *psz2, size_t n)
Definition: vlc_strings.h:75
vlc_interrupt
Definition: interrupt.h:32
video_format_t::i_visible_height
unsigned int i_visible_height
height of visible area
Definition: vlc_es.h:359
decoder_owner
Definition: image.c:51
image_handler_t::pf_convert
picture_t *(* pf_convert)(image_handler_t *, picture_t *, const video_format_t *, video_format_t *)
Definition: vlc_image.h:52
cookie_parse
static http_cookie_t * cookie_parse(const char *value, const char *host, const char *path)
Definition: httpcookies.c:198
container_of
#define container_of(ptr, type, member)
Definition: vlc_common.h:1140
video_format_t::i_sar_den
unsigned int i_sar_den
Definition: vlc_es.h:364
vlc_fs.h
vlc_sout.h
decoder_t::fmt_out
es_format_t fmt_out
Definition: vlc_codec.h:113
vlc_interrupt::interrupted
bool interrupted
Definition: interrupt.h:35
vlc_video_context
Definition: decoder_helpers.c:228
vlc_restorecancel
void vlc_restorecancel(int state)
Restores the cancellation state.
Definition: thread.c:193
picture_fifo_Push
void picture_fifo_Push(picture_fifo_t *fifo, picture_t *picture)
It saves a picture_t into the fifo.
Definition: picture_fifo.c:69
vlc_readv_i11e
ssize_t vlc_readv_i11e(int fd, struct iovec *iov, int count)
Wrapper for readv() that returns the EINTR error upon VLC I/O interruption.
Definition: interrupt.c:414
image_Ext2Fourcc
vlc_fourcc_t image_Ext2Fourcc(const char *)
Definition: image.c:622
vlc_sem_wait
void vlc_sem_wait(vlc_sem_t *sem)
Waits on a semaphore.
Definition: threads.c:463
vlc_interrupt_set
vlc_interrupt_t * vlc_interrupt_set(vlc_interrupt_t *newctx)
Sets the interruption context for the calling thread.
Definition: interrupt.c:98
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
vlc_interrupt_raise
void vlc_interrupt_raise(vlc_interrupt_t *ctx)
Raises an interruption through a specified context.
Definition: interrupt.c:83
vlc_interrupt::killed
atomic_bool killed
Definition: interrupt.h:36
vlc_mwait_i11e_cleanup
static void vlc_mwait_i11e_cleanup(void *opaque)
Definition: interrupt.c:217
vlc_array_init
static void vlc_array_init(vlc_array_t *p_array)
Definition: vlc_arrays.h:264
VLC_UNUSED
#define VLC_UNUSED(x)
Definition: vlc_common.h:1105
vlc_recvfrom_i11e
ssize_t vlc_recvfrom_i11e(int fd, void *buf, size_t len, int flags, struct sockaddr *addr, socklen_t *addrlen)
Definition: interrupt.c:482
vlc_stream.h
vlc_sem_t
Semaphore.
Definition: vlc_threads.h:449
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:472
vlc_array_clear
static void vlc_array_clear(vlc_array_t *p_array)
Definition: vlc_arrays.h:270
COLOR_SPACE_UNDEF
@ COLOR_SPACE_UNDEF
Definition: vlc_es.h:313
vlc_interrupt_forward_wake
static void vlc_interrupt_forward_wake(void *opaque)
Definition: interrupt.c:246
video_format_t::i_visible_width
unsigned int i_visible_width
width of visible area
Definition: vlc_es.h:358
strdup
char * strdup(const char *)
vlc_interrupt_forward_stop
int vlc_interrupt_forward_stop(void *const data[2])
Undoes vlc_interrupt_forward_start().
Definition: interrupt.c:270
vlc_pipe
int vlc_pipe(int fds[2])
Creates a pipe (see "man pipe" for further reference).
Definition: filesystem.c:275
VLC_USED
#define VLC_USED
Definition: fourcc_gen.c:32
vlc_custom_create
#define vlc_custom_create(o, s, n)
Definition: libvlc.h:117
DeleteConverter
static void DeleteConverter(filter_t *)
Definition: image.c:803
es_format_t::i_codec
vlc_fourcc_t i_codec
FOURCC value as used in vlc.
Definition: vlc_es.h:620
image_handler_t
Definition: vlc_image.h:39
vlc_http_cookies_destroy
void vlc_http_cookies_destroy(vlc_http_cookie_jar_t *p_jar)
Definition: httpcookies.c:283
vlc_mutex_lock
void vlc_mutex_lock(vlc_mutex_t *mtx)
Acquires a mutex.
Definition: threads.c:158
vlc_poll_i11e_inner
static int vlc_poll_i11e_inner(struct pollfd *restrict fds, unsigned nfds, int timeout, vlc_interrupt_t *ctx, struct pollfd *restrict ufd)
Definition: interrupt.c:304
image_handler_t::outfifo
picture_fifo_t * outfifo
Definition: vlc_image.h:61
VLC_FOURCC
#define VLC_FOURCC(a, b, c, d)
Definition: fourcc_gen.c:37
vlc_array_item_at_index
#define vlc_array_item_at_index(ar, idx)
Definition: vlc_arrays.h:283
vlc_cond_t
Condition variable.
Definition: vlc_threads.h:349
vlc_interrupt::callback
void(* callback)(void *)
Definition: interrupt.h:37
encoder_t::fmt_out
es_format_t fmt_out
Definition: vlc_codec.h:255
encoder_t::p_module
module_t * p_module
Definition: vlc_codec.h:247
vlc_sem_post
int vlc_sem_post(vlc_sem_t *sem)
Increments the value of a semaphore.
Definition: threads.c:447
TRANSFER_FUNC_UNDEF
@ TRANSFER_FUNC_UNDEF
Definition: vlc_es.h:290
vlc_poll_i11e
int vlc_poll_i11e(struct pollfd *fds, unsigned nfds, int timeout)
Interruptible variant of poll().
Definition: interrupt.c:367
image_handler_t::pf_read_url
picture_t *(* pf_read_url)(image_handler_t *, const char *, video_format_t *)
Definition: vlc_image.h:44
VLC_CODEC_JPEG
#define VLC_CODEC_JPEG
Definition: vlc_fourcc.h:442
video_format_t::i_height
unsigned int i_height
picture height
Definition: vlc_es.h:355
ImageWrite
static block_t * ImageWrite(image_handler_t *, picture_t *, const video_format_t *, const video_format_t *)
Write an image.
Definition: image.c:367
VLC_CODEC_TIFF
#define VLC_CODEC_TIFF
Definition: vlc_fourcc.h:446
vlc_image.h
image_handler_t::pf_write_url
int(* pf_write_url)(image_handler_t *, picture_t *, const video_format_t *, const video_format_t *, const char *)
Definition: vlc_image.h:48
vlc_stream_Delete
void vlc_stream_Delete(stream_t *s)
Destroy a stream.
Definition: stream.c:133
image_handler_t::p_enc
encoder_t * p_enc
Definition: vlc_image.h:58
cookie_should_be_sent
static bool cookie_should_be_sent(const http_cookie_t *cookie, bool secure, const char *host, const char *path)
Definition: httpcookies.c:153
video_format_t::i_frame_rate_base
unsigned int i_frame_rate_base
frame rate denominator
Definition: vlc_es.h:367
VLC_CODEC_BMP
#define VLC_CODEC_BMP
Definition: vlc_fourcc.h:445
vlc_writev_i11e
ssize_t vlc_writev_i11e(int fd, const struct iovec *iov, int count)
Wrapper for writev() that returns the EINTR error upon VLC I/O interruption.
Definition: interrupt.c:433
i_codec
vlc_fourcc_t i_codec
Definition: image.c:585
libvlc.h
block_t::i_dts
vlc_tick_t i_dts
Definition: vlc_block.h:130
stream_MimeType
static char * stream_MimeType(stream_t *s)
Get the mime-type of a stream.
Definition: vlc_stream.h:375
video_format_t::i_rmask
uint32_t i_rmask
Definition: vlc_es.h:369
VLC_CODEC_TARGA
#define VLC_CODEC_TARGA
Definition: vlc_fourcc.h:448
image_handler_t::p_parent
vlc_object_t * p_parent
Definition: vlc_image.h:56
vlc_object_delete
#define vlc_object_delete(obj)
Definition: vlc_objects.h:136
vlc_poll_i11e_cleanup
static void vlc_poll_i11e_cleanup(void *opaque)
Definition: interrupt.c:293
likely
#define likely(p)
Predicted true condition.
Definition: vlc_common.h:218
vlc_interrupt_register
void vlc_interrupt_register(void(*cb)(void *), void *opaque)
Registers a custom interrupt handler.
Definition: interrupt.c:159
picture_Hold
static picture_t * picture_Hold(picture_t *picture)
Increments the picture reference count.
Definition: vlc_picture.h:355
image_handler_t::pf_read
picture_t *(* pf_read)(image_handler_t *, block_t *, const es_format_t *, video_format_t *)
Definition: vlc_image.h:41
block_t::p_buffer
uint8_t * p_buffer
Payload start.
Definition: vlc_block.h:121
image_get_device
static vlc_decoder_device * image_get_device(decoder_t *p_dec)
Definition: image.c:665
BitMapFormatIsSimilar
static bool BitMapFormatIsSimilar(const video_format_t *f1, const video_format_t *f2)
Definition: image.c:340
video_format_t::i_chroma
vlc_fourcc_t i_chroma
picture chroma
Definition: vlc_es.h:352
picture_HasChainedPics
static bool picture_HasChainedPics(const picture_t *pic)
Check whether a picture has other pictures linked.
Definition: vlc_picture.h:168
vlc_codec.h
vlc_interrupt_init
void vlc_interrupt_init(vlc_interrupt_t *ctx)
Initializes an interruption context.
Definition: interrupt.c:51
VLC_CODEC_RGB24
#define VLC_CODEC_RGB24
Definition: vlc_fourcc.h:347
vlc_accept
int vlc_accept(int lfd, struct sockaddr *addr, socklen_t *alen, bool nonblock)
Accepts an inbound connection request on a listening socket.
Definition: filesystem.c:345
vlc_recvmsg_i11e
ssize_t vlc_recvmsg_i11e(int fd, struct msghdr *msg, int flags)
Definition: interrupt.c:468
ext_table
static const struct @70 ext_table[]
Misc functions.
vlc_cond_init
void vlc_cond_init(vlc_cond_t *cond)
Initializes a condition variable.
Definition: threads.c:234
VLC_CODEC_PPM
#define VLC_CODEC_PPM
Definition: vlc_fourcc.h:438
vlc_sendto_i11e
ssize_t vlc_sendto_i11e(int fd, const void *buf, size_t len, int flags, const struct sockaddr *addr, socklen_t addrlen)
Definition: interrupt.c:512
ImageConvert
static picture_t * ImageConvert(image_handler_t *, picture_t *, const video_format_t *, video_format_t *)
Convert an image to a different format.
Definition: image.c:512
vlc_alloc
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:1144
VLC_CODEC_JPEGLS
#define VLC_CODEC_JPEGLS
Definition: vlc_fourcc.h:444
vlc_cond_timedwait
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
cookie_get_path
static char * cookie_get_path(const char *cookie)
Definition: httpcookies.c:134
module_unneed
#define module_unneed(a, b)
Definition: vlc_modules.h:126
vlc_interrupt_destroy
void vlc_interrupt_destroy(vlc_interrupt_t *ctx)
Destroys an interrupt context.
Definition: interrupt.c:76
vlc_meta.h
image_Mime2Fourcc
vlc_fourcc_t image_Mime2Fourcc(const char *psz_mime)
Definition: image.c:657
block_Release
void block_Release(block_t *block)
Releases a block.
Definition: block.c:135
vlc_mutex_unlock
void vlc_mutex_unlock(vlc_mutex_t *mtx)
Releases a mutex.
Definition: threads.c:209
es_format_Copy
int es_format_Copy(es_format_t *restrict dst, const es_format_t *src)
Definition: es_format.c:436
block_t
Definition: vlc_block.h:117
msg_Err
#define msg_Err(p_this,...)
Definition: vlc_messages.h:102
mime_table
static const struct @71 mime_table[]
decoder_owner::dec
decoder_t dec
Definition: image.c:55
vlc_testcancel
void vlc_testcancel(void)
Issues an explicit deferred cancellation point.
Definition: thread.c:201
vlc_interrupt_prepare
static void vlc_interrupt_prepare(vlc_interrupt_t *ctx, void(*cb)(void *), void *data)
Prepares to enter interruptible wait.
Definition: interrupt.c:113
image_handler_t::p_dec
decoder_t * p_dec
Definition: vlc_image.h:57
vlc_accept_i11e
int vlc_accept_i11e(int fd, struct sockaddr *addr, socklen_t *addrlen, bool blocking)
Definition: interrupt.c:526
module_need
#define module_need(a, b, c, d)
Definition: vlc_modules.h:111
cookie_destroy
static void cookie_destroy(http_cookie_t *cookie)
Definition: httpcookies.c:187
VLC_CODEC_RGB16
#define VLC_CODEC_RGB16
Definition: vlc_fourcc.h:345
vlc_fourcc_t
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:33
p
#define p(t)
vlc_modules.h