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
79943f01
Commit
79943f01
authored
Oct 23, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access_out_file: add the sync option, only if O_SYNC is defined.
parent
90763723
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
modules/access_output/file.c
modules/access_output/file.c
+9
-5
No files found.
modules/access_output/file.c
View file @
79943f01
...
@@ -75,8 +75,10 @@ vlc_module_begin ()
...
@@ -75,8 +75,10 @@ vlc_module_begin ()
add_shortcut
(
"file"
,
"stream"
)
add_shortcut
(
"file"
,
"stream"
)
add_bool
(
SOUT_CFG_PREFIX
"append"
,
false
,
APPEND_TEXT
,
APPEND_LONGTEXT
,
add_bool
(
SOUT_CFG_PREFIX
"append"
,
false
,
APPEND_TEXT
,
APPEND_LONGTEXT
,
true
)
true
)
#ifdef O_SYNC
add_bool
(
SOUT_CFG_PREFIX
"sync"
,
false
,
SYNC_TEXT
,
SYNC_LONGTEXT
,
add_bool
(
SOUT_CFG_PREFIX
"sync"
,
false
,
SYNC_TEXT
,
SYNC_LONGTEXT
,
false
)
false
)
#endif
set_callbacks
(
Open
,
Close
)
set_callbacks
(
Open
,
Close
)
vlc_module_end
()
vlc_module_end
()
...
@@ -85,7 +87,11 @@ vlc_module_end ()
...
@@ -85,7 +87,11 @@ vlc_module_end ()
* Exported prototypes
* Exported prototypes
*****************************************************************************/
*****************************************************************************/
static
const
char
*
const
ppsz_sout_options
[]
=
{
static
const
char
*
const
ppsz_sout_options
[]
=
{
"append"
,
"sync"
,
NULL
"append"
,
#ifdef O_SYNC
"sync"
,
#endif
NULL
};
};
static
ssize_t
Write
(
sout_access_out_t
*
,
block_t
*
);
static
ssize_t
Write
(
sout_access_out_t
*
,
block_t
*
);
...
@@ -105,7 +111,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -105,7 +111,6 @@ static int Open( vlc_object_t *p_this )
{
{
sout_access_out_t
*
p_access
=
(
sout_access_out_t
*
)
p_this
;
sout_access_out_t
*
p_access
=
(
sout_access_out_t
*
)
p_this
;
int
fd
;
int
fd
;
bool
sync
;
config_ChainParse
(
p_access
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_access
->
p_cfg
);
config_ChainParse
(
p_access
,
SOUT_CFG_PREFIX
,
ppsz_sout_options
,
p_access
->
p_cfg
);
...
@@ -116,7 +121,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -116,7 +121,6 @@ static int Open( vlc_object_t *p_this )
}
}
bool
append
=
var_GetBool
(
p_access
,
SOUT_CFG_PREFIX
"append"
);
bool
append
=
var_GetBool
(
p_access
,
SOUT_CFG_PREFIX
"append"
);
sync
=
var_GetBool
(
p_access
,
SOUT_CFG_PREFIX
"sync"
);
if
(
!
strcmp
(
p_access
->
psz_path
,
"-"
)
)
if
(
!
strcmp
(
p_access
->
psz_path
,
"-"
)
)
{
{
...
@@ -138,9 +142,9 @@ static int Open( vlc_object_t *p_this )
...
@@ -138,9 +142,9 @@ static int Open( vlc_object_t *p_this )
fd
=
vlc_open
(
psz_tmp
,
O_RDWR
|
O_CREAT
|
O_LARGEFILE
|
fd
=
vlc_open
(
psz_tmp
,
O_RDWR
|
O_CREAT
|
O_LARGEFILE
|
#ifdef O_SYNC
#ifdef O_SYNC
(
sync
?
O_SYNC
:
0
)
|
(
var_GetBool
(
p_access
,
SOUT_CFG_PREFIX
"sync"
)
?
O_SYNC
:
0
)
|
#endif
#endif
(
append
?
0
:
O_TRUNC
),
0666
);
(
append
?
0
:
O_TRUNC
),
0666
);
free
(
psz_tmp
);
free
(
psz_tmp
);
}
}
...
...
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