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
df2362a8
Commit
df2362a8
authored
Jan 06, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework: Fix my previous commit.
parent
8dcc9704
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
100 deletions
+0
-100
extras/MacOSX/Framework/Headers/Internal/VLCVideoCommon.h
extras/MacOSX/Framework/Headers/Internal/VLCVideoCommon.h
+0
-37
extras/MacOSX/Framework/Sources/VLCVideoCommon.m
extras/MacOSX/Framework/Sources/VLCVideoCommon.m
+0
-63
No files found.
extras/MacOSX/Framework/Headers/Internal/VLCVideoCommon.h
View file @
df2362a8
...
...
@@ -35,40 +35,3 @@
+
(
id
)
layoutManager
;
@end
/*****************************************************************************
* VLCVideoCommon.h: VLC.framework VLCVideoCommon header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 the VideoLAN team
* $Id: VLCVideoCommon.h 23915 2007-12-28 22:20:19Z pdherbemont $
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.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.
*****************************************************************************/
#import <QuartzCore/QuartzCore.h>
@interface
VLCVideoLayoutManager
:
NSObject
{
CGSize
originalVideoSize
;
BOOL
fillScreenEntirely
;
}
@property
BOOL
fillScreenEntirely
;
@property
CGSize
originalVideoSize
;
+
(
id
)
layoutManager
;
@end
extras/MacOSX/Framework/Sources/VLCVideoCommon.m
View file @
df2362a8
...
...
@@ -61,66 +61,3 @@
}
}
@end
/*****************************************************************************
* VLCVideoCommon.m: VLC.framework VLCVideoCommon implementation
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 the VideoLAN team
* $Id: VLCVideoCommon.m 23915 2007-12-28 22:20:19Z pdherbemont $
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.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.
*****************************************************************************/
#import "VLCVideoCommon.h"
/******************************************************************************
* Implementation VLCVideoLayoutManager
*
* Manage the size of the video layer
*/
@implementation
VLCVideoLayoutManager
@synthesize
fillScreenEntirely
;
@synthesize
originalVideoSize
;
+
(
id
)
layoutManager
{
return
[[[
self
alloc
]
init
]
autorelease
];
}
-
(
void
)
layoutSublayersOfLayer
:(
CALayer
*
)
layer
{
/* After having done everything normally resize the vlcopengllayer */
if
(
[[
layer
sublayers
]
count
]
>
0
&&
[[[[
layer
sublayers
]
objectAtIndex
:
0
]
name
]
isEqualToString
:
@"vlcopengllayer"
])
{
CALayer
*
videolayer
=
[[
layer
sublayers
]
objectAtIndex
:
0
];
CGRect
bounds
=
layer
.
bounds
;
CGRect
videoRect
=
bounds
;
CGFloat
xRatio
=
CGRectGetWidth
(
bounds
)
/
originalVideoSize
.
width
;
CGFloat
yRatio
=
CGRectGetHeight
(
bounds
)
/
originalVideoSize
.
height
;
CGFloat
ratio
=
fillScreenEntirely
?
MAX
(
xRatio
,
yRatio
)
:
MIN
(
xRatio
,
yRatio
);
videoRect
.
size
.
width
=
ratio
*
originalVideoSize
.
width
;
videoRect
.
size
.
height
=
ratio
*
originalVideoSize
.
height
;
videoRect
.
origin
.
x
+=
(
CGRectGetWidth
(
bounds
)
-
CGRectGetWidth
(
videoRect
))
/
2
.
0
;
videoRect
.
origin
.
y
+=
(
CGRectGetHeight
(
bounds
)
-
CGRectGetHeight
(
videoRect
))
/
2
.
0
;
videolayer
.
frame
=
videoRect
;
}
}
@end
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