Hi...

I will trying the convert streamer program to streamer library...

I change in the code of xawtv "xawtv/console/Subdir.mk":

--
#console/streamer : LDLIBS += $(THREAD_LIBS) $(ICONV_LIBS) -ljpeg -lm
console/streamer : LDLIBS += -shared $(THREAD_LIBS) $(ICONV_LIBS) -ljpeg -lm -o libstreamer.so
--

And I change in the code "xawtv/streamer.c":

--
int
//main(int argc, char **argv) //kapachov 13-10-2006
main_streamer()
{
int c,queued=0,noaudio=0;
char *raw_length=NULL;
char *val;

/* parse options */
ng_init();
read_config();

debug++;
printf ("\n/-DEBUG %d-/\n", debug);
moviename = g_strconcat ("fichero.yuv", NULL);
printf ("\n/-MOVINAME %s -/\n", moviename);
fps=(int)(atof("24") * 1000 + 0.5);
printf ("\n/-FPS %d -/\n", fps);
sscanf("352x240","%dx%d", &video.width,&video.height);
printf ("\n/-VIDEO WIDTH.HEIGHT-/\n");
raw_length = g_strconcat ("0:15", NULL);
printf ("\n/-RAW %s -/\n", raw_length);


/* cfg_parse_cmdline(&argc,argv,cmd_opts_devices);

for (; {
if (-1 == (c = getopt(argc, argv, "haqdp:w:"
"o:f:r:s:t:b:j:" "O:F:R:")))
break;
switch (c) {
// general options //
case 'q':
quiet = 1;
break;
case 'a':
noaudio = 1;
break;
case 'd':
debug++;
ng_debug++;
break;
case 'w':
wait_seconds = atoi(optarg);
break;
case 'p':
parallel = atoi(optarg);
break;
// video options //
case 'o':
moviename = optarg;
break;
case 'f':
vfmt_name = optarg;
break;
case 'r':
fps = (int)(atof(optarg) * 1000 + 0.5);
break;
case 's':
if (2 != sscanf(optarg,"%dx%d",&video.width,&video.height))
video.width = video.height = 0;
break;

case 't':
raw_length = optarg;
break;
case 'b':
bufcount = atoi(optarg);
break;
case 'j':
ng_jpeg_quality = atoi(optarg);
break;

// audio options //
case 'O':
audioname = optarg;
break;
case 'F':
afmt_name = optarg;
break;
case 'R':
audio.rate = atoi(optarg);
break;

// errors / help //
case 'h':
usage(stdout);
exit(0);
default:
usage(stderr);
exit(1);
}
}*/
--


Then, when I call the function main_streamer from my program "main" :

--
/-ng_init 0-/

/-DEBUG 1-/

/-MOVINAME fichero.yuv -/

/-FPS 24000 -/

/-VIDEO WIDTH.HEIGHT-/

/-RAW 0:15 -/
checking writer files [multiple image files] ...
video name=ppm ext=ppm: ext mismatch [need yuv]
video name=pgm ext=pgm: ext mismatch [need yuv]
video name=jpeg ext=jpeg: ext mismatch [need yuv]
checking writer raw [single file, raw video data] ...
video name=rgb ext=raw: ext mismatch [need yuv]
video name=gray ext=raw: ext mismatch [need yuv]
video name=422 ext=raw: ext mismatch [need yuv]
video name=422p ext=raw: ext mismatch [need yuv]
video name=4mpeg ext=yuv: OK
raw / video: 12 bit YUV 4:2:0 (planar) / audio: none
devlist_probe: checking existing entries ...
devlist_probe: probing dvb devices ...
open(/dev/dvb/adapter0/frontend0): No such file or directory
open(/dev/dvb/adapter0/frontend0): No such file or directory
open(/dev/dvb/adapter1/frontend0): No such file or directory
open(/dev/dvb/adapter1/frontend0): No such file or directory
open(/dev/dvb/adapter2/frontend0): No such file or directory
open(/dev/dvb/adapter2/frontend0): No such file or directory
open(/dev/dvb/adapter3/frontend0): No such file or directory
open(/dev/dvb/adapter3/frontend0): No such file or directory
devlist_probe: probing v4l2 devices ...
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
device_probe_video: /dev/video0: add
devlist_probe: probing v4l devices ...
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
device_probe_video: /dev/video0: seen, skipping
devlist_probe: probing xv devices ...
Violación de segmento
--



But... If convert streamer library to streamer program again...



--
/-ng_init 0-/

/-DEBUG 1-/

/-MOVINAME fichero.yuv -/

/-FPS 24000 -/

/-VIDEO WIDTH.HEIGHT-/

/-RAW 0:15 -/
checking writer files [multiple image files] ...
video name=ppm ext=ppm: ext mismatch [need yuv]
video name=pgm ext=pgm: ext mismatch [need yuv]
video name=jpeg ext=jpeg: ext mismatch [need yuv]
checking writer raw [single file, raw video data] ...
video name=rgb ext=raw: ext mismatch [need yuv]
video name=gray ext=raw: ext mismatch [need yuv]
video name=422 ext=raw: ext mismatch [need yuv]
video name=422p ext=raw: ext mismatch [need yuv]
video name=4mpeg ext=yuv: OK
raw / video: 12 bit YUV 4:2:0 (planar) / audio: none
devlist_probe: checking existing entries ...
devlist_probe: probing dvb devices ...
open(/dev/dvb/adapter0/frontend0): No such file or directory
open(/dev/dvb/adapter0/frontend0): No such file or directory
open(/dev/dvb/adapter1/frontend0): No such file or directory
open(/dev/dvb/adapter1/frontend0): No such file or directory
open(/dev/dvb/adapter2/frontend0): No such file or directory
open(/dev/dvb/adapter2/frontend0): No such file or directory
open(/dev/dvb/adapter3/frontend0): No such file or directory
open(/dev/dvb/adapter3/frontend0): No such file or directory
devlist_probe: probing v4l2 devices ...
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
device_probe_video: /dev/video0: add
devlist_probe: probing v4l devices ...
open(/dev/video1): No such file or directory
open(/dev/video2): No such file or directory
open(/dev/video3): No such file or directory
device_probe_video: /dev/video0: seen, skipping
devlist_probe: probing done
using: device configuration "BT878 video (AVerMedia TVCaptur":
bus = PCI:0000:05:09.0
video = /dev/video0
dvb = [unset]
sndrec = [unset, using default]
sndplay = [unset, using default]
mixer = [unset, using default]
control = [unset]
movie_init_writer start
setformat: 12 bit YUV 4:2:0 (planar) (352x240): ok
writer_video_thread start [pid=20599]
movie_init_writer end (h=0x9079c6
movie_writer_start
movie_writer_stop/r: -0.00s [0], a/v: -0.00s [0]
writer_video_thread done
Oops: fifos is 1 (expected 0) [common/fifo.c:fifo_check:139]
--

Any idea...


___
thank for the attention lent...