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
816d3cc4
Commit
816d3cc4
authored
Oct 15, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged vout_DatePicture into vout_DisplayPicture.
parent
96588cbc
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
55 additions
and
99 deletions
+55
-99
include/vlc_vout.h
include/vlc_vout.h
+29
-19
modules/video_filter/clone.c
modules/video_filter/clone.c
+1
-2
modules/video_filter/crop.c
modules/video_filter/crop.c
+1
-1
modules/video_filter/deinterlace.c
modules/video_filter/deinterlace.c
+3
-9
modules/video_filter/logo.c
modules/video_filter/logo.c
+4
-5
modules/video_filter/magnify.c
modules/video_filter/magnify.c
+1
-2
modules/video_filter/opencv_wrapper.c
modules/video_filter/opencv_wrapper.c
+1
-1
modules/video_filter/panoramix.c
modules/video_filter/panoramix.c
+3
-5
modules/video_filter/puzzle.c
modules/video_filter/puzzle.c
+1
-1
modules/video_filter/transform.c
modules/video_filter/transform.c
+1
-1
modules/video_filter/wall.c
modules/video_filter/wall.c
+1
-2
modules/visualization/goom.c
modules/visualization/goom.c
+2
-2
modules/visualization/visual/visual.c
modules/visualization/visual/visual.c
+1
-2
src/input/decoder.c
src/input/decoder.c
+0
-2
src/libvlccore.sym
src/libvlccore.sym
+0
-1
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+6
-44
No files found.
include/vlc_vout.h
View file @
816d3cc4
...
...
@@ -245,34 +245,45 @@ struct picture_heap_t
* Flags used to describe the status of a picture
*****************************************************************************/
/* Picture type */
#define EMPTY_PICTURE 0
/* empty buffer */
#define MEMORY_PICTURE 100
/* heap-allocated buffer */
#define DIRECT_PICTURE 200
/* direct buffer */
/* Picture type
* FIXME are the values meaningfull ? */
enum
{
EMPTY_PICTURE
=
0
,
/* empty buffer */
MEMORY_PICTURE
=
100
,
/* heap-allocated buffer */
DIRECT_PICTURE
=
200
,
/* direct buffer */
};
/* Picture status */
#define FREE_PICTURE 0
/* free and not allocated */
#define RESERVED_PICTURE 1
/* allocated and reserved */
#define RESERVED_DATED_PICTURE 2
/* waiting for DisplayPicture */
#define RESERVED_DISP_PICTURE 3
/* waiting for a DatePicture */
#define READY_PICTURE 4
/* ready for display */
#define DISPLAYED_PICTURE 5
/* been displayed but is linked */
#define DESTROYED_PICTURE 6
/* allocated but no more used */
enum
{
FREE_PICTURE
,
/* free and not allocated */
RESERVED_PICTURE
,
/* allocated and reserved */
READY_PICTURE
,
/* ready for display */
DISPLAYED_PICTURE
,
/* been displayed but is linked */
DESTROYED_PICTURE
,
/* allocated but no more used */
};
/* Quantification type */
#define QTYPE_MPEG1 0
#define QTYPE_MPEG2 1
#define QTYPE_H264 2
enum
{
QTYPE_MPEG1
,
QTYPE_MPEG2
,
QTYPE_H264
,
};
/*****************************************************************************
* Shortcuts to access image components
*****************************************************************************/
/* Plane indices */
#define Y_PLANE 0
#define U_PLANE 1
#define V_PLANE 2
#define A_PLANE 3
enum
{
Y_PLANE
=
0
,
U_PLANE
=
1
,
V_PLANE
=
2
,
A_PLANE
=
3
,
};
/* Shortcuts */
#define Y_PIXELS p[Y_PLANE].p_pixels
...
...
@@ -655,7 +666,6 @@ VLC_EXPORT( picture_t *, vout_CreatePicture, ( vout_thread_t *, bool, bool,
VLC_EXPORT
(
void
,
vout_InitFormat
,
(
video_frame_format_t
*
,
uint32_t
,
int
,
int
,
int
)
);
VLC_EXPORT
(
void
,
vout_DestroyPicture
,
(
vout_thread_t
*
,
picture_t
*
)
);
VLC_EXPORT
(
void
,
vout_DisplayPicture
,
(
vout_thread_t
*
,
picture_t
*
)
);
VLC_EXPORT
(
void
,
vout_DatePicture
,
(
vout_thread_t
*
,
picture_t
*
,
mtime_t
)
);
VLC_EXPORT
(
void
,
vout_LinkPicture
,
(
vout_thread_t
*
,
picture_t
*
)
);
VLC_EXPORT
(
void
,
vout_UnlinkPicture
,
(
vout_thread_t
*
,
picture_t
*
)
);
VLC_EXPORT
(
void
,
vout_PlacePicture
,
(
vout_thread_t
*
,
unsigned
int
,
unsigned
int
,
unsigned
int
*
,
unsigned
int
*
,
unsigned
int
*
,
unsigned
int
*
)
);
...
...
modules/video_filter/clone.c
View file @
816d3cc4
...
...
@@ -337,8 +337,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
],
p_outpic
,
p_pic
->
date
);
p_outpic
->
date
=
p_pic
->
date
;
vout_LinkPicture
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
],
p_outpic
);
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
...
...
modules/video_filter/crop.c
View file @
816d3cc4
...
...
@@ -513,7 +513,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
,
p_pic
->
date
)
;
p_outpic
->
date
=
p_pic
->
date
;
vout_LinkPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
...
...
modules/video_filter/deinterlace.c
View file @
816d3cc4
...
...
@@ -511,7 +511,7 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
pp_outpic
[
0
],
p_pic
->
date
)
;
pp_outpic
[
0
]
->
date
=
p_pic
->
date
;
/* If we are using double rate, get an additional new picture */
if
(
p_vout
->
p_sys
->
b_double_rate
)
...
...
@@ -531,15 +531,9 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
/* 20ms is a bit arbitrary, but it's only for the first image we get */
if
(
!
p_vout
->
p_sys
->
last_date
)
{
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
pp_outpic
[
1
],
p_pic
->
date
+
20000
);
}
pp_outpic
[
1
]
->
date
=
p_pic
->
date
+
20000
;
else
{
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
pp_outpic
[
1
],
(
3
*
p_pic
->
date
-
p_vout
->
p_sys
->
last_date
)
/
2
);
}
pp_outpic
[
1
]
->
date
=
(
3
*
p_pic
->
date
-
p_vout
->
p_sys
->
last_date
)
/
2
;
p_vout
->
p_sys
->
last_date
=
p_pic
->
date
;
}
...
...
modules/video_filter/logo.c
View file @
816d3cc4
...
...
@@ -584,13 +584,12 @@ static void Render( vout_thread_t *p_vout, picture_t *p_inpic )
}
picture_Copy
(
p_outpic
,
p_inpic
);
vout_DatePicture
(
p_sys
->
p_vout
,
p_outpic
,
p_inpic
->
date
);
if
(
p_pic
)
p_sys
->
p_blend
->
pf_video_blend
(
p_sys
->
p_blend
,
p_outpic
,
p_pic
,
p_sys
->
posx
,
p_sys
->
posy
,
p_logo
->
i_alpha
!=
-
1
?
p_logo
->
i_alpha
:
p_logo_list
->
i_alpha
);
p_sys
->
p_blend
->
pf_video_blend
(
p_sys
->
p_blend
,
p_outpic
,
p_pic
,
p_sys
->
posx
,
p_sys
->
posy
,
p_logo
->
i_alpha
!=
-
1
?
p_logo
->
i_alpha
:
p_logo_list
->
i_alpha
);
vout_DisplayPicture
(
p_sys
->
p_vout
,
p_outpic
);
}
...
...
modules/video_filter/magnify.c
View file @
816d3cc4
...
...
@@ -256,8 +256,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_sys
->
p_vout
,
p_outpic
,
p_pic
->
date
);
p_outpic
->
date
=
p_pic
->
date
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
const
bool
b_visible
=
p_sys
->
b_visible
;
...
...
modules/video_filter/opencv_wrapper.c
View file @
816d3cc4
...
...
@@ -589,7 +589,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
msg_Dbg
(
p_vout
,
"Render took %2.4f seconds
\n
"
,
duration
);
ReleaseImages
(
p_vout
);
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
,
p_pic
->
date
)
;
p_outpic
->
date
=
p_pic
->
date
;
vout_UnlinkPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
vout_DisplayPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
...
...
modules/video_filter/panoramix.c
View file @
816d3cc4
...
...
@@ -960,7 +960,7 @@ static void RenderPlanarYUV( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_entry
->
p_vout
,
p_outpic
,
p_pic
->
date
)
;
p_outpic
->
date
=
p_pic
->
date
;
vout_LinkPicture
(
p_entry
->
p_vout
,
p_outpic
);
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
...
...
@@ -1262,8 +1262,7 @@ static void RenderPackedRGB( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
].
p_vout
,
p_outpic
,
p_pic
->
date
);
p_outpic
->
date
=
p_pic
->
date
;
vout_LinkPicture
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
].
p_vout
,
p_outpic
);
...
...
@@ -1598,8 +1597,7 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
].
p_vout
,
p_outpic
,
p_pic
->
date
);
p_outpic
->
date
=
p_pic
->
date
;
vout_LinkPicture
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
].
p_vout
,
p_outpic
);
...
...
modules/video_filter/puzzle.c
View file @
816d3cc4
...
...
@@ -366,7 +366,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
,
p_pic
->
date
)
;
p_outpic
->
date
=
p_pic
->
date
;
for
(
i_plane
=
0
;
i_plane
<
p_outpic
->
i_planes
;
i_plane
++
)
{
...
...
modules/video_filter/transform.c
View file @
816d3cc4
...
...
@@ -324,7 +324,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
,
p_pic
->
date
)
;
p_outpic
->
date
=
p_pic
->
date
;
vout_LinkPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
p_vout
->
p_sys
->
pf_filter
(
p_vout
,
p_pic
,
p_outpic
);
...
...
modules/video_filter/wall.c
View file @
816d3cc4
...
...
@@ -522,9 +522,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
}
p_outpic
->
date
=
p_pic
->
date
;
vout_DatePicture
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
].
p_vout
,
p_outpic
,
p_pic
->
date
);
vout_LinkPicture
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
].
p_vout
,
p_outpic
);
...
...
modules/visualization/goom.c
View file @
816d3cc4
...
...
@@ -370,8 +370,8 @@ static void* Thread( vlc_object_t *p_this )
if
(
p_pic
==
NULL
)
break
;
memcpy
(
p_pic
->
p
[
0
].
p_pixels
,
plane
,
width
.
i_int
*
height
.
i_int
*
4
);
vout_DatePicture
(
p_thread
->
p_vout
,
p_pic
,
aout_DateGet
(
&
i_pts
)
+
GOOM_DELAY
)
;
p_pic
->
date
=
aout_DateGet
(
&
i_pts
)
+
GOOM_DELAY
;
vout_DisplayPicture
(
p_thread
->
p_vout
,
p_pic
);
}
...
...
modules/visualization/visual/visual.c
View file @
816d3cc4
...
...
@@ -370,8 +370,7 @@ static void DoWork( aout_instance_t *p_aout, aout_filter_t *p_filter,
#undef p_effect
}
vout_DatePicture
(
p_sys
->
p_vout
,
p_outpic
,
(
p_in_buf
->
start_date
+
p_in_buf
->
end_date
)
/
2
);
p_outpic
->
date
=
(
p_in_buf
->
start_date
+
p_in_buf
->
end_date
)
/
2
;
vout_DisplayPicture
(
p_sys
->
p_vout
,
p_outpic
);
}
...
...
src/input/decoder.c
View file @
816d3cc4
...
...
@@ -1260,8 +1260,6 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
p_owner
->
i_last_rate
=
i_rate
;
}
vout_DatePicture
(
p_vout
,
p_picture
,
p_picture
->
date
);
vout_DisplayPicture
(
p_vout
,
p_picture
);
}
else
...
...
src/libvlccore.sym
View file @
816d3cc4
...
...
@@ -519,7 +519,6 @@ vout_Close
vout_ControlWindow
__vout_Create
vout_CreatePicture
vout_DatePicture
vout_DestroyPicture
vout_DisplayPicture
vout_EnableFilter
...
...
src/video_output/vout_pictures.c
View file @
816d3cc4
...
...
@@ -43,56 +43,20 @@
* Display a picture
*
* Remove the reservation flag of a picture, which will cause it to be ready
* for display. The picture won't be displayed until vout_DatePicture has been
* called.
* for display.
*/
void
vout_DisplayPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
vlc_mutex_lock
(
&
p_vout
->
picture_lock
);
switch
(
p_pic
->
i_status
)
if
(
p_pic
->
i_status
==
RESERVED_PICTURE
)
{
case
RESERVED_PICTURE
:
p_pic
->
i_status
=
RESERVED_DISP_PICTURE
;
break
;
case
RESERVED_DATED_PICTURE
:
p_pic
->
i_status
=
READY_PICTURE
;
break
;
default:
msg_Err
(
p_vout
,
"picture to display %p has invalid status %d"
,
p_pic
,
p_pic
->
i_status
);
break
;
}
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
}
/**
* Date a picture
*
* Remove the reservation flag of a picture, which will cause it to be ready
* for display. The picture won't be displayed until vout_DisplayPicture has
* been called.
* \param p_vout The vout in question
* \param p_pic The picture to date
* \param date The date to display the picture
*/
void
vout_DatePicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
mtime_t
date
)
{
vlc_mutex_lock
(
&
p_vout
->
picture_lock
);
p_pic
->
date
=
date
;
switch
(
p_pic
->
i_status
)
else
{
case
RESERVED_PICTURE
:
p_pic
->
i_status
=
RESERVED_DATED_PICTURE
;
break
;
case
RESERVED_DISP_PICTURE
:
p_pic
->
i_status
=
READY_PICTURE
;
break
;
default:
msg_Err
(
p_vout
,
"picture to date %p has invalid status %d"
,
msg_Err
(
p_vout
,
"picture to display %p has invalid status %d"
,
p_pic
,
p_pic
->
i_status
);
break
;
}
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
...
...
@@ -252,9 +216,7 @@ void vout_DestroyPicture( vout_thread_t *p_vout, picture_t *p_pic )
#ifndef NDEBUG
/* Check if picture status is valid */
if
(
(
p_pic
->
i_status
!=
RESERVED_PICTURE
)
&&
(
p_pic
->
i_status
!=
RESERVED_DATED_PICTURE
)
&&
(
p_pic
->
i_status
!=
RESERVED_DISP_PICTURE
)
)
if
(
p_pic
->
i_status
!=
RESERVED_PICTURE
)
{
msg_Err
(
p_vout
,
"picture to destroy %p has invalid status %d"
,
p_pic
,
p_pic
->
i_status
);
...
...
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