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
add20a10
Commit
add20a10
authored
Aug 24, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/eyetv: simplify header and implementation
parent
746edb20
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
25 deletions
+13
-25
modules/gui/macosx/eyetv.h
modules/gui/macosx/eyetv.h
+4
-4
modules/gui/macosx/eyetv.m
modules/gui/macosx/eyetv.m
+5
-17
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+4
-4
No files found.
modules/gui/macosx/eyetv.h
View file @
add20a10
...
@@ -29,13 +29,13 @@
...
@@ -29,13 +29,13 @@
BOOL
b_eyeTVactive
;
BOOL
b_eyeTVactive
;
BOOL
b_deviceConnected
;
BOOL
b_deviceConnected
;
}
}
@property
(
readonly
)
BOOL
eyeTVRunning
;
@property
(
readonly
)
BOOL
deviceConnected
;
@property
(
readwrite
)
int
channel
;
-
(
void
)
globalNotificationReceived
:
(
NSNotification
*
)
theNotification
;
-
(
void
)
globalNotificationReceived
:
(
NSNotification
*
)
theNotification
;
-
(
BOOL
)
isEyeTVrunning
;
-
(
BOOL
)
isDeviceConnected
;
-
(
void
)
launchEyeTV
;
-
(
void
)
launchEyeTV
;
-
(
int
)
currentChannel
;
-
(
int
)
switchChannelUp
:(
BOOL
)
b_yesOrNo
;
-
(
int
)
switchChannelUp
:(
BOOL
)
b_yesOrNo
;
-
(
void
)
selectChannel
:(
int
)
theChannelNum
;
-
(
NSEnumerator
*
)
allChannels
;
-
(
NSEnumerator
*
)
allChannels
;
@end
@end
modules/gui/macosx/eyetv.m
View file @
add20a10
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
@implementation
VLCEyeTVController
@implementation
VLCEyeTVController
@synthesize
eyeTVRunning
=
b_eyeTVactive
,
deviceConnected
=
b_deviceConnected
;
static
VLCEyeTVController
*
_o_sharedInstance
=
nil
;
static
VLCEyeTVController
*
_o_sharedInstance
=
nil
;
+
(
VLCEyeTVController
*
)
sharedInstance
+
(
VLCEyeTVController
*
)
sharedInstance
...
@@ -70,17 +72,6 @@ static VLCEyeTVController *_o_sharedInstance = nil;
...
@@ -70,17 +72,6 @@ static VLCEyeTVController *_o_sharedInstance = nil;
b_eyeTVactive
=
NO
;
b_eyeTVactive
=
NO
;
}
}
-
(
BOOL
)
isEyeTVrunning
{
return
b_eyeTVactive
;
}
-
(
BOOL
)
isDeviceConnected
{
return
b_deviceConnected
;
}
-
(
void
)
launchEyeTV
-
(
void
)
launchEyeTV
{
{
NSAppleScript
*
script
=
[[
NSAppleScript
alloc
]
initWithSource
:
NSAppleScript
*
script
=
[[
NSAppleScript
alloc
]
initWithSource
:
...
@@ -97,7 +88,7 @@ static VLCEyeTVController *_o_sharedInstance = nil;
...
@@ -97,7 +88,7 @@ static VLCEyeTVController *_o_sharedInstance = nil;
[
script
release
];
[
script
release
];
}
}
-
(
int
)
c
urrentC
hannel
-
(
int
)
channel
{
{
int
currentChannel
=
0
;
int
currentChannel
=
0
;
NSAppleScript
*
script
=
[[
NSAppleScript
alloc
]
initWithSource
:
NSAppleScript
*
script
=
[[
NSAppleScript
alloc
]
initWithSource
:
...
@@ -108,11 +99,8 @@ static VLCEyeTVController *_o_sharedInstance = nil;
...
@@ -108,11 +99,8 @@ static VLCEyeTVController *_o_sharedInstance = nil;
{
{
NSString
*
errorString
=
[
errorDict
objectForKey
:
NSAppleScriptErrorMessage
];
NSString
*
errorString
=
[
errorDict
objectForKey
:
NSAppleScriptErrorMessage
];
NSLog
(
@"EyeTV channel inventory failed with error status '%@'"
,
errorString
);
NSLog
(
@"EyeTV channel inventory failed with error status '%@'"
,
errorString
);
}
}
else
else
{
currentChannel
=
(
int
)[
descriptor
int32Value
];
currentChannel
=
(
int
)[
descriptor
int32Value
];
}
[
script
release
];
[
script
release
];
return
currentChannel
;
return
currentChannel
;
}
}
...
@@ -157,7 +145,7 @@ static VLCEyeTVController *_o_sharedInstance = nil;
...
@@ -157,7 +145,7 @@ static VLCEyeTVController *_o_sharedInstance = nil;
return
currentChannel
;
return
currentChannel
;
}
}
-
(
void
)
se
lec
tChannel
:
(
int
)
theChannelNum
-
(
void
)
setChannel
:
(
int
)
theChannelNum
{
{
NSAppleScript
*
script
;
NSAppleScript
*
script
;
switch
(
theChannelNum
)
switch
(
theChannelNum
)
...
...
modules/gui/macosx/open.m
View file @
add20a10
...
@@ -1346,9 +1346,9 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1346,9 +1346,9 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
{
if
(
[[[
o_capture_mode_pop
selectedItem
]
title
]
isEqualToString
:
@"EyeTV"
]
)
if
(
[[[
o_capture_mode_pop
selectedItem
]
title
]
isEqualToString
:
@"EyeTV"
]
)
{
{
if
(
[[[
VLCMain
sharedInstance
]
eyeTVController
]
isEyeTVr
unning
]
==
YES
)
if
(
[[[
VLCMain
sharedInstance
]
eyeTVController
]
eyeTVR
unning
]
==
YES
)
{
{
if
(
[[[
VLCMain
sharedInstance
]
eyeTVController
]
isD
eviceConnected
]
==
YES
)
if
(
[[[
VLCMain
sharedInstance
]
eyeTVController
]
d
eviceConnected
]
==
YES
)
{
{
[
self
showCaptureView
:
o_eyetv_running_view
];
[
self
showCaptureView
:
o_eyetv_running_view
];
[
self
setupChannelInfo
];
[
self
setupChannelInfo
];
...
@@ -1458,7 +1458,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1458,7 +1458,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
else
if
(
sender
==
o_eyetv_channels_pop
)
else
if
(
sender
==
o_eyetv_channels_pop
)
{
{
int
chanNum
=
[[
sender
selectedItem
]
tag
];
int
chanNum
=
[[
sender
selectedItem
]
tag
];
[[[
VLCMain
sharedInstance
]
eyeTVController
]
se
lec
tChannel
:
chanNum
];
[[[
VLCMain
sharedInstance
]
eyeTVController
]
setChannel
:
chanNum
];
[
self
setMRL
:
[
NSString
stringWithFormat
:
@"eyetv:// :eyetv-channel=%d"
,
chanNum
]];
[
self
setMRL
:
[
NSString
stringWithFormat
:
@"eyetv:// :eyetv-channel=%d"
,
chanNum
]];
}
}
else
else
...
@@ -1536,7 +1536,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1536,7 +1536,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
keyEquivalent:
@""
]
setTag
:
++
x
];
keyEquivalent:
@""
]
setTag
:
++
x
];
}
}
/* make Tuner the default */
/* make Tuner the default */
[
o_eyetv_channels_pop
selectItemWithTag
:[[[
VLCMain
sharedInstance
]
eyeTVController
]
c
urrentC
hannel
]];
[
o_eyetv_channels_pop
selectItemWithTag
:[[[
VLCMain
sharedInstance
]
eyeTVController
]
channel
]];
}
}
/* clean up GUI */
/* clean up GUI */
...
...
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