[vlc-commits] input: fix resuming from pause at EOF (fixes #6490)
vlc | branch: master | Rémi Denis-Courmont| Thu Nov 17 22:31:48 2016 +0200| [42c2b52b80710953227b8cee7747246fdbf86578] | committer: Rémi Denis-Courmont input: fix resuming from pause at EOF (fixes #6490) As things stood, the input was paused at EOF... and when resumed would get straight back into pause. This adds a flag to heep track of the occurrence of pause at EOF. If it occurs a second time in a row, terminate the input thread loop. If however the user seeks backward and resume, clear the flag and resume playback normally. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42c2b52b80710953227b8cee7747246fdbf86578 --- src/input/input.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/input/input.c b/src/input/input.c index e440c50..cfcb92f 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -676,7 +676,8 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive ) ControlPause( p_input, mdate() ); bool b_pause_after_eof = b_interactive && - var_InheritBool( p_input, "play-and-pause" ); + var_InheritBool( p_input, "play-and-pause" ); +bool b_paused_at_eof = false; demux_t *p_demux = input_priv(p_input)->master->p_demux; const bool b_can_demux = p_demux->pf_demux != NULL; @@ -704,6 +705,8 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive ) i_wakeup = es_out_GetWakeup( input_priv(p_input)->p_es_out ); if( b_force_update ) i_intf_update = 0; + +b_paused_at_eof = false; } else if( !es_out_GetEmpty( input_priv(p_input)->p_es_out ) ) { @@ -714,12 +717,16 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive ) * This way we won't trigger timeshifting for nothing */ else if( b_pause_after_eof && input_priv(p_input)->b_can_pause ) { +if( b_paused_at_eof ) +break; + vlc_value_t val = { .i_int = PAUSE_S }; msg_Dbg( p_input, "pausing at EOF (pause after each)"); Control( p_input, INPUT_CONTROL_SET_STATE, val ); b_paused = true; +b_paused_at_eof = true; } else { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] playlist: unregister input item callbacks at exit (fixes #17087)
vlc | branch: master | Rémi Denis-Courmont| Thu Nov 17 22:05:18 2016 +0200| [4d1a065d485e7c107269102677f68d612e77f65f] | committer: Rémi Denis-Courmont playlist: unregister input item callbacks at exit (fixes #17087) Destroy remaining playlist items normally. This does NOT fix #17652. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d1a065d485e7c107269102677f68d612e77f65f --- src/playlist/engine.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/playlist/engine.c b/src/playlist/engine.c index feda7ad..dbb2723 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -324,17 +324,14 @@ void playlist_Destroy( playlist_t *p_playlist ) set_current_status_node( p_playlist, NULL ); /* Release the current item */ set_current_status_item( p_playlist, NULL ); + +/* Remove all remaining items */ +playlist_NodeDelete( p_playlist, p_playlist->p_root, true ); PL_UNLOCK; vlc_cond_destroy( _sys->signal ); vlc_mutex_destroy( _sys->lock ); -/* Remove all remaining items */ -FOREACH_ARRAY( playlist_item_t *p_del, p_sys->all_items ) -free( p_del->pp_children ); -vlc_gc_decref( p_del->p_input ); -free( p_del ); -FOREACH_END(); ARRAY_RESET( p_sys->all_items ); ARRAY_RESET( p_playlist->items ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] playlist: remove redundant hack
vlc | branch: master | Rémi Denis-Courmont| Thu Nov 17 21:44:23 2016 +0200| [707cbccdd2b255568efca42d23c4a56da5f90bf9] | committer: Rémi Denis-Courmont playlist: remove redundant hack Forcing an input item into a playlist item breaks common clean-up procedures. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=707cbccdd2b255568efca42d23c4a56da5f90bf9 --- src/playlist/loadsave.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c index 4e4d1e0..67e4029 100644 --- a/src/playlist/loadsave.c +++ b/src/playlist/loadsave.c @@ -129,8 +129,6 @@ static void input_item_subitem_tree_added( const vlc_event_t * p_event, int playlist_MLLoad( playlist_t *p_playlist ) { -input_item_t *p_input; - char *psz_datadir = config_GetUserDir( VLC_DATA_DIR ); if( !psz_datadir ) /* XXX: This should never happen */ { @@ -158,20 +156,13 @@ int playlist_MLLoad( playlist_t *p_playlist ) if( psz_uri == NULL ) return VLC_ENOMEM; -p_input = input_item_New( psz_uri, _("Media Library") ); +input_item_t *p_input = input_item_New( psz_uri, _("Media Library") ); free( psz_uri ); if( p_input == NULL ) return VLC_EGENERIC; -PL_LOCK; -if( p_playlist->p_media_library->p_input ) -vlc_gc_decref( p_playlist->p_media_library->p_input ); - -p_playlist->p_media_library->p_input = p_input; - vlc_event_attach( _input->event_manager, vlc_InputItemSubItemTreeAdded, input_item_subitem_tree_added, p_playlist ); -PL_UNLOCK; vlc_object_t *dummy = vlc_object_create( p_playlist, sizeof (*dummy) ); var_Create( dummy, "meta-file", VLC_VAR_VOID ); @@ -180,6 +171,7 @@ int playlist_MLLoad( playlist_t *p_playlist ) vlc_event_detach( _input->event_manager, vlc_InputItemSubItemTreeAdded, input_item_subitem_tree_added, p_playlist ); +vlc_gc_decref( p_input ); return VLC_SUCCESS; } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] playlist: unregister input item callbacks at exit (fixes #17507)
vlc | branch: master | Rémi Denis-Courmont| Thu Nov 17 22:05:18 2016 +0200| [963dbe80be2bd658750cbcb3cd7d5ab03abb0b05] | committer: Rémi Denis-Courmont playlist: unregister input item callbacks at exit (fixes #17507) Destroy remaining playlist items normally. This does NOT fix #17652. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=963dbe80be2bd658750cbcb3cd7d5ab03abb0b05 --- src/playlist/engine.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/playlist/engine.c b/src/playlist/engine.c index feda7ad..dbb2723 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -324,17 +324,14 @@ void playlist_Destroy( playlist_t *p_playlist ) set_current_status_node( p_playlist, NULL ); /* Release the current item */ set_current_status_item( p_playlist, NULL ); + +/* Remove all remaining items */ +playlist_NodeDelete( p_playlist, p_playlist->p_root, true ); PL_UNLOCK; vlc_cond_destroy( _sys->signal ); vlc_mutex_destroy( _sys->lock ); -/* Remove all remaining items */ -FOREACH_ARRAY( playlist_item_t *p_del, p_sys->all_items ) -free( p_del->pp_children ); -vlc_gc_decref( p_del->p_input ); -free( p_del ); -FOREACH_END(); ARRAY_RESET( p_sys->all_items ); ARRAY_RESET( p_playlist->items ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] playlist: fix use after free in current array
vlc | branch: master | Rémi Denis-Courmont| Thu Nov 17 22:02:08 2016 +0200| [4151f731a9a58a66e2931ae51cdb5939523e7c6b] | committer: Rémi Denis-Courmont playlist: fix use after free in current array The "current" array is *not* sorted by ID. Binary search cannot work there. (Maybe this should be a linked-listed instead.) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4151f731a9a58a66e2931ae51cdb5939523e7c6b --- src/playlist/tree.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/playlist/tree.c b/src/playlist/tree.c index 8bc560f..b6bc9c3 100644 --- a/src/playlist/tree.c +++ b/src/playlist/tree.c @@ -129,9 +129,11 @@ void playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root, set_current_status_item( p_playlist, NULL ); } -ARRAY_BSEARCH( p_playlist->current,->i_id, int, p_root->i_id, i ); -if( i != -1 ) -ARRAY_REMOVE( p_playlist->current, i ); +for( i = 0; i < p_playlist->current.i_size; i++ ) +if( p_playlist->current.p_elems[i] == p_root ) +ARRAY_REMOVE( p_playlist->current, i ); +for( i = 0; i < p_playlist->current.i_size; i++ ) +assert( p_playlist->current.p_elems[i] != p_root ); PL_DEBUG( "deleting item `%s'", p_root->p_input->psz_name ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] sd: force playlist node deletion
vlc | branch: master | Pierre Ynard| Thu Nov 17 06:59:51 2016 +0100| [a21d87cdd0c89b8ec36038fac63234221b5b43e0] | committer: Rémi Denis-Courmont sd: force playlist node deletion It is necessary because nodes are created with the RO flag. Signed-off-by: Rémi Denis-Courmont > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a21d87cdd0c89b8ec36038fac63234221b5b43e0 --- src/playlist/services_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c index 6009348..650fc20 100644 --- a/src/playlist/services_discovery.c +++ b/src/playlist/services_discovery.c @@ -255,7 +255,7 @@ static void playlist_ServicesDiscoveryInternalRemove(playlist_t *playlist, /* Remove the sd playlist node if it exists */ playlist_Lock(playlist); if (sds->node != NULL) -playlist_NodeDelete(playlist, sds->node, false); +playlist_NodeDelete(playlist, sds->node, true); playlist_Unlock(playlist); free(sds); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] sd: force playlist node deletion
vlc | branch: master | Pierre Ynard via vlc-devel| Thu Nov 17 06:59:51 2016 +0100| [095299078ec04a4fba8a4c493b0cc8b55129830e] | committer: Rémi Denis-Courmont sd: force playlist node deletion It is necessary because nodes are created with the RO flag. Signed-off-by: Rémi Denis-Courmont > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=095299078ec04a4fba8a4c493b0cc8b55129830e --- src/playlist/services_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c index 6009348..650fc20 100644 --- a/src/playlist/services_discovery.c +++ b/src/playlist/services_discovery.c @@ -255,7 +255,7 @@ static void playlist_ServicesDiscoveryInternalRemove(playlist_t *playlist, /* Remove the sd playlist node if it exists */ playlist_Lock(playlist); if (sds->node != NULL) -playlist_NodeDelete(playlist, sds->node, false); +playlist_NodeDelete(playlist, sds->node, true); playlist_Unlock(playlist); free(sds); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] playlist: remove unused expanded flag
vlc | branch: master | Rémi Denis-Courmont| Thu Nov 17 20:01:29 2016 +0200| [72f21416f2f1dac135cb933fb069353bce65153a] | committer: Rémi Denis-Courmont playlist: remove unused expanded flag > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72f21416f2f1dac135cb933fb069353bce65153a --- include/vlc_playlist.h | 1 - modules/lua/libs/playlist.c | 1 - share/lua/README.txt| 1 - 3 files changed, 3 deletions(-) diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h index 521c0ad..4e50ee9 100644 --- a/include/vlc_playlist.h +++ b/include/vlc_playlist.h @@ -147,7 +147,6 @@ typedef enum { PLAYLIST_SKIP_FLAG = 0x0002, /**< Must playlist skip after it ? */ PLAYLIST_DBL_FLAG = 0x0004, /**< Is it disabled ? */ PLAYLIST_RO_FLAG = 0x0008, /**< Write-enabled ? */ -PLAYLIST_EXPANDED_FLAG = 0x0020, /**< Expanded node */ PLAYLIST_SUBITEM_STOP_FLAG = 0x0040, /**< Must playlist stop if the item gets subitems ?*/ PLAYLIST_NO_INHERIT_FLAG = 0x0080, /**< Childs must not inherit flags from parent node */ } playlist_item_flags_e; diff --git a/modules/lua/libs/playlist.c b/modules/lua/libs/playlist.c index 771a14a..78b61c9 100644 --- a/modules/lua/libs/playlist.c +++ b/modules/lua/libs/playlist.c @@ -212,7 +212,6 @@ static void push_playlist_item( lua_State *L, playlist_item_t *p_item ) CHECK_AND_SET_FLAG( SKIP, skip ) CHECK_AND_SET_FLAG( DBL, disabled ) CHECK_AND_SET_FLAG( RO, ro ) -CHECK_AND_SET_FLAG( EXPANDED, expanded ) #undef CHECK_AND_SET_FLAG lua_setfield( L, -2, "flags" ); if( p_input ) diff --git a/share/lua/README.txt b/share/lua/README.txt index d19053a..d726fcf 100644 --- a/share/lua/README.txt +++ b/share/lua/README.txt @@ -288,7 +288,6 @@ playlist.get( [what, [tree]] ): Get the playlist. .skip .disabled .ro - .expanded .name: .path: .duration: (-1 if unknown) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] playlist: remove unused expanded flag
vlc | branch: master | Rémi Denis-Courmont| Thu Nov 17 20:01:29 2016 +0200| [8c64e1098ee676f8b03037f14d407e3222811640] | committer: Rémi Denis-Courmont playlist: remove unused expanded flag > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c64e1098ee676f8b03037f14d407e3222811640 --- include/vlc_playlist.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h index 521c0ad..4e50ee9 100644 --- a/include/vlc_playlist.h +++ b/include/vlc_playlist.h @@ -147,7 +147,6 @@ typedef enum { PLAYLIST_SKIP_FLAG = 0x0002, /**< Must playlist skip after it ? */ PLAYLIST_DBL_FLAG = 0x0004, /**< Is it disabled ? */ PLAYLIST_RO_FLAG = 0x0008, /**< Write-enabled ? */ -PLAYLIST_EXPANDED_FLAG = 0x0020, /**< Expanded node */ PLAYLIST_SUBITEM_STOP_FLAG = 0x0040, /**< Must playlist stop if the item gets subitems ?*/ PLAYLIST_NO_INHERIT_FLAG = 0x0080, /**< Childs must not inherit flags from parent node */ } playlist_item_flags_e; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] playlist: fix flawed logic
vlc | branch: master | Rémi Denis-Courmont| Thu Nov 17 19:13:33 2016 +0200| [17f268596c0089d90f7341a6127e64e66ab67c86] | committer: Rémi Denis-Courmont playlist: fix flawed logic Regression from cc67adbfdcf3d084a8b2860e58dea0d711f24010. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=17f268596c0089d90f7341a6127e64e66ab67c86 --- src/playlist/tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/playlist/tree.c b/src/playlist/tree.c index ad41bd2..8bc560f 100644 --- a/src/playlist/tree.c +++ b/src/playlist/tree.c @@ -99,8 +99,7 @@ void playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root, /* Delete the children */ for( int i = p_root->i_children - 1 ; i >= 0; i-- ) -if( p_root->pp_children[i]->i_children >= 0 ) -playlist_NodeDelete( p_playlist, p_root->pp_children[i], b_force ); +playlist_NodeDelete( p_playlist, p_root->pp_children[i], b_force ); /* Delete the node */ if( p_root->i_flags & PLAYLIST_RO_FLAG && !b_force ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] hxxx_sei: allow to differentiate T35 payloads
vlc | branch: master | Francois Cartegnie| Wed Nov 16 20:12:17 2016 +0100| [c8c9f30d7264895798690ee234e00d6b647f353a] | committer: Francois Cartegnie hxxx_sei: allow to differentiate T35 payloads > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c8c9f30d7264895798690ee234e00d6b647f353a --- modules/packetizer/h264.c | 6 +- modules/packetizer/hevc.c | 8 +++- modules/packetizer/hxxx_sei.c | 5 +++-- modules/packetizer/hxxx_sei.h | 16 ++-- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c index 18f9aaa..2e39e97 100644 --- a/modules/packetizer/h264.c +++ b/modules/packetizer/h264.c @@ -957,7 +957,11 @@ static bool ParseSeiCallback( const hxxx_sei_data_t *p_sei_data, void *cbdata ) /* Look for user_data_registered_itu_t_t35 */ case HXXX_SEI_USER_DATA_REGISTERED_ITU_T_T35: { -cc_storage_append( p_sys->p_ccs, true, p_sei_data->itu_t35.p_cc, p_sei_data->itu_t35.i_cc ); +if( p_sei_data->itu_t35.type == HXXX_ITU_T35_TYPE_CC ) +{ +cc_storage_append( p_sys->p_ccs, true, p_sei_data->itu_t35.u.cc.p_data, + p_sei_data->itu_t35.u.cc.i_data ); +} } break; /* Look for SEI recovery point */ diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c index 39283fe..8392e64 100644 --- a/modules/packetizer/hevc.c +++ b/modules/packetizer/hevc.c @@ -695,7 +695,13 @@ static bool ParseSEICallback( const hxxx_sei_data_t *p_sei_data, void *cbdata ) decoder_sys_t *p_sys = p_dec->p_sys; if( p_sei_data->i_type == HXXX_SEI_USER_DATA_REGISTERED_ITU_T_T35 ) -cc_storage_append( p_sys->p_ccs, true, p_sei_data->itu_t35.p_cc, p_sei_data->itu_t35.i_cc ); +{ +if( p_sei_data->itu_t35.type == HXXX_ITU_T35_TYPE_CC ) +{ +cc_storage_append( p_sys->p_ccs, true, p_sei_data->itu_t35.u.cc.p_data, + p_sei_data->itu_t35.u.cc.i_data ); +} +} return true; } diff --git a/modules/packetizer/hxxx_sei.c b/modules/packetizer/hxxx_sei.c index 85a59ed..04550e5 100644 --- a/modules/packetizer/hxxx_sei.c +++ b/modules/packetizer/hxxx_sei.c @@ -119,8 +119,9 @@ void HxxxParseSEI(const uint8_t *p_buf, size_t i_buf, ( i_t35 >= sizeof(p_DIRECTV_data_start_code) && !memcmp( p_t35, p_DIRECTV_data_start_code, sizeof(p_DIRECTV_data_start_code) ) ) ) { -sei_data.itu_t35.i_cc = i_t35 - 3; -sei_data.itu_t35.p_cc = _t35[3]; +sei_data.itu_t35.type = HXXX_ITU_T35_TYPE_CC; +sei_data.itu_t35.u.cc.i_data = i_t35 - 3; +sei_data.itu_t35.u.cc.p_data = _t35[3]; b_continue = pf_callback( _data, cbdata ); } diff --git a/modules/packetizer/hxxx_sei.h b/modules/packetizer/hxxx_sei.h index 6189c17..7b53a57 100644 --- a/modules/packetizer/hxxx_sei.h +++ b/modules/packetizer/hxxx_sei.h @@ -28,6 +28,11 @@ enum hxxx_sei_type_e HXXX_SEI_RECOVERY_POINT = 6 }; +enum hxxx_sei_t35_type_e +{ +HXXX_ITU_T35_TYPE_CC, +}; + typedef struct { unsigned i_type; @@ -36,8 +41,15 @@ typedef struct bs_t *p_bs; /* for raw/unhandled in common code callbacks */ struct { -const uint8_t *p_cc; -size_t i_cc; +enum hxxx_sei_t35_type_e type; +union +{ +struct +{ +const uint8_t *p_data; +size_t i_data; +} cc; +} u; } itu_t35; struct { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] codec: cc: name enum type
vlc | branch: master | Francois Cartegnie| Wed Nov 16 20:48:11 2016 +0100| [9d1754b9de248025e52f2fdbc02fe1127bc9df28] | committer: Francois Cartegnie codec: cc: name enum type > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d1754b9de248025e52f2fdbc02fe1127bc9df28 --- modules/codec/cc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/codec/cc.h b/modules/codec/cc.h index a62d176..f9c6170 100644 --- a/modules/codec/cc.h +++ b/modules/codec/cc.h @@ -32,7 +32,7 @@ /* CC have a maximum rate of 9600 bit/s (per field?) */ #define CC_MAX_DATA_SIZE (2 * 3*600) -enum +enum cc_payload_type_e { CC_PAYLOAD_NONE, CC_PAYLOAD_GA94, @@ -49,7 +49,7 @@ typedef struct bool b_reorder; /* */ -int i_payload_type; +enum cc_payload_type_e i_payload_type; int i_payload_other_count; /* CC data per field ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input/input: remove unused legacy variable
vlc | branch: master | Filip Roséen| Thu Nov 17 10:25:15 2016 +0100| [ae0cb07a82384200b2e1fa1902f0fcfa2f1c84ae] | committer: Pierre Ynard input/input: remove unused legacy variable psz_timer_name was introduced as part of bf117f4 (2008-04), but the usage of the variable was removed in e3a897c (2011-11); as such it does not longer serve a purpose. Signed-off-by: Pierre Ynard > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ae0cb07a82384200b2e1fa1902f0fcfa2f1c84ae --- src/input/input.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/input/input.c b/src/input/input.c index b183f7d..e440c50 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -287,15 +287,9 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, input_thread_t *p_input = >input; -/* Construct a nice name for the input timer */ -char psz_timer_name[255]; char * psz_name = input_item_GetName( p_item ); -snprintf( psz_timer_name, sizeof(psz_timer_name), - "input launching for '%s'", psz_name ); - msg_Dbg( p_input, "Creating an input for %s'%s'", b_preparsing ? "preparsing " : "", psz_name); - free( psz_name ); /* Parse input options */ ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] core: keys: bind page Up/down to viewpoint zoom in/out
vlc | branch: master | Thomas Guillem| Thu Nov 17 09:47:28 2016 +0100| [7250ce82dac585f3de66a017c7bb6962e431416c] | committer: Thomas Guillem core: keys: bind page Up/down to viewpoint zoom in/out ACTION_ID_VIEWPOINT_FOV* are not bound anymore > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7250ce82dac585f3de66a017c7bb6962e431416c --- src/libvlc-module.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/libvlc-module.c b/src/libvlc-module.c index 776634b..076a7b6 100644 --- a/src/libvlc-module.c +++ b/src/libvlc-module.c @@ -1425,6 +1425,8 @@ static const char *const mouse_wheel_texts[] = { /* 360° Viewpoint */ #define VIEWPOINT_FOV_IN_KEY_TEXT N_("Shrink the viewpoint field of view (360°)") #define VIEWPOINT_FOV_OUT_KEY_TEXT N_("Expand the viewpoint field of view (360°)") +#define VIEWPOINT_ZOOM_IN_KEY_TEXT N_("Increase the viewpoint zoom (360°)") +#define VIEWPOINT_ZOOM_OUT_KEY_TEXT N_("Decrease the viewpoint zoom (360°)") #define WALLPAPER_KEY_TEXT N_("Toggle wallpaper mode in video output") #define WALLPAPER_KEY_LONGTEXT N_( \ @@ -2231,8 +2233,8 @@ vlc_module_begin () # define KEY_UNCROP_RIGHT "Alt+Shift+l" /* 360° Viewpoint */ -# define KEY_VIEWPOINT_FOV_IN "Page Up" -# define KEY_VIEWPOINT_FOV_OUT "Page Down" +# define KEY_VIEWPOINT_ZOOM_IN "Page Up" +# define KEY_VIEWPOINT_ZOOM_OUT "Page Down" /* the macosx-interface already has bindings */ # define KEY_ZOOM_QUARTER NULL @@ -2378,8 +2380,8 @@ vlc_module_begin () # define KEY_UNCROP_RIGHT "Alt+Shift+f" /* 360° Viewpoint */ -# define KEY_VIEWPOINT_FOV_IN "Page Up" -# define KEY_VIEWPOINT_FOV_OUT "Page Down" +# define KEY_VIEWPOINT_ZOOM_IN "Page Up" +# define KEY_VIEWPOINT_ZOOM_OUT "Page Down" /* Zooming */ # define KEY_ZOOM_QUARTER "Alt+1" @@ -2574,10 +2576,14 @@ vlc_module_begin () add_key( "key-loop", KEY_LOOP, LOOP_KEY_TEXT, LOOP_KEY_LONGTEXT, false ) -add_key( "key-viewpoint-fov-in", KEY_VIEWPOINT_FOV_IN, +add_key( "key-viewpoint-fov-in", NULL, VIEWPOINT_FOV_IN_KEY_TEXT, VIEWPOINT_FOV_IN_KEY_TEXT, true ) -add_key( "key-viewpoint-fov-out", KEY_VIEWPOINT_FOV_OUT, +add_key( "key-viewpoint-fov-out", NULL, VIEWPOINT_FOV_OUT_KEY_TEXT, VIEWPOINT_FOV_OUT_KEY_TEXT, true ) +add_key( "key-viewpoint-zoom-in", KEY_VIEWPOINT_ZOOM_IN, + VIEWPOINT_ZOOM_IN_KEY_TEXT, VIEWPOINT_ZOOM_IN_KEY_TEXT, true ) +add_key( "key-viewpoint-zoom-out", KEY_VIEWPOINT_ZOOM_OUT, + VIEWPOINT_ZOOM_OUT_KEY_TEXT, VIEWPOINT_ZOOM_OUT_KEY_TEXT, true ) set_section ( N_("Zoom" ), NULL ) add_key( "key-zoom-quarter", KEY_ZOOM_QUARTER, ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] core: keys: rename ACTIONID_FOV* to ACTIONID_VIEWPOINT_FOV*
vlc | branch: master | Thomas Guillem| Wed Nov 16 13:12:02 2016 +0100| [d68a92f55b05f971d554ec3ad5cb2cace6872445] | committer: Thomas Guillem core: keys: rename ACTIONID_FOV* to ACTIONID_VIEWPOINT_FOV* > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d68a92f55b05f971d554ec3ad5cb2cace6872445 --- include/vlc_keys.h| 4 ++-- modules/control/hotkeys.c | 4 ++-- src/config/keys.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/vlc_keys.h b/include/vlc_keys.h index 3788e68..1bf2a72 100644 --- a/include/vlc_keys.h +++ b/include/vlc_keys.h @@ -228,8 +228,8 @@ typedef enum vlc_action { ACTIONID_PROGRAM_SID_PREV, ACTIONID_INTF_POPUP_MENU, /* Viewpoint */ -ACTIONID_FOV_IN, -ACTIONID_FOV_OUT, +ACTIONID_VIEWPOINT_FOV_IN, +ACTIONID_VIEWPOINT_FOV_OUT, } vlc_action_t; diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c index 725f5f9..0ad8b42 100644 --- a/modules/control/hotkeys.c +++ b/modules/control/hotkeys.c @@ -919,13 +919,13 @@ static int PutAction( intf_thread_t *p_intf, int i_action ) var_DecInteger( p_vout, "crop-right" ); break; -case ACTIONID_FOV_IN: +case ACTIONID_VIEWPOINT_FOV_IN: if( p_vout ) input_UpdateViewpoint( p_input, &(vlc_viewpoint_t) { .fov = -1.f }, false ); break; -case ACTIONID_FOV_OUT: +case ACTIONID_VIEWPOINT_FOV_OUT: if( p_vout ) input_UpdateViewpoint( p_input, &(vlc_viewpoint_t) { .fov = 1.f }, diff --git a/src/config/keys.c b/src/config/keys.c index d1611f9..c89983e 100644 --- a/src/config/keys.c +++ b/src/config/keys.c @@ -368,8 +368,8 @@ static const struct action actions[] = { "uncrop-right", ACTIONID_UNCROP_RIGHT, }, { "uncrop-top", ACTIONID_UNCROP_TOP, }, { "unzoom", ACTIONID_UNZOOM, }, -{ "viewpoint-fov-in", ACTIONID_FOV_IN, }, -{ "viewpoint-fov-out", ACTIONID_FOV_OUT, }, +{ "viewpoint-fov-in", ACTIONID_VIEWPOINT_FOV_IN, }, +{ "viewpoint-fov-out", ACTIONID_VIEWPOINT_FOV_OUT, }, { "vol-down", ACTIONID_VOL_DOWN, }, { "vol-mute", ACTIONID_VOL_MUTE, }, { "vol-up", ACTIONID_VOL_UP, }, ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] core: keys: less translation for VIEWPOINT_FOV_*
vlc | branch: master | Thomas Guillem| Wed Nov 16 14:15:15 2016 +0100| [d59e76a52a3311616566f107e4eb6cb620c5b8be] | committer: Thomas Guillem core: keys: less translation for VIEWPOINT_FOV_* > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d59e76a52a3311616566f107e4eb6cb620c5b8be --- src/libvlc-module.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libvlc-module.c b/src/libvlc-module.c index 7a55d1e..776634b 100644 --- a/src/libvlc-module.c +++ b/src/libvlc-module.c @@ -1423,10 +1423,8 @@ static const char *const mouse_wheel_texts[] = { #define UNCROP_RIGHT_KEY_LONGTEXT N_("Uncrop one pixel from the right of the video") /* 360° Viewpoint */ -#define VIEWPOINT_FOV_IN_KEY_TEXT N_("Shrink field of view") -#define VIEWPOINT_FOV_IN_KEY_LONGTEXT N_("Shrink the viewpoint field of view") -#define VIEWPOINT_FOV_OUT_KEY_TEXT N_("Expand field of view") -#define VIEWPOINT_FOV_OUT_KEY_LONGTEXT N_("Expand the viewpoint field of view") +#define VIEWPOINT_FOV_IN_KEY_TEXT N_("Shrink the viewpoint field of view (360°)") +#define VIEWPOINT_FOV_OUT_KEY_TEXT N_("Expand the viewpoint field of view (360°)") #define WALLPAPER_KEY_TEXT N_("Toggle wallpaper mode in video output") #define WALLPAPER_KEY_LONGTEXT N_( \ @@ -2577,9 +2575,9 @@ vlc_module_begin () LOOP_KEY_TEXT, LOOP_KEY_LONGTEXT, false ) add_key( "key-viewpoint-fov-in", KEY_VIEWPOINT_FOV_IN, - VIEWPOINT_FOV_IN_KEY_TEXT, VIEWPOINT_FOV_IN_KEY_LONGTEXT, true ) + VIEWPOINT_FOV_IN_KEY_TEXT, VIEWPOINT_FOV_IN_KEY_TEXT, true ) add_key( "key-viewpoint-fov-out", KEY_VIEWPOINT_FOV_OUT, - VIEWPOINT_FOV_OUT_KEY_TEXT, VIEWPOINT_FOV_OUT_KEY_LONGTEXT, true ) + VIEWPOINT_FOV_OUT_KEY_TEXT, VIEWPOINT_FOV_OUT_KEY_TEXT, true ) set_section ( N_("Zoom" ), NULL ) add_key( "key-zoom-quarter", KEY_ZOOM_QUARTER, ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vout: opengl: add a define for sphere radius
vlc | branch: master | Thomas Guillem| Wed Nov 16 15:34:27 2016 +0100| [8b3460eccb3532c1388f10f08ec5810814b8b017] | committer: Thomas Guillem vout: opengl: add a define for sphere radius > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8b3460eccb3532c1388f10f08ec5810814b8b017 --- modules/video_output/opengl.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c index 618a556..a6bebbd 100644 --- a/modules/video_output/opengl.c +++ b/modules/video_output/opengl.c @@ -97,6 +97,8 @@ # define SUPPORTS_FIXED_PIPELINE #endif +#define SPHERE_RADIUS 1.f + typedef struct { GLuint texture; unsigned format; @@ -1252,7 +1254,6 @@ static int BuildSphere(unsigned nbPlanes, GLushort **indices, unsigned *nbIndices, float *left, float *top, float *right, float *bottom) { -float radius = 1; unsigned nbLatBands = 128; unsigned nbLonBands = 128; @@ -1293,9 +1294,9 @@ static int BuildSphere(unsigned nbPlanes, float z = sinPhi * sinTheta; unsigned off1 = (lat * (nbLonBands + 1) + lon) * 3; -(*vertexCoord)[off1] = radius * x; -(*vertexCoord)[off1 + 1] = radius * y; -(*vertexCoord)[off1 + 2] = radius * z; +(*vertexCoord)[off1] = SPHERE_RADIUS * x; +(*vertexCoord)[off1 + 1] = SPHERE_RADIUS * y; +(*vertexCoord)[off1 + 2] = SPHERE_RADIUS * z; for (unsigned p = 0; p < nbPlanes; ++p) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] video_output: fix viewpoint initialization from input
vlc | branch: master | Thomas Guillem| Thu Nov 17 09:22:54 2016 +0100| [a892f9aa7660499bec487cd1f537181b5cffc2d8] | committer: Thomas Guillem video_output: fix viewpoint initialization from input Partially revert commits 8a62e7a2e14d8715e9783c895661a3901a2b96bf and 2d32661b145718b2d31dbf9a2f23b7f7af39799c > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a892f9aa7660499bec487cd1f537181b5cffc2d8 --- src/video_output/video_output.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 6c937c0..fde5947 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -559,8 +559,13 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons if (p_viewpoint != NULL) cfg->viewpoint = *p_viewpoint; else -vlc_viewpoint_init( >viewpoint ); - +{ +cfg->viewpoint.yaw = vout->p->original.f_pose_yaw_degrees; +cfg->viewpoint.pitch = vout->p->original.f_pose_pitch_degrees; +cfg->viewpoint.roll = vout->p->original.f_pose_roll_degrees; +cfg->viewpoint.fov = vout->p->original.f_pose_fov_degrees; +cfg->viewpoint.zoom = 0.f; +} cfg->display.title = title; const int display_width = var_CreateGetInteger(vout, "width"); const int display_height = var_CreateGetInteger(vout, "height"); @@ -1471,16 +1476,6 @@ static int ThreadReinit(vout_thread_t *vout, state.cfg.zoom.den = 1; } -if (original.projection_mode == PROJECTION_MODE_EQUIRECTANGULAR -|| original.projection_mode == PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD) -{ -state.cfg.viewpoint.yaw = original.f_pose_yaw_degrees; -state.cfg.viewpoint.pitch = original.f_pose_pitch_degrees; -state.cfg.viewpoint.roll = original.f_pose_roll_degrees; -state.cfg.viewpoint.fov = original.f_pose_fov_degrees; -state.cfg.viewpoint.zoom = 0.f; -} - vout->p->original = original; vout->p->dpb_size = cfg->dpb_size; if (ThreadStart(vout, )) { ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits