[vlc-commits] vout: reset pause state from ThreadReinit()

2017-01-17 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Mon Jan 16 15:00:42 
2017 +0100| [cd1362c8ac0c5aa13270c2d59665b6539fe755cf] | committer: Thomas 
Guillem

vout: reset pause state from ThreadReinit()

The vout is expected to be on a playing state after Init or Reinit.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd1362c8ac0c5aa13270c2d59665b6539fe755cf
---

 src/video_output/video_output.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index a0163b4..7751ae6 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1497,6 +1497,10 @@ static int ThreadReinit(vout_thread_t *vout,
 const vout_configuration_t *cfg)
 {
 video_format_t original;
+
+vout->p->pause.is_on = false;
+vout->p->pause.date  = VLC_TS_INVALID;
+
 if (VoutValidateFormat(, cfg->fmt)) {
 ThreadStop(vout, NULL);
 ThreadClean(vout);

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout/opengl: add direct rendering support (OpenGL 4.4)

2017-01-17 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Fri Dec 30 09:57:37 
2016 +0100| [565d1771dbbbec7437681ac9b247adf9b404] | committer: Thomas 
Guillem

vout/opengl: add direct rendering support (OpenGL 4.4)

This commit adds support for direct rendering with YUV/RGB software chromas.
This is done using Pixel Buffer Object (PBO, A Buffer Object that is used for
asynchronous pixel transfer operations) [1][2]. PBO are present since OpenGL
2.1 and since OpenGLES 3.0.

But there is an issue, VLC software decoders and video filters might need to
read picture buffers while they're being displayed. Therefore, the basic use
case of PBOs can't work (since you need to unmap the buffer before displaying
it).

To solve this issue, we need to use persistent mapped buffers[3]. This can be
done using the glBufferStorage() function with the GL_MAP_PERSISTENT_BIT flag.

Unfortunately, this new API is only present since OpenGL 4.4 and as an
extension since OpenGLES 3.1 (so no Android, macos and ios support for now).

References:
[1]: https://www.khronos.org/opengl/wiki/Pixel_Buffer_Object
[2]: http://www.songho.ca/opengl/gl_pbo.html
[3]: https://www.khronos.org/opengl/wiki/Buffer_Object_Streaming

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=565d1771dbbbec7437681ac9b247adf9b404
---

 NEWS  |   1 +
 modules/video_output/opengl/converters.c  | 288 +-
 modules/video_output/opengl/internal.h|  21 +++
 modules/video_output/opengl/vout_helper.c |   9 +
 4 files changed, 312 insertions(+), 7 deletions(-)

diff --git a/NEWS b/NEWS
index 8aba9cf..350098f 100644
--- a/NEWS
+++ b/NEWS
@@ -150,6 +150,7 @@ Video ouput:
  * EFL Evas video output with Tizen TBM Surface support
  * New OpenGL provider for Windows
  * Drop OpenGL 1.x and OpenGL ES 1 support
+ * Direct rendering with OpenGL (starting OpenGL 4.4)
 
 Text renderer:
  * CTL support through Harfbuzz in the Freetype module
diff --git a/modules/video_output/opengl/converters.c 
b/modules/video_output/opengl/converters.c
index 080064b..bcbc5a1 100644
--- a/modules/video_output/opengl/converters.c
+++ b/modules/video_output/opengl/converters.c
@@ -22,10 +22,11 @@
 # include "config.h"
 #endif
 
-#include 
-
 #include 
+#include 
+#include 
 
+#include 
 #include "internal.h"
 
 #ifndef GL_RED
@@ -40,6 +41,17 @@
 #define NEED_GL_EXT_unpack_subimage
 #endif
 
+#ifdef VLCGL_HAS_PBO
+struct picture_sys_t
+{
+const opengl_tex_converter_t *tc;
+GLuint  buffers[PICTURE_PLANE_MAX];
+size_t  bytes[PICTURE_PLANE_MAX];
+GLsync  fence;
+unsignedindex;
+};
+#endif
+
 struct priv
 {
 GLint  tex_internal;
@@ -49,6 +61,12 @@ struct priv
 bool   has_unpack_subimage;
 void * texture_temp_buf;
 size_t texture_temp_buf_size;
+#ifdef VLCGL_HAS_PBO
+struct {
+picture_t *pics[VLCGL_PICTURE_MAX];
+unsigned long long list;
+} ongpu;
+#endif
 };
 
 struct yuv_priv
@@ -57,6 +75,239 @@ struct yuv_priv
 GLfloat local_value[16];
 };
 
+#ifdef VLCGL_HAS_PBO
+static int
+pbo_map(const opengl_tex_converter_t *tc, picture_t *pic)
+{
+picture_sys_t *picsys = pic->p_sys;
+
+tc->api->GenBuffers(pic->i_planes, picsys->buffers);
+
+const GLbitfield access = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT |
+  GL_MAP_PERSISTENT_BIT;
+for (int i = 0; i < pic->i_planes; ++i)
+{
+tc->api->BindBuffer(GL_PIXEL_UNPACK_BUFFER, picsys->buffers[i]);
+tc->api->BufferStorage(GL_PIXEL_UNPACK_BUFFER, picsys->bytes[i], NULL,
+   access);
+
+pic->p[i].p_pixels =
+tc->api->MapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, 
picsys->bytes[i],
+access);
+
+if (pic->p[i].p_pixels == NULL)
+{
+msg_Err(tc->parent, "could not map PBO buffers");
+for (i = i - 1; i >= 0; --i)
+{
+tc->api->BindBuffer(GL_PIXEL_UNPACK_BUFFER,
+picsys->buffers[i]);
+tc->api->UnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
+}
+tc->api->DeleteBuffers(pic->i_planes, picsys->buffers);
+memset(picsys->buffers, 0, PICTURE_PLANE_MAX * sizeof(GLuint));
+return VLC_EGENERIC;
+}
+}
+return VLC_SUCCESS;
+}
+
+/** Find next (bit) set */
+static int fnsll(unsigned long long x, unsigned i)
+{
+if (i >= CHAR_BIT * sizeof (x))
+return 0;
+return ffsll(x & ~((1ULL << i) - 1));
+}
+
+static void
+pbo_release_gpupics(const opengl_tex_converter_t *tc, bool force)
+{
+struct priv *priv = tc->priv;
+
+/* Release all pictures that are not used by the GPU anymore */
+for (unsigned i = ffsll(priv->ongpu.list); i;
+ i = fnsll(priv->ongpu.list, i))
+{
+assert(priv->ongpu.pics[i - 1] != NULL);
+
+picture_t *pic = priv->ongpu.pics[i - 1];
+picture_sys_t *picsys = 

[vlc-commits] vout: remove vout_Reset()

2017-01-17 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Jan  5 11:30:19 
2017 +0100| [95810fbd6f60acffa4895c973e2e1b1ff872a488] | committer: Thomas 
Guillem

vout: remove vout_Reset()

Pictures from leaking decoders won't be reset anymore. This may cause a freeze
if a vout is reused after a leaking decoder.

The call to ThreadFlush(vout, true, INT64_MAX) is now done from ThreadReinit().

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95810fbd6f60acffa4895c973e2e1b1ff872a488
---

 src/input/decoder.c |  4 
 src/video_output/video_output.c | 35 ---
 src/video_output/vout_control.h |  5 -
 3 files changed, 44 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 27549e3..1e8189a 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1793,10 +1793,6 @@ static void DeleteDecoder( decoder_t * p_dec )
 }
 if( p_owner->p_vout )
 {
-/* Hack to make sure all the the pictures are freed by the decoder
- * and that the vout is not paused anymore */
-vout_Reset( p_owner->p_vout );
-
 /* */
 input_resource_RequestVout( p_owner->p_resource, p_owner->p_vout, NULL,
 0, true );
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 7751ae6..764e2da 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -332,12 +332,6 @@ void vout_Flush(vout_thread_t *vout, mtime_t date)
 vout_control_WaitEmpty(>p->control);
 }
 
-void vout_Reset(vout_thread_t *vout)
-{
-vout_control_PushVoid(>p->control, VOUT_CONTROL_RESET);
-vout_control_WaitEmpty(>p->control);
-}
-
 bool vout_IsEmpty(vout_thread_t *vout)
 {
 picture_t *picture = picture_fifo_Peek(vout->p->decoder_fifo);
@@ -1207,32 +1201,6 @@ static void ThreadFlush(vout_thread_t *vout, bool below, 
mtime_t date)
 picture_fifo_Flush(vout->p->decoder_fifo, date, below);
 }
 
-static void ThreadReset(vout_thread_t *vout)
-{
-ThreadFlush(vout, true, INT64_MAX);
-if (vout->p->decoder_pool) {
-unsigned count, leaks;
-
-if (vout->p->private_pool != NULL) {
-count = picture_pool_GetSize(vout->p->private_pool);
-picture_pool_Release(vout->p->private_pool);
-}
-
-leaks = picture_pool_Reset(vout->p->decoder_pool);
-if (leaks > 0)
-msg_Err(vout, "%u picture(s) leaked by decoder", leaks);
-
-if (vout->p->private_pool != NULL) {
-vout->p->private_pool = picture_pool_Reserve(vout->p->decoder_pool,
- count);
-if (vout->p->private_pool == NULL)
-abort();
-}
-}
-vout->p->pause.is_on = false;
-vout->p->pause.date  = mdate();
-}
-
 static void ThreadStep(vout_thread_t *vout, mtime_t *duration)
 {
 *duration = 0;
@@ -1603,9 +1571,6 @@ static int ThreadControl(vout_thread_t *vout, 
vout_control_cmd_t cmd)
 case VOUT_CONTROL_FLUSH:
 ThreadFlush(vout, false, cmd.u.time);
 break;
-case VOUT_CONTROL_RESET:
-ThreadReset(vout);
-break;
 case VOUT_CONTROL_STEP:
 ThreadStep(vout, cmd.u.time_ptr);
 break;
diff --git a/src/video_output/vout_control.h b/src/video_output/vout_control.h
index e50c096..8fbefa6 100644
--- a/src/video_output/vout_control.h
+++ b/src/video_output/vout_control.h
@@ -51,11 +51,6 @@ void vout_GetResetStatistic( vout_thread_t *p_vout, unsigned 
*pi_displayed,
 void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
 
 /*
- * Reset the states of the vout.
- */
-void vout_Reset( vout_thread_t *p_vout );
-
-/*
  * Cancel the vout, if cancel is true, it won't return any pictures after this
  * call.
  */

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout: remove picture_pool_Reset()

2017-01-17 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Jan  5 11:30:37 
2017 +0100| [1f8bbc5cb14c6dd1479c48237ba72692e0fe3d07] | committer: Thomas 
Guillem

vout: remove picture_pool_Reset()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f8bbc5cb14c6dd1479c48237ba72692e0fe3d07
---

 include/vlc_picture_pool.h | 12 
 src/misc/picture_pool.c| 14 --
 2 files changed, 26 deletions(-)

diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h
index 69a3d13..679e986 100644
--- a/include/vlc_picture_pool.h
+++ b/include/vlc_picture_pool.h
@@ -146,18 +146,6 @@ 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 If any picture in the pool is not free, this function will leak
- * and may eventually cause invalid memory accesses.
- *
- * @note This function has no effects if all pictures in the pool are free.
- *
- * @return the number of picture references that were freed
- */
-unsigned picture_pool_Reset( picture_pool_t * );
-
-/**
  * Cancel the picture pool.
  *
  * It won't return any pictures via picture_pool_Get or picture_pool_Wait if
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 8a507ac..348d136 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -288,20 +288,6 @@ void picture_pool_Cancel(picture_pool_t *pool, bool 
canceled)
 vlc_mutex_unlock(>lock);
 }
 
-unsigned picture_pool_Reset(picture_pool_t *pool)
-{
-unsigned ret;
-
-vlc_mutex_lock(>lock);
-assert(pool->refs > 0);
-ret = pool->picture_count - popcountll(pool->available);
-pool->available = (1ULL << pool->picture_count) - 1;
-pool->canceled = false;
-vlc_mutex_unlock(>lock);
-
-return ret;
-}
-
 unsigned picture_pool_GetSize(const picture_pool_t *pool)
 {
 return pool->picture_count;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: libmp4: don't return empty fake root if peek fails

2017-01-17 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie  | Sun Mar 27 
14:44:03 2016 +0200| [180979bbf205ec3d2243b3608e35bd19ebc33f6e] | committer: 
Francois Cartegnie

demux: libmp4: don't return empty fake root if peek fails

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=180979bbf205ec3d2243b3608e35bd19ebc33f6e
---

 modules/demux/mp4/libmp4.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 7717423..133f77f 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -4638,7 +4638,11 @@ MP4_Box_t *MP4_BoxGetNextChunk( stream_t *s )
 return NULL;
 
 /* We might get a ftyp box or a SmooBox */
-MP4_PeekBoxHeader( s, p_tmp_box );
+if( MP4_PeekBoxHeader( s, p_tmp_box ) == 0 )
+{
+free( p_tmp_box );
+return NULL;
+}
 
 if( p_tmp_box->i_type == ATOM_ftyp )
 {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: mp4: fix regression on incomplete SPU samples

2017-01-17 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie  | Tue Jan 17 
18:02:33 2017 +0100| [ab8cc7d643ef2f6c7a24ef739916e245fb21e2ee] | committer: 
Francois Cartegnie

demux: mp4: fix regression on incomplete SPU samples

using p_block buffer size was broken since the conversion
occured between.

Also now uses stream_Block

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ab8cc7d643ef2f6c7a24ef739916e245fb21e2ee
---

 modules/demux/mp4/mp4.c | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index badcd6b..e23346d 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -513,12 +513,8 @@ static void MP4_GetInterleaving( demux_t *p_demux, 
uint64_t *pi_max_contiguous,
 p_sys->track[i].i_chunk = 0;
 }
 
-static block_t * MP4_Block_Read( demux_t *p_demux, const mp4_track_t *p_track, 
int i_size )
+static block_t * MP4_Block_Convert( demux_t *p_demux, const mp4_track_t 
*p_track, block_t *p_block )
 {
-block_t *p_block = vlc_stream_Block( p_demux->s, i_size );
-if ( !p_block )
-return NULL;
-
 /* might have some encap */
 if( p_track->fmt.i_cat == SPU_ES )
 {
@@ -546,6 +542,10 @@ static block_t * MP4_Block_Read( demux_t *p_demux, const 
mp4_track_t *p_track, i
 
 static void MP4_Block_Send( demux_t *p_demux, mp4_track_t *p_track, block_t 
*p_block )
 {
+p_block = MP4_Block_Convert( p_demux, p_track, p_block );
+if( p_block == NULL )
+return;
+
 if ( p_track->b_chans_reorder )
 {
 aout_ChannelReorder( p_block->p_buffer, p_block->i_buffer,
@@ -1176,7 +1176,7 @@ static int DemuxTrack( demux_t *p_demux, mp4_track_t *tk, 
uint64_t i_readpos,
 }
 
 /* now read pes */
-if( !(p_block = MP4_Block_Read( p_demux, tk, i_samplessize )) )
+if( !(p_block = vlc_stream_Block( p_demux->s, i_samplessize )) )
 {
 msg_Warn( p_demux, "track[0x%x] will be disabled (eof?)"
": Failed to read %d bytes sample at 
%"PRIu64,
@@ -4593,12 +4593,11 @@ static int LeafParseTRUN( demux_t *p_demux, mp4_track_t 
*p_track,
 return VLC_EGENERIC;
 }
 
-block_t *p_block = MP4_Block_Read( p_demux, p_track, __MIN( len, 
INT32_MAX ) );
+block_t *p_block = vlc_stream_Block( p_demux->s, len );
 uint32_t i_read = ( p_block ) ? p_block->i_buffer : 0;
 if( i_read < len )
 {
 /* update data left in mdat */
-*pi_mdatlen -= chunk_size;
 *pi_mdatlen -= i_read;
 free( p_block );
 return VLC_EGENERIC;
@@ -4823,7 +4822,7 @@ static int LeafParseMDATwithMOOV( demux_t *p_demux )
 
 /* now read pes */
 
-if( !(p_block = MP4_Block_Read( p_demux, p_track, 
i_samplessize )) )
+if( !(p_block = vlc_stream_Block( p_demux->s, i_samplessize )) 
)
 {
 uint64_t i_pos = vlc_stream_Tell( p_demux->s );
 p_sys->context.i_mdatbytesleft -= ( i_pos - i_current_pos 
);

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: mp4: simplify spu setup

2017-01-17 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie  | Tue Jan 17 
15:34:05 2017 +0100| [c538c770c2af27852182ae56e371d1a3176a9ce5] | committer: 
Francois Cartegnie

demux: mp4: simplify spu setup

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c538c770c2af27852182ae56e371d1a3176a9ce5
---

 modules/demux/mp4/essetup.c | 29 -
 modules/demux/mp4/mp4.c | 13 +++--
 2 files changed, 11 insertions(+), 31 deletions(-)

diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index c06d475..ac1d8c5 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -1167,36 +1167,23 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t 
*p_track, MP4_Box_t *p_sample )
 return 1;
 }
 
-int SetupCCES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
+int SetupSpuES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
 {
-VLC_UNUSED(p_demux);
-
+/* It's a little ugly but .. there are special cases */
 switch( p_sample->i_type )
 {
-case( ATOM_c608 ): /* EIA608 closed captions */
-//case( ATOM_c708 ): /* EIA708 closed captions */
+case ATOM_c608: /* EIA608 closed captions */
+//case ATOM_c708: /* EIA708 closed captions */
 p_track->fmt.i_codec = VLC_CODEC_EIA608_1;
-p_track->fmt.i_cat = SPU_ES;
 break;
-default:
-return 0;
-}
-
-return 1;
-}
 
-int SetupSpuES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
-{
-MP4_Box_data_sample_text_t *p_text = p_sample->data.p_sample_text;
-if(!p_text)
-return 0;
-
-/* It's a little ugly but .. there are special cases */
-switch( p_sample->i_type )
-{
 case( VLC_FOURCC( 't', 'e', 'x', 't' ) ):
 case( VLC_FOURCC( 't', 'x', '3', 'g' ) ):
 {
+const MP4_Box_data_sample_text_t *p_text = 
p_sample->data.p_sample_text;
+if(!p_text)
+return 0;
+
 p_track->fmt.i_codec = VLC_CODEC_TX3G;
 
 if( p_text->i_display_flags & 0xC000 )
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 898c2fd..badcd6b 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -2652,16 +2652,9 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t 
*p_track,
 break;
 
 case SPU_ES:
-switch( p_sample->i_handler )
-{
-case ATOM_clcp:
-if ( !SetupCCES( p_demux, p_track, p_sample ) )
-return VLC_EGENERIC;
-break;
-default:
-if ( !SetupSpuES( p_demux, p_track, p_sample ) )
- return VLC_EGENERIC;
-}
+if ( !SetupSpuES( p_demux, p_track, p_sample ) )
+   return VLC_EGENERIC;
+break;
 
 default:
 break;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: mp4: simplify subs cases

2017-01-17 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie  | Tue Jan 17 
15:21:46 2017 +0100| [2cc48569c388379b9d88e2b0201da5d0b31f8d89] | committer: 
Francois Cartegnie

demux: mp4: simplify subs cases

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cc48569c388379b9d88e2b0201da5d0b31f8d89
---

 modules/demux/mp4/mp4.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 283f7a1..898c2fd 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3107,11 +3107,7 @@ static void MP4_TrackCreate( demux_t *p_demux, 
mp4_track_t *p_track,
 case( ATOM_text ):
 case( ATOM_subp ):
 case( ATOM_sbtl ):
-p_track->fmt.i_cat = SPU_ES;
-break;
-
-/* closed captions */
-case( ATOM_clcp ):
+case( ATOM_clcp ): /* closed captions */
 p_track->fmt.i_cat = SPU_ES;
 break;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: mp4: fix rrtp video

2017-01-17 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie  | Tue Jan 17 
18:42:41 2017 +0100| [f4530a1fc66c2ba693c05e35c9b0e580007dc875] | committer: 
Francois Cartegnie

demux: mp4: fix rrtp video

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f4530a1fc66c2ba693c05e35c9b0e580007dc875
---

 modules/demux/mp4/essetup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index ac1d8c5..7482e28 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -247,6 +247,8 @@ static int SetupRTPReceptionHintTrack( demux_t *p_demux, 
mp4_track_t *p_track, M
 if( !strcmp(pch, "H264") )
 {
 p_track->fmt.i_codec = VLC_CODEC_H264;
+/* *** sending AnnexB ! */
+p_track->fmt.b_packetized = false;
 }
 else if( !strcmp(pch, "GSM") )
 {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout/macosx: add missing locks/unlocks

2017-01-17 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Tue Jan 17 15:37:38 
2017 +0100| [48a528381c8ed97267d009606d831099dbdfb041] | committer: Thomas 
Guillem

vout/macosx: add missing locks/unlocks

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48a528381c8ed97267d009606d831099dbdfb041
---

 modules/video_output/macosx.m | 12 
 1 file changed, 12 insertions(+)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index e3fc9ac..132f5b8 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -325,7 +325,11 @@ void Close (vlc_object_t *this)
waitUntilDone:NO];
 
 if (sys->vgl != NULL)
+{
+vlc_gl_MakeCurrent(sys->gl);
 vout_display_opengl_Delete (sys->vgl);
+vlc_gl_ReleaseCurrent(sys->gl);
+}
 
 if (sys->gl != NULL)
 vlc_object_release(sys->gl);
@@ -353,7 +357,11 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned 
requested_count)
 vout_display_sys_t *sys = vd->sys;
 
 if (!sys->pool)
+{
+vlc_gl_MakeCurrent(sys->gl);
 sys->pool = vout_display_opengl_GetPool (sys->vgl, requested_count);
+vlc_gl_ReleaseCurrent(sys->gl);
+}
 assert(sys->pool);
 return sys->pool;
 }
@@ -363,14 +371,18 @@ static void PictureRender (vout_display_t *vd, picture_t 
*pic, subpicture_t *sub
 
 vout_display_sys_t *sys = vd->sys;
 
+vlc_gl_MakeCurrent(sys->gl);
 vout_display_opengl_Prepare (sys->vgl, pic, subpicture);
+vlc_gl_ReleaseCurrent(sys->gl);
 }
 
 static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t 
*subpicture)
 {
 vout_display_sys_t *sys = vd->sys;
 [sys->glView setVoutFlushing:YES];
+vlc_gl_MakeCurrent(sys->gl);
 vout_display_opengl_Display (sys->vgl, >source);
+vlc_gl_ReleaseCurrent(sys->gl);
 [sys->glView setVoutFlushing:NO];
 picture_Release (pic);
 sys->has_first_frame = true;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Fix lirc activation after detection

2017-01-17 Thread Nicolas Chauvet
vlc | branch: master | Nicolas Chauvet  | Mon Jan 16 
22:49:54 2017 +0100| [409c41370f5eae1b7e1b3790a69071a0b9934dd0] | committer: 
Thomas Guillem

Fix lirc activation after detection

This fix build time activation of lirc.
"true" isn't "yes", so the HAVE_LIRC condition isn't met

This bug was initialy reported as
https://bugzilla.rpmfusion.org/4420

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=409c41370f5eae1b7e1b3790a69071a0b9934dd0
---

 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 29eaed9..864ff98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3931,7 +3931,7 @@ have_lirc="no"
 AS_IF([test "${enable_lirc}" = "yes"], [
   AC_CHECK_HEADER(lirc/lirc_client.h, [
 AC_CHECK_LIB(lirc_client, lirc_init, [
-  have_lirc="true"
+  have_lirc="yes"
 ])
   ])
 ])

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] wasapi: fix wrong state when the fmt is not recognised

2017-01-17 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Tue Jan 17 09:12:08 
2017 +0100| [0ae30bfe340e744cec9d94516843dd899379dbde] | committer: Thomas 
Guillem

wasapi: fix wrong state when the fmt is not recognised

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ae30bfe340e744cec9d94516843dd899379dbde
---

 modules/audio_output/wasapi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index 1ed39b5..cafca6b 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -492,7 +492,10 @@ static HRESULT Start(aout_stream_t *s, 
audio_sample_format_t *restrict pfmt,
 buffer_duration = AOUT_MAX_PREPARE_TIME * 10;
 }
 else
+{
+hr = E_FAIL;
 goto error;
+}
 
 hr = IAudioClient_IsFormatSupported(sys->client, shared_mode,
 pwf, _closest);

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits