Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
c1c27e1d
Commit
c1c27e1d
authored
Apr 16, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SMF: demux SysEx messages
parent
e82cac59
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
modules/demux/smf.c
modules/demux/smf.c
+16
-15
No files found.
modules/demux/smf.c
View file @
c1c27e1d
...
@@ -472,19 +472,22 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
...
@@ -472,19 +472,22 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
case
0xF0
:
/* System Exclusive */
case
0xF0
:
/* System Exclusive */
switch
(
event
)
switch
(
event
)
{
{
case
0xF0
:
/* System Specific */
case
0xF0
:
/* System Specific start */
case
0xF7
:
/* System Specific continuation */
{
{
/* TODO: don't skip these */
/* Variable length followed by SysEx event data */
stream_Read
(
s
,
NULL
,
1
);
/* Manuf ID */
int32_t
len
=
ReadVarInt
(
s
);
for
(;;)
if
(
len
==
-
1
)
{
uint8_t
c
;
if
(
stream_Read
(
s
,
&
c
,
1
)
!=
1
)
return
-
1
;
return
-
1
;
if
(
c
==
0xF7
)
goto
skip
;
block
=
stream_Block
(
s
,
len
);
}
if
(
block
==
NULL
)
/* never reached */
return
-
1
;
block
=
block_Realloc
(
block
,
1
,
len
);
if
(
block
==
NULL
)
return
-
1
;
block
->
p_buffer
[
0
]
=
event
;
goto
send
;
}
}
case
0xFF
:
/* SMF Meta Event */
case
0xFF
:
/* SMF Meta Event */
if
(
HandleMeta
(
p_demux
,
tr
))
if
(
HandleMeta
(
p_demux
,
tr
))
...
@@ -504,9 +507,6 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
...
@@ -504,9 +507,6 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
/* We cannot handle undefined "common" (non-real-time)
/* We cannot handle undefined "common" (non-real-time)
* events inside SMF, as we cannot differentiate a
* events inside SMF, as we cannot differentiate a
* one byte delta-time (< 0x80) from event data. */
* one byte delta-time (< 0x80) from event data. */
case
0xF7
:
/* End of sysex -> should never happen(?) */
msg_Err
(
p_demux
,
"unknown MIDI event 0x%02X"
,
event
);
return
-
1
;
/* undefined events */
default:
default:
datalen
=
0
;
datalen
=
0
;
break
;
break
;
...
@@ -544,6 +544,7 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
...
@@ -544,6 +544,7 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
stream_Read
(
s
,
block
->
p_buffer
+
2
,
datalen
-
1
);
stream_Read
(
s
,
block
->
p_buffer
+
2
,
datalen
-
1
);
}
}
send:
block
->
i_dts
=
block
->
i_pts
=
VLC_TS_0
+
date_Get
(
&
p_demux
->
p_sys
->
pts
);
block
->
i_dts
=
block
->
i_pts
=
VLC_TS_0
+
date_Get
(
&
p_demux
->
p_sys
->
pts
);
es_out_Send
(
p_demux
->
out
,
p_demux
->
p_sys
->
es
,
block
);
es_out_Send
(
p_demux
->
out
,
p_demux
->
p_sys
->
es
,
block
);
...
...
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