#include <vlc_common.h>
#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
#include <vlc_vout.h>
#include <vlc_playlist.h>
+#include <vlc_url.h>
#include "vlcproc.hpp"
#include "os_factory.hpp"
#include "os_timer.hpp"
#include "var_manager.hpp"
#include "vout_manager.hpp"
+#include "fsc_window.hpp"
#include "theme.hpp"
#include "window_manager.hpp"
#include "../commands/async_queue.hpp"
#include "../commands/cmd_resize.hpp"
#include "../commands/cmd_vars.hpp"
#include "../commands/cmd_dialogs.hpp"
-#include "../commands/cmd_update_item.hpp"
#include "../commands/cmd_audio.hpp"
#include "../commands/cmd_callbacks.hpp"
#include "../utils/var_bool.hpp"
+#include "../utils/var_string.hpp"
#include <sstream>
#include <assert.h>
VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
- m_varVoutSize( pIntf ), m_varEqBands( pIntf ),
- m_pVout( NULL ), m_pAout( NULL ), m_bEqualizer_started( false ),
- m_cmdManage( this )
+ m_varEqBands( pIntf ), m_pVout( NULL ), m_pAout( NULL ),
+ m_bEqualizer_started( false ), m_cmdManage( this )
{
// Create a timer to poll the status of the vlc
OSFactory *pOsFactory = OSFactory::instance( pIntf );
pVarManager->registerVar( m_cVarStreamBitRate, "bitrate" );
m_cVarStreamSampleRate = VariablePtr( new VarText( getIntf(), false ) );
pVarManager->registerVar( m_cVarStreamSampleRate, "samplerate" );
+ m_cVarStreamArt = VariablePtr( new VarString( getIntf() ) );
+ pVarManager->registerVar( m_cVarStreamArt, "streamArt" );
// Register the equalizer bands
for( int i = 0; i < EqualizerBands::kNbBands; i++)
// so they must put commands in the queue and NOT do anything else
// (X11 calls are not reentrant)
- // Called when volume sound changes
#define ADD_CALLBACK( p_object, var ) \
var_AddCallback( p_object, var, onGenericCallback, this );
- ADD_CALLBACK( pIntf->p_libvlc, "volume-change" )
+ ADD_CALLBACK( pIntf->p_sys->p_playlist, "volume" )
+ ADD_CALLBACK( pIntf->p_libvlc, "intf-show" )
ADD_CALLBACK( pIntf->p_sys->p_playlist, "item-current" )
ADD_CALLBACK( pIntf->p_sys->p_playlist, "random" )
#undef ADD_CALLBACK
- // Called when the playlist changes
- var_AddCallback( pIntf->p_sys->p_playlist, "intf-change",
- onIntfChange, this );
// Called when a playlist item is added
var_AddCallback( pIntf->p_sys->p_playlist, "playlist-item-append",
onItemAppend, this );
// TODO: properly handle item-deleted
var_AddCallback( pIntf->p_sys->p_playlist, "playlist-item-deleted",
onItemDelete, this );
- // Called when the "interface shower" wants us to show the skin
- var_AddCallback( pIntf->p_libvlc, "intf-show",
- onIntfShow, this );
// Called when the current input changes
var_AddCallback( pIntf->p_sys->p_playlist, "input-current",
onInputNew, this );
// Called when a playlist item changed
var_AddCallback( pIntf->p_sys->p_playlist, "item-change",
onItemChange, this );
- // Called when our skins2 demux wants us to load a new skin
- var_AddCallback( pIntf, "skin-to-load", onSkinToLoad, this );
// Called when we have an interaction dialog to display
var_Create( pIntf, "interaction", VLC_VAR_ADDRESS );
var_AddCallback( pIntf, "interaction", onInteraction, this );
- interaction_Register( pIntf );
// initialize variables refering to liblvc and playlist objects
init_variables();
interaction_Unregister( getIntf() );
- var_DelCallback( getIntf()->p_libvlc, "volume-change",
+ var_DelCallback( getIntf()->p_sys->p_playlist, "volume",
+ onGenericCallback, this );
+ var_DelCallback( getIntf()->p_libvlc, "intf-show",
onGenericCallback, this );
var_DelCallback( getIntf()->p_sys->p_playlist, "item-current",
onGenericCallback, this );
var_DelCallback( getIntf()->p_sys->p_playlist, "repeat",
onGenericCallback, this );
- var_DelCallback( getIntf()->p_sys->p_playlist, "intf-change",
- onIntfChange, this );
+
var_DelCallback( getIntf()->p_sys->p_playlist, "playlist-item-append",
onItemAppend, this );
var_DelCallback( getIntf()->p_sys->p_playlist, "playlist-item-deleted",
onItemDelete, this );
- var_DelCallback( getIntf()->p_libvlc, "intf-show",
- onIntfShow, this );
var_DelCallback( getIntf()->p_sys->p_playlist, "input-current",
onInputNew, this );
var_DelCallback( getIntf()->p_sys->p_playlist, "item-change",
onItemChange, this );
- var_DelCallback( getIntf(), "skin-to-load", onSkinToLoad, this );
var_DelCallback( getIntf(), "interaction", onInteraction, this );
}
}
-int VlcProc::onIntfChange( vlc_object_t *pObj, const char *pVariable,
- vlc_value_t oldVal, vlc_value_t newVal,
- void *pParam )
-{
- VlcProc *pThis = (VlcProc*)pParam;
-
- // Update the stream variable
- pThis->updateStreamName();
-
- // Create a playtree notify command (for new style playtree)
- CmdPlaytreeChanged *pCmdTree = new CmdPlaytreeChanged( pThis->getIntf() );
-
- // Push the command in the asynchronous command queue
- AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
- pQueue->push( CmdGenericPtr( pCmdTree ) );
-
- return VLC_SUCCESS;
-}
-
-
-int VlcProc::onIntfShow( vlc_object_t *pObj, const char *pVariable,
- vlc_value_t oldVal, vlc_value_t newVal,
- void *pParam )
-{
- if (newVal.b_bool)
- {
- VlcProc *pThis = (VlcProc*)pParam;
-
- // Create a raise all command
- CmdRaiseAll *pCmd = new CmdRaiseAll( pThis->getIntf(),
- pThis->getIntf()->p_sys->p_theme->getWindowManager() );
-
- // Push the command in the asynchronous command queue
- AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
- pQueue->push( CmdGenericPtr( pCmd ) );
- }
-
- return VLC_SUCCESS;
-}
-
int VlcProc::onInputNew( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldval, vlc_value_t newval, void *pParam )
{
+ (void)pObj; (void)pVariable; (void)oldval;
VlcProc *pThis = (VlcProc*)pParam;
input_thread_t *pInput = static_cast<input_thread_t*>(newval.p_address);
- var_AddCallback( pInput, "intf-event", onGenericCallback, pThis );
+ var_AddCallback( pInput, "intf-event", onGenericCallback2, pThis );
var_AddCallback( pInput, "bit-rate", onGenericCallback, pThis );
var_AddCallback( pInput, "sample-rate", onGenericCallback, pThis );
var_AddCallback( pInput, "can-record", onGenericCallback, pThis );
vlc_value_t oldval, vlc_value_t newval,
void *pParam )
{
+ (void)pObj; (void)pVariable; (void)oldval;
VlcProc *pThis = (VlcProc*)pParam;
input_item_t *p_item = static_cast<input_item_t*>(newval.p_address);
- // Update the stream variable
- pThis->updateStreamName();
-
// Create a playtree notify command
CmdPlaytreeUpdate *pCmdTree = new CmdPlaytreeUpdate( pThis->getIntf(),
- p_item->i_id );
+ p_item );
// Push the command in the asynchronous command queue
AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
+ (void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
- playlist_add_t *p_add = (playlist_add_t*)malloc( sizeof(
- playlist_add_t ) ) ;
-
- memcpy( p_add, newVal.p_address, sizeof( playlist_add_t ) ) ;
-
- CmdGenericPtr ptrTree;
- CmdPlaytreeAppend *pCmdTree = new CmdPlaytreeAppend( pThis->getIntf(),
- p_add );
- ptrTree = CmdGenericPtr( pCmdTree );
+ playlist_add_t *p_add = static_cast<playlist_add_t*>(newVal.p_address);
+ CmdPlaytreeAppend *pCmdTree =
+ new CmdPlaytreeAppend( pThis->getIntf(), p_add );
// Push the command in the asynchronous command queue
AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
- pQueue->push( ptrTree , false );
+ pQueue->push( CmdGenericPtr( pCmdTree ), false );
return VLC_SUCCESS;
}
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
+ (void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
int i_id = newVal.i_int;
-
- CmdGenericPtr ptrTree;
- CmdPlaytreeDelete *pCmdTree = new CmdPlaytreeDelete( pThis->getIntf(),
- i_id);
- ptrTree = CmdGenericPtr( pCmdTree );
+ CmdPlaytreeDelete *pCmdTree =
+ new CmdPlaytreeDelete( pThis->getIntf(), i_id);
// Push the command in the asynchronous command queue
AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
- pQueue->push( ptrTree , false );
-
- return VLC_SUCCESS;
-}
-
-
-int VlcProc::onSkinToLoad( vlc_object_t *pObj, const char *pVariable,
- vlc_value_t oldVal, vlc_value_t newVal,
- void *pParam )
-{
- VlcProc *pThis = (VlcProc*)pParam;
-
- // Create a playlist notify command
- CmdChangeSkin *pCmd =
- new CmdChangeSkin( pThis->getIntf(), newVal.psz_string );
-
- // Push the command in the asynchronous command queue
- AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
- pQueue->push( CmdGenericPtr( pCmd ) );
+ pQueue->push( CmdGenericPtr( pCmdTree ), false );
return VLC_SUCCESS;
}
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
+ (void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
interaction_dialog_t *p_dialog = (interaction_dialog_t *)(newVal.p_address);
return VLC_SUCCESS;
}
-
-void VlcProc::updateStreamName()
-{
- // Create a update item command
- CmdUpdateItem *pCmdItem = new CmdUpdateItem( getIntf(), getStreamNameVar(), getStreamURIVar() );
-
- // Push the command in the asynchronous command queue
- AsyncQueue *pQueue = AsyncQueue::instance( getIntf() );
- pQueue->push( CmdGenericPtr( pCmdItem ) );
-}
-
int VlcProc::onEqBandsChange( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
+ (void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
// Post a set equalizer bands command
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
+ (void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
EqualizerPreamp *pVarPreamp = (EqualizerPreamp*)(pThis->m_cVarEqPreamp.get());
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
+ (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
- CmdGeneric *pCmd = NULL;
-
-#define ADD_CALLBACK_ENTRY( var, label ) \
+#define ADD_CALLBACK_ENTRY( var, func, remove ) \
{ \
if( strcmp( pVariable, var ) == 0 ) \
- pCmd = new Cmd_##label( pThis->getIntf(), pObj, newVal ); \
+ { \
+ string label = var; \
+ CmdGeneric *pCmd = new CmdCallback( pThis->getIntf(), pObj, newVal, \
+ &VlcProc::func, label ); \
+ if( pCmd ) \
+ pQueue->push( CmdGenericPtr( pCmd ), remove ); \
+ return VLC_SUCCESS; \
+ } \
}
- ADD_CALLBACK_ENTRY( "item-current", item_current_changed )
- ADD_CALLBACK_ENTRY( "volume-change", volume_changed )
+ ADD_CALLBACK_ENTRY( "item-current", on_item_current_changed, false )
+ ADD_CALLBACK_ENTRY( "volume", on_volume_changed, true )
- ADD_CALLBACK_ENTRY( "intf-event", intf_event_changed )
- ADD_CALLBACK_ENTRY( "bit-rate", bit_rate_changed )
- ADD_CALLBACK_ENTRY( "sample-rate", sample_rate_changed )
- ADD_CALLBACK_ENTRY( "can-record", can_record_changed )
+ ADD_CALLBACK_ENTRY( "bit-rate", on_bit_rate_changed, false )
+ ADD_CALLBACK_ENTRY( "sample-rate", on_sample_rate_changed, false )
+ ADD_CALLBACK_ENTRY( "can-record", on_can_record_changed, false )
- ADD_CALLBACK_ENTRY( "random", random_changed )
- ADD_CALLBACK_ENTRY( "loop", loop_changed )
- ADD_CALLBACK_ENTRY( "repeat", repeat_changed )
+ ADD_CALLBACK_ENTRY( "random", on_random_changed, false )
+ ADD_CALLBACK_ENTRY( "loop", on_loop_changed, false )
+ ADD_CALLBACK_ENTRY( "repeat", on_repeat_changed, false )
- ADD_CALLBACK_ENTRY( "audio-filter", audio_filter_changed )
+ ADD_CALLBACK_ENTRY( "audio-filter", on_audio_filter_changed, false )
-#undef ADD_CALLBACK_ENTRY
+ ADD_CALLBACK_ENTRY( "intf-show", on_intf_show_changed, false )
- if( pCmd )
- pQueue->push( CmdGenericPtr( pCmd ), false );
- else
- msg_Err( pObj, "no Callback entry provided for %s", pVariable );
+ ADD_CALLBACK_ENTRY( "mouse-moved", on_mouse_moved_changed, false )
- return VLC_SUCCESS;
+#undef ADD_CALLBACK_ENTRY
+
+ msg_Err( pThis->getIntf(), "no callback entry for %s", pVariable );
+ return VLC_EGENERIC;
}
-void VlcProc::on_item_current_changed( vlc_object_t* p_obj, vlc_value_t newVal )
+
+int VlcProc::onGenericCallback2( vlc_object_t *pObj, const char *pVariable,
+ vlc_value_t oldVal, vlc_value_t newVal,
+ void *pParam )
{
- input_item_t *p_item = static_cast<input_item_t*>(newVal.p_address);
+ (void)oldVal;
+ VlcProc *pThis = (VlcProc*)pParam;
+ AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
- // Update the stream variable
- updateStreamName();
+ /**
+ * For intf-event, commands are labeled based on the value of newVal.
+ *
+ * For some values (e.g position), only keep the latest command
+ * when there are multiple pending commands (remove=true).
+ *
+ * for others, don't discard commands (remove=false)
+ **/
+ if( strcmp( pVariable, "intf-event" ) == 0 )
+ {
+ stringstream label;
+ bool b_remove;
+ switch( newVal.i_int )
+ {
+ case INPUT_EVENT_STATE:
+ case INPUT_EVENT_POSITION:
+ case INPUT_EVENT_ES:
+ case INPUT_EVENT_CHAPTER:
+ case INPUT_EVENT_RECORD:
+ b_remove = true;
+ break;
+ case INPUT_EVENT_VOUT:
+ case INPUT_EVENT_AOUT:
+ case INPUT_EVENT_DEAD:
+ b_remove = false;
+ break;
+ default:
+ return VLC_SUCCESS;
+ }
+ label << pVariable << "_" << newVal.i_int;
+ CmdGeneric *pCmd = new CmdCallback( pThis->getIntf(), pObj, newVal,
+ &VlcProc::on_intf_event_changed,
+ label.str() );
+ if( pCmd )
+ pQueue->push( CmdGenericPtr( pCmd ), b_remove );
+
+ return VLC_SUCCESS;
+ }
- // Create a playtree notify command
- AsyncQueue *pQueue = AsyncQueue::instance( getIntf() );
- CmdPlaytreeUpdate *pCmdTree =
- new CmdPlaytreeUpdate( getIntf(), p_item->i_id );
- pQueue->push( CmdGenericPtr( pCmdTree ) , true );
+ msg_Err( pThis->getIntf(), "no callback entry for %s", pVariable );
+ return VLC_EGENERIC;
}
+
#define SET_BOOL(m,v) ((VarBoolImpl*)(m).get())->set(v)
#define SET_STREAMTIME(m,v,b) ((StreamTime*)(m).get())->set(v,b)
#define SET_TEXT(m,v) ((VarText*)(m).get())->set(v)
+#define SET_STRING(m,v) ((VarString*)(m).get())->set(v)
#define SET_VOLUME(m,v,b) ((Volume*)(m).get())->set(v,b)
+void VlcProc::on_item_current_changed( vlc_object_t* p_obj, vlc_value_t newVal )
+{
+ (void)p_obj;
+ input_item_t *p_item = static_cast<input_item_t*>(newVal.p_address);
+
+ // Update short name
+ char *psz_name = input_item_GetName( p_item );
+ SET_TEXT( m_cVarStreamName, UString( getIntf(), psz_name ) );
+ free( psz_name );
+
+ // Update local path (if possible) or full uri
+ char *psz_uri = input_item_GetURI( p_item );
+ char *psz_path = make_path( psz_uri );
+ char *psz_save = psz_path ? psz_path : psz_uri;
+ SET_TEXT( m_cVarStreamURI, UString( getIntf(), psz_save ) );
+ free( psz_path );
+ free( psz_uri );
+
+ // Update art uri
+ char *psz_art = input_item_GetArtURL( p_item );
+ SET_STRING( m_cVarStreamArt, string( psz_art ? psz_art : "" ) );
+ free( psz_art );
+
+ // Update playtree
+ getPlaytreeVar().onUpdateCurrent( true );
+}
+
void VlcProc::on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
input_thread_t* pInput = (input_thread_t*) p_obj;
{
vout_thread_t* pVout = input_GetVout( pInput );
SET_BOOL( m_cVarHasVout, pVout != NULL );
- if( pVout )
+ if( !pVout || pVout == m_pVout )
{
- SET_BOOL( m_cVarFullscreen,
- var_GetBool( pVout, "fullscreen" ) );
- vlc_object_release( pVout );
+ // end of input or vout reuse (nothing to do)
+ if( pVout )
+ vlc_object_release( pVout );
+ break;
}
+ if( m_pVout )
+ {
+ // remove previous Vout callbacks
+ var_DelCallback( m_pVout, "mouse-moved",
+ onGenericCallback, this );
+ vlc_object_release( m_pVout );
+ m_pVout = NULL;
+ }
+
+ // add new Vout callbackx
+ var_AddCallback( pVout, "mouse-moved",
+ onGenericCallback, this );
+ m_pVout = pVout;
break;
}
case INPUT_EVENT_AOUT:
{
- aout_instance_t* pAout = input_GetAout( pInput );
+ audio_output_t* pAout = input_GetAout( pInput );
// end of input or aout reuse (nothing to do)
if( !pAout || pAout == m_pAout )
case INPUT_EVENT_DEAD:
msg_Dbg( getIntf(), "end of input detected for %p", pInput );
- var_DelCallback( pInput, "intf-event", onGenericCallback, this );
+ var_DelCallback( pInput, "intf-event", onGenericCallback2, this );
var_DelCallback( pInput, "bit-rate", onGenericCallback, this );
var_DelCallback( pInput, "sample-rate", onGenericCallback, this );
var_DelCallback( pInput, "can-record" , onGenericCallback, this );
void VlcProc::on_bit_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
+ (void)newVal;
input_thread_t* pInput = (input_thread_t*) p_obj;
assert( getIntf()->p_sys->p_input == NULL || getIntf()->p_sys->p_input == pInput );
void VlcProc::on_sample_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
+ (void)newVal;
input_thread_t* pInput = (input_thread_t*) p_obj;
assert( getIntf()->p_sys->p_input == NULL || getIntf()->p_sys->p_input == pInput );
void VlcProc::on_can_record_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
+ (void)newVal;
input_thread_t* pInput = (input_thread_t*) p_obj;
assert( getIntf()->p_sys->p_input == NULL || getIntf()->p_sys->p_input == pInput );
void VlcProc::on_random_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
+ (void)newVal;
playlist_t* pPlaylist = (playlist_t*) p_obj;
SET_BOOL( m_cVarRandom, var_GetBool( pPlaylist, "random" ) );
void VlcProc::on_loop_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
+ (void)newVal;
playlist_t* pPlaylist = (playlist_t*) p_obj;
SET_BOOL( m_cVarLoop, var_GetBool( pPlaylist, "loop" ) );
void VlcProc::on_repeat_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
+ (void)newVal;
playlist_t* pPlaylist = (playlist_t*) p_obj;
SET_BOOL( m_cVarRepeat, var_GetBool( pPlaylist, "repeat" ) );
(void)p_obj; (void)newVal;
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
- audio_volume_t volume;
- aout_VolumeGet( pPlaylist, &volume );
- SET_VOLUME( m_cVarVolume, (double)volume * 2.0 / AOUT_VOLUME_MAX, false );
+ audio_volume_t volume = aout_VolumeGet( pPlaylist );
+ SET_VOLUME( m_cVarVolume, volume, false );
SET_BOOL( m_cVarMute, volume == 0 );
}
void VlcProc::on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
- aout_instance_t* pAout = (aout_instance_t*) p_obj;
+ (void)newVal;
+ audio_output_t* pAout = (audio_output_t*) p_obj;
char *pFilters = newVal.psz_string;
}
}
+void VlcProc::on_intf_show_changed( vlc_object_t* p_obj, vlc_value_t newVal )
+{
+ (void)p_obj; (void)newVal;
+ bool b_fullscreen = getFullscreenVar().get();
+
+ if( !b_fullscreen )
+ {
+ if( newVal.b_bool )
+ {
+ // Create a raise all command
+ CmdRaiseAll *pCmd = new CmdRaiseAll( getIntf(),
+ getIntf()->p_sys->p_theme->getWindowManager() );
+
+ // Push the command in the asynchronous command queue
+ AsyncQueue *pQueue = AsyncQueue::instance( getIntf() );
+ pQueue->push( CmdGenericPtr( pCmd ) );
+ }
+ }
+ else
+ {
+ VoutManager* pVoutManager = VoutManager::instance( getIntf() );
+ FscWindow *pWin = pVoutManager->getFscWindow();
+ if( pWin )
+ {
+ bool b_visible = pWin->getVisibleVar().get();
+ AsyncQueue *pQueue = AsyncQueue::instance( getIntf() );
+
+ if( !b_visible )
+ {
+ CmdShowWindow* pCmd = new CmdShowWindow( getIntf(),
+ getIntf()->p_sys->p_theme->getWindowManager(),
+ *pWin );
+ pQueue->push( CmdGenericPtr( pCmd ) );
+ }
+ else
+ {
+ CmdHideWindow* pCmd = new CmdHideWindow( getIntf(),
+ getIntf()->p_sys->p_theme->getWindowManager(),
+ *pWin );
+ pQueue->push( CmdGenericPtr( pCmd ) );
+ }
+ }
+ }
+}
+
+void VlcProc::on_mouse_moved_changed( vlc_object_t* p_obj, vlc_value_t newVal )
+{
+ (void)p_obj; (void)newVal;
+ FscWindow* pFscWindow = VoutManager::instance( getIntf() )->getFscWindow();
+ if( pFscWindow )
+ pFscWindow->onMouseMoved();
+}
+
void VlcProc::reset_input()
{
SET_BOOL( m_cVarSeekable, false );
SET_BOOL( m_cVarRecordable, false );
SET_BOOL( m_cVarRecording, false );
SET_BOOL( m_cVarDvdActive, false );
- SET_BOOL( m_cVarFullscreen, false );
SET_BOOL( m_cVarHasAudio, false );
SET_BOOL( m_cVarHasVout, false );
SET_BOOL( m_cVarStopped, true );
SET_BOOL( m_cVarPaused, false );
SET_STREAMTIME( m_cVarTime, 0, false );
+ SET_TEXT( m_cVarStreamName, UString( getIntf(), "") );
+ SET_TEXT( m_cVarStreamURI, UString( getIntf(), "") );
SET_TEXT( m_cVarStreamBitRate, UString( getIntf(), "") );
SET_TEXT( m_cVarStreamSampleRate, UString( getIntf(), "") );
+
+ getPlaytreeVar().onUpdateCurrent( false );
}
void VlcProc::init_variables()
SET_BOOL( m_cVarLoop, var_GetBool( pPlaylist, "loop" ) );
SET_BOOL( m_cVarRepeat, var_GetBool( pPlaylist, "repeat" ) );
- audio_volume_t volume;
- aout_VolumeGet( pPlaylist, &volume );
- SET_VOLUME( m_cVarVolume, (double)volume * 2.0 / AOUT_VOLUME_MAX, false );
+ audio_volume_t volume = aout_VolumeGet( pPlaylist );
+ SET_VOLUME( m_cVarVolume, volume, false );
SET_BOOL( m_cVarMute, volume == 0 );
update_equalizer();
if( m_pAout )
pFilters = var_GetNonEmptyString( m_pAout, "audio-filter" );
else
- pFilters = config_GetPsz( getIntf(), "audio-filter" );
+ pFilters = var_InheritString( getIntf(), "audio-filter" );
bool b_equalizer = pFilters && strstr( pFilters, "equalizer" );
free( pFilters );
#undef SET_BOOL
#undef SET_STREAMTIME
#undef SET_TEXT
+#undef SET_STRING
#undef SET_VOLUME