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
d47f9998
Commit
d47f9998
authored
Apr 29, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* file: use - to write on stdout. (but you can only use ts and ps muxer,
as the others need to seek).
parent
db31a972
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
modules/access_output/file.c
modules/access_output/file.c
+26
-5
No files found.
modules/access_output/file.c
View file @
d47f9998
...
...
@@ -2,7 +2,7 @@
* file.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: file.c,v 1.
4 2003/03/03 14:21:08 gbazin
Exp $
* $Id: file.c,v 1.
5 2003/04/29 15:40:31 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -80,7 +80,17 @@ static int Open( vlc_object_t *p_this )
return
(
VLC_EGENERIC
);
}
if
(
!
(
p_access
->
p_sys
->
p_file
=
fopen
(
p_access
->
psz_name
,
"wb"
)
)
)
if
(
!
p_access
->
psz_name
)
{
msg_Err
(
p_access
,
"no file name specified"
);
return
VLC_EGENERIC
;
}
if
(
!
strcmp
(
p_access
->
psz_name
,
"-"
)
)
{
p_access
->
p_sys
->
p_file
=
stdout
;
msg_Dbg
(
p_access
,
"using stdout"
);
}
else
if
(
!
(
p_access
->
p_sys
->
p_file
=
fopen
(
p_access
->
psz_name
,
"wb"
)
)
)
{
msg_Err
(
p_access
,
"cannot open `%s'"
,
p_access
->
psz_name
);
free
(
p_access
->
p_sys
);
...
...
@@ -101,9 +111,12 @@ static void Close( vlc_object_t * p_this )
{
sout_access_out_t
*
p_access
=
(
sout_access_out_t
*
)
p_this
;
if
(
p_access
->
p_sys
->
p_file
)
if
(
strcmp
(
p_access
->
psz_name
,
"-"
)
)
{
fclose
(
p_access
->
p_sys
->
p_file
);
if
(
p_access
->
p_sys
->
p_file
)
{
fclose
(
p_access
->
p_sys
->
p_file
);
}
}
free
(
p_access
->
p_sys
);
...
...
@@ -139,7 +152,15 @@ static int Seek( sout_access_out_t *p_access, off_t i_pos )
{
msg_Dbg
(
p_access
,
"Seek: pos:"
I64Fd
,
(
int64_t
)
i_pos
);
return
(
fseek
(
p_access
->
p_sys
->
p_file
,
i_pos
,
SEEK_SET
)
);
if
(
strcmp
(
p_access
->
psz_name
,
"-"
)
)
{
return
(
fseek
(
p_access
->
p_sys
->
p_file
,
i_pos
,
SEEK_SET
)
);
}
else
{
msg_Err
(
p_access
,
"cannot seek while using stdout"
);
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