Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
eb22c298
Commit
eb22c298
authored
Apr 01, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cancel
parent
86e5f20a
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
708 deletions
+30
-708
configure.ac
configure.ac
+28
-45
modules/demux/playlist/Modules.am
modules/demux/playlist/Modules.am
+0
-1
modules/demux/playlist/native.c
modules/demux/playlist/native.c
+0
-394
modules/demux/playlist/playlist.c
modules/demux/playlist/playlist.c
+0
-6
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+0
-2
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/playlist.cpp
+1
-2
modules/misc/playlist/Modules.am
modules/misc/playlist/Modules.am
+0
-1
modules/misc/playlist/export.c
modules/misc/playlist/export.c
+1
-8
modules/misc/playlist/native.c
modules/misc/playlist/native.c
+0
-249
No files found.
configure.ac
View file @
eb22c298
dnl Autoconf settings for vlc
dnl $Id$
AC_INIT(vlc,0.7.2-cvs)
CONFIGURE_LINE="$0 $*"
...
...
@@ -892,7 +892,7 @@ AX_ADD_PLUGINS([trivial_channel_mixer headphone_channel_mixer])
AX_ADD_PLUGINS([trivial_mixer spdif_mixer float32_mixer])
AX_ADD_PLUGINS([aout_file])
AX_ADD_PLUGINS([i420_rgb i420_yuy2 i422_yuy2 i420_ymga])
AX_ADD_PLUGINS([id3 m3u sgimb])
AX_ADD_PLUGINS([id3 m3u
playlist export
sgimb])
AX_ADD_PLUGINS([rawvideo])
AX_ADD_PLUGINS([wav araw demuxdump demuxsub adpcm a52sys dtssys au])
AX_ADD_PLUGINS([access_file access_udp access_tcp access_http ipv4 access_mms])
...
...
@@ -2903,48 +2903,6 @@ if test "${enable_skins}" != "no"; then
fi fi
fi
dnl
dnl libxml2
dnl
XML2_PATH="${PATH}"
AC_ARG_WITH(xml2-config-path,
[ --with-xml2-config-path=PATH xml2-config path (default search in \$PATH)],
[ if test "${with_xml2_config_path}" != "no"; then
XML2_PATH="${with_xml2_config_path}:${PATH}"
fi ])
AC_PATH_PROG(XML2_CONFIG, xml2-config, no, ${XML2_PATH})
AC_MSG_WARN([trucmuche0])
if test "${XML2_CONFIG}" != "no"; then
AC_MSG_WARN([trucmuche2])
AX_ADD_CPPFLAGS([skins2],[`${XML2_CONFIG} --cflags`])
AX_ADD_CFLAGS([playlist export],[`${XML2_CONFIG} --cflags`])
AX_ADD_LDFLAGS([skins2 playlist export],[`${XML2_CONFIG} --libs`])
AC_MSG_WARN([trucmuche3])
dnl skins2 and playlist depend on the xmlTextReader extension
AC_CHECK_LIB(xml2,xmlTextReaderConstName,
[ AC_MSG_WARN([trucmuche4])
AX_ADD_PLUGINS([playlist export])],
[
skins2_missing_lib="yes"
AC_MSG_WARN([trucmuche5])
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
AC_MSG_WARN([You will not be able to import/export playlists])
if test "${enable_skins2}" = "yes"; then
AC_MSG_WARN([trucmuche6])
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension (required for skins2)])
fi])
else
skins2_missing_lib="yes"
AC_MSG_ERROR([Could not find libxml2. You will not be able to import/export playlists])
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([Could not find libxml2 (required for skins2)])
fi
fi
dnl
dnl Skins2 module
dnl
...
...
@@ -2977,7 +2935,32 @@ if test "${enable_skins2}" = "yes" || (test "${SYS}" != "darwin" && test "${SYS}
fi
fi
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_skins2}"
dnl libxml2
XML2_PATH="${PATH}"
AC_ARG_WITH(xml2-config-path,
[ --with-xml2-config-path=PATH xml2-config path (default search in \$PATH)],
[ if test "${with_xml2_config_path}" != "no"; then
XML2_PATH="${with_xml2_config_path}:${PATH}"
fi ])
AC_PATH_PROG(XML2_CONFIG, xml2-config, no, ${XML2_PATH})
if test "${XML2_CONFIG}" != "no"; then
AX_ADD_CPPFLAGS([skins2],[`${XML2_CONFIG} --cflags`])
AX_ADD_LDFLAGS([skins2],[`${XML2_CONFIG} --libs`])
dnl skins2 depends on the xmlTextReader extension
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_skins2}"
AC_CHECK_LIB(xml2,xmlTextReaderConstName,[],[
skins2_missing_lib="yes"
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension (required for skins2)])
fi])
LDFLAGS="${LDFLAGS_save}"
else
skins2_missing_lib="yes"
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([Could not find libxml2 (required for skins2)])
fi
fi
if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"); then
AX_ADD_PLUGINS([skins2])
...
...
modules/demux/playlist/Modules.am
View file @
eb22c298
...
...
@@ -2,5 +2,4 @@ SOURCES_playlist = playlist.c \
playlist.h \
old.c \
m3u.c \
native.c \
pls.c
modules/demux/playlist/native.c
deleted
100644 → 0
View file @
86e5f20a
This diff is collapsed.
Click to expand it.
modules/demux/playlist/playlist.c
View file @
eb22c298
...
...
@@ -40,12 +40,6 @@ vlc_module_begin();
set_capability
(
"demux2"
,
10
);
set_callbacks
(
Import_Old
,
NULL
);
add_submodule
();
set_description
(
_
(
"Native playlist import"
)
);
add_shortcut
(
"playlist"
);
add_shortcut
(
"native-open"
);
set_capability
(
"demux2"
,
10
);
set_callbacks
(
Import_Native
,
Close_Native
);
add_submodule
();
set_description
(
_
(
"M3U playlist import"
)
);
add_shortcut
(
"m3u-open"
);
...
...
modules/demux/playlist/playlist.h
View file @
eb22c298
...
...
@@ -26,8 +26,6 @@ char *FindPrefix( demux_t * );
int
Import_Old
(
vlc_object_t
*
);
int
Import_M3U
(
vlc_object_t
*
);
int
Import_Native
(
vlc_object_t
*
);
int
Close_Native
(
vlc_object_t
*
);
void
Close_M3U
(
vlc_object_t
*
);
int
Import_PLS
(
vlc_object_t
*
);
...
...
modules/gui/wxwindows/playlist.cpp
View file @
eb22c298
...
...
@@ -591,8 +591,7 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
char
*
psz_desc
;
char
*
psz_filter
;
char
*
psz_module
;
}
formats
[]
=
{{
_
(
"Native VLC playlist"
),
"*.vlp"
,
"export-native"
},
{
_
(
"M3U file"
),
"*.m3u"
,
"export-m3u"
},
}
formats
[]
=
{{
_
(
"M3U file"
),
"*.m3u"
,
"export-m3u"
},
{
_
(
"PLS file"
),
"*.pls"
,
"export-pls"
}};
wxString
filter
=
wxT
(
""
);
...
...
modules/misc/playlist/Modules.am
View file @
eb22c298
SOURCES_export = export.c \
native.c \
m3u.c \
old.c
modules/misc/playlist/export.c
View file @
eb22c298
...
...
@@ -2,7 +2,7 @@
* export.c : Playlist export module
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id
: export.c,v 1.2 2004/02/22 15:52:33 zorglub Exp
$
* $Id$
*
* Authors: Clment Stenac <zorglub@videolan.org>
*
...
...
@@ -29,7 +29,6 @@
/***************************************************************************
* Prototypes
***************************************************************************/
int
Export_Native
(
vlc_object_t
*
p_intf
);
int
Export_M3U
(
vlc_object_t
*
p_intf
);
int
Export_Old
(
vlc_object_t
*
p_intf
);
...
...
@@ -39,12 +38,6 @@ int Export_Old ( vlc_object_t *p_intf );
*****************************************************************************/
vlc_module_begin
();
add_submodule
();
set_description
(
_
(
"Native playlist exporter"
)
);
add_shortcut
(
"export-native"
);
set_capability
(
"playlist export"
,
0
);
set_callbacks
(
Export_Native
,
NULL
);
add_submodule
();
set_description
(
_
(
"M3U playlist exporter"
)
);
add_shortcut
(
"export-m3u"
);
...
...
modules/misc/playlist/native.c
deleted
100644 → 0
View file @
86e5f20a
/*****************************************************************************
* native.c : Native playlist export module
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id$
*
* Authors: Clment Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h>
/* malloc(), free() */
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include <errno.h>
/* ENOMEM */
#include <libxml/xmlwriter.h>
#include <libxml/encoding.h>
#define ENCODING "UTF-8"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
int
Export_Native
(
vlc_object_t
*
);
char
*
ToUTF8
(
char
*
);
/*****************************************************************************
* Native: main export function
*****************************************************************************/
int
Export_Native
(
vlc_object_t
*
p_this
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
p_this
;
playlist_export_t
*
p_export
=
(
playlist_export_t
*
)
p_playlist
->
p_private
;
int
i
,
j
,
k
;
char
*
psz_name
=
"VLC Playlist"
;
int
i_version
=
1
;
int
i_ret
;
xmlTextWriterPtr
p_writer
;
xmlBufferPtr
p_buf
;
xmlChar
*
tmp
;
msg_Dbg
(
p_playlist
,
"Saving using native format"
);
/* Create a new XmlWriter */
p_buf
=
xmlBufferCreate
();
if
(
!
p_buf
)
{
msg_Warn
(
p_playlist
,
"Unable to create XML buffer"
);
return
VLC_EGENERIC
;
}
/* Create a new XmlWriter */
p_writer
=
xmlNewTextWriterMemory
(
p_buf
,
0
);
if
(
!
p_writer
)
{
msg_Dbg
(
p_playlist
,
"Unable to create XML writer"
);
return
VLC_EGENERIC
;
}
/* Make a beautiful output */
i_ret
=
xmlTextWriterSetIndent
(
p_writer
,
1
);
/* Start the document */
i_ret
=
xmlTextWriterStartDocument
(
p_writer
,
NULL
,
ENCODING
,
NULL
);
if
(
i_ret
<
0
)
{
return
VLC_EGENERIC
;
}
i_ret
=
xmlTextWriterStartElement
(
p_writer
,
BAD_CAST
"playlist"
);
if
(
i_ret
<
0
)
{
msg_Dbg
(
p_playlist
,
"Unable to write root node"
);
return
VLC_EGENERIC
;
}
for
(
i
=
0
;
i
<
p_playlist
->
i_size
;
i
++
)
{
playlist_item_t
*
p_item
=
p_playlist
->
pp_items
[
i
];
char
*
psz_utf8
=
NULL
;
i_ret
=
xmlTextWriterStartElement
(
p_writer
,
BAD_CAST
"item"
);
/* Write item attributes */
psz_utf8
=
ToUTF8
(
p_item
->
input
.
psz_uri
);
if
(
!
psz_utf8
)
return
VLC_EGENERIC
;
i_ret
=
xmlTextWriterWriteAttribute
(
p_writer
,
"uri"
,
psz_utf8
);
free
(
psz_utf8
);
psz_utf8
=
ToUTF8
(
p_item
->
input
.
psz_name
);
if
(
!
psz_utf8
)
return
VLC_EGENERIC
;
i_ret
=
xmlTextWriterWriteAttribute
(
p_writer
,
"name"
,
psz_utf8
);
free
(
psz_utf8
);
/* Write categories */
for
(
j
=
0
;
j
<
p_item
->
input
.
i_categories
;
j
++
)
{
info_category_t
*
p_cat
=
p_item
->
input
.
pp_categories
[
j
];
if
(
p_cat
->
i_infos
>
0
)
{
i_ret
=
xmlTextWriterStartElement
(
p_writer
,
"category"
);
psz_utf8
=
ToUTF8
(
p_cat
->
psz_name
);
if
(
!
psz_utf8
)
return
VLC_EGENERIC
;
i_ret
=
xmlTextWriterWriteAttribute
(
p_writer
,
"name"
,
psz_utf8
);
free
(
psz_utf8
);
for
(
k
=
0
;
k
<
p_cat
->
i_infos
;
k
++
)
{
i_ret
=
xmlTextWriterStartElement
(
p_writer
,
"info"
);
psz_utf8
=
ToUTF8
(
p_cat
->
pp_infos
[
k
]
->
psz_name
);
if
(
!
psz_utf8
)
return
VLC_EGENERIC
;
i_ret
=
xmlTextWriterWriteAttribute
(
p_writer
,
"name"
,
psz_utf8
);
free
(
psz_utf8
);
psz_utf8
=
ToUTF8
(
p_cat
->
pp_infos
[
k
]
->
psz_value
);
if
(
!
psz_utf8
)
return
VLC_EGENERIC
;
i_ret
=
xmlTextWriterWriteAttribute
(
p_writer
,
"value"
,
psz_utf8
);
free
(
psz_utf8
);
i_ret
=
xmlTextWriterEndElement
(
p_writer
);
}
/* Finish category */
i_ret
=
xmlTextWriterEndElement
(
p_writer
);
}
}
for
(
j
=
0
;
j
<
p_item
->
input
.
i_options
;
j
++
)
{
i_ret
=
xmlTextWriterStartElement
(
p_writer
,
"option"
);
psz_utf8
=
ToUTF8
(
p_item
->
input
.
ppsz_options
[
j
]
);
if
(
!
psz_utf8
)
return
VLC_EGENERIC
;
i_ret
=
xmlTextWriterWriteAttribute
(
p_writer
,
"name"
,
psz_utf8
);
}
/* Finish item */
i_ret
=
xmlTextWriterEndElement
(
p_writer
);
}
/* Finish playlist */
i_ret
=
xmlTextWriterEndElement
(
p_writer
);
i_ret
=
xmlTextWriterEndDocument
(
p_writer
);
xmlFreeTextWriter
(
p_writer
);
fprintf
(
p_export
->
p_file
,
"%s"
,
(
const
char
*
)
p_buf
->
content
);
#if 0
/* Write items */
for( i = 0; i< p_playlist->i_size ; i++)
{
playlist_item_t *p_item= p_playlist->pp_items[i];
ItemStripEntities( p_item );
fprintf( p_export->p_file," <item uri=\"%s\" name=\"%s\"",
p_item->psz_uri,
p_item->psz_name );
if( p_item->i_duration != -1 )
{
fprintf( p_export->p_file, "duration=\""I64Fi"\""
p_item->i_duration )
}
if( p_item->b_enabled != 1 )
{
fprintf( p_export->p_file," enabled=\"%i\"", p_item->b_enabled );
}
if( p_item->i_group != 1 )
{
fprintf( p_export->p_file,"group=\"%i\"", p_item->i_group );
}
if( p_item->i_played > 0 )
{
fprintf( p_export->p_file," played=\"%i\"",p_item->i_nb_played );
}
fprintf( p_export->p_file, ">\n" );
for( j = 0; j< p_item->i_categories ; j++ )
{
item_info_category_t *p_cat = p_item->pp_categories[j];
if( p_cat->i_infos > 0 )
{
fprintf( p_export->p_file," <category name=\"%s\">\n",
p_cat->psz_name);
for( k = 0; k< p_cat->i_infos; k++)
{
fprintf( p_export->p_file,
" <info name=\"%s\" value=\"%s\" />\n",
p_cat->pp_infos[k]->psz_name,
p_cat->pp_infos[k]->psz_value );
}
fprintf( p_export->p_file," </category>\n" );
}
}
for( j = 0; j< p_item->i_options ; j++ )
{
fprintf( p_export->p_file," <option name=\"%s\">\n",
p_item->ppsz_options[j]);
}
fprintf( p_export->p_file, " </item>\n");
}
/* Write groups */
for( i = 0; i< p_playlist->i_groups ; i++)
{
fprintf( p_export->p_file," <group name=\"%s\" id=\"%i\" />\n",
p_playlist->pp_groups[i]->psz_name,
p_playlist->pp_groups[i]->i_id );
}
/* Write footer */
fprintf( p_export->p_file,"</playlist>\n" );
#endif
return
VLC_SUCCESS
;
}
char
*
ToUTF8
(
char
*
psz_in
)
{
int
i_in
=
strlen
(
psz_in
);
int
i_out
=
2
*
i_in
+
1
;
char
*
psz_out
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
i_out
);
isolat1ToUTF8
(
psz_out
,
&
i_out
,
psz_in
,
&
i_in
);
psz_out
[
i_out
]
=
0
;
return
psz_out
;
}
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