[vlc-commits] contrib: mfx: Update to the latest version

2018-03-29 Thread Martin Storsjö
vlc | branch: master | Martin Storsjö  | Thu Mar 29 23:59:26 
2018 +0300| [31a382df84b8ac8a6f803318caea829c3b642165] | committer: Martin 
Storsjö

contrib: mfx: Update to the latest version

This avoids having to force building in C++98 mode.

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

 contrib/src/mfx/rules.mak | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/src/mfx/rules.mak b/contrib/src/mfx/rules.mak
index 165ff8610a..2b4fbad702 100644
--- a/contrib/src/mfx/rules.mak
+++ b/contrib/src/mfx/rules.mak
@@ -1,7 +1,7 @@
 # mfx (Media SDK)
 
 mfx_GITURL := https://github.com/lu-zero/mfx_dispatch.git
-MFX_GITHASH := 7adf2e463149adf6820de745a4d9e5d9a1ba8763
+MFX_GITHASH := b3b0bc9524a8a936fb1b80ca2db45566feb2e868
 
 ifeq ($(call need_pkg,"mfx"),)
 PKGS_FOUND += mfx
@@ -23,6 +23,6 @@ mfx: mfx-$(MFX_GITHASH).tar.xz .sum-mfx
$(MOVE)
 
 .mfx: mfx
-   cd $< && $(HOSTVARS) ./configure $(HOSTCONF) CXXFLAGS="-std=c++98 -O2"
+   cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
cd $< && $(MAKE) install
touch $@

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


[vlc-commits] contrib: projectM: Don't force building in C++98 mode

2018-03-29 Thread Martin Storsjö
vlc | branch: master | Martin Storsjö  | Thu Mar 29 23:57:26 
2018 +0300| [e2ea86d8a21d5ddf63f9263aec401f0f8556e671] | committer: Martin 
Storsjö

contrib: projectM: Don't force building in C++98 mode

Instead patch the project to fix the error that was clang gave when
building in C+11 mode (which clang 6 does by default):

Renderer/VideoEcho.cpp:77:30: error: non-constant-expression cannot be narrowed 
from type 'double' to 'float' in initializer list [-Wc++11-narrowing]
  float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy},

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

 contrib/src/projectM/clang6.patch | 18 ++
 contrib/src/projectM/rules.mak|  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/contrib/src/projectM/clang6.patch 
b/contrib/src/projectM/clang6.patch
new file mode 100644
index 00..122b7fff6c
--- /dev/null
+++ b/contrib/src/projectM/clang6.patch
@@ -0,0 +1,18 @@
+diff -urN projectM-orig/Renderer/VideoEcho.cpp projectM/Renderer/VideoEcho.cpp
+--- projectM-orig/Renderer/VideoEcho.cpp   2009-12-06 03:42:51.0 
+0200
 projectM/Renderer/VideoEcho.cpp2018-03-29 23:56:45.852289647 +0300
+@@ -74,10 +74,10 @@
+   default: flipx=1;flipy=1; break;
+   }
+ 
+-  float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy},
+-{-0.5*flipx,  0.5*flipy},
+-{ 0.5*flipx,  0.5*flipy},
+-{ 0.5*flipx, -0.5*flipy}};
++  float pointsFlip[4][2] = {{-0.5f*flipx, -0.5f*flipy},
++{-0.5f*flipx,  0.5f*flipy},
++{ 0.5f*flipx,  0.5f*flipy},
++{ 0.5f*flipx, -0.5f*flipy}};
+ 
+   glVertexPointer(2,GL_FLOAT,0,pointsFlip);
+   glDrawArrays(GL_TRIANGLE_FAN,0,4);
diff --git a/contrib/src/projectM/rules.mak b/contrib/src/projectM/rules.mak
index a9e7b29911..d9edde0932 100644
--- a/contrib/src/projectM/rules.mak
+++ b/contrib/src/projectM/rules.mak
@@ -23,6 +23,7 @@ ifdef HAVE_WIN32
$(APPLY) $(SRC)/projectM/win32.patch
 endif
$(APPLY) $(SRC)/projectM/gcc6.patch
+   $(APPLY) $(SRC)/projectM/clang6.patch
$(MOVE)
 
 DEPS_projectM = glew $(DEPS_glew)
@@ -35,7 +36,6 @@ DEPS_projectM = glew $(DEPS_glew)
-DUSE_FTGL:BOOL=OFF \
-DINCLUDE-PROJECTM-PULSEAUDIO:BOOL=OFF \
-DINCLUDE-PROJECTM-QT:BOOL=OFF \
-   -DCMAKE_CXX_STANDARD=98 \
-DBUILD_PROJECTM_STATIC:BOOL=ON .
cd $< && $(MAKE) install
-cd $<; cp Renderer/libRenderer.a 
MilkdropPresetFactory/libMilkdropPresetFactory.a $(PREFIX)/lib

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


[vlc-commits] Revert "mmdevice: add a way to enable/disable passthrough"

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 17:00:30 
2018 +0200| [4b5b85f797c3cce2f96f060799b1348c19d6c85e] | committer: Thomas 
Guillem

Revert "mmdevice: add a way to enable/disable passthrough"

This reverts commit 872c6011e8e0c978cacf7494e5972ab4b963a6f0.

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

 modules/audio_output/mmdevice.c | 38 --
 1 file changed, 8 insertions(+), 30 deletions(-)

diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 5e41c5b6ee..c2f190f01f 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -1122,20 +1122,18 @@ static int Start(audio_output_t *aout, 
audio_sample_format_t *restrict fmt)
 const bool b_hdmi = AOUT_FMT_HDMI(fmt);
 if (b_spdif || b_hdmi)
 {
-if (!var_GetBool(aout, "mmdevice-digital-output"))
-return -1;
-
-if (b_hdmi || fmt->i_format == VLC_CODEC_DTS)
+switch (var_InheritInteger(aout, "mmdevice-passthrough"))
 {
-const bool no_codec_hd =
-var_InheritInteger(aout, "mmdevice-passthrough") == 
MM_PASSTHROUGH_ENABLED;
-if (no_codec_hd)
-{
+case MM_PASSTHROUGH_DISABLED:
+return -1;
+case MM_PASSTHROUGH_ENABLED:
 if (b_hdmi)
 return -1;
-else
+else if (fmt->i_format == VLC_CODEC_DTS)
 var_SetBool(aout, "dtshd", false );
-}
+/* falltrough */
+case MM_PASSTHROUGH_ENABLED_HD:
+break;
 }
 }
 
@@ -1239,16 +1237,6 @@ static void Stop(audio_output_t *aout)
 sys->stream = NULL;
 }
 
-static int DigitalOutCallback(vlc_object_t *obj, const char *varname,
-   vlc_value_t oldval, vlc_value_t newval, void 
*data)
-{
-(void) varname; (void) oldval; (void) newval; (void) data;
-audio_output_t *aout = (audio_output_t *)obj;
-
-aout_RestartRequest(aout, AOUT_RESTART_OUTPUT);
-return 0;
-}
-
 static int Open(vlc_object_t *obj)
 {
 audio_output_t *aout = (audio_output_t *)obj;
@@ -1326,14 +1314,6 @@ static int Open(vlc_object_t *obj)
 LeaveCriticalSection(>lock);
 LeaveMTA(); /* Leave MTA after thread has entered MTA */
 
-int passthrough = var_InheritInteger(aout, "mmdevice-passthrough");
-
-/* Inherit mmdevice-digital-output bool from mmdevice-passthrough */
-var_Create(aout, "mmdevice-digital-output", VLC_VAR_BOOL);
-var_SetBool(aout, "mmdevice-digital-output",
-passthrough != MM_PASSTHROUGH_DISABLED);
-var_AddCallback (aout, "mmdevice-digital-output", DigitalOutCallback, 
NULL);
-
 aout->start = Start;
 aout->stop = Stop;
 aout->time_get = TimeGet;
@@ -1357,8 +1337,6 @@ static void Close(vlc_object_t *obj)
 audio_output_t *aout = (audio_output_t *)obj;
 aout_sys_t *sys = aout->sys;
 
-var_DelCallback (aout, "mmdevice-digital-output", DigitalOutCallback, 
NULL);
-
 EnterCriticalSection(>lock);
 sys->requested_device = default_device; /* break out of MMSession() loop */
 sys->it = NULL; /* break out of MMThread() loop */

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


[vlc-commits] Revert "qt: win32: add "Digital Output" checkbox in audio device menu"

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 15:55:40 
2018 +0200| [ab93b7e518aa99c2d2432303e8445e4bf4167371] | committer: Thomas 
Guillem

Revert "qt: win32: add "Digital Output" checkbox in audio device menu"

This reverts commit bc594717e9e234c392306efe4f56492ffaa9dfc4.

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

 modules/gui/qt/menus.cpp | 19 ---
 1 file changed, 19 deletions(-)

diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
index 051510a41a..3652827f72 100644
--- a/modules/gui/qt/menus.cpp
+++ b/modules/gui/qt/menus.cpp
@@ -1576,25 +1576,6 @@ void VLCMenuBar::updateAudioDevice( intf_thread_t * 
p_intf, audio_output_t *p_ao
 free( ids );
 free( names );
 free( selected );
-
-#ifdef _WIN32
-char *module = var_GetString( p_aout, "module-name" );
-const bool is_mmdevice = module && strcmp(module, "mmdevice") == 0;
-free(module);
-if (is_mmdevice)
-{
-current->addSeparator();
-addActionWithCheckbox( current, "mmdevice-digital-output",
-   qtr( "Digital Output" ) );
-
-QVector objects;
-QVector varnames;
-varnames.append( "mmdevice-digital-output" );
-objects.append( VLC_OBJECT( p_aout ) );
-Populate( current, varnames, objects );
-}
-#endif
-
 }
 
 void VLCMenuBar::updateRecents( intf_thread_t *p_intf )

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


[vlc-commits] Revert "aout: export used module internal name"

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 15:56:03 
2018 +0200| [afbd2a8f3b9f1a4accc888a0336362ef7e12de75] | committer: Thomas 
Guillem

Revert "aout: export used module internal name"

This reverts commit 3aa4fda0d0742c7a68b57600c8bec311b3078d72.

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

 src/audio_output/output.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 78adace304..caf398ea18 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -249,9 +249,6 @@ audio_output_t *aout_New (vlc_object_t *parent)
 return NULL;
 }
 
-var_Create (aout, "module-name", VLC_VAR_STRING);
-var_SetString (aout, "module-name", module_get_object(owner->module));
-
 /*
  * Persistent audio output variables
  */

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


[vlc-commits] interface: remove use of obsolete logger interface

2018-03-29 Thread Lyndon Brown
vlc/vlc-3.0 | branch: master | Lyndon Brown  | Fri Mar 23 
01:34:56 2018 +| [a0c6a1d48661406bad19957745888fff13578d35] | committer: 
Rémi Denis-Courmont

interface: remove use of obsolete logger interface

patch attached to remove use of the obsolete logger interface in the
core interface code.

Signed-off-by: Rémi Denis-Courmont 
(cherry picked from commit f0e01208a39ff1b9f17c6555ee793be4e7c9ecd8)
Signed-off-by: Rémi Denis-Courmont 

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

 src/interface/interface.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index a100e048e4..6155d5ab7c 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -95,9 +95,6 @@ int intf_Create( playlist_t *playlist, const char *chain )
 val.psz_string = (char *)"http,none";
 text.psz_string = (char *)_("Web");
 var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );
-val.psz_string = (char *)"logger,none";
-text.psz_string = (char *)_("Debug logging");
-var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );
 val.psz_string = (char *)"gestures,none";
 text.psz_string = (char *)_("Mouse Gestures");
 var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );

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


[vlc-commits] stream_extractor/archive: use correct format specifier for ssize_t

2018-03-29 Thread Marvin Scholz
vlc/vlc-3.0 | branch: master | Marvin Scholz  | Thu Mar 29 
12:32:12 2018 +0200| [9b84234fdbb8ecb588ef0d7d4c3e7a5083789905] | committer: 
Rémi Denis-Courmont

stream_extractor/archive: use correct format specifier for ssize_t

Signed-off-by: Rémi Denis-Courmont 
(cherry picked from commit 55c30095259704eca30e4d556a1bec78e2a6ac00)
Signed-off-by: Rémi Denis-Courmont 

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

 modules/stream_extractor/archive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_extractor/archive.c 
b/modules/stream_extractor/archive.c
index 9396c34c3e..b58453ab8c 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -194,7 +194,7 @@ static la_ssize_t libarchive_read_cb( libarchive_t* p_arc, 
void* p_obj,
 if( i_ret < 0 )
 {
 archive_set_error( p_sys->p_archive, ARCHIVE_FATAL,
-  "libarchive_read_cb failed = %" PRId64, i_ret );
+  "libarchive_read_cb failed = %zd", i_ret );
 
 return ARCHIVE_FATAL;
 }

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


[vlc-commits] fix ball vfilter help text output

2018-03-29 Thread Lyndon Brown
vlc/vlc-3.0 | branch: master | Lyndon Brown  | Fri Mar 23 
01:48:19 2018 +| [3212e40bfb6ac39ba267568b88495eadfb3ddd59] | committer: 
Rémi Denis-Courmont

fix ball vfilter help text output

help text for the ball video filter's "ball-speed" and "ball-size"
options is misquoted, resulting in large chunks of whitespace mid-
sentence.

Signed-off-by: Rémi Denis-Courmont 
(cherry picked from commit 3156a062d79016a15b1949b466f32d2c7310aed8)
Signed-off-by: Rémi Denis-Courmont 

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

 modules/video_filter/ball.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/video_filter/ball.c b/modules/video_filter/ball.c
index da93211ef6..2c9aa5c933 100644
--- a/modules/video_filter/ball.c
+++ b/modules/video_filter/ball.c
@@ -101,12 +101,12 @@ static int getBallColor( vlc_object_t *p_this, char const 
*psz_newval );
 #define EDGE_VISIBLE_LONGTEXT N_("Set edge visibility.")
 
 #define BALL_SPEED_TEXT N_("Ball speed")
-#define BALL_SPEED_LONGTEXT N_("Set ball speed, the displacement value \
-in number of pixels by frame.")
+#define BALL_SPEED_LONGTEXT N_("Set ball speed, the displacement value " \
+   "in number of pixels by frame.")
 
 #define BALL_SIZE_TEXT N_("Ball size")
-#define BALL_SIZE_LONGTEXT N_("Set ball size giving its radius in number \
-of pixels")
+#define BALL_SIZE_LONGTEXT N_("Set ball size giving its radius in number " \
+  "of pixels")
 
 #define GRAD_THRESH_TEXT N_("Gradient threshold")
 #define GRAD_THRESH_LONGTEXT N_("Set gradient threshold for edge computation.")

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


[vlc-commits] access: pass ES output to access_New()

2018-03-29 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Mar 24 
12:38:59 2018 +0200| [9c6cde9415231dde72ecc396458a42388a36858a] | committer: 
Rémi Denis-Courmont

access: pass ES output to access_New()

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

 src/input/access.c | 9 +
 src/input/input.c  | 4 ++--
 src/input/stream.c | 2 +-
 src/input/stream.h | 3 ++-
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/input/access.c b/src/input/access.c
index 430f54236c..05b50cbe8a 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -67,7 +67,7 @@ static void vlc_access_Destroy(stream_t *access)
  * access_New:
  */
 static stream_t *access_New(vlc_object_t *parent, input_thread_t *input,
-bool preparsing, const char *mrl)
+es_out_t *out, bool preparsing, const char *mrl)
 {
 char *redirv[MAX_REDIR];
 unsigned redirc = 0;
@@ -77,6 +77,7 @@ static stream_t *access_New(vlc_object_t *parent, 
input_thread_t *input,
 return NULL;
 
 access->p_input = input;
+access->out = out;
 access->psz_name = NULL;
 access->psz_url = strdup(mrl);
 access->psz_filepath = NULL;
@@ -145,7 +146,7 @@ error:
 
 stream_t *vlc_access_NewMRL(vlc_object_t *parent, const char *mrl)
 {
-return access_New(parent, NULL, false, mrl);
+return access_New(parent, NULL, NULL, false, mrl);
 }
 
 /*
@@ -261,13 +262,13 @@ static void AStreamDestroy(stream_t *s)
 }
 
 stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
-   bool preparsing, const char *url)
+   es_out_t *out, bool preparsing, const char *url)
 {
 stream_t *s = vlc_stream_CommonNew(parent, AStreamDestroy);
 if (unlikely(s == NULL))
 return NULL;
 
-stream_t *access = access_New(VLC_OBJECT(s), input, preparsing, url);
+stream_t *access = access_New(VLC_OBJECT(s), input, out, preparsing, url);
 if (access == NULL)
 {
 stream_CommonDelete(s);
diff --git a/src/input/input.c b/src/input/input.c
index 6bac6a9a78..a0b6775f77 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2430,8 +2430,8 @@ static demux_t *InputDemuxNew( input_thread_t *p_input, 
input_source_t *p_source
 if( asprintf( _base_mrl, "%s://%s", psz_access, psz_path ) < 0 )
 return NULL;
 
-stream_t *p_stream = stream_AccessNew( obj, p_input, priv->b_preparsing,
-   psz_base_mrl );
+stream_t *p_stream = stream_AccessNew( obj, p_input, NULL,
+   priv->b_preparsing, psz_base_mrl );
 free( psz_base_mrl );
 
 if( p_stream == NULL )
diff --git a/src/input/stream.c b/src/input/stream.c
index 0ed08df918..72760ce82f 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -129,7 +129,7 @@ stream_t *(vlc_stream_NewURL)(vlc_object_t *p_parent, const 
char *psz_url)
 if( !psz_url )
 return NULL;
 
-stream_t *s = stream_AccessNew( p_parent, NULL, false, psz_url );
+stream_t *s = stream_AccessNew( p_parent, NULL, NULL, false, psz_url );
 if( s == NULL )
 msg_Err( p_parent, "no suitable access module for `%s'", psz_url );
 return s;
diff --git a/src/input/stream.h b/src/input/stream.h
index c481e7fe10..0ea78b8c00 100644
--- a/src/input/stream.h
+++ b/src/input/stream.h
@@ -34,7 +34,8 @@ void stream_CommonDelete( stream_t *s );
 /**
  * This function creates a raw stream_t from an URL.
  */
-stream_t *stream_AccessNew(vlc_object_t *, input_thread_t *, bool, const char 
*);
+stream_t *stream_AccessNew(vlc_object_t *, input_thread_t *, es_out_t *, bool,
+   const char *);
 
 /**
  * Probes stream filters automatically.

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


[vlc-commits] fix ball vfilter help text output

2018-03-29 Thread Lyndon Brown
vlc | branch: master | Lyndon Brown  | Fri Mar 23 01:48:19 
2018 +| [3156a062d79016a15b1949b466f32d2c7310aed8] | committer: Rémi 
Denis-Courmont

fix ball vfilter help text output

help text for the ball video filter's "ball-speed" and "ball-size"
options is misquoted, resulting in large chunks of whitespace mid-
sentence.

Signed-off-by: Rémi Denis-Courmont 

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

 modules/video_filter/ball.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/video_filter/ball.c b/modules/video_filter/ball.c
index da93211ef6..2c9aa5c933 100644
--- a/modules/video_filter/ball.c
+++ b/modules/video_filter/ball.c
@@ -101,12 +101,12 @@ static int getBallColor( vlc_object_t *p_this, char const 
*psz_newval );
 #define EDGE_VISIBLE_LONGTEXT N_("Set edge visibility.")
 
 #define BALL_SPEED_TEXT N_("Ball speed")
-#define BALL_SPEED_LONGTEXT N_("Set ball speed, the displacement value \
-in number of pixels by frame.")
+#define BALL_SPEED_LONGTEXT N_("Set ball speed, the displacement value " \
+   "in number of pixels by frame.")
 
 #define BALL_SIZE_TEXT N_("Ball size")
-#define BALL_SIZE_LONGTEXT N_("Set ball size giving its radius in number \
-of pixels")
+#define BALL_SIZE_LONGTEXT N_("Set ball size giving its radius in number " \
+  "of pixels")
 
 #define GRAD_THRESH_TEXT N_("Gradient threshold")
 #define GRAD_THRESH_LONGTEXT N_("Set gradient threshold for edge computation.")

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


[vlc-commits] access_demux: check that ES output is non-NULL

2018-03-29 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Mar 24 
13:01:54 2018 +0200| [eb171844342b4d948eb29c7e3b2c866d45200381] | committer: 
Rémi Denis-Courmont

access_demux: check that ES output is non-NULL

A combined access-demux cannot be instantiated without an ES output.
This checks that the ES output is present, avoiding crashes for
instance with vlc_stream_NewURL().

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

 modules/access/alsa.c| 4 
 modules/access/avcapture.m   | 3 +++
 modules/access/bluray.c  | 2 +-
 modules/access/cdda.c| 3 +++
 modules/access/dc1394.c  | 3 +++
 modules/access/dcp/dcp.cpp   | 2 +-
 modules/access/decklink.cpp  | 3 +++
 modules/access/dshow/dshow.cpp   | 3 +++
 modules/access/dvdnav.c  | 3 +++
 modules/access/dvdread.c | 3 +++
 modules/access/imem.c| 3 +++
 modules/access/jack.c| 3 +++
 modules/access/linsys/linsys_hdsdi.c | 3 +++
 modules/access/linsys/linsys_sdi.c   | 3 +++
 modules/access/live555.cpp   | 3 +++
 modules/access/oss.c | 3 +++
 modules/access/pulse.c   | 3 +++
 modules/access/qtsound.m | 3 +++
 modules/access/rdp.c | 3 +++
 modules/access/rtp/rtp.c | 3 +++
 modules/access/screen/screen.c   | 3 +++
 modules/access/screen/wayland.c  | 3 +++
 modules/access/screen/xcb.c  | 4 +++-
 modules/access/shm.c | 3 +++
 modules/access/timecode.c| 4 +++-
 modules/access/v4l2/demux.c  | 2 ++
 modules/access/v4l2/radio.c  | 2 ++
 modules/access/vnc.c | 3 +++
 modules/access/wasapi.c  | 3 +++
 29 files changed, 82 insertions(+), 4 deletions(-)

diff --git a/modules/access/alsa.c b/modules/access/alsa.c
index 6988b6..5cc0768de8 100644
--- a/modules/access/alsa.c
+++ b/modules/access/alsa.c
@@ -341,6 +341,10 @@ static uint16_t channel_maps[] = {
 static int Open (vlc_object_t *obj)
 {
 demux_t *demux = (demux_t *)obj;
+
+if (demux->out == NULL)
+return VLC_EGENERIC;
+
 demux_sys_t *sys = vlc_obj_malloc(obj, sizeof (*sys));
 if (unlikely(sys == NULL))
 return VLC_ENOMEM;
diff --git a/modules/access/avcapture.m b/modules/access/avcapture.m
index 30b9c199ef..278e7f8e94 100644
--- a/modules/access/avcapture.m
+++ b/modules/access/avcapture.m
@@ -257,6 +257,9 @@ static int Open(vlc_object_t *p_this)
 
 char*psz_uid = NULL;
 
+if (p_demux->out == NULL)
+return VLC_EGENERIC;
+
 @autoreleasepool {
 if (p_demux->psz_location && *p_demux->psz_location)
 psz_uid = strdup(p_demux->psz_location);
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 126acb7d44..cf4676a302 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -632,7 +632,7 @@ static int blurayOpen(vlc_object_t *object)
 const char *error_msg = NULL;
 #define BLURAY_ERROR(s) do { error_msg = s; goto error; } while(0)
 
-if (unlikely(!p_demux->p_input))
+if (p_demux->out == NULL || unlikely(p_demux->p_input == NULL))
 return VLC_EGENERIC;
 
 forced = !strncasecmp(p_demux->psz_url, "bluray:", 7);
diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 6a6815df24..384dfb03a4 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -217,6 +217,9 @@ static int DemuxOpen(vlc_object_t *obj)
 demux_t *demux = (demux_t *)obj;
 unsigned track;
 
+if (demux->out == NULL)
+return VLC_EGENERIC;
+
 vcddev_t *dev = DiscOpen(obj, demux->psz_location, demux->psz_filepath,
  );
 if (dev == NULL)
diff --git a/modules/access/dc1394.c b/modules/access/dc1394.c
index cf523fbf3c..631abf6f9b 100644
--- a/modules/access/dc1394.c
+++ b/modules/access/dc1394.c
@@ -166,6 +166,9 @@ static int Open( vlc_object_t *p_this )
 es_format_t   fmt;
 dc1394error_t res;
 
+if (p_demux->out == NULL)
+return VLC_EGENERIC;
+
 /* Set up p_demux */
 p_demux->pf_demux = Demux;
 p_demux->pf_control = Control;
diff --git a/modules/access/dcp/dcp.cpp b/modules/access/dcp/dcp.cpp
index b1b846522c..e53813beb3 100644
--- a/modules/access/dcp/dcp.cpp
+++ b/modules/access/dcp/dcp.cpp
@@ -306,7 +306,7 @@ static int Open( vlc_object_t *obj )
 es_format_t video_format, audio_format;
 int retval;
 
-if( !p_demux->psz_filepath )
+if( p_demux->out == NULL || p_demux->psz_filepath == NULL )
 return VLC_EGENERIC;
 
 p_sys = new ( nothrow ) demux_sys_t();
diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index 5d54b15d87..761396c75a 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -487,6 +487,9 @@ static int Open(vlc_object_t *p_this)
 int rate;
 BMDVideoInputFlags 

[vlc-commits] interface: remove use of obsolete logger interface

2018-03-29 Thread Lyndon Brown
vlc | branch: master | Lyndon Brown  | Fri Mar 23 01:34:56 
2018 +| [f0e01208a39ff1b9f17c6555ee793be4e7c9ecd8] | committer: Rémi 
Denis-Courmont

interface: remove use of obsolete logger interface

patch attached to remove use of the obsolete logger interface in the
core interface code.

Signed-off-by: Rémi Denis-Courmont 

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

 src/interface/interface.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index a100e048e4..6155d5ab7c 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -95,9 +95,6 @@ int intf_Create( playlist_t *playlist, const char *chain )
 val.psz_string = (char *)"http,none";
 text.psz_string = (char *)_("Web");
 var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );
-val.psz_string = (char *)"logger,none";
-text.psz_string = (char *)_("Debug logging");
-var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );
 val.psz_string = (char *)"gestures,none";
 text.psz_string = (char *)_("Mouse Gestures");
 var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );

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


[vlc-commits] stream_filter/cache_block: remove unused variable

2018-03-29 Thread Marvin Scholz
vlc | branch: master | Marvin Scholz  | Thu Mar 29 10:35:47 
2018 +0200| [e5126c83b154502d60c9ae7147eec4fb39376202] | committer: Rémi 
Denis-Courmont

stream_filter/cache_block: remove unused variable

Signed-off-by: Rémi Denis-Courmont 

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

 modules/stream_filter/cache_block.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/stream_filter/cache_block.c 
b/modules/stream_filter/cache_block.c
index d2f4757896..9d21b99655 100644
--- a/modules/stream_filter/cache_block.c
+++ b/modules/stream_filter/cache_block.c
@@ -117,7 +117,6 @@ static void AStreamPrebufferBlock(stream_t *s)
 msg_Dbg(s, "starting pre-buffering");
 for (;;)
 {
-const int64_t now = mdate();
 size_t cache_size = block_BytestreamRemaining( >cache );
 
 if (vlc_killed() || cache_size > STREAM_CACHE_PREBUFFER_SIZE)

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


[vlc-commits] stream_filter/cache_block: use correct format for size_t

2018-03-29 Thread Marvin Scholz
vlc | branch: master | Marvin Scholz  | Thu Mar 29 10:35:46 
2018 +0200| [bf00410b0e7ec5e96aa2e89cf3a3765397b2ea8d] | committer: Rémi 
Denis-Courmont

stream_filter/cache_block: use correct format for size_t

Signed-off-by: Rémi Denis-Courmont 

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

 modules/stream_filter/cache_block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_filter/cache_block.c 
b/modules/stream_filter/cache_block.c
index f462e3fb37..d2f4757896 100644
--- a/modules/stream_filter/cache_block.c
+++ b/modules/stream_filter/cache_block.c
@@ -123,7 +123,7 @@ static void AStreamPrebufferBlock(stream_t *s)
 if (vlc_killed() || cache_size > STREAM_CACHE_PREBUFFER_SIZE)
 {
 
-msg_Dbg(s, "prebuffering done %"PRId64" bytes in",
+msg_Dbg(s, "prebuffering done %zu bytes in",
  cache_size);
 break;
 }

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


[vlc-commits] stream_extractor/archive: use correct format specifier for ssize_t

2018-03-29 Thread Marvin Scholz
vlc | branch: master | Marvin Scholz  | Thu Mar 29 12:32:12 
2018 +0200| [55c30095259704eca30e4d556a1bec78e2a6ac00] | committer: Rémi 
Denis-Courmont

stream_extractor/archive: use correct format specifier for ssize_t

Signed-off-by: Rémi Denis-Courmont 

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

 modules/stream_extractor/archive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_extractor/archive.c 
b/modules/stream_extractor/archive.c
index 9396c34c3e..b58453ab8c 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -194,7 +194,7 @@ static la_ssize_t libarchive_read_cb( libarchive_t* p_arc, 
void* p_obj,
 if( i_ret < 0 )
 {
 archive_set_error( p_sys->p_archive, ARCHIVE_FATAL,
-  "libarchive_read_cb failed = %" PRId64, i_ret );
+  "libarchive_read_cb failed = %zd", i_ret );
 
 return ARCHIVE_FATAL;
 }

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


[vlc-commits] interface: remove use of obsolete logger interface

2018-03-29 Thread jnqnfe
vlc | branch: master | jnq...@gmail.com  | Fri Mar 23 
01:34:56 2018 +| [e1671e404f5c815afc480563fed5f14c225fe589] | committer: 
Rémi Denis-Courmont

interface: remove use of obsolete logger interface

patch attached to remove use of the obsolete logger interface in the
core interface code.
From 391b1deb4df4fbb98c13f870aa8a9a22bf839208 Mon Sep 17 00:00:00 2001
From: Lyndon Brown 
Date: Fri, 23 Mar 2018 01:30:01 +
Subject: interface: remove obsolete logger interface

Signed-off-by: Rémi Denis-Courmont 

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

 src/interface/interface.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index a100e048e4..6155d5ab7c 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -95,9 +95,6 @@ int intf_Create( playlist_t *playlist, const char *chain )
 val.psz_string = (char *)"http,none";
 text.psz_string = (char *)_("Web");
 var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );
-val.psz_string = (char *)"logger,none";
-text.psz_string = (char *)_("Debug logging");
-var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );
 val.psz_string = (char *)"gestures,none";
 text.psz_string = (char *)_("Mouse Gestures");
 var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, ,  );

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


[vlc-commits] avcodec: fix black screen with hdtv-fixed videos

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Thu Mar 29 
15:08:13 2018 +0200| [6c54abb7472548f55a0f87bf98a61d729ccc6d32] | committer: 
Thomas Guillem

avcodec: fix black screen with hdtv-fixed videos

In case of indirect rendering.

This fixes a regression from dfb767189073493336df0cf43f7d0b6bf51f63e3

Fixes #20175

(cherry picked from commit c988b8d58b01ef6d628e3051774a2032dd7f6b7d)
Signed-off-by: Thomas Guillem 

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

 modules/codec/avcodec/video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 9df2c413f8..a25f6ca461 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -351,8 +351,8 @@ static int lavc_CopyPicture(decoder_t *dec, picture_t *pic, 
AVFrame *frame)
 sys->p_context->pix_fmt, (name != NULL) ? name : "unknown");
 return VLC_EGENERIC;
 } else if (fourcc != pic->format.i_chroma
- || frame->width != (int) pic->format.i_visible_width
- || frame->height != (int) pic->format.i_visible_height)
+ || frame->width > (int) pic->format.i_width
+ || frame->height > (int) pic->format.i_height)
 {
 msg_Warn(dec, "dropping frame because the vout changed");
 return VLC_EGENERIC;

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


[vlc-commits] avcodec: fix black screen with hdtv-fixed videos

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 15:08:13 
2018 +0200| [c988b8d58b01ef6d628e3051774a2032dd7f6b7d] | committer: Thomas 
Guillem

avcodec: fix black screen with hdtv-fixed videos

In case of indirect rendering.

This fixes a regression from dfb767189073493336df0cf43f7d0b6bf51f63e3

Fixes #20175

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

 modules/codec/avcodec/video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 174a252388..b505d34846 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -365,8 +365,8 @@ static int lavc_CopyPicture(decoder_t *dec, picture_t *pic, 
AVFrame *frame)
 sys->p_context->pix_fmt, (name != NULL) ? name : "unknown");
 return VLC_EGENERIC;
 } else if (fourcc != pic->format.i_chroma
- || frame->width != (int) pic->format.i_visible_width
- || frame->height != (int) pic->format.i_visible_height)
+ || frame->width > (int) pic->format.i_width
+ || frame->height > (int) pic->format.i_height)
 {
 msg_Warn(dec, "dropping frame because the vout changed");
 return VLC_EGENERIC;

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


[vlc-commits] avcodec: with black screen with hdtv-fixed videos

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Thu Mar 29 
15:08:13 2018 +0200| [fb047c42bc20b1375ec4d36144152be6e9c4ee23] | committer: 
Thomas Guillem

avcodec: with black screen with hdtv-fixed videos

In case of indirect rendering.

This fixes a regression from dfb767189073493336df0cf43f7d0b6bf51f63e3

Fixes #20175

(cherry picked from commit 242fccb1c7288ed0ae721db372d14fadae884cc1)
Signed-off-by: Thomas Guillem 

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

 modules/codec/avcodec/video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 9df2c413f8..a25f6ca461 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -351,8 +351,8 @@ static int lavc_CopyPicture(decoder_t *dec, picture_t *pic, 
AVFrame *frame)
 sys->p_context->pix_fmt, (name != NULL) ? name : "unknown");
 return VLC_EGENERIC;
 } else if (fourcc != pic->format.i_chroma
- || frame->width != (int) pic->format.i_visible_width
- || frame->height != (int) pic->format.i_visible_height)
+ || frame->width > (int) pic->format.i_width
+ || frame->height > (int) pic->format.i_height)
 {
 msg_Warn(dec, "dropping frame because the vout changed");
 return VLC_EGENERIC;

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


[vlc-commits] avcodec: with black screen with hdtv-fixed videos

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 15:08:13 
2018 +0200| [242fccb1c7288ed0ae721db372d14fadae884cc1] | committer: Thomas 
Guillem

avcodec: with black screen with hdtv-fixed videos

In case of indirect rendering.

This fixes a regression from dfb767189073493336df0cf43f7d0b6bf51f63e3

Fixes #20175

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

 modules/codec/avcodec/video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 174a252388..b505d34846 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -365,8 +365,8 @@ static int lavc_CopyPicture(decoder_t *dec, picture_t *pic, 
AVFrame *frame)
 sys->p_context->pix_fmt, (name != NULL) ? name : "unknown");
 return VLC_EGENERIC;
 } else if (fourcc != pic->format.i_chroma
- || frame->width != (int) pic->format.i_visible_width
- || frame->height != (int) pic->format.i_visible_height)
+ || frame->width > (int) pic->format.i_width
+ || frame->height > (int) pic->format.i_height)
 {
 msg_Warn(dec, "dropping frame because the vout changed");
 return VLC_EGENERIC;

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


[vlc-commits] mmdevice: disable passthrough by default

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Thu Mar 22 
09:25:13 2018 +0100| [b3897efd57328066ccd3f5613250b631b61b7a43] | committer: 
Thomas Guillem

mmdevice: disable passthrough by default

(cherry picked from commit 8b5389f994b2f4b00e349de467d623f09dbbd84e)
Signed-off-by: Thomas Guillem 

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

 modules/audio_output/mmdevice.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/mmdevice.h b/modules/audio_output/mmdevice.h
index 41dae596e5..e35bef7491 100644
--- a/modules/audio_output/mmdevice.h
+++ b/modules/audio_output/mmdevice.h
@@ -24,7 +24,7 @@
 #define MM_PASSTHROUGH_DISABLED 0
 #define MM_PASSTHROUGH_ENABLED 1
 #define MM_PASSTHROUGH_ENABLED_HD 2
-#define MM_PASSTHROUGH_DEFAULT MM_PASSTHROUGH_ENABLED_HD
+#define MM_PASSTHROUGH_DEFAULT MM_PASSTHROUGH_DISABLED
 
 typedef struct aout_stream aout_stream_t;
 

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


[vlc-commits] chromecast: don't ignore messages with a sessionId of 0

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Thu Mar 29 
13:58:41 2018 +0200| [0375b6d965fcfa0c2c7c574d466366aeff5de364] | committer: 
Thomas Guillem

chromecast: don't ignore messages with a sessionId of 0

This fixes the FINISHED message sometimes not handled.

(cherry picked from commit f5d3bcf344e1ffce26fed9d0ba1021ed074c5a04)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/chromecast_ctrl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 184e516e39..2b47268e1c 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -801,7 +801,7 @@ void intf_sys_t::processMediaMessage( const 
castchannel::CastMessage& msg )
 status[0]["playerState"].operator const char *(),
 sessionId );
 
-if ((m_mediaSessionId != sessionId && m_mediaSessionId != 0))
+if (sessionId != 0 && m_mediaSessionId != 0 && m_mediaSessionId != 
sessionId)
 {
 msg_Warn( m_module, "Ignoring message for a different media 
session");
 json_value_free(p_data);

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


[vlc-commits] chromecast: retry connection after a Dead state

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Thu Mar 29 
10:15:24 2018 +0200| [1fca7d2edd7fda7bc61baf3679ae9cd0772ebf32] | committer: 
Thomas Guillem

chromecast: retry connection after a Dead state

Retry only when playing a new input in order to avoid retry busy loops.

(cherry picked from commit 400fa1a9906bb8d53875c6475eed69a60cdb19f2)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/chromecast.h|   4 +-
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 102 --
 2 files changed, 79 insertions(+), 27 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h 
b/modules/stream_out/chromecast/chromecast.h
index 50c678f188..19b0c9dea1 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -185,6 +185,7 @@ struct intf_sys_t
 int httpd_file_fill( uint8_t *psz_request, uint8_t **pp_data, int *pi_data 
);
 void interrupt_wake_up();
 private:
+void reinit();
 bool handleMessages();
 
 bool processMessage(const castchannel::CastMessage );
@@ -237,7 +238,9 @@ private:
 private:
 vlc_object_t  * const m_module;
 const int  m_streaming_port;
+const int  m_device_port;
 std::stringm_mime;
+std::stringm_device_addr;
 
 std::string m_appTransportId;
 unsigned m_last_request_id;
@@ -248,7 +251,6 @@ private:
 vlc_cond_t   m_pace_cond;
 vlc_thread_t m_chromecastThread;
 
-
 on_input_event_itfm_on_input_event;
 void *m_on_input_event_data;
 
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index c293261594..184e516e39 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -91,6 +91,8 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int port, 
std::string device
int device_port, httpd_host_t *httpd_host)
  : m_module(p_this)
  , m_streaming_port(port)
+ , m_device_port(device_port)
+ , m_device_addr(device_addr)
  , m_last_request_id( 0 )
  , m_mediaSessionId( 0 )
  , m_on_input_event( NULL )
@@ -116,7 +118,8 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
  , m_pause_delay( VLC_TS_INVALID )
  , m_pingRetriesLeft( PING_WAIT_RETRIES )
 {
-m_communication = new ChromecastCommunication( p_this, 
device_addr.c_str(), device_port );
+m_communication = new ChromecastCommunication( p_this, 
m_device_addr.c_str(),
+   m_device_port );
 
 m_ctl_thread_interrupt = vlc_interrupt_create();
 if( unlikely(m_ctl_thread_interrupt == NULL) )
@@ -159,36 +162,40 @@ intf_sys_t::~intf_sys_t()
 var_Destroy( m_module->obj.parent->obj.parent, CC_SHARED_VAR_NAME );
 
 vlc_mutex_lock(_lock);
-switch ( m_state )
+if( m_communication )
 {
-case Ready:
-case Loading:
-case Buffering:
-case Playing:
-case Paused:
-case Stopping:
-case Stopped:
-// Generate the close messages.
-m_communication->msgReceiverClose( m_appTransportId );
-/* fallthrough */
-case Connecting:
-case Connected:
-case Launching:
-m_communication->msgReceiverClose(DEFAULT_CHOMECAST_RECEIVER);
-/* fallthrough */
-default:
-break;
-}
-vlc_mutex_unlock(_lock);
+switch ( m_state )
+{
+case Ready:
+case Loading:
+case Buffering:
+case Playing:
+case Paused:
+case Stopping:
+case Stopped:
+// Generate the close messages.
+m_communication->msgReceiverClose( m_appTransportId );
+/* fallthrough */
+case Connecting:
+case Connected:
+case Launching:
+m_communication->msgReceiverClose(DEFAULT_CHOMECAST_RECEIVER);
+/* fallthrough */
+default:
+break;
+}
 
-vlc_interrupt_kill( m_ctl_thread_interrupt );
+vlc_mutex_unlock(_lock);
+vlc_interrupt_kill( m_ctl_thread_interrupt );
+vlc_join(m_chromecastThread, NULL);
 
-vlc_join(m_chromecastThread, NULL);
+delete m_communication;
+}
+else
+vlc_mutex_unlock(_lock);
 
 vlc_interrupt_destroy( m_ctl_thread_interrupt );
 
-delete m_communication;
-
 if (m_meta != NULL)
 vlc_meta_Delete(m_meta);
 
@@ -202,6 +209,38 @@ intf_sys_t::~intf_sys_t()
 vlc_mutex_destroy(_lock);
 }
 
+void intf_sys_t::reinit()
+{
+assert( m_state == Dead );
+
+if( m_communication )
+{
+vlc_join( m_chromecastThread, NULL );
+delete m_communication;
+m_communication = NULL;
+}
+
+try
+{
+m_communication = new ChromecastCommunication( m_module,

[vlc-commits] chromecast: fix wrong state when media app was closed

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Wed Mar 28 
10:28:03 2018 +0200| [0d9908673bf99e5a36b593688757a607ab07fc71] | committer: 
Thomas Guillem

chromecast: fix wrong state when media app was closed

(cherry picked from commit 9a19ab41c10676df0b4606538544dfcaf0247e57)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/chromecast_ctrl.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index a70240544c..598cdf6392 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -405,6 +405,7 @@ bool intf_sys_t::isStateReady() const
 case Authenticating:
 case Connecting:
 case Stopping:
+case Stopped:
 case Dead:
 return false;
 default:

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


[vlc-commits] chromecast: use a pointer for m_communication

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Wed Mar 28 
18:46:18 2018 +0200| [93ddf7868ad9663068cb38ed14a5248017deb020] | committer: 
Thomas Guillem

chromecast: use a pointer for m_communication

In order to delete/create during the life time of intf_sys_t.

(cherry picked from commit a74e7ff8a1d43078a51472c110810cadc8ab1bed)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/chromecast.h|  2 +-
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 45 ---
 2 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h 
b/modules/stream_out/chromecast/chromecast.h
index 417ad5b09f..5e93c70e18 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -255,7 +255,7 @@ private:
 on_paused_changed_itf m_on_paused_changed;
 void *m_on_paused_changed_data;
 
-ChromecastCommunication m_communication;
+ChromecastCommunication *m_communication;
 std::queue m_msgQueue;
 States m_state;
 bool m_retry_on_fail;
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 598cdf6392..0703c841e5 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -97,7 +97,6 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int port, 
std::string device
  , m_on_input_event_data( NULL )
  , m_on_paused_changed( NULL )
  , m_on_paused_changed_data( NULL )
- , m_communication( p_this, device_addr.c_str(), device_port )
  , m_state( Authenticating )
  , m_retry_on_fail( false )
  , m_played_once( false )
@@ -117,6 +116,8 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
  , m_pause_delay( VLC_TS_INVALID )
  , m_pingRetriesLeft( PING_WAIT_RETRIES )
 {
+m_communication = new ChromecastCommunication( p_this, 
device_addr.c_str(), device_port );
+
 m_ctl_thread_interrupt = vlc_interrupt_create();
 if( unlikely(m_ctl_thread_interrupt == NULL) )
 throw std::runtime_error( "error creating interrupt context" );
@@ -126,7 +127,7 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
 vlc_cond_init( _pace_cond );
 
 std::stringstream ss;
-ss << "http://; << m_communication.getServerIp() << ":" << port;
+ss << "http://; << m_communication->getServerIp() << ":" << port;
 m_art_http_ip = ss.str();
 
 m_common.p_opaque = this;
@@ -168,12 +169,12 @@ intf_sys_t::~intf_sys_t()
 case Stopping:
 case Stopped:
 // Generate the close messages.
-m_communication.msgReceiverClose( m_appTransportId );
+m_communication->msgReceiverClose( m_appTransportId );
 /* fallthrough */
 case Connecting:
 case Connected:
 case Launching:
-m_communication.msgReceiverClose(DEFAULT_CHOMECAST_RECEIVER);
+m_communication->msgReceiverClose(DEFAULT_CHOMECAST_RECEIVER);
 /* fallthrough */
 default:
 break;
@@ -186,6 +187,8 @@ intf_sys_t::~intf_sys_t()
 
 vlc_interrupt_destroy( m_ctl_thread_interrupt );
 
+delete m_communication;
+
 if (m_meta != NULL)
 vlc_meta_Delete(m_meta);
 
@@ -316,7 +319,7 @@ void intf_sys_t::tryLoad()
 msg_Dbg( m_module, "Starting the media receiver application" );
 // Don't use setState as we don't want to signal the condition in 
this case.
 m_state = Launching;
-m_communication.msgReceiverLaunchApp();
+m_communication->msgReceiverLaunchApp();
 }
 return;
 }
@@ -328,7 +331,7 @@ void intf_sys_t::tryLoad()
 // Reset the mediaSessionID to allow the new session to become the current 
one.
 // we cannot start a new load when the last one is still processing
 m_last_request_id =
-m_communication.msgPlayerLoad( m_appTransportId, m_streaming_port,
+m_communication->msgPlayerLoad( m_appTransportId, m_streaming_port,
m_mime, m_meta );
 if( m_last_request_id != ChromecastCommunication::kInvalidId )
 m_state = Loading;
@@ -549,7 +552,7 @@ void intf_sys_t::mainLoop()
 vlc_interrupt_set( m_ctl_thread_interrupt );
 
 // State was already initialized as Authenticating
-m_communication.msgAuth();
+m_communication->msgAuth();
 
 while ( !vlc_killed() )
 {
@@ -594,8 +597,8 @@ void intf_sys_t::processAuthMessage( const 
castchannel::CastMessage& msg )
 {
 vlc_mutex_locker locker(_lock);
 setState( Connecting );
-m_communication.msgConnect(DEFAULT_CHOMECAST_RECEIVER);
-m_communication.msgReceiverGetStatus();
+m_communication->msgConnect(DEFAULT_CHOMECAST_RECEIVER);
+

[vlc-commits] chromecast: demux: add deinit()

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Wed Mar 28 
12:17:57 2018 +0200| [b8f3bc8269ff2f9b4f2b54ae73cc3b71734d1cbd] | committer: 
Thomas Guillem

chromecast: demux: add deinit()

(cherry picked from commit a7ee0f82f96f6bc26941ceb42365474bc62abb27)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/chromecast_demux.cpp | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast_demux.cpp 
b/modules/stream_out/chromecast/chromecast_demux.cpp
index fdd61092d6..08485d13b7 100644
--- a/modules/stream_out/chromecast/chromecast_demux.cpp
+++ b/modules/stream_out/chromecast/chromecast_demux.cpp
@@ -141,6 +141,14 @@ struct demux_cc
 resetTimes();
 }
 
+void deinit()
+{
+assert(p_renderer);
+p_renderer->pf_set_meta( p_renderer->p_opaque, NULL );
+p_renderer->pf_set_on_paused_changed_cb( p_renderer->p_opaque,
+ NULL, NULL );
+}
+
 void resetTimes()
 {
 m_start_time = m_last_time = -1;
@@ -162,11 +170,7 @@ struct demux_cc
 ~demux_cc()
 {
 if( p_renderer )
-{
-p_renderer->pf_set_meta( p_renderer->p_opaque, NULL );
-p_renderer->pf_set_on_paused_changed_cb( p_renderer->p_opaque,
- NULL, NULL );
-}
+deinit();
 }
 
 void resetDemuxEof()
@@ -414,14 +418,14 @@ struct demux_cc
 case DEMUX_FILTER_ENABLE:
 p_renderer = static_cast(
 var_InheritAddress( p_demux, CC_SHARED_VAR_NAME ) );
+assert(p_renderer != NULL);
 m_enabled = true;
 init();
 return VLC_SUCCESS;
 
 case DEMUX_FILTER_DISABLE:
 
-p_renderer->pf_set_on_paused_changed_cb( p_renderer->p_opaque,
- NULL, NULL );
+deinit();
 
 /* Seek back to last known position. Indeed we don't want to resume
  * from the input position that can be more than 1 minutes forward

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


[vlc-commits] chromecast: rename setOnPausedChangedCb to setDemuxEnabled

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Wed Mar 28 
18:54:56 2018 +0200| [6392b5ac207ebeddc562a6797bc5d3ebdc766559] | committer: 
Thomas Guillem

chromecast: rename setOnPausedChangedCb to setDemuxEnabled

(cherry picked from commit 90276eb2c3a8b4e4d02233c361dd9f92739801ef)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/chromecast.h |  6 +++---
 modules/stream_out/chromecast/chromecast_common.h  |  2 +-
 modules/stream_out/chromecast/chromecast_ctrl.cpp  | 13 +++--
 modules/stream_out/chromecast/chromecast_demux.cpp |  7 +++
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h 
b/modules/stream_out/chromecast/chromecast.h
index 0a550136ee..50c678f188 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -172,8 +172,8 @@ struct intf_sys_t
 void setHasInput(const std::string mime_type = "");
 
 void setOnInputEventCb(on_input_event_itf on_input_event, void 
*on_input_event_data);
-void setOnPausedChangedCb(on_paused_changed_itf on_paused_changed,
-  void *on_paused_changed_data);
+void setDemuxEnabled(bool enabled, on_paused_changed_itf on_paused_changed,
+ void *on_paused_changed_data);
 void requestPlayerStop();
 States state() const;
 
@@ -223,7 +223,7 @@ private:
 
 static int pace(void*);
 static void send_input_event(void *, enum cc_input_event event, union 
cc_input_arg arg);
-static void set_on_paused_changed_cb(void *, on_paused_changed_itf, void 
*);
+static void set_demux_enabled(void *, bool, on_paused_changed_itf, void *);
 
 static void set_pause_state(void*, bool paused, mtime_t delay);
 
diff --git a/modules/stream_out/chromecast/chromecast_common.h 
b/modules/stream_out/chromecast/chromecast_common.h
index 8b4199fed7..f5a378812d 100644
--- a/modules/stream_out/chromecast/chromecast_common.h
+++ b/modules/stream_out/chromecast/chromecast_common.h
@@ -58,7 +58,7 @@ typedef struct
 {
 void *p_opaque;
 
-void (*pf_set_on_paused_changed_cb)(void *, on_paused_changed_itf, void *);
+void (*pf_set_demux_enabled)(void *, bool enabled, on_paused_changed_itf, 
void *);
 
 mtime_t (*pf_get_time)(void*);
 
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 052d51d3f8..c293261594 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -131,7 +131,7 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
 m_art_http_ip = ss.str();
 
 m_common.p_opaque = this;
-m_common.pf_set_on_paused_changed_cb = set_on_paused_changed_cb;
+m_common.pf_set_demux_enabled = set_demux_enabled;
 m_common.pf_get_time = get_time;
 m_common.pf_pace = pace;
 m_common.pf_send_input_event = send_input_event;
@@ -1029,8 +1029,9 @@ void intf_sys_t::setOnInputEventCb(on_input_event_itf 
on_input_event,
 m_on_input_event_data = on_input_event_data;
 }
 
-void intf_sys_t::setOnPausedChangedCb(on_paused_changed_itf on_paused_changed,
-  void *on_paused_changed_data)
+void intf_sys_t::setDemuxEnabled(bool enabled,
+ on_paused_changed_itf on_paused_changed,
+ void *on_paused_changed_data)
 {
 vlc_mutex_locker locker(_lock);
 m_on_paused_changed = on_paused_changed;
@@ -1140,11 +1141,11 @@ mtime_t intf_sys_t::get_time(void *pt)
 return p_this->getPlaybackTimestamp();
 }
 
-void intf_sys_t::set_on_paused_changed_cb(void *pt,
-  on_paused_changed_itf itf, void 
*data)
+void intf_sys_t::set_demux_enabled(void *pt, bool enabled,
+   on_paused_changed_itf itf, void *data)
 {
 intf_sys_t *p_this = static_cast(pt);
-p_this->setOnPausedChangedCb(itf, data);
+p_this->setDemuxEnabled(enabled, itf, data);
 }
 
 int intf_sys_t::pace(void *pt)
diff --git a/modules/stream_out/chromecast/chromecast_demux.cpp 
b/modules/stream_out/chromecast/chromecast_demux.cpp
index 08485d13b7..589556406f 100644
--- a/modules/stream_out/chromecast/chromecast_demux.cpp
+++ b/modules/stream_out/chromecast/chromecast_demux.cpp
@@ -135,8 +135,8 @@ struct demux_cc
 
 es_out_Control( p_demux->p_next->out, ES_OUT_RESET_PCR );
 
-p_renderer->pf_set_on_paused_changed_cb(p_renderer->p_opaque,
-on_paused_changed_cb, p_demux);
+p_renderer->pf_set_demux_enabled(p_renderer->p_opaque, true,
+ on_paused_changed_cb, p_demux);
 
 resetTimes();
 

[vlc-commits] avcodec: accept NV12 an input

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Tue Mar 27 
19:47:17 2018 +0200| [9a6212cfbdc31a3ca8cf35ce42b21e3d7b31a5cd] | committer: 
Thomas Guillem

avcodec: accept NV12 an input

This removes a conversion when both decoder and encoder use NV12.

(cherry picked from commit 47b038e6c1e21f42b2c7f06b9062d8210f111905)
Signed-off-by: Thomas Guillem 

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

 modules/codec/avcodec/encoder.c | 20 +---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index e25d2ba0b3..74c5dc3144 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -543,12 +543,26 @@ int InitVideoEnc( vlc_object_t *p_this )
 
 if( p_codec->pix_fmts )
 {
+static const enum AVPixelFormat vlc_pix_fmts[] = {
+AV_PIX_FMT_YUV420P,
+AV_PIX_FMT_NV12,
+AV_PIX_FMT_RGB24,
+};
+bool found = false;
 const enum PixelFormat *p = p_codec->pix_fmts;
-for( ; *p != -1; p++ )
+for( ; !found && *p != -1; p++ )
 {
-if( *p == p_context->pix_fmt ) break;
+for( size_t i = 0; i < ARRAY_SIZE(vlc_pix_fmts); ++i )
+{
+if( *p == vlc_pix_fmts[i] )
+{
+found = true;
+p_context->pix_fmt = *p;
+break;
+}
+}
 }
-if( *p == -1 ) p_context->pix_fmt = p_codec->pix_fmts[0];
+if (!found) p_context->pix_fmt = p_codec->pix_fmts[0];
 GetVlcChroma( _enc->fmt_in.video, p_context->pix_fmt );
 p_enc->fmt_in.i_codec = p_enc->fmt_in.video.i_chroma;
 }

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


[vlc-commits] chromecast: reset state only when retrying

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Thu Mar 29 
10:13:52 2018 +0200| [96c18ad9c3d627bb30c16282122ce818d1ba02bd] | committer: 
Thomas Guillem

chromecast: reset state only when retrying

(cherry picked from commit aea0e78e43ca962cc1ea18b15b76ad46bc1ac965)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/chromecast_ctrl.cpp | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 4f7dc18ffb..052d51d3f8 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -463,10 +463,11 @@ int intf_sys_t::pace()
 return CC_PACE_OK_ENDED;
 else if( isStateError() || m_state == Stopped )
 {
-States error_state = m_state;
-m_state = Ready;
-if( error_state == LoadFailed && m_retry_on_fail )
+if( m_state == LoadFailed && m_retry_on_fail )
+{
+m_state = Ready;
 return CC_PACE_ERR_RETRY;
+}
 return CC_PACE_ERR;
 }
 

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


[vlc-commits] chromecast: always quit thread in Dead state

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Thu Mar 29 
10:12:23 2018 +0200| [8bd0a7f5d427ec969de0cedb2ed7bfe1e03c0792] | committer: 
Thomas Guillem

chromecast: always quit thread in Dead state

(cherry picked from commit f8040cd87db949e8bb708b2d80b4ca1fb12cf680)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/chromecast.h|  4 ++--
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 14 +-
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h 
b/modules/stream_out/chromecast/chromecast.h
index 5e93c70e18..0a550136ee 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -187,7 +187,7 @@ struct intf_sys_t
 private:
 bool handleMessages();
 
-void processMessage(const castchannel::CastMessage );
+bool processMessage(const castchannel::CastMessage );
 void queueMessage( QueueableMessages msg );
 
 void setPauseState(bool paused, mtime_t delay);
@@ -212,7 +212,7 @@ private:
 void mainLoop();
 void processAuthMessage( const castchannel::CastMessage& msg );
 void processHeartBeatMessage( const castchannel::CastMessage& msg );
-void processReceiverMessage( const castchannel::CastMessage& msg );
+bool processReceiverMessage( const castchannel::CastMessage& msg );
 void processMediaMessage( const castchannel::CastMessage& msg );
 void processConnectionMessage( const castchannel::CastMessage& msg );
 
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 0703c841e5..4f7dc18ffb 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -505,7 +505,7 @@ void intf_sys_t::sendInputEvent(enum cc_input_event event, 
union cc_input_arg ar
  * @param msg the CastMessage to process
  * @return 0 if the message has been successfuly processed else -1
  */
-void intf_sys_t::processMessage(const castchannel::CastMessage )
+bool intf_sys_t::processMessage(const castchannel::CastMessage )
 {
 const std::string & namespace_ = msg.namespace_();
 
@@ -513,12 +513,13 @@ void intf_sys_t::processMessage(const 
castchannel::CastMessage )
 msg_Dbg( m_module, "processMessage: %s->%s %s", namespace_.c_str(), 
msg.destination_id().c_str(), msg.payload_utf8().c_str());
 #endif
 
+bool ret = true;
 if (namespace_ == NAMESPACE_DEVICEAUTH)
 processAuthMessage( msg );
 else if (namespace_ == NAMESPACE_HEARTBEAT)
 processHeartBeatMessage( msg );
 else if (namespace_ == NAMESPACE_RECEIVER)
-processReceiverMessage( msg );
+ret = processReceiverMessage( msg );
 else if (namespace_ == NAMESPACE_MEDIA)
 processMediaMessage( msg );
 else if (namespace_ == NAMESPACE_CONNECTION)
@@ -527,6 +528,7 @@ void intf_sys_t::processMessage(const 
castchannel::CastMessage )
 {
 msg_Err( m_module, "Unknown namespace: %s", msg.namespace_().c_str());
 }
+return ret;
 }
 
 void intf_sys_t::queueMessage( QueueableMessages msg )
@@ -625,11 +627,12 @@ void intf_sys_t::processHeartBeatMessage( const 
castchannel::CastMessage& msg )
 json_value_free(p_data);
 }
 
-void intf_sys_t::processReceiverMessage( const castchannel::CastMessage& msg )
+bool intf_sys_t::processReceiverMessage( const castchannel::CastMessage& msg )
 {
 json_value *p_data = json_parse(msg.payload_utf8().c_str());
 std::string type((*p_data)["type"]);
 
+bool ret = true;
 if (type == "RECEIVER_STATUS")
 {
 json_value applications = (*p_data)["status"]["applications"];
@@ -715,6 +718,7 @@ void intf_sys_t::processReceiverMessage( const 
castchannel::CastMessage& msg )
 m_appTransportId = "";
 m_mediaSessionId = 0;
 setState( Dead );
+ret = false;
 }
 else
 {
@@ -723,6 +727,7 @@ void intf_sys_t::processReceiverMessage( const 
castchannel::CastMessage& msg )
 }
 
 json_value_free(p_data);
+return ret;
 }
 
 void intf_sys_t::processMediaMessage( const castchannel::CastMessage& msg )
@@ -958,8 +963,7 @@ bool intf_sys_t::handleMessages()
 }
 castchannel::CastMessage msg;
 msg.ParseFromArray(p_packet + PACKET_HEADER_LEN, i_payloadSize);
-processMessage(msg);
-return true;
+return processMessage(msg);
 }
 
 void intf_sys_t::doStop()

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


[vlc-commits] avcodec: fail if the specified encoder is not found

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Tue Mar 27 
17:40:32 2018 +0200| [234c95094d31c311534fd2779f1a7a9bb8481303] | committer: 
Thomas Guillem

avcodec: fail if the specified encoder is not found

Instead of using the default avcodec encoder.

(cherry picked from commit 2d628e37d2e9d28038bc5904deb2fe3d6837e4a6)
Signed-off-by: Thomas Guillem 

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

 modules/codec/avcodec/encoder.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index df8f663b86..e25d2ba0b3 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -344,12 +344,15 @@ int InitVideoEnc( vlc_object_t *p_this )
 {
 p_codec = avcodec_find_encoder_by_name( psz_encoder );
 if( !p_codec )
+{
 msg_Err( p_this, "Encoder `%s' not found", psz_encoder );
+return VLC_EGENERIC;
+}
 else if( p_codec->id != i_codec_id )
 {
 msg_Err( p_this, "Encoder `%s' can't handle %4.4s",
 psz_encoder, (char*)_enc->fmt_out.i_codec );
-p_codec = NULL;
+return VLC_EGENERIC;
 }
 }
 free( psz_encoder );

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


[vlc-commits] chromecast: test a maximum encoding size

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Tue Mar 27 
16:59:22 2018 +0200| [60b2aec07e9c02d29c106749bce71846d3869e63] | committer: 
Thomas Guillem

chromecast: test a maximum encoding size

(cherry picked from commit 0d3289c825efd325e06fcd77e2f5b1e37fb15cb5)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/cast.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/modules/stream_out/chromecast/cast.cpp 
b/modules/stream_out/chromecast/cast.cpp
index 7ad61da782..8eb4901a75 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -1006,6 +1006,10 @@ sout_stream_sys_t::GetVencOption( sout_stream_t 
*p_stream, vlc_fourcc_t *p_codec
 es_format_t fmt;
 es_format_InitFromVideo( , p_vid );
 fmt.i_codec = fmt.video.i_chroma = VLC_CODEC_I420;
+
+/* Test the maximum size/fps we will encode */
+fmt.video.i_visible_width = fmt.video.i_width = 1920;
+fmt.video.i_visible_height = fmt.video.i_height = 1080;
 fmt.video.i_frame_rate = 30;
 fmt.video.i_frame_rate_base = 1;
 

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


[vlc-commits] chromecast: use vpx encoder if there is no x264 module

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Tue Mar 27 
11:26:36 2018 +0200| [87b510a361e544af492d666f01966c59d7ae7281] | committer: 
Thomas Guillem

chromecast: use vpx encoder if there is no x264 module

(cherry picked from commit 4529f8add415995c0e959edee3626d063c66885b)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/cast.cpp | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp 
b/modules/stream_out/chromecast/cast.cpp
index 29282ae4ea..0e7956fcc9 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -906,6 +906,13 @@ bool sout_stream_sys_t::transcodingCanFallback() const
 return transcoding_state != (TRANSCODING_VIDEO|TRANSCODING_AUDIO);
 }
 
+static std::string GetVencVPXOption( sout_stream_t * /* p_stream */,
+  const video_format_t * /* p_vid */,
+  int /* i_quality */ )
+{
+return "venc=vpx{quality-mode=1}";
+}
+
 static std::string GetVencX264Option( sout_stream_t * /* p_stream */,
   const video_format_t *p_vid,
   int i_quality )
@@ -965,11 +972,19 @@ sout_stream_sys_t::GetVcodecOption( sout_stream_t 
*p_stream, vlc_fourcc_t *p_cod
 psz_video_maxres = video_maxres_720p;
 }
 
-*p_codec_video = VLC_CODEC_H264;
-
 std::string venc_option;
 if( module_exists("x264") )
+{
+*p_codec_video = VLC_CODEC_H264;
 venc_option = GetVencX264Option( p_stream, p_vid, i_quality );
+}
+else if( module_exists("vpx") )
+{
+*p_codec_video = VLC_CODEC_VP8;
+venc_option = GetVencVPXOption( p_stream, p_vid, i_quality );
+}
+else /* Fallback to h264 with an unknown module */
+*p_codec_video = VLC_CODEC_H264;
 
 msg_Dbg( p_stream, "Converting video to %.4s", (const char*)p_codec_video 
);
 

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


[vlc-commits] chromecast: test encoder modules

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Tue Mar 27 
11:44:16 2018 +0200| [264dc7b734dfefa3565aacfaa66fa3bf551fd2e0] | committer: 
Thomas Guillem

chromecast: test encoder modules

Instead of just checking if a module exists. Indeed, a module (specially HW 
ones) is likely to fail during probe.

(cherry picked from commit a41ecd04a379a1accee10583f5cd921d68793c61)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/cast.cpp | 108 -
 1 file changed, 81 insertions(+), 27 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp 
b/modules/stream_out/chromecast/cast.cpp
index 0e7956fcc9..7ad61da782 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -95,6 +95,7 @@ struct sout_stream_sys_t
 , out_force_reload( false )
 , perf_warning_shown( false )
 , transcoding_state( TRANSCODING_NONE )
+, venc_opt_idx ( -1 )
 , out_streams_added( 0 )
 {
 assert(p_intf != NULL);
@@ -141,11 +142,14 @@ struct sout_stream_sys_t
 bool   out_force_reload;
 bool   perf_warning_shown;
 inttranscoding_state;
+intvenc_opt_idx;
 std::vector streams;
 std::vector out_streams;
 unsigned int   out_streams_added;
 
 private:
+std::string GetVencOption( sout_stream_t *, vlc_fourcc_t *,
+   const video_format_t *, int );
 std::string GetAcodecOption( sout_stream_t *, vlc_fourcc_t *, const 
audio_format_t *, int );
 std::string GetVcodecOption( sout_stream_t *, vlc_fourcc_t *, const 
video_format_t *, int );
 bool UpdateOutput( sout_stream_t * );
@@ -953,6 +957,78 @@ static std::string GetVencX264Option( sout_stream_t * /* 
p_stream */,
 return ssout.str();
 }
 
+
+static struct
+{
+vlc_fourcc_t fcc;
+std::string (*get_opt)( sout_stream_t *, const video_format_t *, int);
+} venc_opt_list[] = {
+{ .fcc = VLC_CODEC_H264, .get_opt = GetVencX264Option },
+{ .fcc = VLC_CODEC_VP8,  .get_opt = GetVencVPXOption },
+{ .fcc = VLC_CODEC_H264, .get_opt = NULL },
+};
+
+std::string
+sout_stream_sys_t::GetVencOption( sout_stream_t *p_stream, vlc_fourcc_t 
*p_codec_video,
+  const video_format_t *p_vid, int i_quality )
+{
+for( size_t i = (venc_opt_idx == -1 ? 0 : venc_opt_idx);
+ i < ARRAY_SIZE(venc_opt_list); ++i )
+{
+std::stringstream ssout, ssvenc;
+char fourcc[5];
+ssvenc << "vcodec=";
+vlc_fourcc_to_char( venc_opt_list[i].fcc, fourcc );
+fourcc[4] = '\0';
+ssvenc << fourcc << ',';
+
+if( venc_opt_list[i].get_opt != NULL )
+ssvenc << venc_opt_list[i].get_opt( p_stream, p_vid, i_quality ) 
<< ',';
+
+if( venc_opt_list[i].get_opt == NULL
+ || ( venc_opt_idx != -1 && (unsigned) venc_opt_idx == i) )
+{
+venc_opt_idx = i;
+*p_codec_video = venc_opt_list[i].fcc;
+return ssvenc.str();
+}
+
+/* Test if a module can encode with the specified options / fmt_video. 
*/
+ssout << "transcode{" << ssvenc.str() << "}:dummy";
+
+sout_stream_t *p_sout_test =
+sout_StreamChainNew( p_stream->p_sout, ssout.str().c_str(), NULL, 
NULL );
+
+if( p_sout_test != NULL )
+{
+p_sout_test->obj.flags |= 
OBJECT_FLAGS_QUIET|OBJECT_FLAGS_NOINTERACT;
+
+es_format_t fmt;
+es_format_InitFromVideo( , p_vid );
+fmt.i_codec = fmt.video.i_chroma = VLC_CODEC_I420;
+fmt.video.i_frame_rate = 30;
+fmt.video.i_frame_rate_base = 1;
+
+sout_stream_id_sys_t *id = sout_StreamIdAdd( p_sout_test,  );
+
+es_format_Clean(  );
+const bool success = id != NULL;
+
+if( id )
+sout_StreamIdDel( p_sout_test, id );
+sout_StreamChainDelete( p_sout_test, NULL );
+
+if( success )
+{
+venc_opt_idx = i;
+*p_codec_video = venc_opt_list[i].fcc;
+return ssvenc.str();
+}
+}
+}
+vlc_assert_unreachable();
+}
+
 std::string
 sout_stream_sys_t::GetVcodecOption( sout_stream_t *p_stream, vlc_fourcc_t 
*p_codec_video,
 const video_format_t *p_vid, int i_quality 
)
@@ -960,39 +1036,18 @@ sout_stream_sys_t::GetVcodecOption( sout_stream_t 
*p_stream, vlc_fourcc_t *p_cod
 std::stringstream ssout;
 static const char video_maxres_hd[] = "maxwidth=1920,maxheight=1080";
 static const char video_maxres_720p[] = 

[vlc-commits] chromecast: refactor

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Tue Mar 27 
08:58:48 2018 +0200| [ca95ca24e658abbb2ae4a650ad2eda73072848aa] | committer: 
Thomas Guillem

chromecast: refactor

(cherry picked from commit b6484305815cb39606f1b47f92d5f5b2e6d1d387)
Signed-off-by: Thomas Guillem 

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

 modules/stream_out/chromecast/cast.cpp | 229 -
 1 file changed, 141 insertions(+), 88 deletions(-)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commitdiff;h=ca95ca24e658abbb2ae4a650ad2eda73072848aa
___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vpx: fetch quality-mode only one time

2018-03-29 Thread Thomas Guillem
vlc/vlc-3.0 | branch: master | Thomas Guillem  | Tue Mar 27 
11:25:21 2018 +0200| [81a309e574e2e41fe6f08d84ebea6ed923da699a] | committer: 
Thomas Guillem

vpx: fetch quality-mode only one time

(cherry picked from commit 6f76042990ceaca0c754d830a21cb0580d862517)
Signed-off-by: Thomas Guillem 

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

 modules/codec/vpx.c | 28 +++-
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index 76331a714b..2b1e37818d 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -365,6 +365,7 @@ static void CloseDecoder(vlc_object_t *p_this)
 struct encoder_sys_t
 {
 struct vpx_codec_ctx ctx;
+unsigned long quality;
 };
 
 /*
@@ -423,6 +424,19 @@ static int OpenEncoder(vlc_object_t *p_this)
 p_enc->fmt_in.i_codec = VLC_CODEC_I420;
 config_ChainParse(p_enc, ENC_CFG_PREFIX, ppsz_sout_options, p_enc->p_cfg);
 
+/* Deadline (in ms) to spend in encoder */
+switch (var_GetInteger(p_enc, ENC_CFG_PREFIX "quality-mode")) {
+case 1:
+p_sys->quality = VPX_DL_REALTIME;
+break;
+case 2:
+p_sys->quality = VPX_DL_BEST_QUALITY;
+break;
+default:
+p_sys->quality = VPX_DL_GOOD_QUALITY;
+break;
+}
+
 return VLC_SUCCESS;
 }
 
@@ -461,21 +475,9 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
 }
 
 int flags = 0;
-/* Deadline (in ms) to spend in encoder */
-int quality = VPX_DL_GOOD_QUALITY;
-switch (var_GetInteger(p_enc, ENC_CFG_PREFIX "quality-mode")) {
-case 1:
-quality = VPX_DL_REALTIME;
-break;
-case 2:
-quality = VPX_DL_BEST_QUALITY;
-break;
-default:
-break;
-}
 
 vpx_codec_err_t res = vpx_codec_encode(ctx, , p_pict->date, 1,
- flags, quality);
+ flags, p_sys->quality);
 if (res != VPX_CODEC_OK) {
 VPX_ERR(p_enc, ctx, "Failed to encode frame");
 vpx_img_free();

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


[vlc-commits] access: dvdnav: flag cell change as discontinuity

2018-03-29 Thread Francois Cartegnie
vlc | branch: master | Francois Cartegnie  | Mon Mar 26 
20:17:02 2018 +0800| [10ebd491932a53d0b0f581b064c433c3f3375072] | committer: 
Jean-Baptiste Kempf

access: dvdnav: flag cell change as discontinuity

Should close #20110

Signed-off-by: Jean-Baptiste Kempf 

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

 modules/access/dvdnav.c | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index d2f6d51260..c21fe826b0 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -115,6 +115,8 @@ vlc_module_end ()
 #define DVD_READ_CACHE 1
 #endif
 
+#define BLOCK_FLAG_CELL_DISCONTINUITY (BLOCK_FLAG_PRIVATE_SHIFT << 1)
+
 /*
  * Local prototypes
  */
@@ -1016,6 +1018,9 @@ static int Demux( demux_t *p_demux )
 p_sys->i_vobu_index = 0;
 p_sys->i_vobu_flush = 0;
 
+for( int i=0; itk[i].i_next_block_flags |= BLOCK_FLAG_CELL_DISCONTINUITY;
+
 /* FIXME is it correct or there is better way to know chapter change */
 if( dvdnav_current_title_info( p_sys->dvdnav, _title,
_part ) == DVDNAV_STATUS_OK )
@@ -1407,13 +1412,27 @@ static int DemuxBlock( demux_t *p_demux, const uint8_t 
*p, int len )
 {
 ESNew( p_demux, i_id );
 }
+
 if( tk->es &&
 !ps_pkt_parse_pes( VLC_OBJECT(p_demux), p_pkt, tk->i_skip 
) )
 {
+int i_next_block_flags = tk->i_next_block_flags;
+tk->i_next_block_flags = 0;
+if( i_next_block_flags & BLOCK_FLAG_CELL_DISCONTINUITY )
+{
+if( p_pkt->i_dts >= VLC_TS_INVALID )
+{
+i_next_block_flags &= 
~BLOCK_FLAG_CELL_DISCONTINUITY;
+i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY;
+}
+else tk->i_next_block_flags = 
BLOCK_FLAG_CELL_DISCONTINUITY;
+}
+p_pkt->i_flags |= i_next_block_flags;
 es_out_Send( p_demux->out, tk->es, p_pkt );
 }
 else
 {
+tk->i_next_block_flags = 0;
 block_Release( p_pkt );
 }
 }

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


[vlc-commits] chromecast: don't ignore messages with a sessionId of 0

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 13:58:41 
2018 +0200| [f5d3bcf344e1ffce26fed9d0ba1021ed074c5a04] | committer: Thomas 
Guillem

chromecast: don't ignore messages with a sessionId of 0

This fixes the FINISHED message sometimes not handled.

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

 modules/stream_out/chromecast/chromecast_ctrl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 184e516e39..2b47268e1c 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -801,7 +801,7 @@ void intf_sys_t::processMediaMessage( const 
castchannel::CastMessage& msg )
 status[0]["playerState"].operator const char *(),
 sessionId );
 
-if ((m_mediaSessionId != sessionId && m_mediaSessionId != 0))
+if (sessionId != 0 && m_mediaSessionId != 0 && m_mediaSessionId != 
sessionId)
 {
 msg_Warn( m_module, "Ignoring message for a different media 
session");
 json_value_free(p_data);

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


[vlc-commits] chromecast: rename setOnPausedChangedCb to setDemuxEnabled

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Wed Mar 28 18:54:56 
2018 +0200| [90276eb2c3a8b4e4d02233c361dd9f92739801ef] | committer: Thomas 
Guillem

chromecast: rename setOnPausedChangedCb to setDemuxEnabled

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

 modules/stream_out/chromecast/chromecast.h |  6 +++---
 modules/stream_out/chromecast/chromecast_common.h  |  2 +-
 modules/stream_out/chromecast/chromecast_ctrl.cpp  | 13 +++--
 modules/stream_out/chromecast/chromecast_demux.cpp |  7 +++
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h 
b/modules/stream_out/chromecast/chromecast.h
index 0a550136ee..50c678f188 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -172,8 +172,8 @@ struct intf_sys_t
 void setHasInput(const std::string mime_type = "");
 
 void setOnInputEventCb(on_input_event_itf on_input_event, void 
*on_input_event_data);
-void setOnPausedChangedCb(on_paused_changed_itf on_paused_changed,
-  void *on_paused_changed_data);
+void setDemuxEnabled(bool enabled, on_paused_changed_itf on_paused_changed,
+ void *on_paused_changed_data);
 void requestPlayerStop();
 States state() const;
 
@@ -223,7 +223,7 @@ private:
 
 static int pace(void*);
 static void send_input_event(void *, enum cc_input_event event, union 
cc_input_arg arg);
-static void set_on_paused_changed_cb(void *, on_paused_changed_itf, void 
*);
+static void set_demux_enabled(void *, bool, on_paused_changed_itf, void *);
 
 static void set_pause_state(void*, bool paused, mtime_t delay);
 
diff --git a/modules/stream_out/chromecast/chromecast_common.h 
b/modules/stream_out/chromecast/chromecast_common.h
index 8b4199fed7..f5a378812d 100644
--- a/modules/stream_out/chromecast/chromecast_common.h
+++ b/modules/stream_out/chromecast/chromecast_common.h
@@ -58,7 +58,7 @@ typedef struct
 {
 void *p_opaque;
 
-void (*pf_set_on_paused_changed_cb)(void *, on_paused_changed_itf, void *);
+void (*pf_set_demux_enabled)(void *, bool enabled, on_paused_changed_itf, 
void *);
 
 mtime_t (*pf_get_time)(void*);
 
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 052d51d3f8..c293261594 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -131,7 +131,7 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
 m_art_http_ip = ss.str();
 
 m_common.p_opaque = this;
-m_common.pf_set_on_paused_changed_cb = set_on_paused_changed_cb;
+m_common.pf_set_demux_enabled = set_demux_enabled;
 m_common.pf_get_time = get_time;
 m_common.pf_pace = pace;
 m_common.pf_send_input_event = send_input_event;
@@ -1029,8 +1029,9 @@ void intf_sys_t::setOnInputEventCb(on_input_event_itf 
on_input_event,
 m_on_input_event_data = on_input_event_data;
 }
 
-void intf_sys_t::setOnPausedChangedCb(on_paused_changed_itf on_paused_changed,
-  void *on_paused_changed_data)
+void intf_sys_t::setDemuxEnabled(bool enabled,
+ on_paused_changed_itf on_paused_changed,
+ void *on_paused_changed_data)
 {
 vlc_mutex_locker locker(_lock);
 m_on_paused_changed = on_paused_changed;
@@ -1140,11 +1141,11 @@ mtime_t intf_sys_t::get_time(void *pt)
 return p_this->getPlaybackTimestamp();
 }
 
-void intf_sys_t::set_on_paused_changed_cb(void *pt,
-  on_paused_changed_itf itf, void 
*data)
+void intf_sys_t::set_demux_enabled(void *pt, bool enabled,
+   on_paused_changed_itf itf, void *data)
 {
 intf_sys_t *p_this = static_cast(pt);
-p_this->setOnPausedChangedCb(itf, data);
+p_this->setDemuxEnabled(enabled, itf, data);
 }
 
 int intf_sys_t::pace(void *pt)
diff --git a/modules/stream_out/chromecast/chromecast_demux.cpp 
b/modules/stream_out/chromecast/chromecast_demux.cpp
index 472c47ca35..bcd379f330 100644
--- a/modules/stream_out/chromecast/chromecast_demux.cpp
+++ b/modules/stream_out/chromecast/chromecast_demux.cpp
@@ -134,8 +134,8 @@ struct demux_cc
 
 es_out_Control( p_demux->p_next->out, ES_OUT_RESET_PCR );
 
-p_renderer->pf_set_on_paused_changed_cb(p_renderer->p_opaque,
-on_paused_changed_cb, p_demux);
+p_renderer->pf_set_demux_enabled(p_renderer->p_opaque, true,
+ on_paused_changed_cb, p_demux);
 
 resetTimes();
 }
@@ -144,8 +144,7 @@ struct demux_cc
 {
 assert(p_renderer);
 p_renderer->pf_set_meta( p_renderer->p_opaque, 

[vlc-commits] chromecast: always quit thread in Dead state

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 10:12:23 
2018 +0200| [f8040cd87db949e8bb708b2d80b4ca1fb12cf680] | committer: Thomas 
Guillem

chromecast: always quit thread in Dead state

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

 modules/stream_out/chromecast/chromecast.h|  4 ++--
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 14 +-
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h 
b/modules/stream_out/chromecast/chromecast.h
index 5e93c70e18..0a550136ee 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -187,7 +187,7 @@ struct intf_sys_t
 private:
 bool handleMessages();
 
-void processMessage(const castchannel::CastMessage );
+bool processMessage(const castchannel::CastMessage );
 void queueMessage( QueueableMessages msg );
 
 void setPauseState(bool paused, mtime_t delay);
@@ -212,7 +212,7 @@ private:
 void mainLoop();
 void processAuthMessage( const castchannel::CastMessage& msg );
 void processHeartBeatMessage( const castchannel::CastMessage& msg );
-void processReceiverMessage( const castchannel::CastMessage& msg );
+bool processReceiverMessage( const castchannel::CastMessage& msg );
 void processMediaMessage( const castchannel::CastMessage& msg );
 void processConnectionMessage( const castchannel::CastMessage& msg );
 
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 0703c841e5..4f7dc18ffb 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -505,7 +505,7 @@ void intf_sys_t::sendInputEvent(enum cc_input_event event, 
union cc_input_arg ar
  * @param msg the CastMessage to process
  * @return 0 if the message has been successfuly processed else -1
  */
-void intf_sys_t::processMessage(const castchannel::CastMessage )
+bool intf_sys_t::processMessage(const castchannel::CastMessage )
 {
 const std::string & namespace_ = msg.namespace_();
 
@@ -513,12 +513,13 @@ void intf_sys_t::processMessage(const 
castchannel::CastMessage )
 msg_Dbg( m_module, "processMessage: %s->%s %s", namespace_.c_str(), 
msg.destination_id().c_str(), msg.payload_utf8().c_str());
 #endif
 
+bool ret = true;
 if (namespace_ == NAMESPACE_DEVICEAUTH)
 processAuthMessage( msg );
 else if (namespace_ == NAMESPACE_HEARTBEAT)
 processHeartBeatMessage( msg );
 else if (namespace_ == NAMESPACE_RECEIVER)
-processReceiverMessage( msg );
+ret = processReceiverMessage( msg );
 else if (namespace_ == NAMESPACE_MEDIA)
 processMediaMessage( msg );
 else if (namespace_ == NAMESPACE_CONNECTION)
@@ -527,6 +528,7 @@ void intf_sys_t::processMessage(const 
castchannel::CastMessage )
 {
 msg_Err( m_module, "Unknown namespace: %s", msg.namespace_().c_str());
 }
+return ret;
 }
 
 void intf_sys_t::queueMessage( QueueableMessages msg )
@@ -625,11 +627,12 @@ void intf_sys_t::processHeartBeatMessage( const 
castchannel::CastMessage& msg )
 json_value_free(p_data);
 }
 
-void intf_sys_t::processReceiverMessage( const castchannel::CastMessage& msg )
+bool intf_sys_t::processReceiverMessage( const castchannel::CastMessage& msg )
 {
 json_value *p_data = json_parse(msg.payload_utf8().c_str());
 std::string type((*p_data)["type"]);
 
+bool ret = true;
 if (type == "RECEIVER_STATUS")
 {
 json_value applications = (*p_data)["status"]["applications"];
@@ -715,6 +718,7 @@ void intf_sys_t::processReceiverMessage( const 
castchannel::CastMessage& msg )
 m_appTransportId = "";
 m_mediaSessionId = 0;
 setState( Dead );
+ret = false;
 }
 else
 {
@@ -723,6 +727,7 @@ void intf_sys_t::processReceiverMessage( const 
castchannel::CastMessage& msg )
 }
 
 json_value_free(p_data);
+return ret;
 }
 
 void intf_sys_t::processMediaMessage( const castchannel::CastMessage& msg )
@@ -958,8 +963,7 @@ bool intf_sys_t::handleMessages()
 }
 castchannel::CastMessage msg;
 msg.ParseFromArray(p_packet + PACKET_HEADER_LEN, i_payloadSize);
-processMessage(msg);
-return true;
+return processMessage(msg);
 }
 
 void intf_sys_t::doStop()

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


[vlc-commits] chromecast: retry connection after a Dead state

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 10:15:24 
2018 +0200| [400fa1a9906bb8d53875c6475eed69a60cdb19f2] | committer: Thomas 
Guillem

chromecast: retry connection after a Dead state

Retry only when playing a new input in order to avoid retry busy loops.

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

 modules/stream_out/chromecast/chromecast.h|   4 +-
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 102 --
 2 files changed, 79 insertions(+), 27 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h 
b/modules/stream_out/chromecast/chromecast.h
index 50c678f188..19b0c9dea1 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -185,6 +185,7 @@ struct intf_sys_t
 int httpd_file_fill( uint8_t *psz_request, uint8_t **pp_data, int *pi_data 
);
 void interrupt_wake_up();
 private:
+void reinit();
 bool handleMessages();
 
 bool processMessage(const castchannel::CastMessage );
@@ -237,7 +238,9 @@ private:
 private:
 vlc_object_t  * const m_module;
 const int  m_streaming_port;
+const int  m_device_port;
 std::stringm_mime;
+std::stringm_device_addr;
 
 std::string m_appTransportId;
 unsigned m_last_request_id;
@@ -248,7 +251,6 @@ private:
 vlc_cond_t   m_pace_cond;
 vlc_thread_t m_chromecastThread;
 
-
 on_input_event_itfm_on_input_event;
 void *m_on_input_event_data;
 
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index c293261594..184e516e39 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -91,6 +91,8 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int port, 
std::string device
int device_port, httpd_host_t *httpd_host)
  : m_module(p_this)
  , m_streaming_port(port)
+ , m_device_port(device_port)
+ , m_device_addr(device_addr)
  , m_last_request_id( 0 )
  , m_mediaSessionId( 0 )
  , m_on_input_event( NULL )
@@ -116,7 +118,8 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
  , m_pause_delay( VLC_TS_INVALID )
  , m_pingRetriesLeft( PING_WAIT_RETRIES )
 {
-m_communication = new ChromecastCommunication( p_this, 
device_addr.c_str(), device_port );
+m_communication = new ChromecastCommunication( p_this, 
m_device_addr.c_str(),
+   m_device_port );
 
 m_ctl_thread_interrupt = vlc_interrupt_create();
 if( unlikely(m_ctl_thread_interrupt == NULL) )
@@ -159,36 +162,40 @@ intf_sys_t::~intf_sys_t()
 var_Destroy( m_module->obj.parent->obj.parent, CC_SHARED_VAR_NAME );
 
 vlc_mutex_lock(_lock);
-switch ( m_state )
+if( m_communication )
 {
-case Ready:
-case Loading:
-case Buffering:
-case Playing:
-case Paused:
-case Stopping:
-case Stopped:
-// Generate the close messages.
-m_communication->msgReceiverClose( m_appTransportId );
-/* fallthrough */
-case Connecting:
-case Connected:
-case Launching:
-m_communication->msgReceiverClose(DEFAULT_CHOMECAST_RECEIVER);
-/* fallthrough */
-default:
-break;
-}
-vlc_mutex_unlock(_lock);
+switch ( m_state )
+{
+case Ready:
+case Loading:
+case Buffering:
+case Playing:
+case Paused:
+case Stopping:
+case Stopped:
+// Generate the close messages.
+m_communication->msgReceiverClose( m_appTransportId );
+/* fallthrough */
+case Connecting:
+case Connected:
+case Launching:
+m_communication->msgReceiverClose(DEFAULT_CHOMECAST_RECEIVER);
+/* fallthrough */
+default:
+break;
+}
 
-vlc_interrupt_kill( m_ctl_thread_interrupt );
+vlc_mutex_unlock(_lock);
+vlc_interrupt_kill( m_ctl_thread_interrupt );
+vlc_join(m_chromecastThread, NULL);
 
-vlc_join(m_chromecastThread, NULL);
+delete m_communication;
+}
+else
+vlc_mutex_unlock(_lock);
 
 vlc_interrupt_destroy( m_ctl_thread_interrupt );
 
-delete m_communication;
-
 if (m_meta != NULL)
 vlc_meta_Delete(m_meta);
 
@@ -202,6 +209,38 @@ intf_sys_t::~intf_sys_t()
 vlc_mutex_destroy(_lock);
 }
 
+void intf_sys_t::reinit()
+{
+assert( m_state == Dead );
+
+if( m_communication )
+{
+vlc_join( m_chromecastThread, NULL );
+delete m_communication;
+m_communication = NULL;
+}
+
+try
+{
+m_communication = new ChromecastCommunication( m_module,
+   m_device_addr.c_str(),
+  

[vlc-commits] chromecast: use a pointer for m_communication

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Wed Mar 28 18:46:18 
2018 +0200| [a74e7ff8a1d43078a51472c110810cadc8ab1bed] | committer: Thomas 
Guillem

chromecast: use a pointer for m_communication

In order to delete/create during the life time of intf_sys_t.

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

 modules/stream_out/chromecast/chromecast.h|  2 +-
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 45 ---
 2 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast.h 
b/modules/stream_out/chromecast/chromecast.h
index 417ad5b09f..5e93c70e18 100644
--- a/modules/stream_out/chromecast/chromecast.h
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -255,7 +255,7 @@ private:
 on_paused_changed_itf m_on_paused_changed;
 void *m_on_paused_changed_data;
 
-ChromecastCommunication m_communication;
+ChromecastCommunication *m_communication;
 std::queue m_msgQueue;
 States m_state;
 bool m_retry_on_fail;
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 598cdf6392..0703c841e5 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -97,7 +97,6 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int port, 
std::string device
  , m_on_input_event_data( NULL )
  , m_on_paused_changed( NULL )
  , m_on_paused_changed_data( NULL )
- , m_communication( p_this, device_addr.c_str(), device_port )
  , m_state( Authenticating )
  , m_retry_on_fail( false )
  , m_played_once( false )
@@ -117,6 +116,8 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
  , m_pause_delay( VLC_TS_INVALID )
  , m_pingRetriesLeft( PING_WAIT_RETRIES )
 {
+m_communication = new ChromecastCommunication( p_this, 
device_addr.c_str(), device_port );
+
 m_ctl_thread_interrupt = vlc_interrupt_create();
 if( unlikely(m_ctl_thread_interrupt == NULL) )
 throw std::runtime_error( "error creating interrupt context" );
@@ -126,7 +127,7 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
 vlc_cond_init( _pace_cond );
 
 std::stringstream ss;
-ss << "http://; << m_communication.getServerIp() << ":" << port;
+ss << "http://; << m_communication->getServerIp() << ":" << port;
 m_art_http_ip = ss.str();
 
 m_common.p_opaque = this;
@@ -168,12 +169,12 @@ intf_sys_t::~intf_sys_t()
 case Stopping:
 case Stopped:
 // Generate the close messages.
-m_communication.msgReceiverClose( m_appTransportId );
+m_communication->msgReceiverClose( m_appTransportId );
 /* fallthrough */
 case Connecting:
 case Connected:
 case Launching:
-m_communication.msgReceiverClose(DEFAULT_CHOMECAST_RECEIVER);
+m_communication->msgReceiverClose(DEFAULT_CHOMECAST_RECEIVER);
 /* fallthrough */
 default:
 break;
@@ -186,6 +187,8 @@ intf_sys_t::~intf_sys_t()
 
 vlc_interrupt_destroy( m_ctl_thread_interrupt );
 
+delete m_communication;
+
 if (m_meta != NULL)
 vlc_meta_Delete(m_meta);
 
@@ -316,7 +319,7 @@ void intf_sys_t::tryLoad()
 msg_Dbg( m_module, "Starting the media receiver application" );
 // Don't use setState as we don't want to signal the condition in 
this case.
 m_state = Launching;
-m_communication.msgReceiverLaunchApp();
+m_communication->msgReceiverLaunchApp();
 }
 return;
 }
@@ -328,7 +331,7 @@ void intf_sys_t::tryLoad()
 // Reset the mediaSessionID to allow the new session to become the current 
one.
 // we cannot start a new load when the last one is still processing
 m_last_request_id =
-m_communication.msgPlayerLoad( m_appTransportId, m_streaming_port,
+m_communication->msgPlayerLoad( m_appTransportId, m_streaming_port,
m_mime, m_meta );
 if( m_last_request_id != ChromecastCommunication::kInvalidId )
 m_state = Loading;
@@ -549,7 +552,7 @@ void intf_sys_t::mainLoop()
 vlc_interrupt_set( m_ctl_thread_interrupt );
 
 // State was already initialized as Authenticating
-m_communication.msgAuth();
+m_communication->msgAuth();
 
 while ( !vlc_killed() )
 {
@@ -594,8 +597,8 @@ void intf_sys_t::processAuthMessage( const 
castchannel::CastMessage& msg )
 {
 vlc_mutex_locker locker(_lock);
 setState( Connecting );
-m_communication.msgConnect(DEFAULT_CHOMECAST_RECEIVER);
-m_communication.msgReceiverGetStatus();
+m_communication->msgConnect(DEFAULT_CHOMECAST_RECEIVER);
+m_communication->msgReceiverGetStatus();
 }
 }
 
@@ -607,7 +610,7 @@ void intf_sys_t::processHeartBeatMessage( const 
castchannel::CastMessage& 

[vlc-commits] chromecast: reset state only when retrying

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Thu Mar 29 10:13:52 
2018 +0200| [aea0e78e43ca962cc1ea18b15b76ad46bc1ac965] | committer: Thomas 
Guillem

chromecast: reset state only when retrying

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

 modules/stream_out/chromecast/chromecast_ctrl.cpp | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp 
b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 4f7dc18ffb..052d51d3f8 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -463,10 +463,11 @@ int intf_sys_t::pace()
 return CC_PACE_OK_ENDED;
 else if( isStateError() || m_state == Stopped )
 {
-States error_state = m_state;
-m_state = Ready;
-if( error_state == LoadFailed && m_retry_on_fail )
+if( m_state == LoadFailed && m_retry_on_fail )
+{
+m_state = Ready;
 return CC_PACE_ERR_RETRY;
+}
 return CC_PACE_ERR;
 }
 

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


[vlc-commits] chromecast: demux: add deinit()

2018-03-29 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem  | Wed Mar 28 12:17:57 
2018 +0200| [a7ee0f82f96f6bc26941ceb42365474bc62abb27] | committer: Thomas 
Guillem

chromecast: demux: add deinit()

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

 modules/stream_out/chromecast/chromecast_demux.cpp | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast_demux.cpp 
b/modules/stream_out/chromecast/chromecast_demux.cpp
index c4239bf67c..472c47ca35 100644
--- a/modules/stream_out/chromecast/chromecast_demux.cpp
+++ b/modules/stream_out/chromecast/chromecast_demux.cpp
@@ -140,6 +140,14 @@ struct demux_cc
 resetTimes();
 }
 
+void deinit()
+{
+assert(p_renderer);
+p_renderer->pf_set_meta( p_renderer->p_opaque, NULL );
+p_renderer->pf_set_on_paused_changed_cb( p_renderer->p_opaque,
+ NULL, NULL );
+}
+
 void resetTimes()
 {
 m_start_time = m_last_time = -1;
@@ -161,11 +169,7 @@ struct demux_cc
 ~demux_cc()
 {
 if( p_renderer )
-{
-p_renderer->pf_set_meta( p_renderer->p_opaque, NULL );
-p_renderer->pf_set_on_paused_changed_cb( p_renderer->p_opaque,
- NULL, NULL );
-}
+deinit();
 }
 
 void resetDemuxEof()
@@ -413,14 +417,14 @@ struct demux_cc
 case DEMUX_FILTER_ENABLE:
 p_renderer = static_cast(
 var_InheritAddress( p_demux, CC_SHARED_VAR_NAME ) );
+assert(p_renderer != NULL);
 m_enabled = true;
 init();
 return VLC_SUCCESS;
 
 case DEMUX_FILTER_DISABLE:
 
-p_renderer->pf_set_on_paused_changed_cb( p_renderer->p_opaque,
- NULL, NULL );
+deinit();
 
 /* Seek back to last known position. Indeed we don't want to resume
  * from the input position that can be more than 1 minutes forward

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


[vlc-commits] contrib: x264: Fix building for aarch64/windows after the recent x264 update

2018-03-29 Thread Martin Storsjö
vlc | branch: master | Martin Storsjö  | Thu Mar 29 10:40:20 
2018 +0300| [31c65810c27b492316e7a32925e599f5bea9db31] | committer: Martin 
Storsjö

contrib: x264: Fix building for aarch64/windows after the recent x264 update

The current version of x264 defaults to using gas-preprocessor and
arasm64 for this target. Override it to use plain $(CC) instead.

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

 contrib/src/x264/rules.mak | 5 +
 1 file changed, 5 insertions(+)

diff --git a/contrib/src/x264/rules.mak b/contrib/src/x264/rules.mak
index d63a788a0f..4519640a7d 100644
--- a/contrib/src/x264/rules.mak
+++ b/contrib/src/x264/rules.mak
@@ -39,6 +39,11 @@ X264CONF += --enable-win32thread
 ifeq ($(ARCH), arm)
 X264_AS = AS="./tools/gas-preprocessor.pl -arch arm -as-type clang 
-force-thumb -- $(CC) -mimplicit-it=always"
 endif
+ifeq ($(ARCH),aarch64)
+# Configure defaults to gas-preprocessor + armasm64 for this target,
+# unless overridden.
+X264_AS = AS="$(CC)"
+endif
 endif
 ifdef HAVE_CROSS_COMPILE
 X264CONF += --cross-prefix="$(HOST)-"

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