Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
GSoC
GSoC2018
macOS
vlc
Commits
b6689cb8
Commit
b6689cb8
authored
Oct 13, 2017
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: input: move libvlc initialisation in a common helper
parent
2c2eb4d0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
27 deletions
+74
-27
test/Makefile.am
test/Makefile.am
+2
-1
test/src/input/common.c
test/src/input/common.c
+42
-0
test/src/input/common.h
test/src/input/common.h
+29
-0
test/src/input/demux-run.c
test/src/input/demux-run.c
+0
-26
test/src/input/demux-run.h
test/src/input/demux-run.h
+1
-0
No files found.
test/Makefile.am
View file @
b6689cb8
...
...
@@ -138,7 +138,8 @@ FORCE:
.PHONY
:
FORCE
libvlc_demux_run_la_SOURCES
=
src/input/demux-run.c src/input/demux-run.h
libvlc_demux_run_la_SOURCES
=
src/input/demux-run.c src/input/demux-run.h
\
src/input/common.c src/input/common.h
libvlc_demux_run_la_CPPFLAGS
=
$(AM_CPPFLAGS)
\
-DTOP_BUILDDIR
=
\"
$$
(
cd
"
$(top_builddir)
"
;
pwd
)
\"
\
-DTOP_SRCDIR
=
\"
$$
(
cd
"
$(top_srcdir)
"
;
pwd
)
\"
...
...
test/src/input/common.c
0 → 100644
View file @
b6689cb8
/*****************************************************************************
* common.c
*****************************************************************************
* Copyright (C) 2017 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "../lib/libvlc_internal.h"
#include "common.h"
libvlc_instance_t
*
libvlc_create
(
void
)
{
#ifdef TOP_BUILDDIR
# ifndef HAVE_STATIC_MODULES
setenv
(
"VLC_PLUGIN_PATH"
,
TOP_BUILDDIR
"/modules"
,
1
);
# endif
setenv
(
"VLC_DATA_PATH"
,
TOP_SRCDIR
"/share"
,
1
);
#endif
libvlc_instance_t
*
vlc
=
libvlc_new
(
0
,
NULL
);
if
(
vlc
==
NULL
)
fprintf
(
stderr
,
"Error: cannot initialize LibVLC.
\n
"
);
return
vlc
;
}
test/src/input/common.h
0 → 100644
View file @
b6689cb8
/*****************************************************************************
* common.h
*****************************************************************************
* Copyright (C) 2017 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <vlc/vlc.h>
#if 0
#define debug(...) printf(__VA_ARGS__)
#else
#define debug(...) (void)0
#endif
libvlc_instance_t
*
libvlc_create
(
void
);
test/src/input/demux-run.c
View file @
b6689cb8
...
...
@@ -46,12 +46,6 @@
#include "demux-run.h"
#if 0
#define debug(...) printf(__VA_ARGS__)
#else
#define debug(...) (void)0
#endif
struct
test_es_out_t
{
struct
es_out_t
out
;
...
...
@@ -230,26 +224,6 @@ static int demux_process_stream(const char *name, stream_t *s)
return
val
==
VLC_DEMUXER_EOF
?
0
:
-
1
;
}
static
libvlc_instance_t
*
libvlc_create
(
void
)
{
const
char
*
argv
[]
=
{
NULL
};
unsigned
argc
=
(
sizeof
(
argv
)
/
sizeof
(
*
argv
))
-
1
;
#ifdef TOP_BUILDDIR
# ifndef HAVE_STATIC_MODULES
setenv
(
"VLC_PLUGIN_PATH"
,
TOP_BUILDDIR
"/modules"
,
1
);
# endif
setenv
(
"VLC_DATA_PATH"
,
TOP_SRCDIR
"/share"
,
1
);
#endif
libvlc_instance_t
*
vlc
=
libvlc_new
(
argc
,
argv
);
if
(
vlc
==
NULL
)
fprintf
(
stderr
,
"Error: cannot initialize LibVLC.
\n
"
);
return
vlc
;
}
int
vlc_demux_process_url
(
const
char
*
demux
,
const
char
*
url
)
{
libvlc_instance_t
*
vlc
=
libvlc_create
();
...
...
test/src/input/demux-run.h
View file @
b6689cb8
...
...
@@ -24,6 +24,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "common.h"
int
vlc_demux_process_url
(
const
char
*
demux
,
const
char
*
url
);
int
vlc_demux_process_path
(
const
char
*
demux
,
const
char
*
path
);
...
...
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