Re: Re: can't output sound on dvb
Nico <[email protected]>
| Newsgroups | gmane.comp.video.mplayer.user.dvb |
|---|---|
| Message-ID | <[email protected]> |
please, try this patch;
cd MPla2003-xxx
patch -p0 < ../dvbout.diff
./configure && make
./mplayer -dvbout card=2 file.mpg
card can vary between 1 and 4, depending on the card you want to use.
I can't test it because I don't have any FF card, so test it at your own
risk.
Please, let me know if it works well; in that case I will post it to
-dev-eng.
Nico
Alexandre CONRAD wrote:
>> in libvo/vo_mpegpes.c /dev/dvb/adapter0/{audio,video} are hardcoded.
>>
>> Just change adapter0 to adapter{n-1}, where n is the card number you
>> want to use.
>
>
> Aaah, right. This is hardcoded. Unfortunatly, I don't have skills to
> make a patch my self for beeing able to choose the decoder from
> mplayer's command line.
>
> would someone be gracefull to add this option and send the patch to
> mplayer to update the CVS ? I have 3 FF cards, I'll test the patch my
> self. Thanks in advance.
>
> Best regards,
_______________________________________________
Mplayer-dvb mailing list
[email protected]
http://mplayerhq.hu/mailman/listinfo/mplayer-dvb
dvbout.diff
(text/plain, 2.3 KB)
diff -Naurb MPlayer-20040203.bak/cfg-mplayer.h MPlayer-20040203/cfg-mplayer.h
--- MPlayer-20040203.bak/cfg-mplayer.h Thu Jan 29 13:01:25 2004
+++ MPlayer-20040203/cfg-mplayer.h Tue Feb 3 09:54:22 2004
@@ -101,6 +101,11 @@
extern m_option_t dxr2_opts[];
#endif
+#ifdef HAVE_DVB_HEAD
+extern m_option_t dvbout_opts[];
+#endif
+
+
#ifdef STREAMING_LIVE_DOT_COM
extern int isSDPFile;
extern int rtspStreamOverTCP;
@@ -331,6 +336,10 @@
{"dxr2", &dxr2_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
#endif
+#ifdef HAVE_DVB_HEAD
+ {"dvbout", &dvbout_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+#endif
+
#ifdef STREAMING_LIVE_DOT_COM
{"sdp", "-sdp is deprecated, use sdp://file instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
// -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP
diff -Naurb MPlayer-20040203.bak/libvo/vo_mpegpes.c MPlayer-20040203/libvo/vo_mpegpes.c
--- MPlayer-20040203.bak/libvo/vo_mpegpes.c Sun Jan 12 18:46:21 2003
+++ MPlayer-20040203/libvo/vo_mpegpes.c Tue Feb 3 10:02:23 2004
@@ -62,9 +62,17 @@
#include "config.h"
#include "video_out.h"
#include "video_out_internal.h"
+#include "m_option.h"
int vo_mpegpes_fd=-1;
int vo_mpegpes_fd2=-1;
+static int dvboutcard = 1;
+
+m_option_t dvbout_opts[] = {
+ { "card", &dvboutcard, CONF_TYPE_INT, CONF_RANGE, 1, 4, NULL },
+ { NULL,NULL, 0, 0, 0, 0, NULL}
+};
+
static vo_info_t info =
{
@@ -99,6 +107,13 @@
}
static uint32_t preinit(const char *arg){
+ char vo_file[25], ao_file[25];
+ int card;
+
+ if(dvboutcard >= 1 && dvboutcard <= 4)
+ card = dvboutcard-1;
+ else
+ card = 0;
#ifdef HAVE_DVB
if(!arg){
//|O_NONBLOCK
@@ -113,12 +128,14 @@
return -1;
}
#else
- printf("Opening /dev/dvb/adapter0/video0+audio0\n");
- if((vo_mpegpes_fd = open("/dev/dvb/adapter0/video0",O_RDWR)) < 0){
+ printf("Opening /dev/dvb/adapter%d/video0+audio0\n", card);
+ sprintf(vo_file, "/dev/dvb/adapter%d/video0", card);
+ if((vo_mpegpes_fd = open(vo_file,O_RDWR)) < 0){
perror("DVB VIDEO DEVICE: ");
return -1;
}
- if((vo_mpegpes_fd2 = open("/dev/dvb/adapter0/audio0",O_RDWR|O_NONBLOCK)) < 0){
+ sprintf(ao_file, "/dev/dvb/adapter%d/audio0", card);
+ if((vo_mpegpes_fd2 = open(ao_file,O_RDWR|O_NONBLOCK)) < 0){
perror("DVB AUDIO DEVICE: ");
return -1;
}