Commit 36868ee9 authored by Damien Fouilleul's avatar Damien Fouilleul

eyetv: latest version of EyeTV capture plugin, needs lotta testing

parent 5266ede1
This diff is collapsed.
......@@ -22,9 +22,6 @@
*****************************************************************************/
#include "EyeTVPluginDefs.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <CoreFoundation/CoreFoundation.h>
void VLCEyeTVPluginGlobalNotificationReceived( CFNotificationCenterRef center,
......
......@@ -122,7 +122,6 @@
mainGroup = 089C166AFE841209C02AAC07 /* VLC EyeTV Plug-In */;
projectDirPath = "";
projectRoot = "";
shouldCheckCompatibility = 1;
targets = (
8D57630D048677EA00EA77CD /* VLC EyeTV Plug-In */,
);
......
# Automake forgets to add a proper tag to libtool with Objective-C files.
# Moreocer Libtool should default tag to CC when none is specified but
# obviously does not. Here is a fix for that.
LIBTOOL=@LIBTOOL@ --tag=CC
SOURCES_access_file = file.c
SOURCES_access_directory = directory.c
SOURCES_access_dv = dv.c
......@@ -7,7 +12,7 @@ SOURCES_access_http = http.c
SOURCES_access_ftp = ftp.c
SOURCES_access_smb = smb.c
SOURCES_access_gnomevfs = gnomevfs.c
SOURCES_access_eyetv = eyetv.c
SOURCES_access_eyetv = eyetv.m
SOURCES_dvdnav = dvdnav.c
SOURCES_dvdread = dvdread.c
SOURCES_dc1394 = dc1394.c
......
......@@ -132,8 +132,6 @@ static VLCEyeTVController *_o_sharedInstance = nil;
script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n"
"channel_up\n"
"volume_change level 0\n"
"tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
"get current channel\n"
"end tell"];
msg_Dbg( VLCIntf, "telling eyetv to switch 1 channel up" );
......@@ -143,8 +141,6 @@ static VLCEyeTVController *_o_sharedInstance = nil;
script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n"
"channel_down\n"
"volume_change level 0\n"
"tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
"get current channel\n"
"end tell"];
msg_Dbg( VLCIntf, "telling eyetv to switch 1 channel down" );
......@@ -172,25 +168,21 @@ static VLCEyeTVController *_o_sharedInstance = nil;
case -2: // Composite
script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n"
" input_change input source composite video input"
" volume_change level 0\n"
" tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
" input_change input source composite video input\n"
" show player_window\n"
"end tell"];
break;
case -1: // S-Video
script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n"
" input_change input source S video input"
" volume_change level 0\n"
" tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
" input_change input source S video input\n"
" show player_window\n"
"end tell"];
break;
case 0: // Tuner
case 0: // Last
script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n"
" input_change input source tuner input"
" volume_change level 0\n"
" tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
" show player_window\n"
"end tell"];
break;
default:
......@@ -198,9 +190,8 @@ static VLCEyeTVController *_o_sharedInstance = nil;
{
NSString *channel_change = [NSString stringWithFormat:
@"tell application \"EyeTV\"\n"
@" channel_change channel number %d\n"
" volume_change level 0\n"
" tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
" channel_change channel number %d\n"
" show player_window\n"
"end tell", theChannelNum];
script = [[NSAppleScript alloc] initWithSource:channel_change];
}
......
......@@ -83,7 +83,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
p_list = [NSMutableArray arrayWithCapacity: 1];
next_media = IOIteratorNext( media_iterator );
if( next_media != nil )
if( next_media )
{
char psz_buf[0x32];
size_t dev_path_length;
......@@ -116,7 +116,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
IOObjectRelease( next_media );
} while( ( next_media = IOIteratorNext( media_iterator ) ) != nil );
} while( ( next_media = IOIteratorNext( media_iterator ) ) );
}
IOObjectRelease( media_iterator );
......@@ -237,12 +237,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* wake up with the correct EyeTV GUI */
if( [[[VLCMain sharedInstance] getEyeTVController] isEyeTVrunning] == YES )
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"nodevice"];
else if( [[[VLCMain sharedInstance] getEyeTVController] isDeviceConnected] == YES )
{
if( [[[VLCMain sharedInstance] getEyeTVController] isDeviceConnected] == YES )
{
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"eyetvup"];
[self setupChannelInfo];
}
else
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"nodevice"];
}
else
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"noeyetv"];
......@@ -411,6 +414,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
[self openNetInfoChanged: nil];
}
else if( [o_label isEqualToString: _NS("EyeTV")] )
{
[o_mrl setStringValue: @"eyetv://"];
}
}
- (void)openFileGeneric
......@@ -797,12 +804,23 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (IBAction)eyetvSwitchChannel:(id)sender
{
if( sender == o_eyetv_nextProgram_btn )
[o_eyetv_channels_pop selectItemWithTag:[[[VLCMain sharedInstance] getEyeTVController] switchChannelUp: YES]];
{
int chanNum = [[[VLCMain sharedInstance] getEyeTVController] switchChannelUp: YES];
[o_eyetv_channels_pop selectItemWithTag:chanNum];
[o_mrl setStringValue: [NSString stringWithFormat:@"eyetv:// :eyetv-channel=%d", chanNum]];
}
else if( sender == o_eyetv_previousProgram_btn )
[o_eyetv_channels_pop selectItemWithTag:[[[VLCMain sharedInstance] getEyeTVController] switchChannelUp: NO]];
{
int chanNum = [[[VLCMain sharedInstance] getEyeTVController] switchChannelUp: NO];
[o_eyetv_channels_pop selectItemWithTag:chanNum];
[o_mrl setStringValue: [NSString stringWithFormat:@"eyetv:// :eyetv-channel=%d", chanNum]];
}
else if( sender == o_eyetv_channels_pop )
[[[VLCMain sharedInstance] getEyeTVController] selectChannel:
[[sender selectedItem] tag]];
{
int chanNum = [[sender selectedItem] tag];
[[[VLCMain sharedInstance] getEyeTVController] selectChannel:chanNum];
[o_mrl setStringValue: [NSString stringWithFormat:@"eyetv:// :eyetv-channel=%d", chanNum]];
}
else
msg_Err( VLCIntf, "eyetvSwitchChannel sent by unknown object" );
}
......@@ -865,9 +883,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
if( channels )
{
NSString *channel;
[[[o_eyetv_channels_pop menu] addItemWithTitle: _NS("Tuner")
action: nil
keyEquivalent: @""] setTag:x++];
[[o_eyetv_channels_pop menu] addItem: [NSMenuItem separatorItem]];
while( channel = [channels nextObject] )
{
......@@ -875,7 +890,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
* additionally, we save a bit of time */
[[[o_eyetv_channels_pop menu] addItemWithTitle: channel
action: nil
keyEquivalent: @""] setTag:x++];
keyEquivalent: @""] setTag:++x];
}
/* make Tuner the default */
[o_eyetv_channels_pop selectItemWithTag:[[[VLCMain sharedInstance] getEyeTVController] currentChannel]];
......@@ -884,8 +899,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* clean up GUI */
[o_eyetv_chn_bgbar setHidden: YES];
[o_eyetv_chn_status_txt setHidden: YES];
[o_mrl setStringValue: @"eyetv:"];
}
- (IBAction)subsChanged:(id)sender
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment