Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
37a5e7db
Commit
37a5e7db
authored
Aug 26, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added nsv stream record mode support.
parent
5924aed6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
modules/demux/nsv.c
modules/demux/nsv.c
+26
-6
No files found.
modules/demux/nsv.c
View file @
37a5e7db
...
...
@@ -72,6 +72,8 @@ struct demux_sys_t
int64_t
i_pcr
;
int64_t
i_time
;
int64_t
i_pcr_inc
;
bool
b_start_record
;
};
static
int
Demux
(
demux_t
*
p_demux
);
...
...
@@ -120,6 +122,8 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_time
=
0
;
p_sys
->
i_pcr_inc
=
0
;
p_sys
->
b_start_record
=
false
;
return
VLC_SUCCESS
;
}
...
...
@@ -159,16 +163,19 @@ static int Demux( demux_t *p_demux )
if
(
!
memcmp
(
p_peek
,
"NSVf"
,
4
)
)
{
if
(
ReadNSVf
(
p_demux
)
)
{
return
-
1
;
}
}
else
if
(
!
memcmp
(
p_peek
,
"NSVs"
,
4
)
)
{
if
(
ReadNSVs
(
p_demux
)
)
if
(
p_sys
->
b_start_record
)
{
return
-
1
;
/* Enable recording once synchronized */
stream_Control
(
p_demux
->
s
,
STREAM_SET_RECORD_STATE
,
true
,
"nsv"
);
p_sys
->
b_start_record
=
false
;
}
if
(
ReadNSVs
(
p_demux
)
)
return
-
1
;
break
;
}
else
if
(
GetWLE
(
p_peek
)
==
0xbeef
)
...
...
@@ -185,9 +192,7 @@ static int Demux( demux_t *p_demux )
{
msg_Err
(
p_demux
,
"invalid signature 0x%x (%4.4s)"
,
GetDWLE
(
p_peek
),
(
const
char
*
)
p_peek
);
if
(
ReSynch
(
p_demux
)
)
{
return
-
1
;
}
}
}
...
...
@@ -316,6 +321,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
double
f
,
*
pf
;
bool
b_bool
,
*
pb_bool
;
int64_t
i64
,
*
pi64
;
switch
(
i_query
)
...
...
@@ -372,6 +378,20 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
*
pf
=
(
double
)
1000000
.
0
/
(
double
)
p_sys
->
i_pcr_inc
;
return
VLC_SUCCESS
;
case
DEMUX_CAN_RECORD
:
pb_bool
=
(
bool
*
)
va_arg
(
args
,
bool
*
);
*
pb_bool
=
true
;
return
VLC_SUCCESS
;
case
DEMUX_SET_RECORD_STATE
:
b_bool
=
(
bool
)
va_arg
(
args
,
int
);
if
(
!
b_bool
)
stream_Control
(
p_demux
->
s
,
STREAM_SET_RECORD_STATE
,
false
);
p_sys
->
b_start_record
=
b_bool
;
return
VLC_SUCCESS
;
case
DEMUX_SET_TIME
:
default:
return
VLC_EGENERIC
;
...
...
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