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
714b4749
Commit
714b4749
authored
Dec 20, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: add demux_IsContentType() helper (refs #14576)
parent
773918ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
include/vlc_demux.h
include/vlc_demux.h
+18
-0
No files found.
include/vlc_demux.h
View file @
714b4749
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
#ifndef VLC_DEMUX_H
#ifndef VLC_DEMUX_H
#define VLC_DEMUX_H 1
#define VLC_DEMUX_H 1
#include <stdlib.h>
#include <string.h>
#include <vlc_es.h>
#include <vlc_es.h>
#include <vlc_stream.h>
#include <vlc_stream.h>
#include <vlc_es_out.h>
#include <vlc_es_out.h>
...
@@ -347,6 +350,21 @@ static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_exte
...
@@ -347,6 +350,21 @@ static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_exte
return
true
;
return
true
;
}
}
VLC_USED
static
inline
bool
demux_IsContentType
(
demux_t
*
demux
,
const
char
*
type
)
{
char
*
mime
=
stream_ContentType
(
demux
->
s
);
if
(
mime
==
NULL
)
return
false
;
size_t
len
=
strlen
(
type
);
bool
ok
=
strncasecmp
(
mime
,
type
,
len
)
==
0
&&
memchr
(
"
\t
;"
,
(
unsigned
char
)
mime
[
len
],
4
)
!=
NULL
;
free
(
mime
);
return
ok
;
}
VLC_USED
VLC_USED
static
inline
bool
demux_IsForced
(
demux_t
*
p_demux
,
const
char
*
psz_name
)
static
inline
bool
demux_IsForced
(
demux_t
*
p_demux
,
const
char
*
psz_name
)
{
{
...
...
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