Go to the documentation of this file.
22 #ifndef LIBVLC_INPUT_SIGNAL_H
23 # define LIBVLC_INPUT_SIGNAL_H 1
static picture_t * ImageRead(image_handler_t *, block_t *, const video_format_t *, video_format_t *)
Definition: image.c:131
block_t *(* pf_write)(image_handler_t *, picture_t *, const video_format_t *, const video_format_t *)
Definition: vlc_image.h:45
int(* pf_vout_format_update)(decoder_t *)
Definition: vlc_codec.h:150
size_t count
Definition: core.c:461
ssize_t vlc_recvfrom_i11e(int fd, void *buf, size_t len, int flags, struct sockaddr *addr, socklen_t *addrlen)
Definition: interrupt.c:485
void picture_fifo_Delete(picture_fifo_t *fifo)
It destroys a fifo created by picture_fifo_New.
Definition: picture_fifo.c:139
static void vlc_interrupt_sem(void *opaque)
Definition: interrupt.c:193
FILE * vlc_fopen(const char *filename, const char *mode)
Opens a FILE pointer.
Definition: filesystem.c:46
static bool cookie_has_attribute(const char *cookie, const char *attr)
Definition: httpcookies.c:71
#define VLC_CODEC_BPG
Definition: vlc_fourcc.h:390
picture_t * picture_Hold(picture_t *p_picture)
This function will increase the picture reference count.
Definition: picture.c:290
char * psz_domain
Definition: httpcookies.c:62
picture_t *(* pf_vout_buffer_new)(decoder_t *)
Definition: vlc_codec.h:151
picture_t * picture_fifo_Pop(picture_fifo_t *fifo)
It retreives a picture_t from the fifo.
Definition: picture_fifo.c:84
static int vlc_stream_GetSize(stream_t *s, uint64_t *size)
Get the size of the stream.
Definition: vlc_stream.h:313
void vlc_restorecancel(int state)
Restores the cancellation state.
Definition: thread.c:323
#define vlc_cleanup_push(routine, arg)
Registers a thread cancellation handler.
Definition: vlc_threads.h:975
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:392
int strcasecmp(const char *, const char *)
static const struct @50 mime_table[]
static encoder_t * CreateEncoder(vlc_object_t *, const video_format_t *, const video_format_t *)
Definition: image.c:716
void * data
Definition: interrupt.h:36
static int video_update_format(decoder_t *p_dec)
Definition: image.c:660
struct filter_owner_t::@166::@168 video
static void vlc_array_remove(vlc_array_t *ar, size_t idx)
Definition: vlc_arrays.h:333
void vlc_interrupt_raise(vlc_interrupt_t *ctx)
Raises an interruption through a specified context.
Definition: interrupt.c:84
static void DeleteEncoder(encoder_t *)
Definition: image.c:785
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:141
#define VLC_CODEC_RGB15
Definition: vlc_fourcc.h:319
module_t * p_module
Definition: vlc_filter.h:70
ssize_t vlc_recvmsg_i11e(int fd, struct msghdr *msg, int flags)
Definition: interrupt.c:471
filter_t * p_filter
Definition: vlc_image.h:58
#define sout_EncoderCreate(o)
Definition: vlc_sout.h:266
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:515
size_t i_buffer
Payload length.
Definition: vlc_block.h:116
int vlc_pipe(int fds[2])
Creates a pipe (see "man pipe" for further reference).
Definition: filesystem.c:263
static void video_format_Clean(video_format_t *p_src)
Cleanup and free palette of this video_format_t.
Definition: vlc_es.h:438
vlc_mutex_t lock
Definition: httpcookies.c:269
mtime_t i_dts
Definition: vlc_block.h:124
int(* pf_decode)(decoder_t *, block_t *p_block)
Definition: vlc_codec.h:96
int fd
Definition: vlc_fixups.h:416
static void vlc_poll_i11e_wake(void *opaque)
Definition: interrupt.c:287
char * psz_value
Definition: httpcookies.c:61
void vlc_interrupt_destroy(vlc_interrupt_t *ctx)
Destroys an interrupt context.
Definition: interrupt.c:77
bool b_host_only
Definition: httpcookies.c:64
Definition: vlc_fixups.h:414
static char * cookie_get_attribute_value(const char *cookie, const char *attr)
Definition: httpcookies.c:48
es_format_t fmt_in
Definition: vlc_filter.h:74
int vlc_sem_post(vlc_sem_t *sem)
Increments the value of a semaphore.
Definition: thread.c:343
vlc_array_t cookies
Definition: httpcookies.c:268
static int vlc_array_append(vlc_array_t *ar, void *elem)
Definition: vlc_arrays.h:315
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:86
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:353
Definition: vlc_codec.h:55
#define vlc_stream_NewURL(a, b)
Definition: vlc_stream.h:404
const char psz_ext[7]
Definition: image.c:581
static picture_t * ImageReadUrl(image_handler_t *, const char *, video_format_t *, video_format_t *)
Definition: image.c:273
static filter_t * CreateFilter(vlc_object_t *, const es_format_t *, const video_format_t *)
Definition: image.c:801
int poll(struct pollfd *, unsigned, int)
static int vlc_ascii_strcasecmp(const char *psz1, const char *psz2)
Compare two ASCII strings ignoring case.
Definition: vlc_strings.h:57
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:350
#define ARRAY_SIZE(x)
Definition: vlc_arrays.h:162
int vlc_poll_i11e(struct pollfd *fds, unsigned nfds, int timeout)
Interruptible variant of poll().
Definition: interrupt.c:372
void picture_Release(picture_t *p_picture)
This function will release a picture.
Definition: picture.c:300
void vlc_cond_signal(vlc_cond_t *p_condvar)
Wakes up one thread waiting on a condition variable.
Definition: thread.c:256
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:417
block_t *(* pf_encode_video)(encoder_t *, picture_t *)
Definition: vlc_codec.h:225
static bool cookie_path_matches(const http_cookie_t *cookie, const char *uripath)
Definition: httpcookies.c:140
#define VLC_CODEC_PNM
Definition: vlc_fourcc.h:398
#define CALLBACK(name, cb)
Definition: var.c:89
pthread_cond_t vlc_cond_t
Condition variable.
Definition: vlc_threads.h:279
vlc_fourcc_t image_Type2Fourcc(const char *)
Definition: image.c:608
static bool cookie_domain_matches(const http_cookie_t *cookie, const char *host)
Definition: httpcookies.c:105
Video picture.
Definition: vlc_picture.h:68
int asprintf(char **, const char *,...)
mtime_t i_pts
Definition: vlc_block.h:123
#define VLCDEC_SUCCESS
Definition: vlc_codec.h:72
static const struct @49 ext_table[]
Misc functions.
char * strndup(const char *, size_t)
image_handler_t * image_HandlerCreate(vlc_object_t *p_this)
Create an image_handler_t instance.
Definition: image.c:82
static void DeleteFilter(filter_t *)
Definition: image.c:830
es_format_t fmt_out
Definition: vlc_filter.h:77
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:298
bool vlc_killed(void)
Checks if the interruption context was "killed".
Definition: interrupt.c:186
vlc_http_cookie_jar_t * vlc_http_cookies_new(void)
Definition: httpcookies.c:272
static char * cookie_default_path(const char *request_path)
Definition: httpcookies.c:163
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:84
static char * cookie_get_domain(const char *cookie)
Definition: httpcookies.c:91
module_t * p_module
Definition: vlc_codec.h:60
picture_fifo_t * picture_fifo_New(void)
It creates an empty picture_fifo_t.
Definition: picture_fifo.c:67
int vlc_close(int fd)
Closes a file descriptor.
Definition: filesystem.c:88
Definition: vlc_arrays.h:238
#define vlc_object_release(a)
Definition: vlc_objects.h:63
#define VLC_CODEC_PGM
Definition: vlc_fourcc.h:386
void vlc_interrupt_register(void(*cb)(void *), void *opaque)
Registers a custom interrupt handler.
Definition: interrupt.c:160
#define VLC_CODEC_PCX
Definition: vlc_fourcc.h:399
void vlc_interrupt_kill(vlc_interrupt_t *ctx)
Marks the interruption context as "killed".
Definition: interrupt.c:178
Definition: httpcookies.c:38
#define VLC_CODEC_RGB32
Definition: vlc_fourcc.h:325
void vlc_testcancel(void)
Issues an explicit deferred cancellation point.
Definition: thread.c:331
struct http_cookie_t http_cookie_t
int vlc_interrupt_unregister(void)
Definition: interrupt.c:167
static size_t vlc_array_count(vlc_array_t *p_array)
Definition: vlc_arrays.h:257
Structure describing a filter.
Definition: vlc_filter.h:65
static void vlc_mwait_i11e_wake(void *opaque)
Definition: interrupt.c:213
#define POLLOUT
Definition: vlc_fixups.h:412
static void vlc_interrupt_cleanup(void *opaque)
Definition: interrupt.c:173
picture_t *(* pf_read_url)(image_handler_t *, const char *, video_format_t *, video_format_t *)
Definition: vlc_image.h:43
static decoder_t * CreateDecoder(vlc_object_t *, const video_format_t *)
Definition: image.c:671
es_format_t fmt_in
Definition: vlc_codec.h:64
void vlc_interrupt_deinit(vlc_interrupt_t *)
Deinitializes an interruption context.
Definition: interrupt.c:71
void * p_queue_ctx
Definition: vlc_codec.h:186
#define VLC_CODEC_PNG
Definition: vlc_fourcc.h:384
static void block_Release(block_t *block)
Releases a block.
Definition: vlc_block.h:181
vlc_interrupt_t * vlc_interrupt_set(vlc_interrupt_t *newctx)
Sets the interruption context for the calling thread.
Definition: interrupt.c:99
#define VLC_CODEC_SVG
Definition: vlc_fourcc.h:396
vlc_mutex_t lock
Definition: interrupt.h:32
Definition: vlc_codec.h:211
short events
Definition: vlc_fixups.h:417
ssize_t recvmsg(int, struct msghdr *, int)
void vlc_sem_wait(vlc_sem_t *sem)
Waits on a semaphore.
Definition: thread.c:357
static thread_local vlc_interrupt_t * vlc_interrupt_var
Definition: interrupt.c:46
const char * psz_name
Definition: vlc_codecs.h:315
int(* pf_queue_video)(decoder_t *, picture_t *)
Definition: vlc_codec.h:179
static picture_t * filter_new_picture(filter_t *p_filter)
Definition: image.c:796
void vlc_mutex_init(vlc_mutex_t *p_mutex)
Initializes a fast mutex.
Definition: thread.c:85
void vlc_interrupt_deinit(vlc_interrupt_t *ctx)
Deinitializes an interruption context.
Definition: interrupt.c:71
#define VLC_CODEC_PGMYUV
Definition: vlc_fourcc.h:387
stream_t definition
Definition: vlc_stream.h:46
#define VLC_CODEC_GIF
Definition: vlc_fourcc.h:394
#define vlc_cleanup_pop()
Unregisters the last cancellation handler.
Definition: vlc_threads.h:983
es_format_t fmt_in
Definition: vlc_codec.h:220
#define POLLIN
Definition: vlc_fixups.h:411
const char * psz_mime
Definition: image.c:629
void image_HandlerDelete(image_handler_t *p_image)
Delete the image_handler_t instance.
Definition: image.c:105
static int vlc_ascii_strncasecmp(const char *psz1, const char *psz2, size_t n)
Definition: vlc_strings.h:72
Definition: interrupt.h:30
picture_t *(* pf_convert)(image_handler_t *, picture_t *, const video_format_t *, video_format_t *)
Definition: vlc_image.h:51
static http_cookie_t * cookie_parse(const char *value, const char *host, const char *path)
Definition: httpcookies.c:199
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:465
Definition: httpcookies.c:266
es_format_t fmt_out
Definition: vlc_codec.h:67
bool interrupted
Definition: interrupt.h:33
ssize_t sendmsg(int, const struct msghdr *, int)
void picture_fifo_Push(picture_fifo_t *fifo, picture_t *picture)
It saves a picture_t into the fifo.
Definition: picture_fifo.c:78
#define likely(p)
Definition: vlc_common.h:113
vlc_fourcc_t image_Ext2Fourcc(const char *)
Definition: image.c:617
The main vlc_object_t structure.
Definition: vlc_objects.h:39
int vlc_savecancel(void)
Disables thread cancellation.
Definition: thread.c:313
block_t * vlc_stream_Block(stream_t *s, size_t size)
Read data into a block.
Definition: stream.c:697
atomic_bool killed
Definition: interrupt.h:34
static void vlc_mwait_i11e_cleanup(void *opaque)
Definition: interrupt.c:218
static void vlc_array_init(vlc_array_t *p_array)
Definition: vlc_arrays.h:244
void picture_Copy(picture_t *p_dst, const picture_t *p_src)
This function will copy both picture dynamic properties and pixels.
Definition: picture.c:373
pthread_mutex_t vlc_mutex_t
Mutex.
Definition: vlc_threads.h:267
vlc_interrupt_t * vlc_interrupt_create(void)
Creates an interruption context.
Definition: interrupt.c:59
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:349
static void vlc_array_clear(vlc_array_t *p_array)
Definition: vlc_arrays.h:250
int vlc_accept_i11e(int fd, struct sockaddr *addr, socklen_t *addrlen, bool blocking)
Definition: interrupt.c:529
static void vlc_interrupt_forward_wake(void *opaque)
Definition: interrupt.c:251
char * strdup(const char *)
bool b_secure
Definition: httpcookies.c:65
#define VLC_USED
Definition: fourcc_gen.c:31
#define vlc_custom_create(o, s, n)
Definition: libvlc.h:108
Definition: vlc_image.h:39
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:436
void vlc_http_cookies_destroy(vlc_http_cookie_jar_t *p_jar)
Definition: httpcookies.c:284
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:309
static int ImageWriteUrl(image_handler_t *, picture_t *, const video_format_t *, video_format_t *, const char *)
Definition: image.c:450
void vlc_cond_destroy(vlc_cond_t *p_condvar)
Deinitializes a condition variable.
Definition: thread.c:228
void vlc_cond_init(vlc_cond_t *p_condvar)
Initializes a condition variable.
Definition: thread.c:216
#define VLC_MALLOC
Definition: vlc_common.h:102
picture_fifo_t * outfifo
Definition: vlc_image.h:60
#define VLC_FOURCC(a, b, c, d)
Definition: fourcc_gen.c:36
#define vlc_array_item_at_index(ar, idx)
Definition: vlc_arrays.h:263
char * psz_path
Definition: httpcookies.c:63
int vlc_interrupt_forward_stop(void *const data[2])
Undoes vlc_interrupt_forward_start().
Definition: interrupt.c:275
void(* callback)(void *)
Definition: interrupt.h:35
es_format_t fmt_out
Definition: vlc_codec.h:223
module_t * p_module
Definition: vlc_codec.h:216
void vlc_mutex_destroy(vlc_mutex_t *p_mutex)
Deinitializes a mutex.
Definition: thread.c:110
#define VLC_CODEC_JPEG
Definition: vlc_fourcc.h:389
void vlc_mutex_unlock(vlc_mutex_t *p_mutex)
Releases a mutex.
Definition: thread.c:138
#define unlikely(p)
Definition: vlc_common.h:114
static block_t * ImageWrite(image_handler_t *, picture_t *, const video_format_t *, const video_format_t *)
Write an image.
Definition: image.c:354
#define VLC_CODEC_TIFF
Definition: vlc_fourcc.h:393
encoder_t * p_enc
Definition: vlc_image.h:57
static bool cookie_should_be_sent(const http_cookie_t *cookie, bool secure, const char *host, const char *path)
Definition: httpcookies.c:154
#define VLC_CODEC_BMP
Definition: vlc_fourcc.h:392
vlc_fourcc_t i_codec
Definition: image.c:580
const char * vlc_strerror_c(int errnum)
Definition: error.c:34
static char * stream_MimeType(stream_t *s)
Get the mime-type of a stream.
Definition: vlc_stream.h:357
bool b_frame_drop_allowed
Definition: vlc_codec.h:70
static picture_t * filter_NewPicture(filter_t *p_filter)
This function will return a new picture usable by p_filter as an output buffer.
Definition: vlc_filter.h:163
#define VLC_CODEC_TARGA
Definition: vlc_fourcc.h:395
#define vlc_assert_unreachable()
Definition: vlc_common.h:118
sem_t vlc_sem_t
Semaphore.
Definition: vlc_threads.h:297
vlc_object_t * p_parent
Definition: vlc_image.h:55
int64_t mtime_t
High precision date or time interval.
Definition: vlc_common.h:150
static void vlc_poll_i11e_cleanup(void *opaque)
Definition: interrupt.c:298
int vlc_cond_timedwait(vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex, mtime_t deadline)
Waits on a condition variable up to a certain date.
Definition: thread.c:273
uint8_t * p_buffer
Payload start.
Definition: vlc_block.h:115
static bool BitMapFormatIsSimilar(const video_format_t *f1, const video_format_t *f2)
Definition: image.c:327
void vlc_interrupt_init(vlc_interrupt_t *ctx)
Initializes an interruption context.
Definition: interrupt.c:51
#define VLC_CODEC_RGB24
Definition: vlc_fourcc.h:323
#define VLC_CODEC_PPM
Definition: vlc_fourcc.h:385
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:333
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:497
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:948
mtime_t mdate(void)
Precision monotonic clock.
Definition: thread.c:406
#define VLC_CODEC_JPEGLS
Definition: vlc_fourcc.h:391
static char * cookie_get_path(const char *cookie)
Definition: httpcookies.c:135
#define mwait(d)
Definition: vlc_threads.h:879
#define module_unneed(a, b)
Definition: vlc_modules.h:49
picture_t *(* pf_video_filter)(filter_t *, picture_t *)
Filter a picture (video filter)
Definition: vlc_filter.h:88
vlc_fourcc_t image_Mime2Fourcc(const char *psz_mime)
Definition: image.c:652
void vlc_interrupt_forward_start(vlc_interrupt_t *to, void *data[2])
Enables forwarding of interruption.
Definition: interrupt.c:261
int vlc_mwait_i11e(mtime_t deadline)
Interruptible variant of mwait().
Definition: interrupt.c:228
void vlc_mutex_lock(vlc_mutex_t *p_mutex)
Acquires a mutex.
Definition: thread.c:123
static int ImageQueueVideo(decoder_t *p_dec, picture_t *p_pic)
Read an image.
Definition: image.c:124
Definition: vlc_block.h:111
#define msg_Err(p_this,...)
Definition: vlc_messages.h:82
int vlc_sem_wait_i11e(vlc_sem_t *sem)
Interruptible variant of vlc_sem_wait().
Definition: interrupt.c:198
char * psz_name
Definition: httpcookies.c:60
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:452
static picture_t * video_new_buffer(decoder_t *p_dec)
Definition: image.c:666
static void vlc_interrupt_prepare(vlc_interrupt_t *ctx, void(*cb)(void *), void *data)
Prepares to enter interruptible wait.
Definition: interrupt.c:114
int(* pf_write_url)(image_handler_t *, picture_t *, const video_format_t *, video_format_t *, const char *)
Definition: vlc_image.h:47
picture_t * picture_NewFromFormat(const video_format_t *p_fmt)
This function will create a new picture using the given format.
Definition: picture.c:271
decoder_t * p_dec
Definition: vlc_image.h:56
#define module_need(a, b, c, d)
Definition: vlc_modules.h:47
static void cookie_destroy(http_cookie_t *cookie)
Definition: httpcookies.c:188
static void DeleteDecoder(decoder_t *)
Definition: image.c:702
#define VLC_CODEC_RGB16
Definition: vlc_fourcc.h:321
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:32
ssize_t vlc_sendmsg_i11e(int fd, const struct msghdr *msg, int flags)
Definition: interrupt.c:502
picture_t *(* pf_read)(image_handler_t *, block_t *, const video_format_t *, video_format_t *)
Definition: vlc_image.h:41
filter_owner_t owner
Definition: vlc_filter.h:151
void vlc_stream_Delete(stream_t *s)
Destroy a stream.
Definition: stream.c:120
vlc_meta_t * p_description
Definition: vlc_codec.h:141