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 @@ ...@@ -22,9 +22,6 @@
*****************************************************************************/ *****************************************************************************/
#include "EyeTVPluginDefs.h" #include "EyeTVPluginDefs.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
void VLCEyeTVPluginGlobalNotificationReceived( CFNotificationCenterRef center, void VLCEyeTVPluginGlobalNotificationReceived( CFNotificationCenterRef center,
......
...@@ -122,7 +122,6 @@ ...@@ -122,7 +122,6 @@
mainGroup = 089C166AFE841209C02AAC07 /* VLC EyeTV Plug-In */; mainGroup = 089C166AFE841209C02AAC07 /* VLC EyeTV Plug-In */;
projectDirPath = ""; projectDirPath = "";
projectRoot = ""; projectRoot = "";
shouldCheckCompatibility = 1;
targets = ( targets = (
8D57630D048677EA00EA77CD /* VLC EyeTV Plug-In */, 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_file = file.c
SOURCES_access_directory = directory.c SOURCES_access_directory = directory.c
SOURCES_access_dv = dv.c SOURCES_access_dv = dv.c
...@@ -7,7 +12,7 @@ SOURCES_access_http = http.c ...@@ -7,7 +12,7 @@ SOURCES_access_http = http.c
SOURCES_access_ftp = ftp.c SOURCES_access_ftp = ftp.c
SOURCES_access_smb = smb.c SOURCES_access_smb = smb.c
SOURCES_access_gnomevfs = gnomevfs.c SOURCES_access_gnomevfs = gnomevfs.c
SOURCES_access_eyetv = eyetv.c SOURCES_access_eyetv = eyetv.m
SOURCES_dvdnav = dvdnav.c SOURCES_dvdnav = dvdnav.c
SOURCES_dvdread = dvdread.c SOURCES_dvdread = dvdread.c
SOURCES_dc1394 = dc1394.c SOURCES_dc1394 = dc1394.c
......
...@@ -132,8 +132,6 @@ static VLCEyeTVController *_o_sharedInstance = nil; ...@@ -132,8 +132,6 @@ static VLCEyeTVController *_o_sharedInstance = nil;
script = [[NSAppleScript alloc] initWithSource: script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n" @"tell application \"EyeTV\"\n"
"channel_up\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" "get current channel\n"
"end tell"]; "end tell"];
msg_Dbg( VLCIntf, "telling eyetv to switch 1 channel up" ); msg_Dbg( VLCIntf, "telling eyetv to switch 1 channel up" );
...@@ -143,8 +141,6 @@ static VLCEyeTVController *_o_sharedInstance = nil; ...@@ -143,8 +141,6 @@ static VLCEyeTVController *_o_sharedInstance = nil;
script = [[NSAppleScript alloc] initWithSource: script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n" @"tell application \"EyeTV\"\n"
"channel_down\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" "get current channel\n"
"end tell"]; "end tell"];
msg_Dbg( VLCIntf, "telling eyetv to switch 1 channel down" ); msg_Dbg( VLCIntf, "telling eyetv to switch 1 channel down" );
...@@ -172,25 +168,21 @@ static VLCEyeTVController *_o_sharedInstance = nil; ...@@ -172,25 +168,21 @@ static VLCEyeTVController *_o_sharedInstance = nil;
case -2: // Composite case -2: // Composite
script = [[NSAppleScript alloc] initWithSource: script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n" @"tell application \"EyeTV\"\n"
" input_change input source composite video input" " input_change input source composite video input\n"
" volume_change level 0\n" " show player_window\n"
" tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
"end tell"]; "end tell"];
break; break;
case -1: // S-Video case -1: // S-Video
script = [[NSAppleScript alloc] initWithSource: script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n" @"tell application \"EyeTV\"\n"
" input_change input source S video input" " input_change input source S video input\n"
" volume_change level 0\n" " show player_window\n"
" tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
"end tell"]; "end tell"];
break; break;
case 0: // Tuner case 0: // Last
script = [[NSAppleScript alloc] initWithSource: script = [[NSAppleScript alloc] initWithSource:
@"tell application \"EyeTV\"\n" @"tell application \"EyeTV\"\n"
" input_change input source tuner input" " show player_window\n"
" volume_change level 0\n"
" tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
"end tell"]; "end tell"];
break; break;
default: default:
...@@ -198,9 +190,8 @@ static VLCEyeTVController *_o_sharedInstance = nil; ...@@ -198,9 +190,8 @@ static VLCEyeTVController *_o_sharedInstance = nil;
{ {
NSString *channel_change = [NSString stringWithFormat: NSString *channel_change = [NSString stringWithFormat:
@"tell application \"EyeTV\"\n" @"tell application \"EyeTV\"\n"
@" channel_change channel number %d\n" " channel_change channel number %d\n"
" volume_change level 0\n" " show player_window\n"
" tell application \"System Events\" to set visible of process \"EyeTV\" to false\n"
"end tell", theChannelNum]; "end tell", theChannelNum];
script = [[NSAppleScript alloc] initWithSource:channel_change]; script = [[NSAppleScript alloc] initWithSource:channel_change];
} }
......
...@@ -83,7 +83,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -83,7 +83,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
p_list = [NSMutableArray arrayWithCapacity: 1]; p_list = [NSMutableArray arrayWithCapacity: 1];
next_media = IOIteratorNext( media_iterator ); next_media = IOIteratorNext( media_iterator );
if( next_media != nil ) if( next_media )
{ {
char psz_buf[0x32]; char psz_buf[0x32];
size_t dev_path_length; size_t dev_path_length;
...@@ -116,7 +116,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -116,7 +116,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
IOObjectRelease( next_media ); IOObjectRelease( next_media );
} while( ( next_media = IOIteratorNext( media_iterator ) ) != nil ); } while( ( next_media = IOIteratorNext( media_iterator ) ) );
} }
IOObjectRelease( media_iterator ); IOObjectRelease( media_iterator );
...@@ -237,12 +237,15 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -237,12 +237,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* wake up with the correct EyeTV GUI */ /* wake up with the correct EyeTV GUI */
if( [[[VLCMain sharedInstance] getEyeTVController] isEyeTVrunning] == YES ) 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"]; [o_eyetv_tabView selectTabViewItemWithIdentifier:@"eyetvup"];
[self setupChannelInfo]; [self setupChannelInfo];
} }
else
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"nodevice"];
}
else else
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"noeyetv"]; [o_eyetv_tabView selectTabViewItemWithIdentifier:@"noeyetv"];
...@@ -411,6 +414,10 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -411,6 +414,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
{ {
[self openNetInfoChanged: nil]; [self openNetInfoChanged: nil];
} }
else if( [o_label isEqualToString: _NS("EyeTV")] )
{
[o_mrl setStringValue: @"eyetv://"];
}
} }
- (void)openFileGeneric - (void)openFileGeneric
...@@ -797,12 +804,23 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -797,12 +804,23 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (IBAction)eyetvSwitchChannel:(id)sender - (IBAction)eyetvSwitchChannel:(id)sender
{ {
if( sender == o_eyetv_nextProgram_btn ) 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 ) 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 ) 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 else
msg_Err( VLCIntf, "eyetvSwitchChannel sent by unknown object" ); msg_Err( VLCIntf, "eyetvSwitchChannel sent by unknown object" );
} }
...@@ -865,9 +883,6 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -865,9 +883,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
if( channels ) if( channels )
{ {
NSString *channel; NSString *channel;
[[[o_eyetv_channels_pop menu] addItemWithTitle: _NS("Tuner")
action: nil
keyEquivalent: @""] setTag:x++];
[[o_eyetv_channels_pop menu] addItem: [NSMenuItem separatorItem]]; [[o_eyetv_channels_pop menu] addItem: [NSMenuItem separatorItem]];
while( channel = [channels nextObject] ) while( channel = [channels nextObject] )
{ {
...@@ -875,7 +890,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -875,7 +890,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
* additionally, we save a bit of time */ * additionally, we save a bit of time */
[[[o_eyetv_channels_pop menu] addItemWithTitle: channel [[[o_eyetv_channels_pop menu] addItemWithTitle: channel
action: nil action: nil
keyEquivalent: @""] setTag:x++]; keyEquivalent: @""] setTag:++x];
} }
/* make Tuner the default */ /* make Tuner the default */
[o_eyetv_channels_pop selectItemWithTag:[[[VLCMain sharedInstance] getEyeTVController] currentChannel]]; [o_eyetv_channels_pop selectItemWithTag:[[[VLCMain sharedInstance] getEyeTVController] currentChannel]];
...@@ -884,8 +899,6 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -884,8 +899,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* clean up GUI */ /* clean up GUI */
[o_eyetv_chn_bgbar setHidden: YES]; [o_eyetv_chn_bgbar setHidden: YES];
[o_eyetv_chn_status_txt setHidden: YES]; [o_eyetv_chn_status_txt setHidden: YES];
[o_mrl setStringValue: @"eyetv:"];
} }
- (IBAction)subsChanged:(id)sender - (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