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
a2d6f90b
Commit
a2d6f90b
authored
Jan 08, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added libvlc_video_set/get_crop_geometry() api
parent
4ce5cc27
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
20 deletions
+63
-20
include/vlc/libvlc.h
include/vlc/libvlc.h
+32
-20
src/control/video.c
src/control/video.c
+31
-0
No files found.
include/vlc/libvlc.h
View file @
a2d6f90b
...
...
@@ -290,8 +290,24 @@ int libvlc_input_get_state ( libvlc_input_t *, libvlc_exception_t *
* @{
*/
/**
* Downcast to this general type as placeholder for a platform specific one, such as:
* Drawable on X11,
* CGrafPort on MacOSX,
* HWND on win32
*/
typedef
int
libvlc_drawable_t
;
/**
* Rectangle type for video geometry
*/
typedef
struct
{
int
top
,
left
;
int
bottom
,
right
;
}
libvlc_rectangle_t
;
/**
* Does this input have a video output ?
* \param p_input the input
...
...
@@ -355,6 +371,22 @@ char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
*/
void
libvlc_video_set_aspect_ratio
(
libvlc_input_t
*
,
char
*
,
libvlc_exception_t
*
);
/**
* Get current crop filter geometry
* \param p_input the input
* \param p_exception an initialized exception
* \return the crop filter geometry
*/
char
*
libvlc_video_get_crop_geometry
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
/**
* Set new crop filter geometry
* \param p_input the input
* \param psz_geometry new crop filter geometry
* \param p_exception an initialized exception
*/
void
libvlc_video_set_crop_geometry
(
libvlc_input_t
*
,
char
*
,
libvlc_exception_t
*
);
/**
* Take a snapshot of the current video window
* \param p_input the input
...
...
@@ -375,13 +407,6 @@ int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *);
*/
void
libvlc_video_resize
(
libvlc_input_t
*
,
int
,
int
,
libvlc_exception_t
*
);
/**
* Downcast to this general type as placeholder for a platform specific one, such as:
* Drawable on X11,
* CGrafPort on MacOSX,
* HWND on win32
*/
/**
* change the parent for the current the video output
* \param p_instance libvlc instance
...
...
@@ -410,19 +435,6 @@ void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exc
*/
void
libvlc_video_set_size
(
libvlc_instance_t
*
,
int
,
int
,
libvlc_exception_t
*
);
/**
* Downcast to this general type as placeholder for a platform specific one, such as:
* Drawable on X11,
* CGrafPort on MacOSX,
* HWND on win32
*/
typedef
struct
{
int
top
,
left
;
int
bottom
,
right
;
}
libvlc_rectangle_t
;
/**
* Set the default video output viewport for a windowless video output (MacOS X only)
* this settings will be used as default for all video outputs
...
...
src/control/video.c
View file @
a2d6f90b
...
...
@@ -357,6 +357,37 @@ void libvlc_video_set_aspect_ratio( libvlc_input_t *p_input,
vlc_object_release
(
p_vout
);
}
char
*
libvlc_video_get_crop_geometry
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
char
*
psz_geometry
=
0
;
vout_thread_t
*
p_vout
=
GetVout
(
p_input
,
p_e
);
if
(
!
p_vout
)
return
0
;
psz_geometry
=
var_GetString
(
p_vout
,
"crop"
);
vlc_object_release
(
p_vout
);
return
psz_geometry
;
}
void
libvlc_video_set_crop_geometry
(
libvlc_input_t
*
p_input
,
char
*
psz_geometry
,
libvlc_exception_t
*
p_e
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_input
,
p_e
);
int
i_ret
=
-
1
;
if
(
!
p_vout
)
return
;
i_ret
=
var_SetString
(
p_vout
,
"crop"
,
psz_geometry
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while setting crop geometry"
);
vlc_object_release
(
p_vout
);
}
int
libvlc_video_destroy
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
...
...
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