1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-04 09:11:33 +02:00

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

experimental
This commit is contained in:
VideoLAN 2003-04-11 22:08:07 +00:00
parent 9b4e33b440
commit 44c1d4ca14
7 changed files with 57 additions and 9 deletions

View File

@ -1,7 +1,7 @@
/* 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>

View File

@ -1,6 +1,6 @@
/* 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).

View File

@ -1,5 +1,5 @@
/* 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).

View File

@ -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 Teulière <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 );

View File

@ -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 Teulière <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)

View File

@ -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 Teulière <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();
}
//---------------------------------------------------------------------------

View File

@ -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 Teulière <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 );