New upstream version 0.16.2+dfsg1

This commit is contained in:
Sebastian Ramacher 2016-10-10 21:01:40 +02:00
parent 67704ac59c
commit 6efda2859e
377 changed files with 7938 additions and 696 deletions

View file

@ -0,0 +1,3 @@
VLCSource="مصدر فيديو VLC"
Playlist="قائمة تشغيل"

View file

@ -1,4 +1,4 @@
VLCSource="VLC Videoquellle"
VLCSource="VLC Videoquelle"
Playlist="Wiedergabeliste"
LoopPlaylist="Wiedergabeliste wiederholen"
PlaybackBehavior="Sichtbarkeitsverhalten"

View file

@ -1,8 +1,8 @@
VLCSource="Fonte de vídeo VLC"
VLCSource="Fonte de vídeo do VLC"
Playlist="Lista de reprodução"
LoopPlaylist="Loop Lista de reprodução"
LoopPlaylist="Repetir a Lista de reprodução"
PlaybackBehavior="Comportamento de visibilidade"
PlaybackBehavior.StopRestart="Parar quando não visível, reiniciar quando visível"
PlaybackBehavior.PauseUnpause="Pausa quando não visível, resumir quando visível"
PlaybackBehavior.AlwaysPlay="Resumir sempre mesmo quando não visível"
PlaybackBehavior.AlwaysPlay="Sempre reproduzir, mesmo quando não visível"

View file

@ -0,0 +1,8 @@
VLCSource="VLC-відео"
Playlist="Список відтворення"
LoopPlaylist="Повторювати список відтворювання"
PlaybackBehavior="Видимість та відтворення"
PlaybackBehavior.StopRestart="Зупинити, коли не видимий. Грати з початку, коли видимий"
PlaybackBehavior.PauseUnpause="Пизупинити, коли не видимий. Грати далі, коли видимий"
PlaybackBehavior.AlwaysPlay="Завжди грати навіть тоді, коли не видимий"

View file

@ -16,6 +16,8 @@ LIBVLC_EVENT_ATTACH libvlc_event_attach_;
/* libvlc media */
LIBVLC_MEDIA_NEW_PATH libvlc_media_new_path_;
LIBVLC_MEDIA_NEW_LOCATION libvlc_media_new_location_;
LIBVLC_MEDIA_ADD_OPTION libvlc_media_add_option_;
LIBVLC_MEDIA_RELEASE libvlc_media_release_;
LIBVLC_MEDIA_RELEASE libvlc_media_retain_;
@ -76,6 +78,8 @@ static bool load_vlc_funcs(void)
/* libvlc media */
LOAD_VLC_FUNC(libvlc_media_new_path);
LOAD_VLC_FUNC(libvlc_media_new_location);
LOAD_VLC_FUNC(libvlc_media_add_option);
LOAD_VLC_FUNC(libvlc_media_release);
LOAD_VLC_FUNC(libvlc_media_retain);

View file

@ -29,6 +29,9 @@ typedef int (*LIBVLC_EVENT_ATTACH)(libvlc_event_manager_t *p_event_manager,
/* libvlc media */
typedef libvlc_media_t *(*LIBVLC_MEDIA_NEW_PATH)(
libvlc_instance_t *p_instance, const char *path);
typedef libvlc_media_t *(*LIBVLC_MEDIA_NEW_LOCATION)(
libvlc_instance_t *p_instance, const char *location);
typedef void (*LIBVLC_MEDIA_ADD_OPTION)(libvlc_media_t *p_md, const char *options);
typedef void (*LIBVLC_MEDIA_RETAIN)(libvlc_media_t *p_md);
typedef void (*LIBVLC_MEDIA_RELEASE)(libvlc_media_t *p_md);
@ -119,6 +122,8 @@ extern LIBVLC_EVENT_ATTACH libvlc_event_attach_;
/* libvlc media */
extern LIBVLC_MEDIA_NEW_PATH libvlc_media_new_path_;
extern LIBVLC_MEDIA_NEW_LOCATION libvlc_media_new_location_;
extern LIBVLC_MEDIA_ADD_OPTION libvlc_media_add_option_;
extern LIBVLC_MEDIA_RELEASE libvlc_media_release_;
extern LIBVLC_MEDIA_RETAIN libvlc_media_retain_;

View file

@ -76,7 +76,9 @@ static libvlc_media_t *get_media(struct darray *array, const char *path)
static inline libvlc_media_t *create_media_from_file(const char *file)
{
return libvlc_media_new_path_(libvlc, file);
return (file && strstr(file, "://") != NULL)
? libvlc_media_new_location_(libvlc, file)
: libvlc_media_new_path_(libvlc, file);
}
static void free_files(struct darray *array)
@ -299,11 +301,25 @@ static unsigned vlcs_video_format(void **p_data, char *chroma, unsigned *width,
enum video_format new_format;
enum video_range_type range;
bool new_range;
unsigned new_width = 0;
unsigned new_height = 0;
size_t i = 0;
new_format = convert_vlc_video_format(chroma, &new_range);
libvlc_video_get_size_(c->media_player, 0, width, height);
/* This is used because VLC will by default try to use a different
* scaling than what the file uses (probably for optimization reasons).
* For example, if the file is 1920x1080, it will try to render it by
* 1920x1088, which isn't what we want. Calling libvlc_video_get_size
* gets the actual video file's size, and thus fixes the problem.
* However this doesn't work with URLs, so if it returns a 0 value, it
* shouldn't be used. */
libvlc_video_get_size_(c->media_player, 0, &new_width, &new_height);
if (new_width && new_height) {
*width = new_width;
*height = new_height;
}
/* don't allocate a new frame if format/width/height hasn't changed */
if (c->frame.format != new_format ||
@ -382,12 +398,14 @@ static void add_file(struct vlc_source *c, struct darray *array,
struct media_file_data data;
struct dstr new_path = {0};
libvlc_media_t *new_media;
bool is_url = path && strstr(path, "://") != NULL;
new_files.da = *array;
dstr_copy(&new_path, path);
#ifdef _WIN32
dstr_replace(&new_path, "/", "\\");
if (!is_url)
dstr_replace(&new_path, "/", "\\");
#endif
path = new_path.array;
@ -399,6 +417,10 @@ static void add_file(struct vlc_source *c, struct darray *array,
new_media = create_media_from_file(path);
if (new_media) {
if (is_url)
libvlc_media_add_option_(new_media,
":network-caching=100");
data.path = new_path.array;
data.media = new_media;
da_push_back(new_files, &data);