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
6975a29a
Commit
6975a29a
authored
Sep 15, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rar: merge access and stream_filter in a single module
parent
c71e5789
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
53 deletions
+52
-53
modules/access/Modules.am
modules/access/Modules.am
+4
-4
modules/access/rar/access.c
modules/access/rar/access.c
+2
-24
modules/access/rar/module.c
modules/access/rar/module.c
+39
-0
modules/access/rar/rar.h
modules/access/rar/rar.h
+4
-0
modules/access/rar/stream.c
modules/access/rar/stream.c
+3
-25
No files found.
modules/access/Modules.am
View file @
6975a29a
...
...
@@ -72,8 +72,9 @@ SOURCES_access_attachment = attachment.c
SOURCES_access_vdr = vdr.c
SOURCES_libbluray = bluray.c
SOURCES_access_rar = rar/rar.c rar/rar.h rar/access.c
SOURCES_stream_filter_rar = rar/rar.c rar/rar.h rar/stream.c
librar_plugin_la_SOURCES = rar/rar.c rar/rar.h \
rar/access.c rar/stream.c rar/module.c
librar_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
if HAVE_DECKLINK
libdecklink_plugin_la_SOURCES = decklink.cpp
...
...
@@ -119,10 +120,9 @@ libvlc_LTLIBRARIES += \
libaccess_ftp_plugin.la \
libaccess_imem_plugin.la \
libaccess_attachment_plugin.la \
librar_plugin.la \
libsdp_plugin.la \
libtimecode_plugin.la \
libaccess_rar_plugin.la \
libstream_filter_rar_plugin.la \
libaccess_vdr_plugin.la \
$(NULL)
...
...
modules/access/rar/access.c
View file @
6975a29a
...
...
@@ -21,9 +21,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
...
...
@@ -39,24 +36,6 @@
#include "rar.h"
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
vlc_module_begin
()
set_category
(
CAT_INPUT
)
set_subcategory
(
SUBCAT_INPUT_STREAM_FILTER
)
set_description
(
N_
(
"Uncompressed RAR"
))
set_capability
(
"access"
,
0
)
set_callbacks
(
Open
,
Close
)
add_shortcut
(
"rar"
)
vlc_module_end
()
/*****************************************************************************
* Local definitions/prototypes
*****************************************************************************/
struct
access_sys_t
{
stream_t
*
s
;
rar_file_t
*
file
;
...
...
@@ -160,7 +139,7 @@ static int Control(access_t *access, int query, va_list args)
}
}
static
int
Open
(
vlc_object_t
*
object
)
int
RarAccess
Open
(
vlc_object_t
*
object
)
{
access_t
*
access
=
(
access_t
*
)
object
;
...
...
@@ -219,7 +198,7 @@ error:
return
VLC_EGENERIC
;
}
static
void
Close
(
vlc_object_t
*
object
)
void
RarAccess
Close
(
vlc_object_t
*
object
)
{
access_t
*
access
=
(
access_t
*
)
object
;
access_sys_t
*
sys
=
access
->
p_sys
;
...
...
@@ -229,4 +208,3 @@ static void Close(vlc_object_t *object)
RarFileDelete
(
sys
->
file
);
free
(
sys
);
}
modules/access/rar/module.c
0 → 100644
View file @
6975a29a
/*****************************************************************************
* stream.c: uncompressed RAR stream filter
*****************************************************************************
* Copyright (C) 2008-2010 Laurent Aimar
*
* 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 <vlc_common.h>
#include <vlc_plugin.h>
#include "rar.h"
vlc_module_begin
()
set_category
(
CAT_INPUT
)
set_subcategory
(
SUBCAT_INPUT_STREAM_FILTER
)
set_description
(
N_
(
"Uncompressed RAR"
))
set_capability
(
"access"
,
0
)
set_callbacks
(
RarAccessOpen
,
RarAccessClose
)
add_submodule
()
set_capability
(
"stream_filter"
,
1
)
set_callbacks
(
RarStreamOpen
,
RarStreamClose
)
vlc_module_end
()
modules/access/rar/rar.h
View file @
6975a29a
...
...
@@ -42,3 +42,7 @@ int RarProbe(stream_t *);
void
RarFileDelete
(
rar_file_t
*
);
int
RarParse
(
stream_t
*
,
int
*
,
rar_file_t
***
);
int
RarAccessOpen
(
vlc_object_t
*
);
void
RarAccessClose
(
vlc_object_t
*
);
int
RarStreamOpen
(
vlc_object_t
*
);
void
RarStreamClose
(
vlc_object_t
*
);
modules/access/rar/stream.c
View file @
6975a29a
...
...
@@ -21,9 +21,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
...
...
@@ -38,24 +35,6 @@
#include "rar.h"
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
vlc_module_begin
()
set_category
(
CAT_INPUT
)
set_subcategory
(
SUBCAT_INPUT_STREAM_FILTER
)
set_description
(
N_
(
"Uncompressed RAR"
))
set_capability
(
"stream_filter"
,
1
)
set_callbacks
(
Open
,
Close
)
add_shortcut
(
"rar"
)
vlc_module_end
()
/****************************************************************************
* Local definitions/prototypes
****************************************************************************/
struct
stream_sys_t
{
stream_t
*
payload
;
};
...
...
@@ -83,7 +62,7 @@ static int Control(stream_t *s, int query, va_list args)
}
}
static
int
Open
(
vlc_object_t
*
object
)
int
RarStream
Open
(
vlc_object_t
*
object
)
{
stream_t
*
s
=
(
stream_t
*
)
object
;
...
...
@@ -152,7 +131,7 @@ static int Open(vlc_object_t *object)
char
*
tmp
;
if
(
asprintf
(
&
tmp
,
"%s.m3u"
,
s
->
psz_path
)
<
0
)
{
Close
(
object
);
RarStream
Close
(
object
);
return
VLC_ENOMEM
;
}
free
(
s
->
psz_path
);
...
...
@@ -161,7 +140,7 @@ static int Open(vlc_object_t *object)
return
VLC_SUCCESS
;
}
static
void
Close
(
vlc_object_t
*
object
)
void
RarStream
Close
(
vlc_object_t
*
object
)
{
stream_t
*
s
=
(
stream_t
*
)
object
;
stream_sys_t
*
sys
=
s
->
p_sys
;
...
...
@@ -169,4 +148,3 @@ static void Close(vlc_object_t *object)
stream_Delete
(
sys
->
payload
);
free
(
sys
);
}
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