[vlc-commits] codec: cc: fix max cc size case
vlc | branch: master | Francois Cartegnie | Thu Sep 22 23:13:35 2016 +0200| [c319ad4979500ae1a22f453c9152128d5aab2c9e] | committer: Francois Cartegnie codec: cc: fix max cc size case > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c319ad4979500ae1a22f453c9152128d5aab2c9e --- modules/codec/cc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/codec/cc.h b/modules/codec/cc.h index 44db57b..c6fd7bb 100644 --- a/modules/codec/cc.h +++ b/modules/codec/cc.h @@ -205,7 +205,7 @@ static inline void cc_Extract( cc_data_t *c, bool b_top_field_first, const uint8 if( i_field != 0 && i_field != 1 ) continue; if( c->i_data + 3 > CC_MAX_DATA_SIZE ) -continue; +break; cc_AppendData( c, cc[0], &cc[1] ); } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] cc: use VLC_CODEC defined cc channels
vlc | branch: master | Francois Cartegnie | Thu Sep 22 21:35:43 2016 +0200| [123af3db40d9a37a4a7f3ad85a5c305453966af5] | committer: Francois Cartegnie cc: use VLC_CODEC defined cc channels > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=123af3db40d9a37a4a7f3ad85a5c305453966af5 --- modules/demux/ty.c | 8 src/input/decoder.c | 8 src/input/es_out.c | 8 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/demux/ty.c b/modules/demux/ty.c index 1c66941..24648a2 100644 --- a/modules/demux/ty.c +++ b/modules/demux/ty.c @@ -771,10 +771,10 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl for( i = 0; i < 4; i++ ) { static const vlc_fourcc_t fcc[4] = { -VLC_FOURCC('c', 'c', '1', ' '), -VLC_FOURCC('c', 'c', '2', ' '), -VLC_FOURCC('c', 'c', '3', ' '), -VLC_FOURCC('c', 'c', '4', ' ') +VLC_CODEC_EIA608_1, +VLC_CODEC_EIA608_2, +VLC_CODEC_EIA608_3, +VLC_CODEC_EIA608_4, }; static const char *ppsz_description[4] = { N_("Closed captions 1"), diff --git a/src/input/decoder.c b/src/input/decoder.c index eafc065..0d28bef 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -2112,10 +2112,10 @@ int input_DecoderSetCcState( decoder_t *p_dec, bool b_decode, int i_channel ) if( b_decode ) { static const vlc_fourcc_t fcc[4] = { -VLC_FOURCC('c', 'c', '1', ' '), -VLC_FOURCC('c', 'c', '2', ' '), -VLC_FOURCC('c', 'c', '3', ' '), -VLC_FOURCC('c', 'c', '4', ' '), +VLC_CODEC_EIA608_1, +VLC_CODEC_EIA608_2, +VLC_CODEC_EIA608_3, +VLC_CODEC_EIA608_4, }; decoder_t *p_cc; es_format_t fmt; diff --git a/src/input/es_out.c b/src/input/es_out.c index d22d2b5..0975916 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -200,10 +200,10 @@ static char *EsOutProgramGetMetaName( es_out_pgrm_t *p_pgrm ); static char *EsInfoCategoryName( es_out_id_t* es ); static const vlc_fourcc_t EsOutFourccClosedCaptions[4] = { -VLC_FOURCC('c', 'c', '1', ' '), -VLC_FOURCC('c', 'c', '2', ' '), -VLC_FOURCC('c', 'c', '3', ' '), -VLC_FOURCC('c', 'c', '4', ' '), +VLC_CODEC_EIA608_1, +VLC_CODEC_EIA608_2, +VLC_CODEC_EIA608_3, +VLC_CODEC_EIA608_4, }; static inline int EsOutGetClosedCaptionsChannel( vlc_fourcc_t fcc ) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Do not clear cc_valid and reserved bits
vlc | branch: master | Rafaël Carré | Thu Nov 6 18:55:15 2014 +0100| [7eda7fbc61915272f0f60ff533f8d1cd8d97e659] | committer: Francois Cartegnie Do not clear cc_valid and reserved bits Signed-off-by: Francois Cartegnie > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7eda7fbc61915272f0f60ff533f8d1cd8d97e659 --- modules/codec/cc.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/codec/cc.h b/modules/codec/cc.h index 6c495c4..44db57b 100644 --- a/modules/codec/cc.h +++ b/modules/codec/cc.h @@ -80,15 +80,16 @@ static inline void cc_Flush( cc_data_t *c ) c->i_data = 0; } -static inline void cc_AppendData( cc_data_t *c, int i_field, const uint8_t cc[2] ) +static inline void cc_AppendData( cc_data_t *c, uint8_t cc_preamble, const uint8_t cc[2] ) { +uint8_t i_field = cc_preamble & 0x03; if( i_field == 0 || i_field == 1 ) { c->pb_present[2*i_field+0] = c->pb_present[2*i_field+1] = true; } -c->p_data[c->i_data++] = i_field; +c->p_data[c->i_data++] = cc_preamble; c->p_data[c->i_data++] = cc[0]; c->p_data[c->i_data++] = cc[1]; } @@ -198,7 +199,7 @@ static inline void cc_Extract( cc_data_t *c, bool b_top_field_first, const uint8 for( i = 0; i < i_count_cc; i++, cc += 3 ) { -int i_field = cc[0] & 0x03; +uint8_t i_field = cc[0] & 0x03; if( ( cc[0] & 0xfc ) != 0xfc ) continue; if( i_field != 0 && i_field != 1 ) @@ -206,7 +207,7 @@ static inline void cc_Extract( cc_data_t *c, bool b_top_field_first, const uint8 if( c->i_data + 3 > CC_MAX_DATA_SIZE ) continue; -cc_AppendData( c, i_field, &cc[1] ); +cc_AppendData( c, cc[0], &cc[1] ); } c->b_reorder = true; } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] codec: cc: don't discard good byte sequences
vlc | branch: master | Steven Toth | Thu Mar 17 08:29:22 2016 -0400| [f32069ff37c64fef50f8d484f929455792385f5f] | committer: Francois Cartegnie codec: cc: don't discard good byte sequences p_buffer[0] doesn't always contain just the field 0 or 1. It often contains two other bitmask fields. Ensure we complare the field value only via a bitmask, else we can discard perfectly good CC data. Signed-off-by: Francois Cartegnie > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f32069ff37c64fef50f8d484f929455792385f5f --- modules/codec/cc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/codec/cc.c b/modules/codec/cc.c index 006015e..d5f10b9 100644 --- a/modules/codec/cc.c +++ b/modules/codec/cc.c @@ -466,7 +466,8 @@ static subpicture_t *Convert( decoder_t *p_dec, block_t **pp_block ) /* TODO do the real decoding here */ while( p_block->i_buffer >= 3 && !(i_status & EIA608_STATUS_DISPLAY) ) { -if( p_block->p_buffer[0] == p_sys->i_field ) +/* Mask off the specific i_field bit, else some sequences can be lost. */ +if ( (p_block->p_buffer[0] & 0x01) == p_sys->i_field ) i_status = Eia608Parse( &p_sys->eia608, p_sys->i_channel, &p_block->p_buffer[1] ); p_block->i_buffer -= 3; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] aout: always signal when the aout changed
vlc | branch: master | Thomas Guillem | Thu Sep 22 16:36:59 2016 +0200| [4bba1e84a13a8d340b8a06df155bec8034bcd012] | committer: Thomas Guillem aout: always signal when the aout changed In a previous patch, we signaled that the aout changed when it was restarted. We also need to signal that event when an aout module selects a device without requesting a restart. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bba1e84a13a8d340b8a06df155bec8034bcd012 --- src/audio_output/aout_internal.h | 1 + src/audio_output/dec.c | 6 ++ src/audio_output/output.c| 1 + 3 files changed, 8 insertions(+) diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h index c6edf8e..a0574fa 100644 --- a/src/audio_output/aout_internal.h +++ b/src/audio_output/aout_internal.h @@ -83,6 +83,7 @@ typedef struct atomic_uint buffers_lost; atomic_uint buffers_played; atomic_uchar restart; +bool device_changed; } aout_owner_t; typedef struct diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c index 1751e30..2f97848 100644 --- a/src/audio_output/dec.c +++ b/src/audio_output/dec.c @@ -83,6 +83,7 @@ int aout_DecNew( audio_output_t *p_aout, owner->input_format = *p_format; owner->mixer_format = owner->input_format; owner->request_vout = *p_request_vout; +owner->device_changed = false; if (aout_OutputNew (p_aout, &owner->mixer_format)) goto error; @@ -174,6 +175,11 @@ static int aout_CheckReady (audio_output_t *aout) * left over by an audio visualization: input_resource_TerminatVout(MAGIC HERE); */ } +if (owner->device_changed) +{ +owner->device_changed = false; +status = AOUT_DEC_CHANGED; +} return (owner->mixer_format.i_format) ? status : AOUT_DEC_FAILED; } diff --git a/src/audio_output/output.c b/src/audio_output/output.c index 90db056..600705d 100644 --- a/src/audio_output/output.c +++ b/src/audio_output/output.c @@ -561,6 +561,7 @@ void aout_OutputUnlock (audio_output_t *aout) aout_OutputDeviceSet (aout, owner->req.device); free (owner->req.device); owner->req.device = (char *)unset_str; +owner->device_changed = true; } if (owner->req.volume >= 0.f) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] pulse: restart when we need to move a passthrough input
vlc | branch: master | Thomas Guillem | Thu Sep 22 16:40:43 2016 +0200| [a3925097aa23b6179ddf61bb04e43cd9a90e6f7f] | committer: Thomas Guillem pulse: restart when we need to move a passthrough input > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a3925097aa23b6179ddf61bb04e43cd9a90e6f7f --- modules/audio_output/pulse.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c index a088e44..bde37d3 100644 --- a/modules/audio_output/pulse.c +++ b/modules/audio_output/pulse.c @@ -75,6 +75,7 @@ struct aout_sys_t char *sink_force; /**< Forced sink name (stream must be NULL) */ struct sink *sinks; /**< Locally-cached list of sinks */ +bool passthrough; }; static void VolumeReport(audio_output_t *aout) @@ -655,6 +656,15 @@ static int StreamMove(audio_output_t *aout, const char *name) aout_DeviceReport(aout, name); return 0; } +else if (sys->passthrough) +{ +/* A sink connected with a passthrough input cannot be moved */ +msg_Dbg(aout, "request restart to connect to sink %s", name); +free(sys->sink_force); +sys->sink_force = strdup(name); +aout_RestartRequest(aout, AOUT_RESTART_OUTPUT); +return 0; +} pa_operation *op; uint32_t idx = pa_stream_get_index(sys->stream); @@ -924,6 +934,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt) sys->flags_force = PA_STREAM_NOFLAGS; free(sys->sink_force); sys->sink_force = NULL; +sys->passthrough = fmt->i_format == VLC_CODEC_SPDIFL; if (encoding == PA_ENCODING_INVALID) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vpx: fallback to dts if pts is invalid
vlc | branch: master | Rafaël Carré | Thu Sep 22 11:21:47 2016 -0400| [043cde8a16911e540543b5f63daee5e3282f4aac] | committer: Tristan Matthews vpx: fallback to dts if pts is invalid Fixes playback for VP9 in mp4. Signed-off-by: Tristan Matthews > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=043cde8a16911e540543b5f63daee5e3282f4aac --- modules/codec/vpx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c index 1c83cb6..fbe9995 100644 --- a/modules/codec/vpx.c +++ b/modules/codec/vpx.c @@ -125,7 +125,7 @@ static picture_t *Decode(decoder_t *dec, block_t **pp_block) return NULL; } -*pkt_pts = block->i_pts; +*pkt_pts = block->i_pts ? block->i_pts : block->i_dts; vpx_codec_err_t err; err = vpx_codec_decode(ctx, block->p_buffer, block->i_buffer, pkt_pts, 0); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input: es_out: early fail selection with unknown es
vlc | branch: master | Francois Cartegnie | Thu Sep 22 16:02:12 2016 +0200| [acdb4e9916f1788f62b401939d52e88f8b4d2243] | committer: Francois Cartegnie input: es_out: early fail selection with unknown es > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=acdb4e9916f1788f62b401939d52e88f8b4d2243 --- src/input/es_out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/es_out.c b/src/input/es_out.c index 1f8c967..050caa0 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -1799,7 +1799,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) { int i_wanted = -1; -if( es->p_pgrm != p_sys->p_pgrm ) +if( es->p_pgrm != p_sys->p_pgrm || !p_esprops ) return; if( i_cat == AUDIO_ES ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input: es_out: fix refactoring
vlc | branch: master | Francois Cartegnie | Thu Sep 22 16:02:35 2016 +0200| [53fa9f5b955d77bdc4778c0e7bb81d3abe1cda64] | committer: Francois Cartegnie input: es_out: fix refactoring s*** happens when you keep one unfixed version in current branch > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=53fa9f5b955d77bdc4778c0e7bb81d3abe1cda64 --- src/input/es_out.c | 39 ++- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/src/input/es_out.c b/src/input/es_out.c index 050caa0..b008aad 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -130,7 +130,7 @@ struct es_out_sys_t int i_count; /* es count */ int i_id; int i_last; -const es_out_id_t *p_main_es; /* current main es */ +es_out_id_t *p_main_es; /* current main es */ enum es_out_policy_e e_policy; } video, audio, sub; @@ -1834,17 +1834,6 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) p_sys->audio.p_main_es->fmt.i_priority < es->fmt.i_priority ) i_wanted = es->i_channel; } - -if( p_sys->audio.i_last >= 0 ) -i_wanted = p_sys->audio.i_last; - -if( p_sys->audio.i_id >= 0 ) -{ -if( es->i_id == p_sys->audio.i_id ) -i_wanted = es->i_channel; -else -return; -} } else if( i_cat == SPU_ES ) { @@ -1852,7 +1841,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) { int es_idx = LanguageArrayIndex( p_sys->ppsz_sub_language, es->psz_language_code ); -if( !p_sys->video.p_main_es ) +if( !p_sys->sub.p_main_es ) { /* Select the language if it's in the list */ if( es_idx >= 0 || @@ -1868,12 +1857,12 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) { int selected_es_idx = LanguageArrayIndex( p_sys->ppsz_sub_language, - p_sys->video.p_main_es->psz_language_code ); + p_sys->sub.p_main_es->psz_language_code ); if( es_idx >= 0 && ( selected_es_idx < 0 || es_idx < selected_es_idx || ( es_idx == selected_es_idx && -p_sys->video.p_main_es->fmt.i_priority < es->fmt.i_priority ) ) ) +p_sys->sub.p_main_es->fmt.i_priority < es->fmt.i_priority ) ) ) i_wanted = es->i_channel; } } @@ -1891,15 +1880,15 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) { /* If there is no user preference, select the default subtitle * or adapt by ES priority */ -if( ( !p_sys->video.p_main_es && +if( ( !p_sys->sub.p_main_es && ( p_sys->i_default_sub_id >= 0 && es->i_id == p_sys->i_default_sub_id ) ) || -( p_sys->video.p_main_es && - p_sys->video.p_main_es->fmt.i_priority < es->fmt.i_priority ) ) +( p_sys->sub.p_main_es && + p_sys->sub.p_main_es->fmt.i_priority < es->fmt.i_priority ) ) i_wanted = es->i_channel; -else if( p_sys->video.p_main_es && - p_sys->video.p_main_es->fmt.i_priority >= es->fmt.i_priority ) -i_wanted = p_sys->video.p_main_es->i_channel; +else if( p_sys->sub.p_main_es && + p_sys->sub.p_main_es->fmt.i_priority >= es->fmt.i_priority ) +i_wanted = p_sys->sub.p_main_es->i_channel; } } else if( i_cat == VIDEO_ES ) @@ -1909,12 +1898,12 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) if( p_esprops ) { -if( p_sys->sub.i_last >= 0 ) -i_wanted = p_sys->sub.i_last; +if( p_esprops->i_last >= 0 ) +i_wanted = p_esprops->i_last; -if( p_sys->sub.i_id >= 0 ) +if( p_esprops->i_id >= 0 ) { -if( es->i_id == p_sys->sub.i_id ) +if( es->i_id == p_esprops->i_id ) i_wanted = es->i_channel; else return; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input: es_out: rename last to channel
vlc | branch: master | Francois Cartegnie | Thu Sep 22 16:23:50 2016 +0200| [150604655f8e07433dd6669c032975b9d829ec8c] | committer: Francois Cartegnie input: es_out: rename last to channel > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=150604655f8e07433dd6669c032975b9d829ec8c --- src/input/es_out.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/input/es_out.c b/src/input/es_out.c index 822dbd9..d22d2b5 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -128,8 +128,8 @@ struct es_out_sys_t struct es_out_es_props_s { int i_count; /* es count */ -int i_id; -int i_last; +int i_id; /* es id as set by es fmt.id */ +int i_channel; /* es number in creation order */ es_out_id_t *p_main_es; /* current main es */ enum es_out_policy_e e_policy; } video, audio, sub; @@ -271,19 +271,19 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate ) p_sys->video.e_policy = ES_OUT_ES_POLICY_SIMULTANEOUS; p_sys->video.i_count = 0; p_sys->video.i_id = -1; -p_sys->video.i_last = -1; +p_sys->video.i_channel = -1; p_sys->video.p_main_es = NULL; p_sys->audio.e_policy = ES_OUT_ES_POLICY_EXCLUSIVE; p_sys->audio.i_count = 0; p_sys->audio.i_id = var_GetInteger( p_input, "audio-track-id" ); -p_sys->audio.i_last = var_GetInteger( p_input, "audio-track" ); +p_sys->audio.i_channel = var_GetInteger( p_input, "audio-track" ); p_sys->audio.p_main_es = NULL; p_sys->sub.e_policy = ES_OUT_ES_POLICY_EXCLUSIVE; p_sys->sub.i_count = 0; p_sys->sub.i_id = var_GetInteger( p_input, "sub-track-id" ); -p_sys->sub.i_last = var_GetInteger( p_input, "sub-track" ); +p_sys->sub.i_channel = var_GetInteger( p_input, "sub-track" ); p_sys->sub.p_main_es = NULL; p_sys->i_group_id = var_GetInteger( p_input, "program" ); @@ -1898,7 +1898,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) if( p_esprops ) { -if( p_esprops->i_last == es->i_channel ) +if( p_esprops->i_channel == es->i_channel ) wanted_es = es; if( p_esprops->i_id >= 0 ) @@ -2049,7 +2049,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block ) es->pb_cc_present[i] = true; /* Enable if user specified on command line */ -if (p_sys->sub.i_last == i) +if (p_sys->sub.i_channel == i) EsOutSelect(out, es->pp_cc_es[i], true); } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input: es_out: compare selected es by pointer
vlc | branch: master | Francois Cartegnie | Thu Sep 22 16:20:18 2016 +0200| [83b688b435296addfd3f9942e44612e1c2c50c51] | committer: Francois Cartegnie input: es_out: compare selected es by pointer > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=83b688b435296addfd3f9942e44612e1c2c50c51 --- src/input/es_out.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/input/es_out.c b/src/input/es_out.c index b008aad..822dbd9 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -1797,7 +1797,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) } else if( p_sys->i_mode == ES_OUT_MODE_AUTO ) { -int i_wanted = -1; +const es_out_id_t *wanted_es = NULL; if( es->p_pgrm != p_sys->p_pgrm || !p_esprops ) return; @@ -1812,7 +1812,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) { /* Only select the language if it's in the list */ if( es_idx >= 0 ) -i_wanted = es->i_channel; +wanted_es = es; } else { @@ -1823,7 +1823,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) ( selected_es_idx < 0 || es_idx < selected_es_idx || ( es_idx == selected_es_idx && p_sys->audio.p_main_es->fmt.i_priority < es->fmt.i_priority ) ) ) -i_wanted = es->i_channel; +wanted_es = es; } } else @@ -1832,7 +1832,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) * then choose by ES priority */ if( !p_sys->audio.p_main_es || p_sys->audio.p_main_es->fmt.i_priority < es->fmt.i_priority ) -i_wanted = es->i_channel; +wanted_es = es; } } else if( i_cat == SPU_ES ) @@ -1851,7 +1851,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) /* check if the subtitle isn't forbidden by none */ LanguageArrayIndex( p_sys->ppsz_sub_language, "none" ) < 0 && es->i_id == p_sys->i_default_sub_id ) ) -i_wanted = es->i_channel; +wanted_es = es; } else { @@ -1863,7 +1863,7 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) ( selected_es_idx < 0 || es_idx < selected_es_idx || ( es_idx == selected_es_idx && p_sys->sub.p_main_es->fmt.i_priority < es->fmt.i_priority ) ) ) -i_wanted = es->i_channel; +wanted_es = es; } } else if ( es->fmt.i_codec == EsOutFourccClosedCaptions[0] || @@ -1885,32 +1885,32 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force ) es->i_id == p_sys->i_default_sub_id ) ) || ( p_sys->sub.p_main_es && p_sys->sub.p_main_es->fmt.i_priority < es->fmt.i_priority ) ) -i_wanted = es->i_channel; +wanted_es = es; else if( p_sys->sub.p_main_es && p_sys->sub.p_main_es->fmt.i_priority >= es->fmt.i_priority ) -i_wanted = p_sys->sub.p_main_es->i_channel; +wanted_es = p_sys->sub.p_main_es; } } else if( i_cat == VIDEO_ES ) { -i_wanted = es->i_channel; +wanted_es = es; } if( p_esprops ) { -if( p_esprops->i_last >= 0 ) -i_wanted = p_esprops->i_last; +if( p_esprops->i_last == es->i_channel ) +wanted_es = es; if( p_esprops->i_id >= 0 ) { if( es->i_id == p_esprops->i_id ) -i_wanted = es->i_channel; +wanted_es = es; else return; } } -if( i_wanted == es->i_channel && !EsIsSelected( es ) ) +if( wanted_es == es && !EsIsSelected( es ) ) EsSelect( out, es ); } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: mp4: fix crashes with VPx
vlc | branch: master | Tristan Matthews | Thu Sep 22 07:36:28 2016 -0400| [32fbf6849dc7600701b9d8156b3df07d5c172a78] | committer: Francois Cartegnie demux: mp4: fix crashes with VPx Reported by Vittorio Giovara. Signed-off-by: Francois Cartegnie > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32fbf6849dc7600701b9d8156b3df07d5c172a78 --- modules/demux/mp4/essetup.c | 12 ++-- modules/demux/mp4/libmp4.c | 9 - 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c index 446bf84..efd4b55 100644 --- a/modules/demux/mp4/essetup.c +++ b/modules/demux/mp4/essetup.c @@ -600,8 +600,16 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample ) p_track->fmt.video.b_color_range_full = p_data->i_fullrange; p_track->fmt.video.i_bits_per_pixel = p_data->i_bit_depth; -p_track->fmt.i_extra = p_data->i_codec_init_datasize; -memcpy( p_track->fmt.p_extra, p_data->p_codec_init_data, p_data->i_codec_init_datasize ); +if( p_data->i_codec_init_datasize ) +{ +p_track->fmt.p_extra = malloc( p_data->i_codec_init_datasize ); +if( p_track->fmt.p_extra ) +{ +p_track->fmt.i_extra = p_data->i_codec_init_datasize; +memcpy( p_track->fmt.p_extra, p_data->p_codec_init_data, +p_data->i_codec_init_datasize ); +} +} } } diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c index 6a36b7f..809381c 100644 --- a/modules/demux/mp4/libmp4.c +++ b/modules/demux/mp4/libmp4.c @@ -1650,7 +1650,14 @@ static int MP4_ReadBox_vpcC( stream_t *p_stream, MP4_Box_t *p_box ) MP4_GET2BYTES( p_vpcC->i_codec_init_datasize ); if( p_vpcC->i_codec_init_datasize > i_read ) p_vpcC->i_codec_init_datasize = i_read; -memcpy( p_vpcC->p_codec_init_data, p_peek, i_read ); + +if( p_vpcC->i_codec_init_datasize ) +{ +p_vpcC->p_codec_init_data = malloc( i_read ); +if( !p_vpcC->p_codec_init_data ) +MP4_READBOX_EXIT( 0 ); +memcpy( p_vpcC->p_codec_init_data, p_peek, i_read ); +} MP4_READBOX_EXIT( 1 ); } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vout-iOS: add error messages so creation no longer silently fails
vlc | branch: master | Felix Paul Kühne | Thu Sep 22 12:59:05 2016 +0200| [28a9f978dbd00379ed343868c65c265364119bfb] | committer: Felix Paul Kühne vout-iOS: add error messages so creation no longer silently fails > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=28a9f978dbd00379ed343868c65c265364119bfb --- modules/video_output/ios2.m | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m index 5e56ca5..8fa4bc6 100644 --- a/modules/video_output/ios2.m +++ b/modules/video_output/ios2.m @@ -240,11 +240,14 @@ static int Open(vlc_object_t *this) sys->glESView = [[VLCOpenGLES2VideoView alloc] initWithFrame:CGRectMake(0.,0.,320.,240.) zeroCopy:sys->zero_copy voutDisplay:vd]; sys->glESView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; -if (!sys->glESView) +if (!sys->glESView) { +msg_Err(vd, "Creating OpenGL ES 2 view failed"); goto bailout; +} [sys->glESView performSelectorOnMainThread:@selector(fetchViewContainer) withObject:nil waitUntilDone:YES]; if (!sys->viewContainer) { +msg_Err(vd, "Fetching view container failed"); goto bailout; } @@ -630,17 +633,23 @@ static void ZeroCopyDisplay(vout_display_t *vd, picture_t *pic, subpicture_t *su { /* get the object we will draw into */ UIView *viewContainer = var_CreateGetAddress (_voutDisplay, "drawable-nsobject"); -if (unlikely(viewContainer == nil)) +if (unlikely(viewContainer == nil)) { +msg_Err(_voutDisplay, "provided view container is nil"); return; +} [viewContainer retain]; @synchronized(viewContainer) { -if (unlikely(![viewContainer respondsToSelector:@selector(isKindOfClass:)])) +if (unlikely(![viewContainer respondsToSelector:@selector(isKindOfClass:)])) { +msg_Err(_voutDisplay, "void pointer not an ObjC object"); return; +} -if (![viewContainer isKindOfClass:[UIView class]]) +if (![viewContainer isKindOfClass:[UIView class]]) { +msg_Err(_voutDisplay, "passed ObjC object not of class UIView"); return; +} vout_display_sys_t *sys = _voutDisplay->sys; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] videotoolbox: compilation fix
vlc | branch: master | Felix Paul Kühne | Thu Sep 22 12:18:52 2016 +0200| [0bd6fca980905e6991db512f1ed5bb1f03d9c285] | committer: Felix Paul Kühne videotoolbox: compilation fix > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0bd6fca980905e6991db512f1ed5bb1f03d9c285 --- modules/codec/videotoolbox.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m index 00745d5..b21e0cc 100644 --- a/modules/codec/videotoolbox.m +++ b/modules/codec/videotoolbox.m @@ -408,7 +408,7 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block) } else { -assert_unreachable(); +vlc_assert_unreachable(); return VLC_EGENERIC; } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] codec: mediacodec: constify csd
vlc | branch: master | Francois Cartegnie | Thu Sep 22 11:54:09 2016 +0200| [09f0ed8de46951f9e0106b26305a90f036570d93] | committer: Francois Cartegnie codec: mediacodec: constify csd > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09f0ed8de46951f9e0106b26305a90f036570d93 --- modules/codec/omxil/mediacodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c index 563d91d..285a395 100644 --- a/modules/codec/omxil/mediacodec.c +++ b/modules/codec/omxil/mediacodec.c @@ -54,7 +54,7 @@ /* Codec Specific Data */ struct csd { -uint8_t *p_buf; +const uint8_t *p_buf; size_t i_size; }; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] packetizer: h264: rename and constify h264_get_spspps
vlc | branch: master | Francois Cartegnie | Thu Sep 22 11:56:17 2016 +0200| [734d698e30bd090d6569df20edd2bf92a8183223] | committer: Francois Cartegnie packetizer: h264: rename and constify h264_get_spspps > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=734d698e30bd090d6569df20edd2bf92a8183223 --- modules/codec/omxil/mediacodec.c | 4 ++-- modules/codec/videotoolbox.m | 4 ++-- modules/mux/mp4/libmp4mux.c | 12 ++-- modules/packetizer/h264_nal.c| 8 modules/packetizer/h264_nal.h| 8 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c index 285a395..b0afcc0 100644 --- a/modules/codec/omxil/mediacodec.c +++ b/modules/codec/omxil/mediacodec.c @@ -263,11 +263,11 @@ static int H264SetCSD(decoder_t *p_dec, void *p_buf, size_t i_size, bool *p_size_changed) { decoder_sys_t *p_sys = p_dec->p_sys; -uint8_t *p_sps_buf = NULL, *p_pps_buf = NULL, *p_ext_buf = NULL; +const uint8_t *p_sps_buf = NULL, *p_pps_buf = NULL, *p_ext_buf = NULL; size_t i_sps_size = 0, i_pps_size = 0, i_ext_size = 0; /* Check if p_buf contains a valid SPS PPS */ -if (h264_get_spspps(p_buf, i_size, +if (h264_AnnexB_get_spspps(p_buf, i_size, &p_sps_buf, &i_sps_size, &p_pps_buf, &i_pps_size, &p_ext_buf, &i_ext_size) == 0 ) diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m index 0df8fbb..00745d5 100644 --- a/modules/codec/videotoolbox.m +++ b/modules/codec/videotoolbox.m @@ -414,9 +414,9 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block) /* get the SPS and PPS units from the NAL unit which is either * part of the demuxer's avvC atom or the mid stream data block */ -uint8_t *p_sps_ab = NULL, *p_pps_ab = NULL, *p_ext_ab = NULL; +const uint8_t *p_sps_ab = NULL, *p_pps_ab = NULL, *p_ext_ab = NULL; size_t i_sps_absize = 0, i_pps_absize = 0, i_ext_absize = 0; -i_ret = h264_get_spspps(p_buf, i_buf, +i_ret = h264_AnnexB_get_spspps(p_buf, i_buf, &p_sps_ab, &i_sps_absize, &p_pps_ab, &i_pps_absize, &p_ext_ab, &i_ext_absize); diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c index c3326cd..e89a206 100644 --- a/modules/mux/mp4/libmp4mux.c +++ b/modules/mux/mp4/libmp4mux.c @@ -27,7 +27,7 @@ #include "libmp4mux.h" #include "../demux/mp4/libmp4.h" /* flags */ #include "../packetizer/hevc_nal.h" -#include "../packetizer/h264_nal.h" /* h264_get_spspps */ +#include "../packetizer/h264_nal.h" /* h264_AnnexB_get_spspps */ #include "../packetizer/hxxx_nal.h" #include @@ -874,10 +874,10 @@ static bo_t *GetAvcCTag(es_format_t *p_fmt) bo_t*avcC = box_new("avcC");/* FIXME use better value */ if(!avcC) return NULL; -uint8_t *p_sps, *p_pps, *p_ext; +const uint8_t *p_sps, *p_pps, *p_ext; size_t i_sps_size, i_pps_size, i_ext_size; -if( h264_get_spspps(p_fmt->p_extra, p_fmt->i_extra, +if( h264_AnnexB_get_spspps(p_fmt->p_extra, p_fmt->i_extra, &p_sps, &i_sps_size, &p_pps, &i_pps_size, &p_ext, &i_ext_size ) != 0 ) @@ -886,9 +886,9 @@ static bo_t *GetAvcCTag(es_format_t *p_fmt) i_sps_size = i_pps_size = i_ext_size = 0; } -(void) hxxx_strip_AnnexB_startcode( (const uint8_t **) &p_sps, &i_sps_size ); -(void) hxxx_strip_AnnexB_startcode( (const uint8_t **) &p_sps, &i_sps_size ); -(void) hxxx_strip_AnnexB_startcode( (const uint8_t **) &p_ext, &i_ext_size ); +(void) hxxx_strip_AnnexB_startcode( &p_sps, &i_sps_size ); +(void) hxxx_strip_AnnexB_startcode( &p_sps, &i_sps_size ); +(void) hxxx_strip_AnnexB_startcode( &p_ext, &i_ext_size ); bo_add_8(avcC, 1); /* configuration version */ bo_add_8(avcC, i_sps_size > 3 ? p_sps[1] : PROFILE_H264_MAIN); diff --git a/modules/packetizer/h264_nal.c b/modules/packetizer/h264_nal.c index 6c5aa47..11f237d 100644 --- a/modules/packetizer/h264_nal.c +++ b/modules/packetizer/h264_nal.c @@ -160,10 +160,10 @@ void h264_AVC_to_AnnexB( uint8_t *p_buf, uint32_t i_len, } } -int h264_get_spspps( uint8_t *p_buf, size_t i_buf, - uint8_t **pp_sps, size_t *p_sps_size, - uint8_t **pp_pps, size_t *p_pps_size, - uint8_t **pp_ext, size_t *p_ext_size ) +int h264_AnnexB_get_spspps( const uint8_t *p_buf, size_t i_buf, +const uint8_t **pp_sps, size_t *p_sps_size, +const uint8_t **pp_pps, size_t *p_pps_size, +const uint8_t **pp_ext, size_t *p_ext_size ) { uint8_t *p_sps = NULL, *p_pps = NULL, *p_ext = NULL; size_t i_sps_size = 0, i_pps_size =
[vlc-commits] vt: simplify h264/annexb start
vlc | branch: master | Francois Cartegnie | Tue Sep 20 18:41:18 2016 +0200| [f856d4b066276a9ab3a94a1574c2690bd0e32415] | committer: Francois Cartegnie vt: simplify h264/annexb start > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f856d4b066276a9ab3a94a1574c2690bd0e32415 --- modules/codec/videotoolbox.m | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m index a3eeb77..51ac7a5 100644 --- a/modules/codec/videotoolbox.m +++ b/modules/codec/videotoolbox.m @@ -382,19 +382,24 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block) uint8_t *p_alloc_buf = NULL; int i_ret = 0; -if (p_block == NULL) { -/* we need to convert the SPS and PPS units we received from the - * demuxer's avvC atom so we can process them further */ -if(h264_isavcC(p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra)) +/* we need to convert the SPS and PPS units we received from the + * demuxer's avvC atom so we can process them further */ +p_sys->b_is_avcc = h264_isavcC(p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra); +if(p_sys->b_is_avcc) +{ +p_alloc_buf = h264_avcC_to_AnnexB_NAL(p_dec->fmt_in.p_extra, + p_dec->fmt_in.i_extra, + &i_buf, + &p_sys->i_nal_length_size); +p_buf = p_alloc_buf; +if(!p_alloc_buf) { -p_alloc_buf = h264_avcC_to_AnnexB_NAL(p_dec->fmt_in.p_extra, - p_dec->fmt_in.i_extra, - &i_buf, - &p_sys->i_nal_length_size); -p_buf = p_alloc_buf; -p_sys->b_is_avcc = !!p_buf; +msg_Warn(p_dec, "invalid avc decoder configuration record"); +return VLC_EGENERIC; } -} else { +} +else if(p_block) +{ /* we are mid-stream, let's have the h264_get helper see if it * can find a NAL unit */ i_buf = p_block->i_buffer; @@ -402,16 +407,16 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block) p_sys->i_nal_length_size = 4; /* default to 4 bytes */ i_ret = VLC_SUCCESS; } - -uint8_t *p_sps_ab = NULL, *p_pps_ab = NULL, *p_ext_ab = NULL; -size_t i_sps_absize = 0, i_pps_absize = 0, i_ext_absize = 0; -if (!p_buf) { -msg_Warn(p_dec, "no valid extradata or conversion failed"); +else +{ +assert_unreachable(); return VLC_EGENERIC; } /* get the SPS and PPS units from the NAL unit which is either * part of the demuxer's avvC atom or the mid stream data block */ +uint8_t *p_sps_ab = NULL, *p_pps_ab = NULL, *p_ext_ab = NULL; +size_t i_sps_absize = 0, i_pps_absize = 0, i_ext_absize = 0; i_ret = h264_get_spspps(p_buf, i_buf, &p_sps_ab, &i_sps_absize, &p_pps_ab, &i_pps_absize, ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] codec: vt: remove unused var
vlc | branch: master | Francois Cartegnie | Thu Sep 22 11:39:04 2016 +0200| [ed267714024859b0f58c4a849c244d6d5ca01c31] | committer: Francois Cartegnie codec: vt: remove unused var > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed267714024859b0f58c4a849c244d6d5ca01c31 --- modules/codec/videotoolbox.m | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m index 51ac7a5..98e1e08 100644 --- a/modules/codec/videotoolbox.m +++ b/modules/codec/videotoolbox.m @@ -131,7 +131,6 @@ struct decoder_sys_t static CMVideoCodecType CodecPrecheck(decoder_t *p_dec) { -decoder_sys_t *p_sys = p_dec->p_sys; uint8_t i_profile = 0xFF, i_level = 0xFF; bool b_ret = false; CMVideoCodecType codec; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] codec: vt: fix format string
vlc | branch: master | Francois Cartegnie | Thu Sep 22 11:39:30 2016 +0200| [e1017a2085f7ab1905329d31d0fb42031989f6f5] | committer: Francois Cartegnie codec: vt: fix format string > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1017a2085f7ab1905329d31d0fb42031989f6f5 --- modules/codec/videotoolbox.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m index 98e1e08..0df8fbb 100644 --- a/modules/codec/videotoolbox.m +++ b/modules/codec/videotoolbox.m @@ -146,7 +146,7 @@ static CMVideoCodecType CodecPrecheck(decoder_t *p_dec) return kCMVideoCodecType_H264; } -msg_Dbg(p_dec, "trying to decode MPEG-4 Part 10: profile %" PRIx8 ", level %i" PRIx8, i_profile, i_level); +msg_Dbg(p_dec, "trying to decode MPEG-4 Part 10: profile %" PRIx8 ", level %" PRIx8, i_profile, i_level); switch (i_profile) { case PROFILE_H264_BASELINE: ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] macosx: Use -apple-system font on about panel
vlc | branch: master | Marvin Scholz | Fri Sep 9 16:57:04 2016 +0200| [941a256636307423105b09a115b068a29bc00961] | committer: Felix Paul Kühne macosx: Use -apple-system font on about panel This patch will add the -apple-system font to the font-family used for the About panel font. On El Capitan and higher it will use the native system font. On Yosemite and lower it will automatically fallback to the next font in the list, either Helvetica Neue or Lucida Grande. Signed-off-by: Felix Paul Kühne > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=941a256636307423105b09a115b068a29bc00961 --- modules/gui/macosx/VLCAboutWindowController.m | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/gui/macosx/VLCAboutWindowController.m b/modules/gui/macosx/VLCAboutWindowController.m index 838858c..9a5e5fa 100644 --- a/modules/gui/macosx/VLCAboutWindowController.m +++ b/modules/gui/macosx/VLCAboutWindowController.m @@ -140,12 +140,9 @@ "DVDs, network streams, capture cards and other media formats!http://www.videolan.org/contribute/\";>Help and join us!")); -NSString *fontfamily; -if (OSX_YOSEMITE || OSX_EL_CAPITAN || OSX_SIERRA) -fontfamily = @"Helvetica Neue"; -else -fontfamily = @"Lucida Grande"; -NSString *joinUsWithStyle = [NSString stringWithFormat:@"%@", + +NSString *fontfamily = (OSX_YOSEMITE) ? @"Helvetica Neue" : @"Lucida Grande"; +NSString *joinUsWithStyle = [NSString stringWithFormat:@"%@", fontfamily, joinus]; NSAttributedString *joinus_readytorender = [[NSAttributedString alloc] initWithHTML:[joinUsWithStyle dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES] options:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:NSUTF8StringEncoding] forKey:NSCharacterEncodingDocumentOption] documentAttributes:NULL]; [o_joinus_txt setAllowsEditingTextAttributes: YES]; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] macosx: Fix missing renderer discovery types
vlc | branch: master | Marvin Scholz | Tue Sep 20 20:24:30 2016 +0200| [4f3e48abf74a76e29b58d94ae6dc0a2eef9c21fa] | committer: Felix Paul Kühne macosx: Fix missing renderer discovery types Signed-off-by: Felix Paul Kühne > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f3e48abf74a76e29b58d94ae6dc0a2eef9c21fa --- modules/gui/macosx/VLCRendererDialog.m| 2 +- modules/gui/macosx/VLCRendererDiscovery.h | 6 +++--- modules/gui/macosx/VLCRendererDiscovery.m | 10 +- modules/gui/macosx/VLCRendererItem.h | 12 ++-- modules/gui/macosx/VLCRendererItem.m | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/gui/macosx/VLCRendererDialog.m b/modules/gui/macosx/VLCRendererDialog.m index afc8f40..2be0fe3 100644 --- a/modules/gui/macosx/VLCRendererDialog.m +++ b/modules/gui/macosx/VLCRendererDialog.m @@ -37,7 +37,7 @@ NSMutableArray *renderer_discoveries; intf_thread_t *p_intf; -vlc_renderer_discovery *p_rd; +vlc_renderer_discovery_t *p_rd; } @end diff --git a/modules/gui/macosx/VLCRendererDiscovery.h b/modules/gui/macosx/VLCRendererDiscovery.h index b45278a..2406689 100644 --- a/modules/gui/macosx/VLCRendererDiscovery.h +++ b/modules/gui/macosx/VLCRendererDiscovery.h @@ -1,5 +1,5 @@ /* - * VLCRendererDiscovery.h: Wrapper class for vlc_renderer_discovery + * VLCRendererDiscovery.h: Wrapper class for vlc_renderer_discovery_t * * Copyright (C) 2016 VLC authors and VideoLAN * $Id$ @@ -29,7 +29,7 @@ /** \c VLCRendererDiscovery is a simple wrapper class for libvlc’s - \c vlc_renderer_discovery. It's initialized with the renderer name and + \c vlc_renderer_discovery_t. It's initialized with the renderer name and manages the underlying renderer discovery. */ @interface VLCRendererDiscovery : NSObject @@ -69,7 +69,7 @@ \param longnameRenderer longname as C string \returns Initialized class that already created the underlying -\c vlc_renderer_discovery structure or nil on failure. +\c vlc_renderer_discovery_t structure or nil on failure. */ - (instancetype)initWithName:(const char*)name andLongname:(const char*)longname; diff --git a/modules/gui/macosx/VLCRendererDiscovery.m b/modules/gui/macosx/VLCRendererDiscovery.m index f54077c..00b98b3 100644 --- a/modules/gui/macosx/VLCRendererDiscovery.m +++ b/modules/gui/macosx/VLCRendererDiscovery.m @@ -1,5 +1,5 @@ /* - * VLCRendererDiscovery.m: Wrapper class for vlc_renderer_discovery + * VLCRendererDiscovery.m: Wrapper class for vlc_renderer_discovery_t * * Copyright (C) 2016 VLC authors and VideoLAN * $Id$ @@ -30,8 +30,8 @@ @interface VLCRendererDiscovery () { -intf_thread_t *p_intf; -vlc_renderer_discovery *p_rd; +intf_thread_t *p_intf; +vlc_renderer_discovery_t*p_rd; } - (void)handleEvent:(const vlc_event_t *)event; @@ -120,7 +120,7 @@ static void renderer_event_received(const vlc_event_t *p_event, void *user_data) - (void)handleEvent:(const vlc_event_t *)event { if (event->type == vlc_RendererDiscoveryItemAdded) { -vlc_renderer_item *base_item = event->u.renderer_discovery_item_added.p_new_item; +vlc_renderer_item_t *base_item = event->u.renderer_discovery_item_added.p_new_item; VLCRendererItem *item = [[VLCRendererItem alloc] initWithRendererItem:base_item]; [_rendererItems addObject:item]; if (_delegate) @@ -128,7 +128,7 @@ static void renderer_event_received(const vlc_event_t *p_event, void *user_data) return; } if (event->type == vlc_RendererDiscoveryItemRemoved) { -vlc_renderer_item *base_item = event->u.renderer_discovery_item_removed.p_item; +vlc_renderer_item_t *base_item = event->u.renderer_discovery_item_removed.p_item; VLCRendererItem *result_item = nil; for (VLCRendererItem *item in _rendererItems) { diff --git a/modules/gui/macosx/VLCRendererItem.h b/modules/gui/macosx/VLCRendererItem.h index e46618a..d65c3b4 100644 --- a/modules/gui/macosx/VLCRendererItem.h +++ b/modules/gui/macosx/VLCRendererItem.h @@ -1,5 +1,5 @@ /* - * VLCRendererItem.h: Wrapper class for vlc_renderer_item + * VLCRendererItem.h: Wrapper class for vlc_renderer_item_t * * Copyright (C) 2016 VLC authors and VideoLAN * $Id$ @@ -28,21 +28,21 @@ /** \c VLCRendererItem is a simple wrapper class for libvlc’s - \c vlc_renderer_item. It's initialized with the renderer item and + \c vlc_renderer_item_t. It's
[vlc-commits] Work-around fdatasync broken on Darwin
vlc | branch: master | Jean-Baptiste Kempf | Thu Sep 22 10:59:57 2016 +0200| [4fcfacad545d71cfe898f799375e7646f54cf97d] | committer: Jean-Baptiste Kempf Work-around fdatasync broken on Darwin > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4fcfacad545d71cfe898f799375e7646f54cf97d --- include/vlc_fixups.h | 4 1 file changed, 4 insertions(+) diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index 03904f3..7a76ef4 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -485,6 +485,10 @@ void freeaddrinfo (struct addrinfo *res); FILE *vlc_win32_tmpfile(void); #endif +#ifdef __APPLE__ +# define fdatasync fsync +#endif + #ifdef __cplusplus } /* extern "C" */ #endif ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits