Commit 279777bf authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: keep input item rather than ID in the manager

parent e24ee41b
...@@ -62,7 +62,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) : ...@@ -62,7 +62,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) :
artUrl = ""; artUrl = "";
p_input = NULL; p_input = NULL;
i_rate = 0; i_rate = 0;
i_input_id = 0; p_item = NULL;
b_video = false; b_video = false;
timeA = 0; timeA = 0;
timeB = 0; timeB = 0;
...@@ -92,12 +92,12 @@ void InputManager::setInput( input_thread_t *_p_input ) ...@@ -92,12 +92,12 @@ void InputManager::setInput( input_thread_t *_p_input )
UpdateNavigation(); UpdateNavigation();
UpdateVout(); UpdateVout();
addCallbacks(); addCallbacks();
i_input_id = input_GetItem( p_input )->i_id; p_item = input_GetItem( p_input );
} }
else else
{ {
p_input = NULL; p_input = NULL;
i_input_id = 0; p_item = NULL;
emit rateChanged( INPUT_RATE_DEFAULT ); emit rateChanged( INPUT_RATE_DEFAULT );
} }
} }
...@@ -112,7 +112,7 @@ void InputManager::delInput() ...@@ -112,7 +112,7 @@ void InputManager::delInput()
delCallbacks(); delCallbacks();
i_old_playing_status = END_S; i_old_playing_status = END_S;
i_input_id = 0; p_item = NULL;
oldName = ""; oldName = "";
artUrl = ""; artUrl = "";
b_video = false; b_video = false;
...@@ -170,7 +170,7 @@ void InputManager::customEvent( QEvent *event ) ...@@ -170,7 +170,7 @@ void InputManager::customEvent( QEvent *event )
break; break;
case ItemChanged_Type: case ItemChanged_Type:
/* Ignore ItemChanged_Type event that does not apply to our input */ /* Ignore ItemChanged_Type event that does not apply to our input */
if( i_input_id == ple->i_id ) if( p_item->i_id == ple->i_id )
{ {
UpdateStatus(); UpdateStatus();
// UpdateName(); // UpdateName();
......
...@@ -106,7 +106,7 @@ public: ...@@ -106,7 +106,7 @@ public:
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
input_thread_t *p_input; input_thread_t *p_input;
int i_input_id; input_item_t *p_item;
int i_old_playing_status; int i_old_playing_status;
QString oldName; QString oldName;
QString artUrl; QString artUrl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment