Mailing List archive

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

[vdr] Re: mplayer/head-driver/Mp3-plugin



Stephan Bieker wrote:
> Hi,
> 
> i am not able to apply the patches from mp3-plugin to mplayer, so it won't
> compile.
> I have tried it with mplayer pre9, pre10, rc1.
> I couldn't find pre8.
> 
> Can someone _please_ tell me in understandable sentences, whow to apply the
> (xyz)-head.diff to mplayer? The slavemode patch applies without hassle. I
> have read the whole list and more than two boards. I can't figure it out.
> 
> Gruss
> 
> Stephan
> 
> 
> 
Hi,
The patch for slave is for pre6 not for rc1.
Here is a patch for both HEAD and slave for rc1(see attachment)

Well one way is (check your paths)
#cd /usr/src
#tar xfjv ../MPlayer-0.90rc1.tar.bz2
#cd MPlayer-0.90rc1
#patch -p1 < ../MPlayer-0.90rc1.DVBHEAD-VDRSLAVE.patch
#ln -s /usr/src/DVB/include/linux/dvb /usr/include/linux/dvb
#./configure
#make
#make install

best luck
::beppe



-- Attached file included as plaintext by Listar --
-- File: MPlayer-0.90rc1.DVBHEAD-VDRSLAVE.patch

diff -ruN ./libao2/ao_mpegpes.c /usr/src/MPlayer-0.90rc1/libao2/ao_mpegpes.c
--- ./libao2/ao_mpegpes.c	Sun Oct  6 03:08:04 2002
+++ /usr/src/MPlayer-0.90rc1/libao2/ao_mpegpes.c	Wed Dec 11 15:47:20 2002
@@ -15,7 +15,7 @@
 #include "../mp_msg.h"
 
 #ifdef HAVE_DVB
-#include <ost/audio.h>
-audioMixer_t dvb_mixer={255,255};
+#include <linux/dvb/audio.h>
+audio_mixer_t dvb_mixer={255,255};
 #endif
 extern int vo_mpegpes_fd;
diff -ruN ./libvo/vo_mpegpes.c /usr/src/MPlayer-0.90rc1/libvo/vo_mpegpes.c
--- ./libvo/vo_mpegpes.c	Mon Nov 11 16:20:26 2002
+++ /usr/src/MPlayer-0.90rc1/libvo/vo_mpegpes.c	Wed Dec 11 15:54:49 2002
@@ -35,12 +35,14 @@
 #include <stdio.h>
 #include <time.h>
 
-#include <ost/dmx.h>
-#include <ost/frontend.h>
-#include <ost/sec.h>
-#include <ost/video.h>
-#include <ost/audio.h>
-
+#include <linux/dvb/video.h>
+#include <linux/dvb/audio.h>
+#ifndef true
+#define true 1
+#endif
+#ifndef false
+#define false 0
+#endif
 #endif
 
 #include "config.h"
@@ -86,11 +88,11 @@
 #ifdef HAVE_DVB
     if(!arg){
     //|O_NONBLOCK
-	if((vo_mpegpes_fd = open("/dev/ost/video",O_RDWR)) < 0){
+	if((vo_mpegpes_fd = open("/dev/dvb/adapter0/video0",O_RDWR)) < 0){
 		perror("DVB VIDEO DEVICE: ");
 		return -1;
 	}
-	if((vo_mpegpes_fd2 = open("/dev/ost/audio",O_RDWR|O_NONBLOCK)) < 0){
+	if((vo_mpegpes_fd2 = open("/dev/dvb/adapter0/audio0",O_RDWR|O_NONBLOCK)) < 0){
 		perror("DVB AUDIO DEVICE: ");
 		return -1;
 	}
diff -ruN ./mplayer.c /usr/src/MPlayer-0.90rc1/mplayer.c
--- ./mplayer.c	Thu Dec  5 01:18:56 2002
+++ /usr/src/MPlayer-0.90rc1/mplayer.c	Wed Dec 11 15:49:50 2002
@@ -2682,6 +2682,25 @@
   current_module=NULL;
 }
 
+#if 1
+  if(slave_mode){
+    float position=0.0;
+    float time=0.0;
+    if(demuxer->file_format==DEMUXER_TYPE_AVI && sh_video->video.dwLength>2) {
+      // get pos from frame number / total frames
+      position=(float)d_video->pack_no*100.0/(float)sh_video->video.dwLength;
+      }
+    else {
+      off_t len = ( demuxer->movi_end - demuxer->movi_start );
+      off_t pos = ( demuxer->file_format == DEMUXER_TYPE_AUDIO?stream->pos:demuxer->filepos );
+      if(len>0) position=( pos - demuxer->movi_start ) * 100.0 / len;
+      }
+    if(sh_video) time=d_video->pts;
+    else if(sh_audio) time=sh_audio->delay;
+    mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position);
+    }
+#endif
+
 #ifdef HAVE_NEW_GUI
       if(use_gui){
         guiEventHandling();



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



Home | Main Index | Thread Index