[vlc-commits] Update PO
vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 3 14:08:33 2014 +0100| [8a35de15ffb718915700695cf9c80d16ac98d2e3] | committer: Jean-Baptiste Kempf Update PO http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=8a35de15ffb718915700695cf9c80d16ac98d2e3 --- po/ach.po | 232 --- po/af.po| 128 +++-- po/am.po| 125 +++-- po/an.po| 211 ++--- po/ar.po| 411 po/ast.po | 211 ++--- po/az.po| 132 ++--- po/be.po| 107 ++- po/bg.po| 210 - po/bn.po| 230 +-- po/bn_IN.po | 205 ++-- po/br.po| 342 ++ po/bs.po| 343 +++--- po/ca.po| 107 ++- po/cgg.po | 134 ++--- po/ckb.po | 122 ++-- po/co.po| 150 --- po/cs.po| 160 po/cy.po| 160 po/da.po| 288 ++-- po/de.po| 105 ++- po/el.po| 117 ++-- po/en_GB.po | 134 ++--- po/es.po| 117 ++-- po/et.po| 126 +++-- po/eu.po| 131 ++--- po/fa.po| 444 +-- po/ff.po| 256 + po/fi.po| 196 ++- po/fr.po| 120 ++-- po/fur.po | 122 ++-- po/ga.po| 119 ++-- po/gd.po| 187 +-- po/gl.po| 107 ++- po/gu.po| 372 + po/he.po| 190 +-- po/hi.po| 236 +++ po/hr.po| 113 +-- po/hu.po| 107 ++- po/hy.po| 110 +-- po/ia.po| 252 ++--- po/id.po| 178 +- po/is.po| 157 po/it.po| 108 +-- po/ja.po| 105 ++- po/ka.po| 128 +++-- po/kk.po| 379 +++-- po/km.po| 107 ++- po/kn.po| 107 ++- po/ko.po| 105 ++- po/ky.po| 253 + po/lg.po| 125 +++-- po/lt.po| 203 ++-- po/lv.po| 532 po/mk.po| 149 --- po/ml.po| 282 +++- po/mn.po| 407 po/mr.po| 271 ++- po/ms.po| 105 ++- po/my.po| 426 +++--- po/nb.po| 302 +++--- po/ne.po| 599 +-- po/nl.po| 105 ++- po/nn.po| 107 ++- po/oc.po| 432 ++ po/or.po| 256 ++--- po/pa.po| 170 + po/pl.po| 105 ++- po/ps.po| 137 +++--- po/pt_BR.po | 156 +--- po/pt_PT.po | 108 +-- po/ro.po| 132 ++--- po/ru.po| 105 ++- po/si.po| 172 + po/sk.po| 105 ++- po/sl.po| 210 ++--- po/sq.po| 433 +- po/sr.po| 349 +- po/sv.po| 124 ++--- po/ta.po| 386 +- po/te.po| 211 +++-- po/tet.po | 143 +++--- po/th.po| 167 + po/tl.po| 143 +++--- po/tr.po| 105 ++- po/uk.po| 105 ++- po/uz.po| 311 +-- po/vi.po| 139 +++--- po/vlc.pot | 104 +-- po/wa.po| 240 po/zh_CN.po | 105 ++- po/zh_TW.po | 118 ++-- po/zu.po| 125 +++-- 93 files changed, 9438 insertions(+), 8867 deletions(-) Diff: http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commitdiff;h=8a35de15ffb718915700695cf9c80d16ac98d2e3 ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Contribs: update FFmpeg/libav to a more recent sha1
vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 3 14:12:56 2014 +0100| [443b85e2ae10e97f49f592697160cbd2c1719978] | committer: Jean-Baptiste Kempf Contribs: update FFmpeg/libav to a more recent sha1 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=443b85e2ae10e97f49f592697160cbd2c1719978 --- contrib/src/ffmpeg/rules.mak |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak index 65d9cb8..4768fc0 100644 --- a/contrib/src/ffmpeg/rules.mak +++ b/contrib/src/ffmpeg/rules.mak @@ -5,10 +5,10 @@ #USE_FFMPEG ?= 1 ifdef USE_FFMPEG -HASH=313d75c +HASH=ea0b921 FFMPEG_SNAPURL := http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=$(HASH);sf=tgz else -HASH=e8049af +HASH=2f221b6 FFMPEG_SNAPURL := http://git.libav.org/?p=libav.git;a=snapshot;h=$(HASH);sf=tgz endif ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] NEWS: update for RC1
vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf j...@videolan.org | Mon Nov 3 14:13:29 2014 +0100| [95774591eed71ca9a5479ad29c2e6bab74b88de5] | committer: Jean-Baptiste Kempf NEWS: update for RC1 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=95774591eed71ca9a5479ad29c2e6bab74b88de5 --- NEWS |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 8655a6b..4bfd1e0 100644 --- a/NEWS +++ b/NEWS @@ -3,11 +3,11 @@ Changes between 2.1.x and 2.2.0-rc1: Important changes: * The licenses of more modules have changed from GPLv2+ to LGPLv2.1+, - notably the streaming output, muxers and access output ones + notably most of the streaming output, muxers and access output modules Core: * Support automatic rotation using streams metadata, GPU-accelerated when possible - * Add extensions download from external repositories + * Add extensions manager and downloading from external repositories * Rework the metadata fetching algorithm and policies * Partial fix of playback of short audio samples @@ -85,7 +85,7 @@ Video Output: * New Android native window provider module * Direct rendering for MediaCodec Android hardware acceleration * Support for loading HLSL shaders in Direct3D video output - * Add mmal based video output + * Add MMAL based video output for RaspberryPi Video Filter: * New Oldmovie effect filter @@ -154,7 +154,7 @@ Misc: * Teletext navigation buttons support in Qt4 gui Security: - * Numerous integer and heap overflow in Ogg and MP4 demuxer + * Numerous integer and heap overflow in Ogg, AVI, ASF, TTA and MP4 demuxers Removed modules: * iOS video output: use ios2 ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Tag 2.2.0-rc1 : VLC media player 2.2.0 'WeatherWax' - Release Canditate 1
[vlc/vlc-2.2] [branch: refs/tags/2.2.0-rc1] Tag:fecc6c4216ecc08fa5d3df81b6088356db664b1c http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git?a=tag;h=fecc6c4216ecc08fa5d3df81b6088356db664b1c Tagger: Jean-Baptiste Kempf j...@videolan.org Date: Mon Nov 3 14:18:50 2014 +0100 VLC media player 2.2.0 'WeatherWax' - Release Canditate 1 This is the first release candidate of VLC media player 2.2.0 2.2.0 is a major version of VLC media player, introducing many new features fixing numerous bugs (~500 since 2.1.5, ~800 since 2.1.0). Notable features of this release are: - Hardware decoding and zero-copy rendering for Linux (VDPAU), Android (MediaCodec), Linux rPI (MMAL) - Automatic rotation to fight Vertical Video Syndrome, GPU accelerated - New formats supported, like MKV/Opus/VP9, H.265, Ogg/VP8, CAF, raw H.265 - Support for Digital Cinema Packages, Blu-Ray BD-J, FTPS - Restart where you left off feature on Qt and OS X interfaces - VLC Extensions and Addons downloader - HLSL shaders on Windows and CoreAnimation output on OS X - Port of the core on iOS, Android and WinRT Numerous bugs have been fixed: - Important refactor of the AVI, WMV, OGG and MP4 demuxers - Audio loops on Windows using DirectSound - OpenMax IL decoder, Speex, SRT support - AVI, Ogg and MP4 muxer Updates of the translations are, of course, present too. ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] trivial_mixer: fix upmix/downmix
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 3 17:56:50 2014 +0200| [4e63463ac0022f7eca3c4b9decb6ad5501b7ce38] | committer: Rémi Denis-Courmont trivial_mixer: fix upmix/downmix http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e63463ac0022f7eca3c4b9decb6ad5501b7ce38 --- modules/audio_filter/channel_mixer/trivial.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c index d05155a..ab804d5 100644 --- a/modules/audio_filter/channel_mixer/trivial.c +++ b/modules/audio_filter/channel_mixer/trivial.c @@ -71,7 +71,7 @@ static block_t *Upmix( filter_t *p_filter, block_t *p_in_buf ) float *p_dest = (float *)p_out_buf-p_buffer; const float *p_src = (float *)p_in_buf-p_buffer; -for( size_t i = 0; i p_in_buf-i_nb_samples; i-- ) +for( size_t i = 0; i p_in_buf-i_nb_samples; i++ ) { for( unsigned j = 0; j i_output_nb; j++ ) p_dest[j] = p_src[j]; @@ -97,7 +97,7 @@ static block_t *Downmix( filter_t *p_filter, block_t *p_buf ) float *p_dest = (float *)p_buf-p_buffer; const float *p_src = p_dest; -for( size_t i = 0; i p_buf-i_nb_samples; i-- ) +for( size_t i = 0; i p_buf-i_nb_samples; i++ ) { for( unsigned j = 0; j i_output_nb; j++ ) p_dest[j] = p_src[j % i_input_nb]; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vmem: unlock before display
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 3 18:10:15 2014 +0200| [57c046ce11210fb354da42e07ef99b724bf2d716] | committer: Rémi Denis-Courmont vmem: unlock before display The documentation promises that the picture is unlocked before it is displayed, so actually do that. (cherry picked from commit 0887539916acdb4276eed910cf88178084d9dba6) http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=57c046ce11210fb354da42e07ef99b724bf2d716 --- modules/video_output/vmem.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c index b4026ff..c5d2314 100644 --- a/modules/video_output/vmem.c +++ b/modules/video_output/vmem.c @@ -302,11 +302,13 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count) static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture) { vout_display_sys_t *sys = vd-sys; +void *id = picture-p_sys-id; assert(!picture_IsReferenced(picture)); -if (sys-display != NULL) -sys-display(sys-opaque, picture-p_sys-id); picture_Release(picture); + +if (sys-display != NULL) +sys-display(sys-opaque, id); VLC_UNUSED(subpicture); } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] opengl: remove lock/unlock callbacks
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 3 19:13:56 2014 +0200| [fef26a45cc024d433bfa9ad08c7fefbdb47b2974] | committer: Rémi Denis-Courmont opengl: remove lock/unlock callbacks They are superseded by makeCurrent() and releaseCurrent(). http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fef26a45cc024d433bfa9ad08c7fefbdb47b2974 --- include/vlc_opengl.h | 10 ++ modules/video_output/egl.c |2 -- modules/video_output/glx.c |2 -- modules/video_output/msw/glwin32.c |2 -- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/vlc_opengl.h b/include/vlc_opengl.h index 2a6db1b..131ecd1 100644 --- a/include/vlc_opengl.h +++ b/include/vlc_opengl.h @@ -49,8 +49,10 @@ struct vlc_gl_t void (*releaseCurrent)(vlc_gl_t *); void (*resize)(vlc_gl_t *, unsigned, unsigned); void (*swap)(vlc_gl_t *); +#ifdef __APPLE__ int (*lock)(vlc_gl_t *); void (*unlock)(vlc_gl_t *); +#endif void*(*getProcAddress)(vlc_gl_t *, const char *); }; @@ -75,13 +77,21 @@ static inline void vlc_gl_ReleaseCurrent(vlc_gl_t *gl) static inline int vlc_gl_Lock(vlc_gl_t *gl) { +#ifdef __APPLE__ return (gl-lock != NULL) ? gl-lock(gl) : VLC_SUCCESS; +#else +(void) gl; return VLC_SUCCESS; +#endif } static inline void vlc_gl_Unlock(vlc_gl_t *gl) { +#ifdef __APPLE__ if (gl-unlock != NULL) gl-unlock(gl); +#else +(void) gl; +#endif } static inline void vlc_gl_Resize(vlc_gl_t *gl, unsigned w, unsigned h) diff --git a/modules/video_output/egl.c b/modules/video_output/egl.c index adbc94e..1f2d5b1 100644 --- a/modules/video_output/egl.c +++ b/modules/video_output/egl.c @@ -359,8 +359,6 @@ static int Open (vlc_object_t *obj, const struct gl_api *api) gl-resize = Resize; gl-swap = SwapBuffers; gl-getProcAddress = GetSymbol; -gl-lock = NULL; -gl-unlock = NULL; return VLC_SUCCESS; error: diff --git a/modules/video_output/glx.c b/modules/video_output/glx.c index 32e12b9..dc692e9 100644 --- a/modules/video_output/glx.c +++ b/modules/video_output/glx.c @@ -208,8 +208,6 @@ static int Open (vlc_object_t *obj) gl-resize = NULL; gl-swap = SwapBuffers; gl-getProcAddress = GetSymbol; -gl-lock = NULL; -gl-unlock = NULL; #ifdef GLX_ARB_get_proc_address bool is_swap_interval_set = false; diff --git a/modules/video_output/msw/glwin32.c b/modules/video_output/msw/glwin32.c index 89f2d7d..3969c8f 100644 --- a/modules/video_output/msw/glwin32.c +++ b/modules/video_output/msw/glwin32.c @@ -204,8 +204,6 @@ static int Open(vlc_object_t *object) #endif /* */ -sys-gl.lock = NULL; -sys-gl.unlock = NULL; sys-gl.swap = Swap; sys-gl.getProcAddress = OurGetProcAddress; sys-gl.sys = vd; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] picture_pool: fix double mutex_unlock if pic_lock fails
vlc | branch: master | Thomas Guillem tho...@gllm.fr | Mon Nov 3 11:22:13 2014 +0100| [6a493b1189ee38210ce15ac25f282aad5af3810b] | committer: Rémi Denis-Courmont picture_pool: fix double mutex_unlock if pic_lock fails Signed-off-by: Rémi Denis-Courmont r...@remlab.net http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a493b1189ee38210ce15ac25f282aad5af3810b --- src/misc/picture_pool.c |1 - 1 file changed, 1 deletion(-) diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c index 15d0791..dac7ef6 100644 --- a/src/misc/picture_pool.c +++ b/src/misc/picture_pool.c @@ -253,7 +253,6 @@ picture_t *picture_pool_Get(picture_pool_t *pool) vlc_mutex_lock(pool-lock); sys-in_use = false; pool-refs--; -vlc_mutex_unlock(pool-lock); continue; } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Wayland: fix attaching and detaching protocol-side buffer objects
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 3 19:58:51 2014 +0200| [6672975cf04c162492507a2483180eddd45534dc] | committer: Rémi Denis-Courmont Wayland: fix attaching and detaching protocol-side buffer objects http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6672975cf04c162492507a2483180eddd45534dc --- modules/video_output/wayland/shm.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/modules/video_output/wayland/shm.c b/modules/video_output/wayland/shm.c index 92fa3f8..39719e1 100644 --- a/modules/video_output/wayland/shm.c +++ b/modules/video_output/wayland/shm.c @@ -61,12 +61,10 @@ struct vout_display_sys_t static void PictureDestroy(picture_t *pic) { -struct wl_buffer *buf = (struct wl_buffer *)pic-p_sys; const long pagemask = sysconf(_SC_PAGE_SIZE) - 1; size_t picsize = pic-p[0].i_pitch * pic-p[0].i_lines; munmap(pic-p[0].p_pixels, (picsize + pagemask) ~pagemask); -wl_buffer_destroy(buf); /* XXX: what if wl_display is already gone? */ free(pic); } @@ -83,6 +81,22 @@ static const struct wl_buffer_listener buffer_cbs = buffer_release_cb, }; +static void PictureAttach(void *data, picture_t *pic) +{ +struct wl_buffer *buf = (struct wl_buffer *)pic-p_sys; + +wl_buffer_add_listener(buf, buffer_cbs, pic); +(void) data; +} + +static void PictureDetach(void *data, picture_t *pic) +{ +struct wl_buffer *buf = (struct wl_buffer *)pic-p_sys; + +wl_buffer_destroy(buf); +(void) data; +} + static picture_pool_t *Pool(vout_display_t *vd, unsigned req) { vout_display_sys_t *sys = vd-sys; @@ -175,7 +189,6 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned req) break; } -wl_buffer_add_listener(buf, buffer_cbs, pic); pics[count++] = pic; } @@ -194,6 +207,8 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned req) picture_Release(pics[--count]); return NULL; } + +picture_pool_Enum(sys-pool, PictureAttach, NULL); return sys-pool; } @@ -234,6 +249,7 @@ static void ResetPictures(vout_display_t *vd) if (sys-pool == NULL) return; +picture_pool_Enum(sys-pool, PictureDetach, NULL); picture_pool_Release(sys-pool); sys-pool = NULL; } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] picture_pool: add enumeration helper
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 3 19:55:41 2014 +0200| [bfe3ffd17ebfbae8ce2ae27f17090517c79e7a01] | committer: Rémi Denis-Courmont picture_pool: add enumeration helper http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bfe3ffd17ebfbae8ce2ae27f17090517c79e7a01 --- include/vlc_picture_pool.h | 13 + src/libvlccore.sym |1 + src/misc/picture_pool.c|9 + 3 files changed, 23 insertions(+) diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h index 72278c9..aa51678 100644 --- a/include/vlc_picture_pool.h +++ b/include/vlc_picture_pool.h @@ -96,6 +96,19 @@ VLC_API void picture_pool_Release( picture_pool_t * ); VLC_API picture_t * picture_pool_Get( picture_pool_t * ) VLC_USED; /** + * Enumerates all pictures in a pool, both free and allocated. + * + * @param cb callback to invoke once for each picture + * @param data opaque data parameter for the callback (first argument) + * + * @note Allocated pictures may be accessed asynchronously by other threads. + * Therefore, only read-only picture parameters can be read by the callback, + * typically picture_t.p_sys. + */ +VLC_API void picture_pool_Enum( picture_pool_t *, +void (*cb)(void *, picture_t *), void *data ); + +/** * Forcefully return all pictures in the pool to free/unallocated state. * * @warning This can only be called when it is known that all pending diff --git a/src/libvlccore.sym b/src/libvlccore.sym index b53ad9d..10e036a 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -303,6 +303,7 @@ picture_NewFromResource picture_pool_Release picture_pool_Get picture_pool_GetSize +picture_pool_Enum picture_pool_New picture_pool_NewExtended picture_pool_NewFromFormat diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c index dac7ef6..2d52517 100644 --- a/src/misc/picture_pool.c +++ b/src/misc/picture_pool.c @@ -334,3 +334,12 @@ bool picture_pool_NeedsLocking(const picture_pool_t *pool) { return pool-pic_lock != NULL || pool-pic_unlock != NULL; } + +void picture_pool_Enum(picture_pool_t *pool, void (*cb)(void *, picture_t *), + void *opaque) +{ +/* NOTE: So far, the pictures table cannot change after the pool is created + * so there is no need to lock the pool mutex here. */ +for (unsigned i = 0; i pool-picture_count; i++) +cb(opaque, pool-picture[i]); +} ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] picture_pool: improve and update documentation
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 3 20:42:57 2014 +0200| [d7d0b381722d4f1cc45e77b35c89d3b0bcbd792e] | committer: Rémi Denis-Courmont picture_pool: improve and update documentation http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d7d0b381722d4f1cc45e77b35c89d3b0bcbd792e --- include/vlc_picture_pool.h | 99 +--- 1 file changed, 66 insertions(+), 33 deletions(-) diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h index aa51678..2b3718c 100644 --- a/include/vlc_picture_pool.h +++ b/include/vlc_picture_pool.h @@ -33,9 +33,6 @@ /** * Picture pool handle - * - * XXX it is not thread safe, all pool manipulations and picture_Release - * must be properly locked if needed. */ typedef struct picture_pool_t picture_pool_t; @@ -51,47 +48,75 @@ typedef struct { } picture_pool_configuration_t; /** - * It creates a picture_pool_t wrapping the given configuration. + * Creates a pool of preallocated pictures. Free pictures can be allocated from + * the pool, and are returned to the pool when they are no longer referenced. + * + * This avoids allocating and deallocationg pictures repeatedly, and ensures + * that memory consumption remains within limits. + * + * To obtain a picture from the pool, use picture_pool_Get(). To increase and + * decrease the reference count, use picture_Hold() and picture_Release() + * respectively. * - * It avoids useless picture creations/destructions. - * The given picture must not have a reference count greater than 1. - * The pool takes ownership of the picture and MUST not be used directly. - * When deleted, the pool will release the pictures using picture_Release. * If defined, picture_pool_configuration_t::lock will be called before * a picture is used, and picture_pool_configuration_t::unlock will be called - * as soon as a picture is unused. They are allowed to modify picture_t::p and - * access picture_t::p_sys. + * as soon as a picture is returned to the pool. + * Those callbacks can modify picture_t::p and access picture_t::p_sys. + * + * @return A pointer to the new pool on success, or NULL on error + * (pictures are bnot/b released on error). */ VLC_API picture_pool_t * picture_pool_NewExtended( const picture_pool_configuration_t * ) VLC_USED; /** - * It creates a picture_pool_t wrapping the given arrays of picture. + * Creates a picture pool with pictures in a given array. + * This is a convenience wrapper for picture_pool_NewExtended() without the + * lock and unlock callbacks. * - * It is provided as convenience. + * @param count number of pictures in the array + * @param tab array of pictures + * + * @return a pointer to the new pool on success, or NULL on error + * (pictures are bnot/b released on error) */ VLC_API picture_pool_t * picture_pool_New(unsigned count, picture_t *const *tab) VLC_USED; /** - * It creates a picture_pool_t creating images using the given format. + * Allocates pictures from the heap and creates a picture pool with them. + * This is a convenience wrapper for picture_NewFromFormat() and + * picture_pool_New(). + * + * @param fmt video format of pictures to allocate from the heap + * @param count number of pictures to allocate * - * Provided for convenience. + * @return a pointer to the new pool on success, NULL on error */ -VLC_API picture_pool_t * picture_pool_NewFromFormat(const video_format_t *, +VLC_API picture_pool_t * picture_pool_NewFromFormat(const video_format_t *fmt, unsigned count) VLC_USED; /** - * It destroys a pool created by picture_pool_New. + * Releases a pool created by picture_pool_NewExtended(), picture_pool_New() + * or picture_pool_NewFromFormat(). + * + * @note If there are no pending references to the pooled pictures, and the + * picture_resource_t.pf_destroy callback was not NULL, it will be invoked. + * Otherwise the default callback will be used. * - * All pictures must already be released to the pool. The pool will then - * released them. + * @warning If there are pending references (a.k.a. late pictures), the + * pictures will remain valid until the all pending references are dropped by + * picture_Release(). */ VLC_API void picture_pool_Release( picture_pool_t * ); /** - * It retreives a picture_t from a pool. + * Obtains a picture from a pool if any is immediately available. * - * The picture must be release by using picture_Release. + * The picture must be released with picture_Release(). + * + * @return a picture, or NULL if all pictures in the pool are allocated + * + * @note This function is thread-safe. */ VLC_API picture_t * picture_pool_Get( picture_pool_t * ) VLC_USED; @@ -104,6 +129,7 @@ VLC_API picture_t * picture_pool_Get( picture_pool_t * ) VLC_USED; * @note Allocated pictures may be accessed asynchronously by other threads. * Therefore, only read-only
[vlc-commits] vmem: unlock picture in prepare, get rid of lock/unlock
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 3 22:39:34 2014 +0200| [5dfce5edb5db6ad71e0fd9b797ff8205ec45c7e4] | committer: Rémi Denis-Courmont vmem: unlock picture in prepare, get rid of lock/unlock http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5dfce5edb5db6ad71e0fd9b797ff8205ec45c7e4 --- modules/video_output/vmem.c | 93 +-- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c index 97055cb..3f117da 100644 --- a/modules/video_output/vmem.c +++ b/modules/video_output/vmem.c @@ -105,11 +105,37 @@ typedef unsigned (*vlc_format_cb)(void **, char *, unsigned *, unsigned *, unsigned *, unsigned *); static picture_pool_t *Pool (vout_display_t *, unsigned); +static void Prepare(vout_display_t *, picture_t *, subpicture_t *); static void Display(vout_display_t *, picture_t *, subpicture_t *); static intControl(vout_display_t *, int, va_list); -static intLock(picture_t *); -static void Unlock(picture_t *); +static void Lock(void *data, picture_t *pic) +{ +vout_display_sys_t *sys = data; +picture_sys_t *picsys = pic-p_sys; +void *planes[PICTURE_PLANE_MAX]; + +picsys-id = sys-lock(sys-opaque, planes); + +for (int i = 0; i pic-i_planes; i++) +pic-p[i].p_pixels = planes[i]; +} + +static void Unlock(void *data, picture_t *pic) +{ +vout_display_sys_t *sys = data; +picture_sys_t *picsys = pic-p_sys; +void *planes[PICTURE_PLANE_MAX]; + +assert(!picture_IsReferenced(pic)); + +for (int i = 0; i pic-i_planes; i++) +planes[i] = pic-p[i].p_pixels; + +if (sys-unlock != NULL) +sys-unlock(sys-opaque, picsys-id, planes); + +} /* * Open: allocates video thread @@ -221,7 +247,7 @@ static int Open(vlc_object_t *object) vd-fmt = fmt; vd-info= info; vd-pool= Pool; -vd-prepare = NULL; +vd-prepare = Prepare; vd-display = Display; vd-control = Control; vd-manage = NULL; @@ -240,11 +266,12 @@ static void Close(vlc_object_t *object) if (sys-cleanup) sys-cleanup(sys-opaque); + +picture_pool_Enum(sys-pool, Unlock, sys); picture_pool_Release(sys-pool); free(sys); } -/* */ static picture_pool_t *Pool(vout_display_t *vd, unsigned count) { vout_display_sys_t *sys = vd-sys; @@ -285,65 +312,37 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count) } /* */ -picture_pool_configuration_t pool; -memset(pool, 0, sizeof(pool)); -pool.picture_count = count; -pool.picture = pictures; -pool.lock = Lock; -pool.unlock= Unlock; -sys-pool = picture_pool_NewExtended(pool); +sys-pool = picture_pool_New(count, pictures); if (!sys-pool) { for (unsigned i = 0; i count; i++) picture_Release(pictures[i]); } +picture_pool_Enum(sys-pool, Lock, sys); return sys-pool; } -static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture) +static void Prepare(vout_display_t *vd, picture_t *pic, subpicture_t *subpic) { -vout_display_sys_t *sys = vd-sys; -void *id = picture-p_sys-id; - -assert(!picture_IsReferenced(picture)); -picture_Release(picture); - -if (sys-display != NULL) -sys-display(sys-opaque, id); -VLC_UNUSED(subpicture); +Unlock(vd-sys, pic); +VLC_UNUSED(subpic); } -static int Control(vout_display_t *vd, int query, va_list args) -{ -(void) vd; (void) query; (void) args; -return VLC_EGENERIC; -} -/* */ -static int Lock(picture_t *picture) +static void Display(vout_display_t *vd, picture_t *pic, subpicture_t *subpic) { -picture_sys_t *picsys = picture-p_sys; -vout_display_sys_t *sys = picsys-sys; -void *planes[PICTURE_PLANE_MAX]; - -picsys-id = sys-lock(sys-opaque, planes); +vout_display_sys_t *sys = vd-sys; -for (int i = 0; i picture-i_planes; i++) -picture-p[i].p_pixels = planes[i]; +if (sys-display != NULL) +sys-display(sys-opaque, pic-p_sys-id); -return VLC_SUCCESS; +Lock(sys, pic); +picture_Release(pic); +VLC_UNUSED(subpic); } -static void Unlock(picture_t *picture) +static int Control(vout_display_t *vd, int query, va_list args) { -picture_sys_t *picsys = picture-p_sys; -vout_display_sys_t *sys = picsys-sys; - -void *planes[PICTURE_PLANE_MAX]; - -for (int i = 0; i picture-i_planes; i++) -planes[i] = picture-p[i].p_pixels; - -if (sys-unlock != NULL) -sys-unlock(sys-opaque, picsys-id, planes); +(void) vd; (void) query; (void) args; +return VLC_EGENERIC; } ___ vlc-commits mailing list vlc-commits@videolan.org
[vlc-commits] Revert vout: fix picture lock/unlock with private pool
vlc | branch: master | Rémi Denis-Courmont r...@remlab.net | Mon Nov 3 22:43:24 2014 +0200| [d0dd307a4387599032e5219373bb6b5d4421c674] | committer: Rémi Denis-Courmont Revert vout: fix picture lock/unlock with private pool This mostly reverts commit 6a6c23bf075ba70844f8e9b51991df74952d616f. http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d0dd307a4387599032e5219373bb6b5d4421c674 --- include/vlc_picture_pool.h |1 - src/misc/picture_pool.c |5 - src/video_output/vout_wrapper.c |4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h index 2b3718c..a0cf9f3 100644 --- a/include/vlc_picture_pool.h +++ b/include/vlc_picture_pool.h @@ -179,7 +179,6 @@ VLC_USED; */ VLC_API unsigned picture_pool_GetSize(const picture_pool_t *); -bool picture_pool_NeedsLocking(const picture_pool_t *); #endif /* VLC_PICTURE_POOL_H */ diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c index 2d52517..fdd9b8e 100644 --- a/src/misc/picture_pool.c +++ b/src/misc/picture_pool.c @@ -330,11 +330,6 @@ unsigned picture_pool_GetSize(const picture_pool_t *pool) return pool-picture_count; } -bool picture_pool_NeedsLocking(const picture_pool_t *pool) -{ -return pool-pic_lock != NULL || pool-pic_unlock != NULL; -} - void picture_pool_Enum(picture_pool_t *pool, void (*cb)(void *, picture_t *), void *opaque) { diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c index 8b5174a..d172bcc 100644 --- a/src/video_output/vout_wrapper.c +++ b/src/video_output/vout_wrapper.c @@ -133,8 +133,8 @@ int vout_InitWrapper(vout_thread_t *vout) picture_pool_t *display_pool = vout_display_Pool(vd, allow_dr ? __MAX(VOUT_MAX_PICTURES, reserved_picture + decoder_picture) : 3); -if (allow_dr !picture_pool_NeedsLocking(display_pool) - picture_pool_GetSize(display_pool) = reserved_picture + decoder_picture) { +if (allow_dr +picture_pool_GetSize(display_pool) = reserved_picture + decoder_picture) { sys-dpb_size = picture_pool_GetSize(display_pool) - reserved_picture; sys-decoder_pool = display_pool; sys-display_pool = display_pool; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits