~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to modules/gui/wxwidgets/dialogs/vlm/vlm_wrapper.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 * vlm_wrapper.cpp : Wrapper around VLM
3
 
 *****************************************************************************
4
 
 * Copyright (C) 2000-2005 the VideoLAN team
5
 
 * $Id: 920853f00dc9a25f7e698ca50fbc6da8a99d9d89 $
6
 
 *
7
 
 * Authors: Clément Stenac <zorglub@videolan.org>
8
 
 *
9
 
 * This program is free software; you can redistribute it and/or modify
10
 
 * it under the terms of the GNU General Public License as published by
11
 
 * the Free Software Foundation; either version 2 of the License, or
12
 
 * (at your option) any later version.
13
 
 *
14
 
 * This program is distributed in the hope that it will be useful,
15
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 * GNU General Public License for more details.
18
 
 *
19
 
 * You should have received a copy of the GNU General Public License
20
 
 * along with this program; if not, write to the Free Software
21
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
 
 *****************************************************************************/
23
 
 
24
 
/* FIXME: This is not wx-specific */
25
 
 
26
 
#include "dialogs/vlm/vlm_wrapper.hpp"
27
 
 
28
 
VLMWrapper::VLMWrapper( intf_thread_t *_p_intf )
29
 
{
30
 
    p_intf = _p_intf;
31
 
    p_vlm = NULL;
32
 
}
33
 
 
34
 
VLMWrapper::~VLMWrapper()
35
 
{
36
 
   /* FIXME :you have to destroy vlm here to close
37
 
    * but we shouldn't destroy vlm here in case somebody else wants it */
38
 
   if( p_vlm )
39
 
        vlm_Delete( p_vlm );
40
 
}
41
 
 
42
 
vlc_bool_t VLMWrapper::AttachVLM()
43
 
{
44
 
    p_vlm = vlm_New( p_intf );
45
 
    return p_vlm ? VLC_TRUE: VLC_FALSE ;
46
 
}
47
 
 
48
 
void VLMWrapper::LockVLM()
49
 
{
50
 
    vlc_mutex_lock( &p_vlm->object_lock );
51
 
}
52
 
 
53
 
void VLMWrapper::UnlockVLM()
54
 
{
55
 
    vlc_mutex_unlock( &p_vlm->object_lock );
56
 
}
57
 
 
58
 
void VLMWrapper::AddBroadcast( const char* name, const char* input,
59
 
                               const char* output,
60
 
                               vlc_bool_t b_enabled, vlc_bool_t b_loop  )
61
 
{
62
 
    vlm_message_t *message;
63
 
    string command = "new \"" + string(name) + "\" broadcast";
64
 
    vlm_ExecuteCommand( p_vlm, command.c_str(), &message );
65
 
    vlm_MessageDelete( message );
66
 
    EditBroadcast( name, input, output, b_enabled, b_loop );
67
 
}
68
 
 
69
 
void VLMWrapper::EditBroadcast( const char* name, const char* input,
70
 
                               const char* output,
71
 
                               vlc_bool_t b_enabled, vlc_bool_t b_loop  )
72
 
{
73
 
    vlm_message_t *message;
74
 
    string command;
75
 
    command = "setup \"" + string(name) + "\" inputdel all";
76
 
    vlm_ExecuteCommand( p_vlm, command.c_str(), &message );
77
 
    vlm_MessageDelete( message );
78
 
    command = "setup \"" + string(name) + "\" input \"" + string(input) + "\"";
79
 
    vlm_ExecuteCommand( p_vlm, command.c_str(), &message );
80
 
    vlm_MessageDelete( message );
81
 
    if( strlen(output) > 0 )
82
 
    {
83
 
        command = "setup \"" + string(name) + "\" output \"" + string(output) + "\"";
84
 
        vlm_ExecuteCommand( p_vlm, (char*)command.c_str(), &message );
85
 
        vlm_MessageDelete( message );
86
 
    }
87
 
    if( b_enabled )
88
 
    {
89
 
        command = "setup \"" + string(name) + "\" enabled";
90
 
        vlm_ExecuteCommand( p_vlm, command.c_str(), &message );
91
 
        vlm_MessageDelete( message );
92
 
    }
93
 
    if( b_loop )
94
 
    {
95
 
        command = "setup \"" + string(name) + "\" loop";
96
 
        vlm_ExecuteCommand( p_vlm, command.c_str(), &message );
97
 
        vlm_MessageDelete( message );
98
 
    }
99
 
}
100
 
 
101
 
void VLMWrapper::AddVod( const char* name, const char* input,
102
 
                         const char* output,
103
 
                         vlc_bool_t b_enabled, vlc_bool_t b_loop  )
104
 
{
105
 
    vlm_message_t *message;
106
 
    string command = "new \"" + string(name) + "\" vod";
107
 
    vlm_ExecuteCommand( p_vlm, command.c_str(), &message );
108
 
    vlm_MessageDelete( message );
109
 
    EditVod( name, input, output, b_enabled, b_loop );
110
 
}
111
 
 
112
 
void VLMWrapper::EditVod( const char* name, const char* input,
113
 
                          const char* output,
114
 
                          vlc_bool_t b_enabled, vlc_bool_t b_loop  )
115
 
{
116
 
    vlm_message_t *message;
117
 
    string command;
118
 
    command = "setup \"" + string(name) + "\" input \"" + string(input) + "\"";
119
 
    vlm_ExecuteCommand( p_vlm, command.c_str(), &message );
120
 
    vlm_MessageDelete( message );
121
 
    if( strlen(output) > 0 )
122
 
    {
123
 
        command = "setup \"" + string(name) + "\" output \"" + string(output) + "\"";
124
 
        vlm_ExecuteCommand( p_vlm, (char*)command.c_str(), &message );
125
 
        vlm_MessageDelete( message );
126
 
    }
127
 
    if( b_enabled )
128
 
    {
129
 
        command = "setup \"" + string(name) + "\" enabled";
130
 
        vlm_ExecuteCommand( p_vlm, command.c_str(), &message );
131
 
        vlm_MessageDelete( message );
132
 
    }
133
 
}