Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: error using mplayer and dxr3



OK! Give this a try, let me know how you get on!

--- player-mplayer.c    2003-04-06 13:03:21.000000000 +0100
+++ player-mplayer.c.patched    2003-04-06 13:04:37.000000000 +0100
@@ -48,6 +48,9 @@

 const char *MPlayerCmd = "mplayer.sh";

+#define DATA "CloseDxr3DeviceCmd"
+#define DATA1 "OpenDxr3DeviceCmd"
+
 // -- cMPlayerStatus 
----------------------------------------------------------
-

 cMPlayerStatus *status;
@@ -133,7 +136,39 @@

 bool cMPlayerPlayer::Fork(void)
 {
-  if(MPlayerSetup.SlaveMode) {
+struct sockaddr_un hp;
+int sock;
+char reply[25];
+
+ /* Open socket. */
+sock = socket(AF_UNIX, SOCK_STREAM, 0);
+if (sock == -1) {
+perror("socket");
+return (-1);
+}
+
+hp.sun_family = AF_UNIX;
+strcpy(hp.sun_path, "/tmp/.dxr3-ux-sock");
+
+if (connect(sock, (struct sockaddr *)&hp, sizeof (hp)) == -1) {
+perror("connect");
+(void) close(sock);
+return (-1);
+}
+
+if (write(sock, DATA, sizeof(DATA)) < 0)  {
+perror("writing on stream socket");
+close(sock);
+}
+
+if (read(sock, &reply, 18) < 0)  {
+perror("writing on stream socket");
+close(sock);
+}
+
+close(sock);
+
+if(MPlayerSetup.SlaveMode) {
     if(pipe(inpipe)==-1) {
       esyslog("ERROR: pipe failed for inpipe: (%d) 
%s",errno,strerror(errno));
       return false;


Cheers,

Morfsta


On Sun, 6 Apr 2003, Stefan Huelswitt wrote:

> On 06 Apr 2003 Morfsta <morfsta@irmplc.com> wrote:
> 
> > I have written code directly into mplayer plugin source to do the release
> > of the dxr3 device from VDR prior to running mplayer and this works! I can
> > now watch mplayer files directly from the VDR OSD. :-)
> > 
> > Is anyone interested in a patch?
> 
> Yes, of course.
> 
> 



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index