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
c65b4ea9
Commit
c65b4ea9
authored
May 20, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Almost) pread() for Win32
parent
1ba9301e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
src/misc/block.c
src/misc/block.c
+19
-0
No files found.
src/misc/block.c
View file @
c65b4ea9
...
@@ -228,6 +228,25 @@ block_t *block_mmap_Alloc (void *addr, size_t length)
...
@@ -228,6 +228,25 @@ block_t *block_mmap_Alloc (void *addr, size_t length)
}
}
#endif
#endif
#ifdef WIN32
static
ssize_t
pread
(
int
fd
,
void
*
buf
,
size_t
count
,
off_t
offset
)
{
HANDLE
handle
=
(
HANDLE
)(
intptr_t
)
_get_osfhandle
(
fd
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
return
-
1
;
OVERLAPPED
olap
=
{
.
Offset
=
offset
,
.
OffsetHigh
=
(
offset
>>
32
),
};
DWORD
written
;
/* This braindead API will override the file pointer even if we specify
* an explicit read offset... So do not expect this to mix well with
* regular read() calls. */
if
(
ReadFile
(
handle
,
buf
,
count
,
&
written
,
&
olap
))
return
written
;
return
-
1
;
}
#endif
/*****************************************************************************
/*****************************************************************************
* block_fifo_t management
* block_fifo_t management
*****************************************************************************/
*****************************************************************************/
...
...
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