Commit 44c1d4ca authored by VideoLAN's avatar VideoLAN

* New message: VLC_NET_ADDUDP, to add an UDP stream to the playlist. Still

               experimental
parent 9b4e33b4
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /root/vlc-cvs/modules/gui/skins/parser/flex.c,v 1.4 2003/03/20 09:29:07 karibu Exp $ * $Header: /root/vlc-cvs/modules/gui/skins/parser/flex.c,v 1.5 2003/04/11 22:08:06 videolan Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
...@@ -24,6 +24,12 @@ ...@@ -24,6 +24,12 @@
#include <stdlib.h> #include <stdlib.h>
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
#else
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#endif #endif
/* Use prototypes in function declarations. */ /* Use prototypes in function declarations. */
...@@ -3042,7 +3048,7 @@ static char *yy_last_accepting_cpos; ...@@ -3042,7 +3048,7 @@ static char *yy_last_accepting_cpos;
char *yytext; char *yytext;
#define INITIAL 0 #define INITIAL 0
/* Validating XML processor for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp). /* Validating XML processor for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp).
* Generated 2003/03/20 10:30:38. * Generated 2003/04/08 20:19:55.
* *
* This program was generated with the FleXML XML processor generator, * This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp). * (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
...@@ -3830,7 +3836,7 @@ FAIL("EOF in prolog."); ...@@ -3830,7 +3836,7 @@ FAIL("EOF in prolog.");
* * skin.dtd: DTD for the VLC skins * * skin.dtd: DTD for the VLC skins
* ***************************************************************************** * *****************************************************************************
* * Copyright (C) 2003 VideoLAN * * Copyright (C) 2003 VideoLAN
* * $Id: flex.c,v 1.4 2003/03/20 09:29:07 karibu Exp $ * * $Id: flex.c,v 1.5 2003/04/11 22:08:06 videolan Exp $
* * * *
* * Authors: Olivier Teulière <ipkiss@via.ecp.fr> * * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* * Emmanuel Puig <karibu@via.ecp.fr> * * Emmanuel Puig <karibu@via.ecp.fr>
......
/* XML application for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp). /* XML application for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp).
* Includes actions from skin.act. * Includes actions from skin.act.
* Generated 2003/03/20 10:30:38. * Generated 2003/04/08 20:19:55.
* *
* This program was generated with the FleXML XML processor generator, * This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp). * (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
......
/* XML processor/application API for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp). /* XML processor/application API for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp).
* Generated 2003/03/20 10:30:38. * Generated 2003/04/08 20:19:55.
* *
* This program was generated with the FleXML XML processor generator, * This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp). * (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* event.cpp: Event class * event.cpp: Event class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: event.cpp,v 1.4 2003/04/08 02:06:13 gbazin Exp $ * $Id: event.cpp,v 1.5 2003/04/11 22:08:06 videolan Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -168,6 +168,10 @@ unsigned int Event::GetMessageType( string Desc ) ...@@ -168,6 +168,10 @@ unsigned int Event::GetMessageType( string Desc )
else if( Desc == "VLC_FULLSCREEN" ) else if( Desc == "VLC_FULLSCREEN" )
return VLC_FULLSCREEN; return VLC_FULLSCREEN;
// Network events
else if( Desc == "VLC_NET_ADDUDP" )
return VLC_NET_ADDUDP;
// Window event // Window event
else if( Desc == "WINDOW_MOVE" ) else if( Desc == "WINDOW_MOVE" )
return WINDOW_MOVE; return WINDOW_MOVE;
...@@ -274,6 +278,10 @@ void Event::CreateEvent() ...@@ -274,6 +278,10 @@ void Event::CreateEvent()
Param2 = GetBool( para1 ); Param2 = GetBool( para1 );
break; break;
case VLC_NET_ADDUDP:
Param2 = atoi( para1 );
break;
case CTRL_ID_VISIBLE: case CTRL_ID_VISIBLE:
Param1 = (unsigned int)FindControl( para1 ); Param1 = (unsigned int)FindControl( para1 );
Param2 = GetBool( para2 ); Param2 = GetBool( para2 );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* event.h: Event class * event.h: Event class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: event.h,v 1.3 2003/04/08 02:06:13 gbazin Exp $ * $Id: event.h,v 1.4 2003/04/11 22:08:06 videolan Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -87,6 +87,9 @@ using namespace std; ...@@ -87,6 +87,9 @@ using namespace std;
#define VLC_PLAYLIST_ADD_FILE (VLC_MESSAGE + 301) #define VLC_PLAYLIST_ADD_FILE (VLC_MESSAGE + 301)
#define VLC_TEST_ALL_CLOSED (VLC_MESSAGE + 600) #define VLC_TEST_ALL_CLOSED (VLC_MESSAGE + 600)
// Network events
#define VLC_NET_ADDUDP (VLC_MESSAGE + 701)
// Window event // Window event
#define WINDOW_MOVE (VLC_WINDOW + 1) #define WINDOW_MOVE (VLC_WINDOW + 1)
#define WINDOW_OPEN (VLC_WINDOW + 2) #define WINDOW_OPEN (VLC_WINDOW + 2)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class * vlcproc.cpp: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.3 2003/03/20 09:29:07 karibu Exp $ * $Id: vlcproc.cpp,v 1.4 2003/04/11 22:08:06 videolan Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -154,6 +154,10 @@ bool VlcProc::EventProc( Event *evt ) ...@@ -154,6 +154,10 @@ bool VlcProc::EventProc( Event *evt )
p_intf->p_sys->p_theme->ChangeTaskbar(); p_intf->p_sys->p_theme->ChangeTaskbar();
return true; return true;
case VLC_NET_ADDUDP:
AddNetworkUDP( (int)evt->GetParam2() );
return true;
default: default:
return true; return true;
} }
...@@ -583,3 +587,29 @@ void VlcProc::ChangeVolume( unsigned int msg, long param ) ...@@ -583,3 +587,29 @@ void VlcProc::ChangeVolume( unsigned int msg, long param )
(int)( volume * SLIDER_RANGE / AOUT_VOLUME_MAX ) ); (int)( volume * SLIDER_RANGE / AOUT_VOLUME_MAX ) );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Network
//---------------------------------------------------------------------------
void VlcProc::AddNetworkUDP( int port )
{
config_PutInt( p_intf, "network-channel", FALSE );
// Build source name
char *s_port = new char[5];
sprintf( s_port, "%i", port );
string source = "udp:@:" + (string)s_port;
delete[] s_port;
playlist_Add( p_intf->p_sys->p_playlist, (char *)source.c_str(),
PLAYLIST_APPEND, PLAYLIST_END );
// Refresh interface !
p_intf->p_sys->p_theme->EvtBank->Get( "playlist_refresh" )
->PostSynchroMessage();
InterfaceRefresh();
}
//---------------------------------------------------------------------------
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.h: VlcProc class * vlcproc.h: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.h,v 1.1 2003/03/18 02:21:47 ipkiss Exp $ * $Id: vlcproc.h,v 1.2 2003/04/11 22:08:07 videolan Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -52,6 +52,7 @@ class VlcProc ...@@ -52,6 +52,7 @@ class VlcProc
void MoveStream( long Pos ); void MoveStream( long Pos );
void FullScreen(); void FullScreen();
void ChangeVolume( unsigned int msg, long param ); void ChangeVolume( unsigned int msg, long param );
void AddNetworkUDP( int port );
void InterfaceRefresh( bool All = false ); void InterfaceRefresh( bool All = false );
void EnabledEvent( string type, bool state ); void EnabledEvent( string type, bool state );
......
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