mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-08 11:26:59 +02:00
Qt4 - Change the event numbers and add more debug to find the IM/Rate bugs.
This commit is contained in:
parent
b7a979cdd5
commit
e1bc46e792
@ -33,6 +33,8 @@
|
||||
#include <vlc_playlist.h>
|
||||
#include "playlist_item.hpp"
|
||||
|
||||
#include "qt4.hpp"
|
||||
|
||||
#include <QModelIndex>
|
||||
#include <QObject>
|
||||
#include <QEvent>
|
||||
@ -48,10 +50,10 @@ class PLItem;
|
||||
#define DEPTH_PL -1
|
||||
#define DEPTH_SEL 1
|
||||
|
||||
static int ItemUpdate_Type = QEvent::User + 2;
|
||||
static int ItemDelete_Type = QEvent::User + 3;
|
||||
static int ItemAppend_Type = QEvent::User + 4;
|
||||
static int PLUpdate_Type = QEvent::User + 5;
|
||||
static int ItemUpdate_Type = QEvent::User + PLEventType + 2;
|
||||
static int ItemDelete_Type = QEvent::User + PLEventType + 3;
|
||||
static int ItemAppend_Type = QEvent::User + PLEventType + 4;
|
||||
static int PLUpdate_Type = QEvent::User + PLEventType + 5;
|
||||
|
||||
class PLEvent : public QEvent
|
||||
{
|
||||
|
@ -82,8 +82,8 @@ public slots:
|
||||
|
||||
#ifdef UPDATE_CHECK
|
||||
|
||||
static int UDOkEvent = QEvent::User + 1;
|
||||
static int UDErrorEvent = QEvent::User + 2;
|
||||
static int UDOkEvent = QEvent::User + DialogEventType + 21;
|
||||
static int UDErrorEvent = QEvent::User + DialogEventType + 22;
|
||||
|
||||
class UpdateDialog : public QVLCFrame
|
||||
{
|
||||
|
@ -159,6 +159,7 @@ void InputManager::delCallbacks()
|
||||
void InputManager::customEvent( QEvent *event )
|
||||
{
|
||||
int type = event->type();
|
||||
msg_Dbg( p_intf, "New Event: type %i", type );
|
||||
IMEvent *ple = static_cast<IMEvent *>(event);
|
||||
//msg_Dbg( p_intf, "New IM Event of type: %i", type );
|
||||
if ( type != PositionUpdate_Type &&
|
||||
@ -170,7 +171,8 @@ void InputManager::customEvent( QEvent *event )
|
||||
|
||||
if( !p_input || p_input->b_die || p_input->b_dead )
|
||||
return;
|
||||
if( type != PositionUpdate_Type && ( i_input_id != ple->i_id ) )
|
||||
if( ( type != PositionUpdate_Type && type != ItemRateChanged_Type )
|
||||
&& ( i_input_id != ple->i_id ) )
|
||||
return;
|
||||
if( type != PositionUpdate_Type )
|
||||
msg_Dbg( p_intf, "New Event: type %i", type );
|
||||
@ -196,9 +198,9 @@ void InputManager::customEvent( QEvent *event )
|
||||
UpdateMeta();
|
||||
break;
|
||||
case ItemStateChanged_Type:
|
||||
UpdateStatus();
|
||||
UpdateTracks();
|
||||
break;
|
||||
UpdateStatus();
|
||||
UpdateTracks();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,6 +306,8 @@ void InputManager::UpdateTracks()
|
||||
var_Change( p_input, "video-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
|
||||
b_has_video = val.i_int > 0;
|
||||
|
||||
msg_Dbg( p_input, "I have audio-video: %i %i", b_has_audio, b_has_video );
|
||||
|
||||
/* Update ZVBI status */
|
||||
#ifdef ZVBI_COMPILED
|
||||
/* Update teletext status*/
|
||||
@ -487,10 +491,10 @@ MainInputManager::~MainInputManager()
|
||||
void MainInputManager::customEvent( QEvent *event )
|
||||
{
|
||||
int type = event->type();
|
||||
//msg_Dbg( p_intf, "New MainIM Event of type: %i", type );
|
||||
if ( type != ItemChanged_Type && type != VolumeChanged_Type )
|
||||
return;
|
||||
|
||||
// msg_Dbg( p_intf, "New MainIM Event of type: %i", type );
|
||||
if( type == VolumeChanged_Type )
|
||||
{
|
||||
emit volumeChanged();
|
||||
|
@ -31,15 +31,17 @@
|
||||
#include <vlc/vlc.h>
|
||||
#include <vlc_input.h>
|
||||
|
||||
#include "qt4.hpp"
|
||||
|
||||
#include <QObject>
|
||||
#include <QEvent>
|
||||
|
||||
static int const PositionUpdate_Type = QEvent::User + 6;
|
||||
static int const ItemChanged_Type = QEvent::User + 7;
|
||||
static int const ItemRateChanged_Type = QEvent::User + 8;
|
||||
static int const ItemTitleChanged_Type = QEvent::User + 9;
|
||||
static int const ItemStateChanged_Type = QEvent::User + 10;
|
||||
static int const VolumeChanged_Type = QEvent::User + 11;
|
||||
static int const PositionUpdate_Type = QEvent::User + IMEventType + 1;
|
||||
static int const ItemChanged_Type = QEvent::User + IMEventType + 2;
|
||||
static int const ItemStateChanged_Type = QEvent::User + IMEventType + 3;
|
||||
static int const ItemTitleChanged_Type = QEvent::User + IMEventType + 4;
|
||||
static int const ItemRateChanged_Type = QEvent::User + IMEventType + 5;
|
||||
static int const VolumeChanged_Type = QEvent::User + IMEventType + 6;
|
||||
|
||||
class IMEvent : public QEvent
|
||||
{
|
||||
|
@ -104,10 +104,16 @@ struct intf_sys_t
|
||||
#define TOGGLEV( x ) { if( x->isVisible() ) x->hide(); \
|
||||
else x->show(); }
|
||||
|
||||
static int DialogEvent_Type = QEvent::User + 1;
|
||||
//static int PLUndockEvent_Type = QEvent::User + 2;
|
||||
//static int PLDockEvent_Type = QEvent::User + 3;
|
||||
static int SetVideoOnTopEvent_Type = QEvent::User + 4;
|
||||
enum {
|
||||
DialogEventType = 0,
|
||||
IMEventType = 100,
|
||||
PLEventType = 200
|
||||
};
|
||||
|
||||
static int DialogEvent_Type = QEvent::User + DialogEventType + 1;
|
||||
//static int PLUndockEvent_Type = QEvent::User + DialogEventType + 2;
|
||||
//static int PLDockEvent_Type = QEvent::User + DialogEventType + 3;
|
||||
static int SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4;
|
||||
|
||||
class DialogEvent : public QEvent
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user