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
82676b9c
Commit
82676b9c
authored
Oct 22, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged vout_pictures.c with video_output.c.
parent
1ccc38ba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
111 deletions
+70
-111
src/Makefile.am
src/Makefile.am
+0
-1
src/video_output/video_output.c
src/video_output/video_output.c
+70
-0
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+0
-110
No files found.
src/Makefile.am
View file @
82676b9c
...
...
@@ -384,7 +384,6 @@ SOURCES_libvlc_common = \
video_output/postprocessing.c
\
video_output/postprocessing.h
\
video_output/video_output.c
\
video_output/vout_pictures.c
\
video_output/video_text.c
\
video_output/video_epg.c
\
video_output/video_widgets.c
\
...
...
src/video_output/video_output.c
View file @
82676b9c
...
...
@@ -368,6 +368,76 @@ void vout_FlushSubpictureChannel( vout_thread_t *vout, int channel )
channel
);
}
/**
* It retreives a picture from the vout or NULL if no pictures are
* available yet.
*
* You MUST call vout_PutPicture or vout_ReleasePicture on it.
*
* You may use vout_HoldPicture(paired with vout_ReleasePicture) to keep a
* read-only reference.
*/
picture_t
*
vout_GetPicture
(
vout_thread_t
*
vout
)
{
/* Get lock */
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
picture_t
*
picture
=
picture_pool_Get
(
vout
->
p
->
decoder_pool
);
if
(
picture
)
{
picture_Reset
(
picture
);
picture
->
p_next
=
NULL
;
}
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
return
picture
;
}
/**
* It gives to the vout a picture to be displayed.
*
* The given picture MUST comes from vout_GetPicture.
*
* Becareful, after vout_PutPicture is called, picture_t::p_next cannot be
* read/used.
*/
void
vout_PutPicture
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
{
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
picture
->
p_next
=
NULL
;
picture_fifo_Push
(
vout
->
p
->
decoder_fifo
,
picture
);
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
vout_control_Wake
(
&
vout
->
p
->
control
);
}
/**
* It releases a picture retreived by vout_GetPicture.
*/
void
vout_ReleasePicture
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
{
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
picture_Release
(
picture
);
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
vout_control_Wake
(
&
vout
->
p
->
control
);
}
/**
* It increment the reference counter of a picture retreived by
* vout_GetPicture.
*/
void
vout_HoldPicture
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
{
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
picture_Hold
(
picture
);
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
}
/* vout_Control* are usable by anyone at anytime */
void
vout_ControlChangeFullscreen
(
vout_thread_t
*
vout
,
bool
fullscreen
)
{
...
...
src/video_output/vout_pictures.c
deleted
100644 → 0
View file @
1ccc38ba
/*****************************************************************************
* vout_pictures.c :
*****************************************************************************
* Copyright (C) 2009-2010 Laurent Aimar
* $Id$
*
* Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h>
#include <vlc_common.h>
#include <libvlc.h>
#include <vlc_vout.h>
#include <vlc_picture_fifo.h>
#include <vlc_picture_pool.h>
#include "vout_internal.h"
/**
* It retreives a picture from the vout or NULL if no pictures are
* available yet.
*
* You MUST call vout_PutPicture or vout_ReleasePicture on it.
*
* You may use vout_HoldPicture(paired with vout_ReleasePicture) to keep a
* read-only reference.
*/
picture_t
*
vout_GetPicture
(
vout_thread_t
*
p_vout
)
{
/* Get lock */
vlc_mutex_lock
(
&
p_vout
->
p
->
picture_lock
);
picture_t
*
p_pic
=
picture_pool_Get
(
p_vout
->
p
->
decoder_pool
);
if
(
p_pic
)
{
picture_Reset
(
p_pic
);
p_pic
->
p_next
=
NULL
;
}
vlc_mutex_unlock
(
&
p_vout
->
p
->
picture_lock
);
return
p_pic
;
}
/**
* It gives to the vout a picture to be displayed.
*
* The given picture MUST comes from vout_GetPicture.
*
* Becareful, after vout_PutPicture is called, picture_t::p_next cannot be
* read/used.
*/
void
vout_PutPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
vlc_mutex_lock
(
&
p_vout
->
p
->
picture_lock
);
p_pic
->
p_next
=
NULL
;
picture_fifo_Push
(
p_vout
->
p
->
decoder_fifo
,
p_pic
);
vlc_mutex_unlock
(
&
p_vout
->
p
->
picture_lock
);
vout_control_Wake
(
&
p_vout
->
p
->
control
);
}
/**
* It releases a picture retreived by vout_GetPicture.
*/
void
vout_ReleasePicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
vlc_mutex_lock
(
&
p_vout
->
p
->
picture_lock
);
picture_Release
(
p_pic
);
vlc_mutex_unlock
(
&
p_vout
->
p
->
picture_lock
);
vout_control_Wake
(
&
p_vout
->
p
->
control
);
}
/**
* It increment the reference counter of a picture retreived by
* vout_GetPicture.
*/
void
vout_HoldPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
vlc_mutex_lock
(
&
p_vout
->
p
->
picture_lock
);
picture_Hold
(
p_pic
);
vlc_mutex_unlock
(
&
p_vout
->
p
->
picture_lock
);
}
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