Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
18ed9eea
Commit
18ed9eea
authored
Apr 26, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB: develop picture core initialization
parent
4fbb72f5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
13 deletions
+19
-13
modules/video_output/xcb/common.c
modules/video_output/xcb/common.c
+3
-7
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+7
-2
modules/video_output/xcb/xcb_vlc.h
modules/video_output/xcb/xcb_vlc.h
+2
-2
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+7
-2
No files found.
modules/video_output/xcb/common.c
View file @
18ed9eea
...
@@ -164,14 +164,10 @@ int GetWindowSize (struct vout_window_t *wnd, xcb_connection_t *conn,
...
@@ -164,14 +164,10 @@ int GetWindowSize (struct vout_window_t *wnd, xcb_connection_t *conn,
* format. If a XCB connection pointer is supplied, the segment is attached to
* format. If a XCB connection pointer is supplied, the segment is attached to
* the X server (MIT-SHM extension).
* the X server (MIT-SHM extension).
*/
*/
int
PictureInit
(
vout_thread_t
*
vout
,
picture_t
*
pic
,
xcb_connection_t
*
conn
)
int
PictureAlloc
(
vout_thread_t
*
vout
,
picture_t
*
pic
,
size_t
size
,
xcb_connection_t
*
conn
)
{
{
assert
(
pic
->
i_status
==
FREE_PICTURE
);
assert
(
pic
->
i_status
==
FREE_PICTURE
);
vout_InitPicture
(
vout
,
pic
,
vout
->
output
.
i_chroma
,
vout
->
output
.
i_width
,
vout
->
output
.
i_height
,
vout
->
output
.
i_aspect
);
const
size_t
size
=
pic
->
p
->
i_pitch
*
pic
->
p
->
i_lines
;
/* Allocate shared memory segment */
/* Allocate shared memory segment */
int
id
=
shmget
(
IPC_PRIVATE
,
size
,
IPC_CREAT
|
0700
);
int
id
=
shmget
(
IPC_PRIVATE
,
size
,
IPC_CREAT
|
0700
);
...
@@ -219,7 +215,7 @@ int PictureInit (vout_thread_t *vout, picture_t *pic, xcb_connection_t *conn)
...
@@ -219,7 +215,7 @@ int PictureInit (vout_thread_t *vout, picture_t *pic, xcb_connection_t *conn)
/**
/**
* Release picture private data: detach the shared memory segment.
* Release picture private data: detach the shared memory segment.
*/
*/
void
Picture
Deinit
(
picture_t
*
pic
,
xcb_connection_t
*
conn
)
void
Picture
Free
(
picture_t
*
pic
,
xcb_connection_t
*
conn
)
{
{
xcb_shm_seg_t
segment
=
(
uintptr_t
)
pic
->
p_sys
;
xcb_shm_seg_t
segment
=
(
uintptr_t
)
pic
->
p_sys
;
...
...
modules/video_output/xcb/x11.c
View file @
18ed9eea
...
@@ -343,7 +343,12 @@ static int Init (vout_thread_t *vout)
...
@@ -343,7 +343,12 @@ static int Init (vout_thread_t *vout)
break
;
break
;
if
(
pic
->
i_status
!=
FREE_PICTURE
)
if
(
pic
->
i_status
!=
FREE_PICTURE
)
continue
;
continue
;
if
(
PictureInit
(
vout
,
pic
,
p_sys
->
shm
?
p_sys
->
conn
:
NULL
))
vout_InitPicture
(
vout
,
pic
,
vout
->
output
.
i_chroma
,
vout
->
output
.
i_width
,
vout
->
output
.
i_height
,
vout
->
output
.
i_aspect
);
if
(
PictureAlloc
(
vout
,
pic
,
pic
->
p
->
i_pitch
*
pic
->
p
->
i_lines
,
p_sys
->
shm
?
p_sys
->
conn
:
NULL
))
break
;
break
;
PP_OUTPUTPICTURE
[
I_OUTPUTPICTURES
++
]
=
pic
;
PP_OUTPUTPICTURE
[
I_OUTPUTPICTURES
++
]
=
pic
;
}
}
...
@@ -357,7 +362,7 @@ static int Init (vout_thread_t *vout)
...
@@ -357,7 +362,7 @@ static int Init (vout_thread_t *vout)
static
void
Deinit
(
vout_thread_t
*
vout
)
static
void
Deinit
(
vout_thread_t
*
vout
)
{
{
for
(
int
i
=
0
;
i
<
I_OUTPUTPICTURES
;
i
++
)
for
(
int
i
=
0
;
i
<
I_OUTPUTPICTURES
;
i
++
)
Picture
Deinit
(
PP_OUTPUTPICTURE
[
i
],
vout
->
p_sys
->
conn
);
Picture
Free
(
PP_OUTPUTPICTURE
[
i
],
vout
->
p_sys
->
conn
);
}
}
/**
/**
...
...
modules/video_output/xcb/xcb_vlc.h
View file @
18ed9eea
...
@@ -49,5 +49,5 @@ struct vout_window_t *GetWindow (vout_thread_t *obj,
...
@@ -49,5 +49,5 @@ struct vout_window_t *GetWindow (vout_thread_t *obj,
bool
*
restrict
pshm
);
bool
*
restrict
pshm
);
int
GetWindowSize
(
struct
vout_window_t
*
wnd
,
xcb_connection_t
*
conn
,
int
GetWindowSize
(
struct
vout_window_t
*
wnd
,
xcb_connection_t
*
conn
,
unsigned
*
restrict
width
,
unsigned
*
restrict
height
);
unsigned
*
restrict
width
,
unsigned
*
restrict
height
);
int
Picture
Init
(
vout_thread_t
*
vout
,
picture_t
*
pic
,
xcb_connection_t
*
conn
);
int
Picture
Alloc
(
vout_thread_t
*
,
picture_t
*
,
size_t
,
xcb_connection_t
*
);
void
Picture
Deinit
(
picture_t
*
pic
,
xcb_connection_t
*
conn
);
void
Picture
Free
(
picture_t
*
pic
,
xcb_connection_t
*
conn
);
modules/video_output/xcb/xvideo.c
View file @
18ed9eea
...
@@ -448,7 +448,12 @@ static int Init (vout_thread_t *vout)
...
@@ -448,7 +448,12 @@ static int Init (vout_thread_t *vout)
break
;
break
;
if
(
pic
->
i_status
!=
FREE_PICTURE
)
if
(
pic
->
i_status
!=
FREE_PICTURE
)
continue
;
continue
;
if
(
PictureInit
(
vout
,
pic
,
p_sys
->
shm
?
p_sys
->
conn
:
NULL
))
vout_InitPicture
(
vout
,
pic
,
vout
->
output
.
i_chroma
,
vout
->
output
.
i_width
,
vout
->
output
.
i_height
,
vout
->
output
.
i_aspect
);
if
(
PictureAlloc
(
vout
,
pic
,
pic
->
p
->
i_pitch
*
pic
->
p
->
i_lines
,
p_sys
->
shm
?
p_sys
->
conn
:
NULL
))
break
;
break
;
PP_OUTPUTPICTURE
[
I_OUTPUTPICTURES
++
]
=
pic
;
PP_OUTPUTPICTURE
[
I_OUTPUTPICTURES
++
]
=
pic
;
}
}
...
@@ -464,7 +469,7 @@ static void Deinit (vout_thread_t *vout)
...
@@ -464,7 +469,7 @@ static void Deinit (vout_thread_t *vout)
vout_sys_t
*
p_sys
=
vout
->
p_sys
;
vout_sys_t
*
p_sys
=
vout
->
p_sys
;
for
(
int
i
=
0
;
i
<
I_OUTPUTPICTURES
;
i
++
)
for
(
int
i
=
0
;
i
<
I_OUTPUTPICTURES
;
i
++
)
Picture
Deinit
(
PP_OUTPUTPICTURE
[
i
],
p_sys
->
conn
);
Picture
Free
(
PP_OUTPUTPICTURE
[
i
],
p_sys
->
conn
);
}
}
/**
/**
...
...
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