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
25c5aee0
Commit
25c5aee0
authored
Nov 19, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decomp: add support for xz compressed streams (LZMA)
parent
5d99f7d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
modules/stream_filter/decomp.c
modules/stream_filter/decomp.c
+23
-1
No files found.
modules/stream_filter/decomp.c
View file @
25c5aee0
/*****************************************************************************
* decomp.c : Decompression module for vlc
*****************************************************************************
* Copyright © 2008 Rémi Denis-Courmont
* Copyright © 2008
-2009
Rémi Denis-Courmont
*
* 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
...
...
@@ -47,6 +47,7 @@
static
int
OpenGzip
(
vlc_object_t
*
);
static
int
OpenBzip2
(
vlc_object_t
*
);
static
int
OpenXZ
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
vlc_module_begin
()
...
...
@@ -54,6 +55,9 @@ vlc_module_begin ()
set_category
(
CAT_INPUT
)
set_subcategory
(
SUBCAT_INPUT_STREAM_FILTER
)
set_capability
(
"stream_filter"
,
20
)
set_callbacks
(
OpenXZ
,
Close
)
add_submodule
()
set_callbacks
(
OpenBzip2
,
Close
)
/* TODO: access shortnames for stream_UrlNew() */
...
...
@@ -408,3 +412,21 @@ static int OpenBzip2 (vlc_object_t *obj)
return
Open
(
stream
,
"bzcat"
);
}
/**
* Detects xz file format
*/
static
int
OpenXZ
(
vlc_object_t
*
obj
)
{
stream_t
*
stream
=
(
stream_t
*
)
obj
;
const
uint8_t
*
peek
;
/* (Try to) parse the xz stream header */
if
(
stream_Peek
(
stream
->
p_source
,
&
peek
,
8
)
<
8
)
return
VLC_EGENERIC
;
if
(
memcmp
(
peek
,
"
\xfd\x37\x7a\x58\x5a
"
,
6
))
return
VLC_EGENERIC
;
msg_Dbg
(
obj
,
"detected xz compressed stream"
);
return
Open
(
stream
,
"xzcat"
);
}
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