comparison TOOLS/netstream.c @ 26963:8825552ee585

Fix the linking of TOOLS/netstream and TOOLS/vivodump.
author diego
date Fri, 06 Jun 2008 13:28:25 +0000
parents 0f42fb42843c
children 5a30f5bc23a0
comparison
equal deleted inserted replaced
26962:457f8904a5eb 26963:8825552ee585
44 #include "mpbswap.h" 44 #include "mpbswap.h"
45 45
46 /// Netstream packets def and some helpers 46 /// Netstream packets def and some helpers
47 #include "stream/netstream.h" 47 #include "stream/netstream.h"
48 48
49 49 // linking hacks
50 //Set some standard variables 50 char *info_name;
51 char* dvdsub_lang=NULL; 51 char *info_artist;
52 char* audio_lang=NULL; 52 char *info_genre;
53 int sub_justify=0; 53 char *info_subject;
54 int identify=0; 54 char *info_copyright;
55 int dvdsub_id=0; 55 char *info_sourceform;
56 int audio_id=0; 56 char *info_comment;
57 int video_id=0; 57
58 void af_fmt2str() {}; 58 char* out_filename = NULL;
59 char* force_fourcc=NULL;
60 char* passtmpfile="divx2pass.log";
59 61
60 #ifdef __MINGW32__ 62 #ifdef __MINGW32__
61 #define usleep sleep 63 #define usleep sleep
62 void strsep() {}; 64 void strsep() {};
63 #endif 65 #endif
365 mp_msg(MSGT_NETST,MSGL_FATAL,"Failed to turn the socket in listen state: %s\n",strerror(errno)); 367 mp_msg(MSGT_NETST,MSGL_FATAL,"Failed to turn the socket in listen state: %s\n",strerror(errno));
366 return -1; 368 return -1;
367 } 369 }
368 return main_loop(listen_fd); 370 return main_loop(listen_fd);
369 } 371 }
370
371
372
373 //---- For libmpdemux
374
375 float stream_cache_seek_min_percent=50.0;
376 float stream_cache_min_percent=20.0;
377
378 #include <libmpdemux/demuxer.h>
379 #include <libmpdemux/stheader.h>
380
381 // audio stream skip/resync functions requires only for seeking.
382 // (they should be implemented in the audio codec layer)
383 void skip_audio_frame(sh_audio_t *sh_audio){
384 sh_audio=NULL;
385 }
386 void resync_audio_stream(sh_audio_t *sh_audio){
387 sh_audio=NULL;
388 }
389
390 int mp_input_check_interrupt(int time){
391 if(time) usleep(time);
392 return 0;
393 }
394
395 // for libdvdread:
396 #include "get_path.c"
397
398 // linking hacks
399 int stream_cache_size=0;
400 int index_mode=0;
401
402 // for demux_ogg:
403 void* vo_sub=NULL;
404 int vo_osd_changed(int new_value){ new_value++; return 0;}
405 int subcc_enabled=0;
406
407 float sub_fps=0;
408 int sub_utf8=0;
409 int suboverlap_enabled = 1;
410 float sub_delay=0;
411
412 //---------------