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
25095c7a
Commit
25095c7a
authored
Oct 08, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Beuheuheuheuhuehueuhuehuehu forgot to add new QuickTime files :*-(((
parent
28c71156
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
578 additions
and
0 deletions
+578
-0
plugins/macosx/intf_macosx_qt.c
plugins/macosx/intf_macosx_qt.c
+159
-0
plugins/macosx/macosx_qt.c
plugins/macosx/macosx_qt.c
+72
-0
plugins/macosx/macosx_qt_common.h
plugins/macosx/macosx_qt_common.h
+79
-0
plugins/macosx/vout_macosx_qt.c
plugins/macosx/vout_macosx_qt.c
+268
-0
No files found.
plugins/macosx/intf_macosx_qt.c
0 → 100644
View file @
25095c7a
/*****************************************************************************
* intf_macosx.c: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2001 VideoLAN
*
* Authors: Colin Delacroix <colin@zoy.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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h>
/* malloc(), free() */
#include <sys/param.h>
/* for MAXPATHLEN */
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "tests.h"
#include "interface.h"
#include "intf_msg.h"
#include "intf_playlist.h"
#include "main.h"
#include "modules.h"
#include "modules_export.h"
#include "macosx_qt_common.h"
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static
int
intf_Probe
(
probedata_t
*
p_data
);
static
int
intf_Open
(
intf_thread_t
*
p_intf
);
static
void
intf_Close
(
intf_thread_t
*
p_intf
);
static
void
intf_Run
(
intf_thread_t
*
p_intf
);
/* OS specific */
#define kMainLoopFrequency (kEventDurationSecond) //45 for good measure
static
pascal
OSStatus
FS_suspend_resume_handler
(
EventHandlerCallRef
ref
,
EventRef
event
,
void
*
dummy
)
;
static
pascal
void
APP_timer_handler
(
EventLoopTimerRef
timer
,
void
*
dummy
)
;
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
void
_M
(
intf_getfunctions
)(
function_list_t
*
p_function_list
)
{
p_function_list
->
pf_probe
=
intf_Probe
;
p_function_list
->
functions
.
intf
.
pf_open
=
intf_Open
;
p_function_list
->
functions
.
intf
.
pf_close
=
intf_Close
;
p_function_list
->
functions
.
intf
.
pf_run
=
intf_Run
;
}
/*****************************************************************************
* intf_Probe: probe the interface and return a score
*****************************************************************************
* This function checks the interface can be run and returns a score to the
* plugin manager so that it can select the best plugin.
*****************************************************************************/
static
int
intf_Probe
(
probedata_t
*
p_data
)
{
if
(
TestMethod
(
INTF_METHOD_VAR
,
"macosx_qt"
)
)
{
return
(
999
);
}
/* Under MacOS X, this plugin always works */
return
(
90
);
}
/*****************************************************************************
* intf_Open: initialize interface
*****************************************************************************/
static
int
intf_Open
(
intf_thread_t
*
p_intf
)
{
p_intf
->
p_sys
=
malloc
(
sizeof
(
intf_sys_t
)
);
if
(
p_intf
->
p_sys
==
NULL
)
{
return
(
1
);
};
return
(
0
);
}
/*****************************************************************************
* intf_Close: destroy interface
*****************************************************************************/
static
void
intf_Close
(
intf_thread_t
*
p_intf
)
{
/* Destroy structure */
free
(
p_intf
->
p_sys
);
}
/*****************************************************************************
* intf_Run: main loop
*****************************************************************************/
static
void
intf_Run
(
intf_thread_t
*
p_intf
)
{
static
EventTypeSpec
suspendResumeEvent
[
2
]
=
{{
kEventClassApplication
,
kEventAppActivated
},
{
kEventClassApplication
,
kEventAppDeactivated
}}
;
BeginFullScreen
(
&
p_intf
->
p_sys
->
before_fullscreen
,
nil
,
0
,
0
,
&
p_intf
->
p_sys
->
p_window
,
0
,
fullScreenAllowEvents
)
;
InstallStandardEventHandler
(
GetApplicationEventTarget
())
;
InstallApplicationEventHandler
(
NewEventHandlerUPP
(
FS_suspend_resume_handler
),
2
,
suspendResumeEvent
,
&
p_intf
->
p_sys
->
p_window
,
NULL
)
;
InstallEventLoopTimer
(
GetMainEventLoop
(),
0
,
kMainLoopFrequency
,
NewEventLoopTimerUPP
(
APP_timer_handler
),
NULL
,
&
p_intf
->
p_sys
->
r_timer
)
;
ShowWindow
(
p_intf
->
p_sys
->
p_window
);
p_intf
->
p_sys
->
b_active
=
1
;
RunApplicationEventLoop
()
;
p_intf
->
p_sys
->
b_active
=
0
;
EndFullScreen
(
p_intf
->
p_sys
->
before_fullscreen
,
nil
)
;
}
static
pascal
void
APP_timer_handler
(
EventLoopTimerRef
timer
,
void
*
dummy
)
{
p_main
->
p_intf
->
pf_manage
(
p_main
->
p_intf
)
;
if
(
p_main
->
p_intf
->
b_die
)
QuitApplicationEventLoop
()
;
}
static
pascal
OSStatus
FS_suspend_resume_handler
(
EventHandlerCallRef
ref
,
EventRef
event
,
void
*
dummy
)
{
switch
(
GetEventKind
(
event
))
{
case
kEventAppActivated
:
ShowWindow
(
p_main
->
p_intf
->
p_sys
->
p_window
)
;
SetPortWindowPort
(
p_main
->
p_intf
->
p_sys
->
p_window
)
;
intf_WarnMsg
(
1
,
"Application is on foreground"
)
;
break
;
case
kEventAppDeactivated
:
HideWindow
(
p_main
->
p_intf
->
p_sys
->
p_window
)
;
intf_WarnMsg
(
1
,
"Application sent to background"
)
;
break
;
}
return
noErr
;
}
plugins/macosx/macosx_qt.c
0 → 100644
View file @
25095c7a
/*****************************************************************************
* macosx.c : MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: macosx_qt.c,v 1.1 2001/10/08 23:10:28 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h>
/* malloc(), free() */
#include "config.h"
#include "common.h"
/* boolean_t, byte_t */
#include "threads.h"
#include "mtime.h"
#include "modules.h"
/*****************************************************************************
* Capabilities defined in the other files.
*****************************************************************************/
void
_M
(
aout_getfunctions
)(
function_list_t
*
p_function_list
);
void
_M
(
vout_getfunctions
)(
function_list_t
*
p_function_list
);
void
_M
(
intf_getfunctions
)(
function_list_t
*
p_function_list
);
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW
(
"Configuration for MacOS X QuickTime module"
)
ADD_COMMENT
(
"Ha, ha -- nothing to configure yet"
)
MODULE_CONFIG_STOP
MODULE_INIT_START
p_module
->
i_capabilities
=
MODULE_CAPABILITY_NULL
|
MODULE_CAPABILITY_VOUT
|
MODULE_CAPABILITY_AOUT
|
MODULE_CAPABILITY_INTF
;
p_module
->
psz_longname
=
"MacOS X QuickTime output"
;
MODULE_INIT_STOP
MODULE_ACTIVATE_START
_M
(
vout_getfunctions
)(
&
p_module
->
p_functions
->
vout
);
_M
(
aout_getfunctions
)(
&
p_module
->
p_functions
->
aout
);
_M
(
intf_getfunctions
)(
&
p_module
->
p_functions
->
intf
);
MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
plugins/macosx/macosx_qt_common.h
0 → 100644
View file @
25095c7a
/*****************************************************************************
* macosx.c : MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: macosx_qt_common.h,v 1.1 2001/10/08 23:10:28 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Constants & more
*****************************************************************************/
#ifndef __CARBONPREFIX__
#define __CARBONPREFIX__
// Needed for carbonization
#define TARGET_API_MAC_CARBON 1
// For the pascal to C or C to pascal string conversions in carbon
#define OLDP2C 1
#endif
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
#include <CoreServices/CoreServices.h>
#include <QuickTime/QuickTime.h>
#include <ApplicationServices/ApplicationServices.h>
/*****************************************************************************
* Type declarations that unfortunately need to be known to both
* ...
* Kind of a hack due to the fact that on Mac OS, there is little difference
* between the interface and the video output, and hence little separation
* between those elements.
*****************************************************************************/
extern
main_t
*
p_main
;
/*****************************************************************************
* vout_sys_t: MacOS X video output method descriptor
*****************************************************************************
* This structure is part of the video output thread descriptor.
* It describes the MacOS X specific properties of an output thread.
*****************************************************************************/
typedef
struct
vout_sys_s
{
ImageDescriptionHandle
h_img_descr
;
ImageSequence
i_seq
;
unsigned
int
i_img_size
;
unsigned
char
*
p_img
;
}
vout_sys_t
;
/*****************************************************************************
* intf_sys_t: description and status of the interface
*****************************************************************************/
typedef
struct
intf_sys_s
{
Ptr
before_fullscreen
;
WindowRef
p_window
;
EventLoopTimerRef
r_timer
;
unsigned
int
b_active
;
}
intf_sys_t
;
plugins/macosx/vout_macosx_qt.c
0 → 100644
View file @
25095c7a
This diff is collapsed.
Click to expand it.
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