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 */
/* 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
......@@ -24,6 +24,12 @@
#include <stdlib.h>
#ifndef _WIN32
#include <unistd.h>
#else
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#endif
/* Use prototypes in function declarations. */
......@@ -3042,7 +3048,7 @@ static char *yy_last_accepting_cpos;
char *yytext;
#define INITIAL 0
/* 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,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
......@@ -3830,7 +3836,7 @@ FAIL("EOF in prolog.");
* * skin.dtd: DTD for the VLC skins
* *****************************************************************************
* * 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>
* * 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).
* 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,
* (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).
* Generated 2003/03/20 10:30:38.
* Generated 2003/04/08 20:19:55.
*
* This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
......
......@@ -2,7 +2,7 @@
* event.cpp: Event class
*****************************************************************************
* 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>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -168,6 +168,10 @@ unsigned int Event::GetMessageType( string Desc )
else if( Desc == "VLC_FULLSCREEN" )
return VLC_FULLSCREEN;
// Network events
else if( Desc == "VLC_NET_ADDUDP" )
return VLC_NET_ADDUDP;
// Window event
else if( Desc == "WINDOW_MOVE" )
return WINDOW_MOVE;
......@@ -274,6 +278,10 @@ void Event::CreateEvent()
Param2 = GetBool( para1 );
break;
case VLC_NET_ADDUDP:
Param2 = atoi( para1 );
break;
case CTRL_ID_VISIBLE:
Param1 = (unsigned int)FindControl( para1 );
Param2 = GetBool( para2 );
......
......@@ -2,7 +2,7 @@
* event.h: Event class
*****************************************************************************
* 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>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -87,6 +87,9 @@ using namespace std;
#define VLC_PLAYLIST_ADD_FILE (VLC_MESSAGE + 301)
#define VLC_TEST_ALL_CLOSED (VLC_MESSAGE + 600)
// Network events
#define VLC_NET_ADDUDP (VLC_MESSAGE + 701)
// Window event
#define WINDOW_MOVE (VLC_WINDOW + 1)
#define WINDOW_OPEN (VLC_WINDOW + 2)
......
......@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class
*****************************************************************************
* 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>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -154,6 +154,10 @@ bool VlcProc::EventProc( Event *evt )
p_intf->p_sys->p_theme->ChangeTaskbar();
return true;
case VLC_NET_ADDUDP:
AddNetworkUDP( (int)evt->GetParam2() );
return true;
default:
return true;
}
......@@ -583,3 +587,29 @@ void VlcProc::ChangeVolume( unsigned int msg, long param )
(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 @@
* vlcproc.h: VlcProc class
*****************************************************************************
* 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>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -52,6 +52,7 @@ class VlcProc
void MoveStream( long Pos );
void FullScreen();
void ChangeVolume( unsigned int msg, long param );
void AddNetworkUDP( int port );
void InterfaceRefresh( bool All = false );
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