Commit d56a1e34 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Remove unmaintained and outdated EyeTV support

parent c612f243
......@@ -264,6 +264,7 @@ Removed modules
* QuickTime decoder module (use native codecs)
* BD access module (use libbluray)
* Direct2D module (use Direct3D11)
* EyeTV access module
Changes between 2.2.0 and 2.2.1:
......
......@@ -1991,16 +1991,6 @@ if test "${enable_realrtsp}" = "yes"; then
VLC_ADD_PLUGIN([access_realrtsp])
fi
dnl
dnl MacOS eyeTV
AC_ARG_ENABLE(macosx-eyetv,
[ --enable-macosx-eyetv Mac OS X EyeTV (TNT Tuner) module (default enabled on Mac OS X)])
if test "x${enable_macosx_eyetv}" != "xno" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_eyetv}" = "yes")
then
VLC_ADD_PLUGIN([access_eyetv])
fi
dnl
dnl QTKit
AC_ARG_ENABLE(macosx-qtkit,
......
Binary files a/extras/package/macosx/eyetvplugin/English.lproj/InfoPlist.strings and /dev/null differ
/* This is public domain code developed by Elgato Systems GmbH. No GPL-covered
* changes were added to this file by any members of the VideoLAN team. If you
* want to do so, add a modified GPL header here, but keep a message emphasising
* the non-licensed parts of this header file.
* Ideally, VideoLAN-related changes should only go to eyetvplugin.h.
*
* $Id$
*/
#pragma once
/*
The EyeTV Plugin API
====================
The EyeTV Software gives third parties access to the incoming MPEG-2 transport stream.
At this time the API is available for the following products:
- EyeTV 200 (analog)
- EyeTV 300 (DVB-S)
- EyeTV 400 (DVB-T)
A plugin receives device plugged/unplugged notifications, it can request or release
individual PIDs and most importantly it has access to transport stream packets in
real time, as they arrive from the device. Note that the plugin is called before EyeTV
itself looks at the packets, so it is even possible to modify the data.
Plugins currently live in EyeTV.app/Contens/Plugins/
A plugin is packaged as a bundle with a single entry point:
long EyeTVPluginDispatcher(EyeTVPluginSelector selector,
void *refCon,
EyeTVPluginDeviceID deviceID,
long param1,
long param2,
long param3,
long param4);
PID Filtering
=============
EyeTV employs both hardware and software PID filtering. A plugin's dispatch routine
is called with the kEyeTVPluginSelector_PacketsArrived selector after the hardware
PID filter (naturally) but prior to the software PID filter, so the plugin has access
to all packets that are delivered by the hardware.
A plugin can request PIDs that are not needed by EyeTV from the hardware PID filter by
means of a callback routine, see eyeTVPluginSelector_SetCallback.
Note that hardware PID filtering is on for single processor machines (to reduce the CPU
load), but off for multi-processor machines (to improve channel switch times).
This behaviour is controlled by the "hardware PID filter" key in com.elgato.eyetv.plist,
which defaults to "Auto" ("Off" on MP machines, "On" on single-processor machines). EyeTV
does not offer GUI to change this setting. A plugin hence needs to be prepared to handle
both an entire transponder or multiplex and to request PIDs it might need.
Note that the plugin is called on the real-time thread that receives the transport stream
packets and that the packet buffers passed to the plugin are the actual hardware DMA buffers.
Please return as quickly as possible from the kEyeTVPluginSelector_PacketsArrived call and
avoid blocking the calling thread.
Revision History:
02/27/2004: Initial Release.
*/
#define EYETV_PLUGIN_API_VERSION 0x04021901
#define EYETV_PLUGIN_API_MIN_VERSION 0x04021901
typedef long long EyeTVPluginDeviceID;
typedef long EyeTVPluginDeviceType;
typedef long EyeTVPluginSelector;
enum {
kEyeTVPIDType_Video = 0,
kEyeTVPIDType_MPEGAudio = 1,
kEyeTVPIDType_VBI = 2, /* teletext */
kEyeTVPIDType_PCR = 3,
kEyeTVPIDType_PMT = 4,
kEyeTVPIDType_Unknown = 5,
kEyeTVPIDType_AC3Audio = 6
};
typedef struct EyeTVPluginPIDInfo EyeTVPluginPIDInfo;
struct EyeTVPluginPIDInfo {
long pid;
long pidType;
};
/***********************************************************************************
*
* EyeTVPluginCallbackParams,
*
***********************************************************************************/
enum {
kEyeTVPluginCallbackSelector_RetainPIDs = 0,
kEyeTVPluginCallbackSelector_ReleasePIDs = 1
};
typedef struct EyeTVPluginCallbackParams EyeTVPluginCallbackParams;
struct EyeTVPluginCallbackParams {
EyeTVPluginDeviceID deviceID; // the deviceID
long selector; // callback selector, see above
long *pids; // list of pids to release/retain
long pidsCount; // count of pids
};
/***********************************************************************************
*
* typedef for the callback function,
*
***********************************************************************************/
typedef long(* EyeTVPluginCallbackProc)(EyeTVPluginCallbackParams *params);
/***********************************************************************************
*
* EyeTVPluginParamStructs
*
***********************************************************************************/
typedef struct EyeTVPluginInitializeParams EyeTVPluginInitializeParams;
struct EyeTVPluginInitializeParams {
long apiVersion; // version of the EyeTV_PLUGIN_API
EyeTVPluginCallbackProc callback; // the callback
}; /* 8 bytes */
typedef struct EyeTVPluginGetInfoParams EyeTVPluginGetInfoParams;
struct EyeTVPluginGetInfoParams {
long *pluginAPIVersion; // <- EYETV_PLUGIN_API_VERSION
char *pluginName; // <- points to a 128-byte buffer, the plugin is expected to fill the buffer with
// a UTF-8 encoded string.
char *description; // <- points to a 1024-byte buffer, the plugin is expected to fill the buffer with
// a UTF-8 encoded string describing the plugin.
}; /* 12 bytes */
enum {
kEyeTVPluginDeviceType_Unknown = 0,
kEyeTVPluginDeviceType_e200 = 1,
kEyeTVPluginDeviceType_e300 = 2,
kEyeTVPluginDeviceType_e400 = 3
} ;
typedef struct EyeTVPluginDeviceAddedParams EyeTVPluginDeviceAddedParams;
struct EyeTVPluginDeviceAddedParams {
EyeTVPluginDeviceType deviceType;
}; /* 4 bytes */
typedef struct EyeTVPluginPacketsArrivedParams EyeTVPluginPacketsArrivedParams;
struct EyeTVPluginPacketsArrivedParams {
long **packets; // points to an array of packets
long packetCount;
}; /* 8 bytes */
typedef struct EyeTVPluginServiceChangedParams EyeTVPluginServiceChangedParams;
struct EyeTVPluginServiceChangedParams {
long headendID; // new headend ID. For E300 it's the orbital position of the satellite
// in tenth of a degree
long transponderID; // new transponder ID (The Frequency in kHz)
long serviceID; // new service ID (the ID of the used service as included in the DVB Stream)
EyeTVPluginPIDInfo *pidList; // points to the list of active PIDs;
long pidCount; // the length of pidList
}; /* 20 bytes */
/***********************************************************************************
*
* EyeTVPluginParams
*
***********************************************************************************/
typedef struct EyeTVPluginParams EyeTVPluginParams;
struct EyeTVPluginParams {
EyeTVPluginDeviceID deviceID; // ID of the device
EyeTVPluginSelector selector; // selector
void *refCon; // refCon
union {
EyeTVPluginInitializeParams initialize; // kEyeTVPluginSelector_Initialize
// kEyeTVPluginSelector_Terminate, no additional parameters
EyeTVPluginGetInfoParams info; // kEyeTVPluginSelector_GetInfo
EyeTVPluginDeviceAddedParams deviceAdded; // kEyeTVPluginSelector_DeviceAdded
// kEyeTVPluginSelector_DeviceRemoved, no additional parameters
EyeTVPluginPacketsArrivedParams packetsArrived; // kEyeTVPluginSelector_PacketsArrived
EyeTVPluginServiceChangedParams serviceChanged; // kEyeTVPluginSelector_ServiceChanged
};
};
enum { // EyeTVPluginSelector
kEyeTVPluginSelector_Initialize = 0,
kEyeTVPluginSelector_Terminate = 1,
kEyeTVPluginSelector_GetInfo = 2,
kEyeTVPluginSelector_DeviceAdded = 3,
kEyeTVPluginSelector_DeviceRemoved = 4,
kEyeTVPluginSelector_PacketsArrived = 5,
kEyeTVPluginSelector_ServiceChanged = 6
};
/***********************************************************************************
*
* EyeTVPluginEntryProc
*
***********************************************************************************/
typedef long(* EyeTVPluginEntryProc)(EyeTVPluginParams *params);
<pkg-contents spec="1.12"><f n="VLC EyeTV Plug-In.bundle" o="" g="" p="0" pt="/Users/fpk/Desktop/vlc/extras/package/macosx/eyetvplugin/build/Release/VLC EyeTV Plug-In.bundle" m="false" t="file"/></pkg-contents>
\ No newline at end of file
<pkgref spec="1.12" uuid="DA869B40-5882-4E63-AA06-CD0C8DC06829"><config><identifier>org.videolan.vlcPluginForEyetv</identifier><version>1.5</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">build/Release/VLC EyeTV Plug-In.bundle</installFrom><installTo mod="true" relocatable="true">/Applications/EyeTV.app/Contents/Plugins</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo</mod><mod>relocatable</mod><mod>installFrom.path</mod><mod>identifier</mod><mod>parent</mod><mod>version</mod><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod><mod>installFrom.isAbsoluteType</mod></config><contents><file-list>01vlc-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
\ No newline at end of file
<pkmkdoc spec="1.12"><properties><title>VLC Plugin for EyeTV</title><build>/Users/fpk/Desktop/VLC Plugin for EyeTV.pkg</build><organization>org.videolan</organization><userSees ui="easy"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="VLC EyeTV Plug-In" id="choice2" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.videolan.vlcPluginForEyetv"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" mod="true" type="license">../../../../COPYING</resource><resource mime-type="text/rtf" kind="embedded" type="readme"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf320
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
\f0\fs26 \cf0 This installer adds a plugin to your EyeTV installation to play and process TV streams with VLC.\
\
Please note that you might have to re-run this installer in case that you update your EyeTV installation.}]]></resource><resource mime-type="text/rtf" kind="embedded" type="conclusion"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf320
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
\f0\fs26 \cf0 Please restart EyeTV to use the VLC plugin.}]]></resource></locale></resources><requirements><requirement id="filt" operator="eq" value="true"><file>/Applications/EyeTV.app</file><message>Please install EyeTV at its default location prior to installing this plugin.</message></requirement></requirements><flags/><item type="file">01vlc.xml</item><mod>properties.title</mod></pkmkdoc>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>org.videolan.vlceyetvplugin</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
<string>NO</string>
<key>CFPlugInFactories</key>
<dict>
<key>00000000-0000-0000-0000-000000000000</key>
<string>MyFactoryFunction</string>
</dict>
<key>CFPlugInTypes</key>
<dict>
<key>00000000-0000-0000-0000-000000000000</key>
<array>
<string>00000000-0000-0000-0000-000000000000</string>
</array>
</dict>
<key>CFPlugInUnloadFunction</key>
<string></string>
</dict>
</plist>
/*****************************************************************************
* eyetvplugin.c: Plug-In for the EyeTV software to connect to VLC
*****************************************************************************
* Copyright (C) 2006-2007 the VideoLAN team
* $Id$
*
* Authors: Felix Kühne <fkuehne at videolan dot 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.
*****************************************************************************/
#include "eyetvplugin.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <fcntl.h>
#define MAX_PIDS 256
#define MAX_ACTIVE_PIDS 256
#define MAX_DEVICES 16
#define VLC_NOTIFICATION_OBJECT "VLCEyeTVSupport"
#pragma push
#pragma pack(1)
/* Structure for TS-Packets */
typedef struct
{
uint32_t sync_byte : 8,
transport_error_indicator : 1,
payload_unit_start_indicator : 1,
transport_priority : 1,
PID : 13,
transport_scrambling_control : 2,
adaptation_field_control : 2,
continuity_counter : 4;
uint8_t payload[184];
} TransportStreamPacket;
#pragma pop
/* Structure to hold global data to communicate with EyeTV */
typedef struct
{
EyeTVPluginCallbackProc callback;
/* Structure to hold current active service */
EyeTVPluginDeviceID activeDeviceID;
long activePIDsCount;
EyeTVPluginPIDInfo activePIDs[MAX_ACTIVE_PIDS];
} VLCEyeTVPluginGlobals_t;
/* following globals limits us to one VLC instance using EyeTV */
static int i_deviceCount;
static int i_vlcSock;
#pragma mark -
/* initialise the plug-in */
static long VLCEyeTVPluginInitialize(VLCEyeTVPluginGlobals_t** globals, long apiVersion, EyeTVPluginCallbackProc callback)
{
printf("VLC media player Plug-In: Initialize\n");
long result = 0;
/* init our own storage */
i_deviceCount = 0;
i_vlcSock = -1;
/* notify a potential VLC instance about our initialisation */
CFNotificationCenterPostNotification( CFNotificationCenterGetDistributedCenter(),
CFSTR("PluginInit"),
CFSTR(VLC_NOTIFICATION_OBJECT),
/*userInfo*/ NULL,
TRUE );
/* init our notification support */
CFNotificationCenterAddObserver( CFNotificationCenterGetDistributedCenter(),
/* observer */ NULL,
/* callBack */ VLCEyeTVPluginGlobalNotificationReceived,
/* name, NULL==all */ NULL,
CFSTR(VLC_NOTIFICATION_OBJECT),
CFNotificationSuspensionBehaviorDeliverImmediately );
*globals = (VLCEyeTVPluginGlobals_t *) calloc(1, sizeof( VLCEyeTVPluginGlobals_t ) );
( *globals )->callback = callback;
return result;
}
/* we will be terminated soon, clean up */
static long VLCEyeTVPluginTerminate(VLCEyeTVPluginGlobals_t *globals)
{
long result = 0;
printf("VLC media player Plug-In: Terminate\n");
/* notify a potential VLC instance about our termination */
CFNotificationCenterPostNotification( CFNotificationCenterGetDistributedCenter (),
CFSTR("PluginQuit"),
CFSTR(VLC_NOTIFICATION_OBJECT),
/*userInfo*/ NULL,
TRUE );
/* remove us from the global notification centre */
CFNotificationCenterRemoveEveryObserver( CFNotificationCenterGetDistributedCenter(),
(void *)VLCEyeTVPluginGlobalNotificationReceived );
/* close data connection */
if( i_vlcSock != -1 )
{
close( i_vlcSock );
i_vlcSock = -1;
}
free( globals );
return result;
}
/* called when EyeTV asks various stuff about us */
static long VLCEyeTVPluginGetInformation(VLCEyeTVPluginGlobals_t *globals, long* outAPIVersion, char* outName, char *outDescription)
{
printf("VLC media player Plug-In: GetInfo\n");
long result = 0;
if( globals )
{
if( outAPIVersion )
{
*outAPIVersion = EYETV_PLUGIN_API_VERSION;
}
if( outName )
{
strcpy( outName, "VLC media player Plug-In");
}
if( outDescription )
{
strcpy( outDescription, "This Plug-In connects EyeTV to the VLC media player for streaming purposes.");
}
}
return result;
}
/* called if we received a global notification */
void VLCEyeTVPluginGlobalNotificationReceived( CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,
CFDictionaryRef userInfo )
{
/* when VLC launches after us, we need to inform it about our existance and the current state of available devices */
if( CFStringCompare( name, CFSTR( "VLCOSXGUIInit" ), 0) == kCFCompareEqualTo )
{
/* we're here */
CFNotificationCenterPostNotification( CFNotificationCenterGetDistributedCenter (),
CFSTR("PluginInit"),
CFSTR(VLC_NOTIFICATION_OBJECT),
/*userInfo*/ NULL,
TRUE );
if( i_deviceCount > 0 )
{
/* at least one device is apparently connected */
CFNotificationCenterPostNotification( CFNotificationCenterGetDistributedCenter (),
CFSTR("DeviceAdded"),
CFSTR(VLC_NOTIFICATION_OBJECT),
/*userInfo*/ NULL,
TRUE );
}
}
/* VLC wants us to start sending data */
if( CFStringCompare( name, CFSTR( "VLCAccessStartDataSending" ), 0) == kCFCompareEqualTo )
{
if( i_vlcSock == -1 )
{
int peerSock;
/* set-up data socket */
peerSock = socket(AF_UNIX, SOCK_STREAM, 0);
if( peerSock != -1 )
{
struct sockaddr_un peerAddr;
/* set-up connection address */
memset(&peerAddr, 0, sizeof(peerAddr));
peerAddr.sun_family = AF_UNIX;
strncpy(peerAddr.sun_path, "/tmp/.vlc-eyetv-bridge", sizeof(peerAddr.sun_path)-1);
/* connect */
printf("data connect in progess...\n");
if( connect(peerSock, (struct sockaddr *)&peerAddr, sizeof(struct sockaddr_un)) != -1 )
{
printf("data sending switched on\n");
i_vlcSock = peerSock;
}
else
printf("connect data socket failed (errno=%d)\n", errno );
}
else
printf("create data socket failed (errno=%d)\n", errno );
}
}
/* VLC wants us to stop sending data */
if( CFStringCompare( name, CFSTR( "VLCAccessStopDataSending" ), 0) == kCFCompareEqualTo )
{
if( i_vlcSock != -1 )
{
close( i_vlcSock );
i_vlcSock = -1;
printf( "data sending switched off\n" );
}
}
}
/* called if a device is added */
static long VLCEyeTVPluginDeviceAdded(VLCEyeTVPluginGlobals_t *globals, EyeTVPluginDeviceID deviceID, EyeTVPluginDeviceType deviceType)
{
printf("VLC media player Plug-In: Device with type %i and ID %i added\n", (int)deviceType, (int)deviceID);
long result = 0;
if( globals )
{
++i_deviceCount;
if( 1 == i_deviceCount )
{
/* notify a potential VLC instance about the addition */
CFNotificationCenterPostNotification( CFNotificationCenterGetDistributedCenter(),
CFSTR("DeviceAdded"),
CFSTR(VLC_NOTIFICATION_OBJECT),
/*userInfo*/ NULL,
TRUE );
}
}
return result;
}
/* called if a device is removed */
static long VLCEyeTVPluginDeviceRemoved(VLCEyeTVPluginGlobals_t *globals, EyeTVPluginDeviceID deviceID)
{
printf("VLC media player Plug-In: DeviceRemoved\n");
long result = 0;
--i_deviceCount;
if( 0 == i_deviceCount )
{
/* notify a potential VLC instance about the removal */
CFNotificationCenterPostNotification( CFNotificationCenterGetDistributedCenter(),
CFSTR("DeviceRemoved"),
CFSTR(VLC_NOTIFICATION_OBJECT),
/*userInfo*/ NULL,
TRUE );
}
if( (i_vlcSock != -1) && (deviceID == globals->activeDeviceID) )
{
close(i_vlcSock);
i_vlcSock = -1;
printf( "data sending switched off\n" );
}
return result;
}
/* This function is called, whenever packets are received by EyeTV. For reasons of performance,
* the data is the original data, not a copy. That means, EyeTV waits until this method is
* finished. Therefore all in this method should be as fast as possible. */
static long VLCEyeTVPluginPacketsArrived(VLCEyeTVPluginGlobals_t *globals, EyeTVPluginDeviceID deviceID, long **packets, long packetsCount)
{
if( globals )
{
/* check if data connection is active */
if( i_vlcSock != -1 )
{
if( deviceID == globals->activeDeviceID )
{
long pidCount = globals->activePIDsCount;
if( pidCount )
{
uint8_t packetBuffer[sizeof(TransportStreamPacket)*20];
int packetBufferSize = 0;
while( packetsCount )
{
/* apply PID filtering, only PIDs in active service for device are sent through */
long pid = ntohl(**packets)>>8 & 0x1FFFL;
/* ignore NULL packets */
if( 0x1FFFL != pid )
{
long i;
for( i=0; i<pidCount; ++i )
{
if( globals->activePIDs[i].pid == pid )
{
memcpy(packetBuffer+packetBufferSize, *packets, sizeof(TransportStreamPacket));
packetBufferSize += sizeof(TransportStreamPacket);
if( packetBufferSize > (sizeof(packetBuffer)-sizeof(TransportStreamPacket)) )
{
/* flush buffer to VLC */
ssize_t sent = write(i_vlcSock, packetBuffer, packetBufferSize);
if( sent != packetBufferSize )
{
if( sent == -1 )
printf("data sending failed (errno=%d)\n", errno);
else
printf("data sending incomplete (sent=%zd)\n", sent);
close(i_vlcSock);
i_vlcSock = -1;
return 0;
}
packetBufferSize = 0;
}
if( i > 0 )
{
/* if we assume that consecutive packets would have the same PID in most cases,
it would therefore speed up filtering to reorder activePIDs list based on pid
occurrences */
EyeTVPluginPIDInfo swap = globals->activePIDs[i];
do
{
register int c = i--;
globals->activePIDs[c] = globals->activePIDs[i];
}
while( i );
globals->activePIDs[i] = swap;
}
if( pid && globals->activePIDs[0].pidType != kEyeTVPIDType_PMT )
{
/* to save on CPU, prevent EyeTV from mirroring that program by blocking video & audio packets
by changing all packets but PAT and PMT to NULL PID */
#if defined(WORDS_BIGENDIAN)
**packets |= 0x001FFF00L;
#else
**packets |= 0x00FFF800L;
#endif
}
/* done filtering on this packet, move on to next packet */
break;
}
}
}
--packetsCount;
++packets;
}
if( packetBufferSize )
{
/* flush buffer to VLC */
ssize_t sent = write(i_vlcSock, packetBuffer, packetBufferSize);
if( sent != packetBufferSize )
{
if( sent == -1 )
printf("data sending failed (errno=%d)\n", errno);
else
printf("data sending incomplete (sent=%zd)\n", sent);
close(i_vlcSock);
i_vlcSock = -1;
return 0;
}
}
}
}
}
}
return 0;
}
/* VLCEyeTVPluginServiceChanged,
*
* - *globals : The plug-in Globals
* - deviceID : Identifies the active Device
* - headendID : The HeadendID, for e300 it's the orbital position of the satelite in
* tenth degrees east
* - transponderID : The Frequency in kHz
* - serviceID : original ServiceID from the DVB-Stream (e300, e400)
* - pidList : List of active PIDs
*
* Whenever a service changes, this function is called. Service-related plug-in data should be updated here.