Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
5f02f262
Commit
5f02f262
authored
Feb 29, 2004
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated PDA interface.
parent
9e8b6d1f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
320 additions
and
146 deletions
+320
-146
modules/gui/pda/pda.c
modules/gui/pda/pda.c
+10
-10
modules/gui/pda/pda.glade
modules/gui/pda/pda.glade
+141
-48
modules/gui/pda/pda_callbacks.c
modules/gui/pda/pda_callbacks.c
+72
-47
modules/gui/pda/pda_interface.c
modules/gui/pda/pda_interface.c
+97
-41
No files found.
modules/gui/pda/pda.c
View file @
5f02f262
...
...
@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: pda.c,v 1.2
1 2004/02/13 10:09:46
jpsaman Exp $
* $Id: pda.c,v 1.2
2 2004/02/29 22:59:59
jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
...
...
@@ -63,7 +63,7 @@ gint E_(GtkModeManage) ( intf_thread_t * p_intf );
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
set_description
(
_
(
"PDA Linux Gtk2+ interface"
)
);
set_description
(
N
_
(
"PDA Linux Gtk2+ interface"
)
);
// add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, VLC_TRUE );
set_capability
(
"interface"
,
70
);
set_callbacks
(
Open
,
Close
);
...
...
@@ -214,31 +214,31 @@ static void Run( intf_thread_t *p_intf )
/* Insert columns 0 */
p_renderer
=
gtk_cell_renderer_text_new
();
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
0
,
_
(
"Filename"
),
p_renderer
,
NULL
);
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
0
,
(
gchar
*
)
N
_
(
"Filename"
),
p_renderer
,
NULL
);
p_column
=
gtk_tree_view_get_column
(
p_intf
->
p_sys
->
p_tvfile
,
0
);
gtk_tree_view_column_add_attribute
(
p_column
,
p_renderer
,
"text"
,
0
);
gtk_tree_view_column_set_sort_column_id
(
p_column
,
0
);
/* Insert columns 1 */
p_renderer
=
gtk_cell_renderer_text_new
();
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
1
,
_
(
"Permissions"
),
p_renderer
,
NULL
);
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
1
,
(
gchar
*
)
N
_
(
"Permissions"
),
p_renderer
,
NULL
);
p_column
=
gtk_tree_view_get_column
(
p_intf
->
p_sys
->
p_tvfile
,
1
);
gtk_tree_view_column_add_attribute
(
p_column
,
p_renderer
,
"text"
,
1
);
gtk_tree_view_column_set_sort_column_id
(
p_column
,
1
);
/* Insert columns 2 */
p_renderer
=
gtk_cell_renderer_text_new
();
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
2
,
_
(
"Size"
),
p_renderer
,
NULL
);
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
2
,
(
gchar
*
)
N
_
(
"Size"
),
p_renderer
,
NULL
);
p_column
=
gtk_tree_view_get_column
(
p_intf
->
p_sys
->
p_tvfile
,
2
);
gtk_tree_view_column_add_attribute
(
p_column
,
p_renderer
,
"text"
,
2
);
gtk_tree_view_column_set_sort_column_id
(
p_column
,
2
);
/* Insert columns 3 */
p_renderer
=
gtk_cell_renderer_text_new
();
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
3
,
_
(
"Owner"
),
p_renderer
,
NULL
);
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
3
,
(
gchar
*
)
N
_
(
"Owner"
),
p_renderer
,
NULL
);
p_column
=
gtk_tree_view_get_column
(
p_intf
->
p_sys
->
p_tvfile
,
3
);
gtk_tree_view_column_add_attribute
(
p_column
,
p_renderer
,
"text"
,
3
);
gtk_tree_view_column_set_sort_column_id
(
p_column
,
3
);
/* Insert columns 4 */
p_renderer
=
gtk_cell_renderer_text_new
();
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
4
,
_
(
"Group"
),
p_renderer
,
NULL
);
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvfile
,
4
,
(
gchar
*
)
N
_
(
"Group"
),
p_renderer
,
NULL
);
p_column
=
gtk_tree_view_get_column
(
p_intf
->
p_sys
->
p_tvfile
,
4
);
gtk_tree_view_column_add_attribute
(
p_column
,
p_renderer
,
"text"
,
4
);
gtk_tree_view_column_set_sort_column_id
(
p_column
,
4
);
...
...
@@ -269,20 +269,20 @@ static void Run( intf_thread_t *p_intf )
/* Columns 1 */
p_renderer
=
gtk_cell_renderer_text_new
();
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvplaylist
,
0
,
_
(
"Filename"
),
p_renderer
,
NULL
);
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvplaylist
,
0
,
(
gchar
*
)
N
_
(
"Filename"
),
p_renderer
,
NULL
);
p_column
=
gtk_tree_view_get_column
(
p_intf
->
p_sys
->
p_tvplaylist
,
0
);
gtk_tree_view_column_add_attribute
(
p_column
,
p_renderer
,
"text"
,
0
);
gtk_tree_view_column_set_sort_column_id
(
p_column
,
0
);
/* Column 2 */
p_renderer
=
gtk_cell_renderer_text_new
();
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvplaylist
,
1
,
_
(
"Time"
),
p_renderer
,
NULL
);
gtk_tree_view_insert_column_with_attributes
(
p_intf
->
p_sys
->
p_tvplaylist
,
1
,
(
gchar
*
)
N
_
(
"Time"
),
p_renderer
,
NULL
);
p_column
=
gtk_tree_view_get_column
(
p_intf
->
p_sys
->
p_tvplaylist
,
1
);
gtk_tree_view_column_add_attribute
(
p_column
,
p_renderer
,
"text"
,
1
);
gtk_tree_view_column_set_sort_column_id
(
p_column
,
1
);
#if 0
/* Column 3 - is a hidden column used for reliable deleting items from the underlying playlist */
p_renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 2, _("Index"), p_renderer, NULL);
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 2,
(gchar *) N
_("Index"), p_renderer, NULL);
p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvplaylist, 2 );
gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 2 );
gtk_tree_view_column_set_sort_column_id(p_column, 2);
...
...
modules/gui/pda/pda.glade
View file @
5f02f262
This diff is collapsed.
Click to expand it.
modules/gui/pda/pda_callbacks.c
View file @
5f02f262
...
...
@@ -2,7 +2,7 @@
* pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: pda_callbacks.c,v 1.2
8 2004/02/13 10:09:46
jpsaman Exp $
* $Id: pda_callbacks.c,v 1.2
9 2004/02/29 22:59:59
jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -110,7 +110,7 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
GtkTreeIter
p_play_iter
;
p_play_model
=
gtk_tree_view_get_model
(
p_tvplaylist
);
if
(
p_play_model
)
{
int
i
;
...
...
@@ -321,7 +321,7 @@ static char *get_file_perms(const struct stat st)
psz_perm
[
8
]
=
'w'
;
if
(
st
.
st_mode
&
S_IXOTH
)
{
/
/ 'sticky' bit
/
* 'sticky' bit */
if
(
st
.
st_mode
&
S_ISVTX
)
psz_perm
[
9
]
=
't'
;
else
...
...
@@ -424,7 +424,7 @@ void onAbout(GtkButton *button, gpointer user_data)
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
GTK_WIDGET
(
button
)
);
/
/ Toggle notebook
/
* Toggle notebook */
if
(
p_intf
->
p_sys
->
p_notebook
)
{
gtk_widget_show
(
GTK_WIDGET
(
p_intf
->
p_sys
->
p_notebook
)
);
...
...
@@ -588,17 +588,27 @@ void NetworkBuildMRL(GtkEditable *editable, gpointer user_data)
void
onAddNetworkPlaylist
(
GtkButton
*
button
,
gpointer
user_data
)
{
GtkEntry
*
p_mrl
=
NULL
;
const
gchar
*
psz_mrl_name
;
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
GtkEntry
*
p_mrl
=
NULL
;
GtkCheckButton
*
p_network_transcode
=
NULL
;
gboolean
b_network_transcode
;
const
gchar
*
psz_mrl_name
;
p_mrl
=
(
GtkEntry
*
)
lookup_widget
(
GTK_WIDGET
(
button
),
"entryMRL"
);
if
(
p_mrl
)
psz_mrl_name
=
gtk_entry_get_text
(
p_mrl
);
p_network_transcode
=
(
GtkCheckButton
*
)
lookup_widget
(
GTK_WIDGET
(
button
),
"checkNetworkTranscode"
);
b_network_transcode
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
p_network_transcode
));
if
(
b_network_transcode
)
{
psz_mrl_name
=
gtk_entry_get_text
(
p_mrl
);
if
(
psz_mrl_name
!=
NULL
)
{
PlaylistAddItem
(
GTK_WIDGET
(
button
),
(
gchar
*
)
psz_mrl_name
,
0
,
0
);
}
msg_Dbg
(
p_intf
,
"Network transcode option selected."
);
onAddTranscodeToPlaylist
(
GTK_WIDGET
(
button
),
(
gchar
*
)
psz_mrl_name
);
}
else
{
msg_Dbg
(
p_intf
,
"Network receiving selected."
);
PlaylistAddItem
(
GTK_WIDGET
(
button
),
(
gchar
*
)
psz_mrl_name
,
0
,
0
);
}
}
...
...
@@ -636,6 +646,9 @@ void onAddCameraToPlaylist(GtkButton *button, gpointer user_data)
gint
i_v4l_decimation
;
/* end MJPEG only */
GtkCheckButton
*
p_check_v4l_transcode
=
NULL
;
gboolean
b_v4l_transcode
;
char
**
ppsz_options
=
NULL
;
/* list of options */
int
i_options
=
0
;
char
v4l_mrl
[
6
];
...
...
@@ -723,7 +736,18 @@ void onAddCameraToPlaylist(GtkButton *button, gpointer user_data)
}
/* end MJPEG only */
PlaylistAddItem
(
GTK_WIDGET
(
button
),
(
gchar
*
)
&
v4l_mrl
,
ppsz_options
,
i_options
);
p_check_v4l_transcode
=
(
GtkCheckButton
*
)
lookup_widget
(
GTK_WIDGET
(
button
),
"checkV4LTranscode"
);
b_v4l_transcode
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
p_check_v4l_transcode
));
if
(
b_v4l_transcode
)
{
msg_Dbg
(
p_intf
,
"Camera transcode option selected."
);
onAddTranscodeToPlaylist
(
GTK_WIDGET
(
button
),
(
gchar
*
)
v4l_mrl
);
}
else
{
msg_Dbg
(
p_intf
,
"Camera reception option selected."
);
PlaylistAddItem
(
GTK_WIDGET
(
button
),
(
gchar
*
)
&
v4l_mrl
,
ppsz_options
,
i_options
);
}
}
...
...
@@ -1018,6 +1042,11 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
}
}
/* Update the playlist */
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
/* Get all the options. */
i_pos
=
snprintf
(
&
mrl
[
0
],
VLC_MAX_MRL
,
"sout"
);
mrl
[
6
]
=
'\0'
;
/* option 1 */
...
...
@@ -1065,7 +1094,7 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
/* option 2 */
i_pos
=
0
;
i_pos
=
snprintf
(
&
ppsz_options
[
i_options
++
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"
dst=
"
);
i_pos
=
snprintf
(
&
ppsz_options
[
i_options
++
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"
#
"
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
p_entryStdAccess
=
(
GtkEntry
*
)
lookup_widget
(
GTK_WIDGET
(
button
),
"entryStdAccess"
);
...
...
@@ -1081,46 +1110,42 @@ void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
b_sap_announce
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
p_checkSAP
));
b_slp_announce
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
p_checkSLP
));
if
(
strncasecmp
(
(
const
char
*
)
p_std_access
,
"display"
,
7
)
==
0
)
{
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"%s,"
,
(
char
*
)
p_std_access
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
}
else
{
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"std{access=%s,"
,
(
char
*
)
p_std_access
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"mux=%s,"
,
(
char
*
)
p_std_muxer
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"url=%s"
,
(
char
*
)
p_std_url
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"std{access=%s,"
,
(
char
*
)
p_std_access
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"mux=%s,"
,
(
char
*
)
p_std_muxer
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"url=%s"
,
(
char
*
)
p_std_url
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
if
(
strncasecmp
(
(
const
char
*
)
p_std_access
,
"udp"
,
3
)
==
0
)
if
(
strncasecmp
(
(
const
char
*
)
p_std_access
,
"udp"
,
3
)
==
0
)
{
if
(
b_sap_announce
)
{
if
(
b_sap_announce
)
{
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"sap=%s"
,
(
char
*
)
p_std_announce
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
}
if
(
b_slp_announce
)
{
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"slp=%s"
,
(
char
*
)
p_std_announce
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
}
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"sap=%s"
,
(
char
*
)
p_std_announce
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
}
if
(
b_slp_announce
)
{
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"slp=%s"
,
(
char
*
)
p_std_announce
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
}
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"}"
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
i_std_ttl
=
gtk_spin_button_get_value_as_int
(
p_entryStdTTL
);
i_pos
=
snprintf
(
&
ppsz_options
[
i_options
++
][
0
],
VLC_MAX_MRL
,
"ttl=%d"
,
(
int
)
i_std_ttl
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
}
PlaylistAddItem
(
GTK_WIDGET
(
button
),
(
gchar
*
)
&
mrl
,
ppsz_options
,
i_options
);
}
i_std_ttl
=
gtk_spin_button_get_value_as_int
(
p_entryStdTTL
);
i_pos
+=
snprintf
(
&
ppsz_options
[
i_options
++
][
i_pos
],
VLC_MAX_MRL
-
i_pos
,
"ttl=%d}"
,
(
int
)
i_std_ttl
);
if
(
i_pos
>=
VLC_MAX_MRL
)
ppsz_options
[
i_options
][
VLC_MAX_MRL
-
1
]
=
'\0'
;
if
(
user_data
!=
NULL
)
{
msg_Dbg
(
p_intf
,
"Adding transcoding options to playlist item."
);
}
else
{
msg_Dbg
(
p_intf
,
"Adding --sout to playlist."
);
PlaylistAddItem
(
GTK_WIDGET
(
button
),
(
gchar
*
)
&
mrl
,
ppsz_options
,
i_options
);
}
}
void
onEntryStdAccessChanged
(
GtkEditable
*
editable
,
gpointer
user_data
)
{
...
...
modules/gui/pda/pda_interface.c
View file @
5f02f262
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment