- Timestamp:
- 12/01/08 21:24:29 (3 years ago)
- Location:
- trunk/fm_server
- Files:
-
- 16 modified
-
configure (modified) (2 diffs)
-
configure.ac (modified) (1 diff)
-
src/Makefile.am (modified) (2 diffs)
-
src/Makefile.in (modified) (3 diffs)
-
src/fm_input.c (modified) (3 diffs)
-
src/fm_input.h (modified) (2 diffs)
-
src/fm_input_cdj.c (modified) (6 diffs)
-
src/fm_input_cdj.h (modified) (1 diff)
-
src/fm_input_gst/fm_input_gst.c (modified) (1 diff)
-
src/fm_output_alsa.c (modified) (1 diff)
-
src/fm_pipeline.c (modified) (1 diff)
-
src/fm_utils.c (modified) (2 diffs)
-
src/fm_utils.h (modified) (2 diffs)
-
src/main.c (modified) (2 diffs)
-
test/Makefile.am (modified) (2 diffs)
-
test/Makefile.in (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fm_server/configure
r267 r269 26188 26188 26189 26189 26190 ac_config_files="$ac_config_files Makefile po/Makefile.in src/Makefile src/fm_input_ gst/Makefile src/fm_effect_rubber/Makefile src/fm_song_db/Makefile test/Makefile"26190 ac_config_files="$ac_config_files Makefile po/Makefile.in src/Makefile src/fm_input_buffer/Makefile src/fm_input_gst/Makefile src/fm_effect_rubber/Makefile src/fm_song_db/Makefile test/Makefile" 26191 26191 26192 26192 cat >confcache <<\_ACEOF … … 26815 26815 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; 26816 26816 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; 26817 "src/fm_input_buffer/Makefile") CONFIG_FILES="$CONFIG_FILES src/fm_input_buffer/Makefile" ;; 26817 26818 "src/fm_input_gst/Makefile") CONFIG_FILES="$CONFIG_FILES src/fm_input_gst/Makefile" ;; 26818 26819 "src/fm_effect_rubber/Makefile") CONFIG_FILES="$CONFIG_FILES src/fm_effect_rubber/Makefile" ;; -
trunk/fm_server/configure.ac
r267 r269 204 204 po/Makefile.in 205 205 src/Makefile 206 src/fm_input_buffer/Makefile 206 207 src/fm_input_gst/Makefile 207 208 src/fm_effect_rubber/Makefile -
trunk/fm_server/src/Makefile.am
r234 r269 1 SUBDIRS = fm_input_ gst fm_effect_rubber fm_song_db1 SUBDIRS = fm_input_buffer fm_input_gst fm_effect_rubber fm_song_db 2 2 3 3 … … 55 55 $(GLIB_LIBS) \ 56 56 $(RGC_SERVER_LIBS) \ 57 fm_input_buffer/libfm_input_buffer.la \ 57 58 fm_input_gst/libfm_input_gst.la \ 58 59 fm_effect_rubber/libfm_effect_rubber.la \ -
trunk/fm_server/src/Makefile.in
r257 r269 121 121 fm_server_OBJECTS = $(am_fm_server_OBJECTS) 122 122 fm_server_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ 123 fm_input_buffer/libfm_input_buffer.la \ 123 124 fm_input_gst/libfm_input_gst.la \ 124 125 fm_effect_rubber/libfm_effect_rubber.la \ … … 317 318 top_builddir = @top_builddir@ 318 319 top_srcdir = @top_srcdir@ 319 SUBDIRS = fm_input_ gst fm_effect_rubber fm_song_db320 SUBDIRS = fm_input_buffer fm_input_gst fm_effect_rubber fm_song_db 320 321 AM_CPPFLAGS = $(GLIB_CFLAGS) \ 321 322 $(RGC_SERVER_CFLAGS) … … 360 361 fm_server_INCLUDES = 361 362 fm_server_LDADD = $(GLIB_LIBS) $(RGC_SERVER_LIBS) \ 363 fm_input_buffer/libfm_input_buffer.la \ 362 364 fm_input_gst/libfm_input_gst.la \ 363 365 fm_effect_rubber/libfm_effect_rubber.la \ -
trunk/fm_server/src/fm_input.c
r232 r269 38 38 PROP_STATE, 39 39 PROP_POSITION 40 }; 41 42 const char *state_names[] = { 43 "NULL", 44 "STOP", 45 "PAUSE", 46 "PLAY", 47 "INVALID" 40 48 }; 41 49 … … 132 140 element->src_ports = g_list_append (element->src_ports, src_port); 133 141 134 input->state = FM_INPUT_ STOP;142 input->state = FM_INPUT_NULL; 135 143 input->position = 0; 136 144 input->length = 0; … … 199 207 g_value_destroy (val); 200 208 } 209 210 211 const char* 212 fm_input_get_state_name (FmInputState state) 213 { 214 g_return_val_if_fail (state <= FM_INPUT_INVALID, NULL); 215 216 return state_names[state]; 217 } -
trunk/fm_server/src/fm_input.h
r48 r269 41 41 42 42 enum _FmInputState { 43 FM_INPUT_NULL = 0, 43 44 FM_INPUT_STOP, 44 45 FM_INPUT_PAUSE, 45 46 FM_INPUT_PLAY, 46 FM_ N_STATES47 FM_INPUT_INVALID 47 48 }; 48 49 … … 94 95 fm_input_state_changed (FmInput *input); 95 96 97 const char* 98 fm_input_get_state_name (FmInputState state); 99 96 100 G_END_DECLS -
trunk/fm_server/src/fm_input_cdj.c
r267 r269 28 28 #include "fm_input.h" 29 29 #include "fm_effect.h" 30 #include "fm_input_gst/jack_ringbuffer.h" 30 31 #include "fm_input_buffer/gstfmsink.h" 32 #include "fm_input_buffer/vm_buffer.h" 33 #include "fm_input_buffer/fm_gst.h" 34 #include "fm_input_buffer/fm_input_buffer.h" 35 /*#include "fm_input_gst/jack_ringbuffer.h" 31 36 #include "fm_input_gst/fm_input_gst_common.h" 32 #include "fm_input_gst/fm_input_gst.h" 37 #include "fm_input_gst/fm_input_gst.h"*/ 38 33 39 #include "fm_effect_rubber/fm_effect_rubber.h" 34 40 #include "fm_output.h" … … 197 203 { 198 204 static gint serial = 0; 199 input_cdj->input = fm_input_ gst_new ();205 input_cdj->input = fm_input_buffer_new (); 200 206 g_object_set_data (G_OBJECT (input_cdj->input), "name", g_strdup_printf ("input%d", serial)); 201 207 … … 411 417 #ifdef USE_PITCH 412 418 static void 413 fm_input_cdj_update_bpm (FmInputCDJ * input_cdj)419 fm_input_cdj_update_bpm (FmInputCDJ *cdj) 414 420 { 415 421 /*gdouble bpm; … … 426 432 427 433 static void 428 fm_input_cdj_load_file (FmInputCDJ * input_cdj,434 fm_input_cdj_load_file (FmInputCDJ *cdj, 429 435 const gchar *filename) 430 436 { 431 437 g_print("loading %s\n", filename); 438 439 FmInputState state = fm_input_get_state (FM_INPUT (cdj->input)); 440 441 if (state > FM_INPUT_STOP) 442 fm_input_set_state (FM_INPUT (cdj->input), FM_INPUT_STOP); 443 444 fm_input_set_state (FM_INPUT (cdj->input), FM_INPUT_NULL); 445 432 446 GValue *fn = g_value_init_string(filename); 433 g_object_set_property (G_OBJECT( input_cdj->input), "filename", fn);447 g_object_set_property (G_OBJECT(cdj->input), "filename", fn); 434 448 g_value_destroy(fn); 435 449 436 input_cdj->beat_info = fm_song_db_get_beatinfo (global_song_db, filename); 437 438 if (!input_cdj->beat_info) { 450 fm_input_set_state (FM_INPUT (cdj->input), FM_INPUT_STOP); 451 452 if (cdj->state == FM_CDJ_PAUSE) 453 fm_input_set_state (FM_INPUT (cdj->input), FM_INPUT_PAUSE); 454 455 if (cdj->state == FM_CDJ_PLAY) 456 fm_input_set_state (FM_INPUT (cdj->input), FM_INPUT_PLAY); 457 458 cdj->beat_info = fm_song_db_get_beatinfo (global_song_db, filename); 459 460 if (!cdj->beat_info) { 439 461 g_print ("Song \"%s\" isn't in the song database\n", filename); 440 462 return; 441 463 } 442 464 443 if (! input_cdj->beat_info->beatsections) {465 if (!cdj->beat_info->beatsections) { 444 466 g_print ("Song \"%s\" doesn't have beat information\n", filename); 445 467 return; 446 468 } 447 469 448 fm_sync_dump_beatsections ( input_cdj->beat_info);470 fm_sync_dump_beatsections (cdj->beat_info); 449 471 /*FmBeatSection *beat_section = beat_info->beatsections->data; 450 472 input_cdj->beat_section = beat_section; … … 517 539 518 540 gint64 offset = value * NSECS_FOR_UNIT; 519 fm_input_ gst_seek_relative (input_cdj->input, offset);541 fm_input_buffer_seek_relative (input_cdj->input, offset); 520 542 } 521 543 … … 525 547 gdouble pos) 526 548 { 527 fm_input_ gst_seek_direct (input_cdj->input, pos);528 } 549 fm_input_buffer_seek_direct (input_cdj->input, pos); 550 } -
trunk/fm_server/src/fm_input_cdj.h
r246 r269 35 35 FmInputCDJCueState cue_state; 36 36 37 FmInput Gst*input;37 FmInputBuffer *input; 38 38 FmEffectRubber *rate; 39 39 -
trunk/fm_server/src/fm_input_gst/fm_input_gst.c
r262 r269 806 806 seek_target = 0; 807 807 808 /* if ((seek_target == 0) && (input_gst->read_track->start_at > 0))809 seek_target =input_gst->read_track->start_at;*/810 811 808 input_gst->seek_at_ns = seek_target; 812 809 } -
trunk/fm_server/src/fm_output_alsa.c
r263 r269 307 307 } 308 308 309 //g_print ("ALSA sample rate: %d\n", output->sample_rate);309 g_print ("ALSA sample rate: %d\n", output->sample_rate); 310 310 311 311 guint n_channels = FM_CHANNELS_STEREO; -
trunk/fm_server/src/fm_pipeline.c
r232 r269 141 141 g_print ("new pipeline created\n"); 142 142 143 /* !!!!!!!!!!!!!!!!!!!! */ 143 144 /* Start with a reasonable default, the output element will alter this if it needs to */ 144 pipeline->sample_rate = 48000; 145 /*pipeline->sample_rate = 48000;*/ 146 pipeline->sample_rate = -1; 145 147 146 148 pipeline->sync_info = fm_sync_new (); -
trunk/fm_server/src/fm_utils.c
r263 r269 43 43 guint prio) 44 44 { 45 #if USE_RT_PRIO 45 46 #ifdef HAVE_SCHED_SETSCHEDULER 46 47 … … 57 58 return TRUE; 58 59 } 59 60 #else 61 return FALSE; 62 #endif 60 63 #else 61 64 return FALSE; -
trunk/fm_server/src/fm_utils.h
r194 r269 21 21 * 22 22 */ 23 24 25 #define USE_RT_PRIO FALSE 23 26 24 27 … … 58 61 void 59 62 fm_sem_destroy (FmSemaphore *sem); 63 64 65 66 #define FM_MIN(x, y) (x) < (y) ? (x) : (y) -
trunk/fm_server/src/main.c
r239 r269 60 60 void fm_effect_pan_class_register (void); 61 61 void fm_input_gst_class_register (void); 62 void fm_input_buffer_class_register (void); 62 63 void fm_input_cdj_class_register (void); 63 64 void fm_mixer_class_register (void); … … 127 128 fm_effect_rate_class_register (); 128 129 fm_effect_rubber_class_register (); 129 fm_input_gst_class_register (); 130 // fm_input_gst_class_register (); 131 fm_input_buffer_class_register (); 130 132 fm_input_cdj_class_register (); 131 133 fm_mixer_class_register (); -
trunk/fm_server/test/Makefile.am
r224 r269 7 7 8 8 9 bin_PROGRAMS = test_simple test_play_file test_beat_master 9 bin_PROGRAMS = test_simple test_play_file test_beat_master test_buffer 10 10 11 11 … … 18 18 test_beat_master_SOURCES = \ 19 19 test_beat_master.c 20 21 test_buffer_SOURCES = \ 22 test_buffer.c -
trunk/fm_server/test/Makefile.in
r257 r269 34 34 host_triplet = @host@ 35 35 bin_PROGRAMS = test_simple$(EXEEXT) test_play_file$(EXEEXT) \ 36 test_beat_master$(EXEEXT) 36 test_beat_master$(EXEEXT) test_buffer$(EXEEXT) 37 37 subdir = test 38 38 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in … … 58 58 test_beat_master_DEPENDENCIES = $(am__DEPENDENCIES_1) \ 59 59 $(am__DEPENDENCIES_1) 60 am_test_buffer_OBJECTS = test_buffer.$(OBJEXT) 61 test_buffer_OBJECTS = $(am_test_buffer_OBJECTS) 62 test_buffer_LDADD = $(LDADD) 63 test_buffer_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) 60 64 am_test_play_file_OBJECTS = test_play_file.$(OBJEXT) 61 65 test_play_file_OBJECTS = $(am_test_play_file_OBJECTS) … … 79 83 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ 80 84 $(LDFLAGS) -o $@ 81 SOURCES = $(test_beat_master_SOURCES) $(test_ play_file_SOURCES) \82 $(test_ simple_SOURCES)83 DIST_SOURCES = $(test_beat_master_SOURCES) $(test_ play_file_SOURCES) \84 $(test_ simple_SOURCES)85 SOURCES = $(test_beat_master_SOURCES) $(test_buffer_SOURCES) \ 86 $(test_play_file_SOURCES) $(test_simple_SOURCES) 87 DIST_SOURCES = $(test_beat_master_SOURCES) $(test_buffer_SOURCES) \ 88 $(test_play_file_SOURCES) $(test_simple_SOURCES) 85 89 ETAGS = etags 86 90 CTAGS = ctags … … 258 262 test_beat_master.c 259 263 264 test_buffer_SOURCES = \ 265 test_buffer.c 266 260 267 all: all-am 261 268 … … 322 329 @rm -f test_beat_master$(EXEEXT) 323 330 $(LINK) $(test_beat_master_OBJECTS) $(test_beat_master_LDADD) $(LIBS) 331 test_buffer$(EXEEXT): $(test_buffer_OBJECTS) $(test_buffer_DEPENDENCIES) 332 @rm -f test_buffer$(EXEEXT) 333 $(LINK) $(test_buffer_OBJECTS) $(test_buffer_LDADD) $(LIBS) 324 334 test_play_file$(EXEEXT): $(test_play_file_OBJECTS) $(test_play_file_DEPENDENCIES) 325 335 @rm -f test_play_file$(EXEEXT) … … 336 346 337 347 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_beat_master.Po@am__quote@ 348 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_buffer.Po@am__quote@ 338 349 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_play_file.Po@am__quote@ 339 350 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_simple.Po@am__quote@
