Changeset 196:5625b89335c7 in roaraudio


Ignore:
Timestamp:
07/20/08 21:30:58 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added basic support for codecfilter_cmd

Location:
roard
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter.c

    r194 r196  
    55struct roar_codecfilter g_codecfilter[] = { 
    66 {-1,                     "null", "null codec filter", NULL,                      NULL, NULL, NULL, NULL, NULL, NULL}, 
    7  {ROAR_CODEC_OGG_GENERAL, "cmd",  "ogg123",            "ogg123 -q -d raw -f - -", NULL, NULL, NULL, NULL, NULL, NULL}, 
     7 {ROAR_CODEC_OGG_GENERAL, "cmd",  "ogg123",            "ogg123 -q -d raw -f - -", cf_cmd_open, NULL, NULL, NULL, NULL, NULL}, 
    88 
    99 {-1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} // end of list 
     
    4040 } 
    4141 
    42  info->filter = *codecfilter_id; 
     42 info->codecfilter = *codecfilter_id; 
    4343 
    4444 if (*codecfilter_id != -1) { 
  • roard/codecfilter_cmd.c

    r172 r196  
    33#include "roard.h" 
    44 
     5int cf_cmd_open(CODECFILTER_USERDATA_T * inst, int codec, 
     6                                             struct roar_stream_server * info, 
     7                                             struct roar_codecfilter   * filter) { 
     8 int socks[2]; 
     9 
     10 if ( socketpair(AF_UNIX, SOCK_STREAM, 0, socks) == -1 ) { 
     11  return -1; 
     12 } 
     13 
     14 if ( lib_run_bg(filter->options, ((struct roar_stream*)info)->fh, socks[1], ROAR_STDERR) == -1 ) 
     15  return -1; 
     16 
     17 ((struct roar_stream*)info)->fh = socks[0]; 
     18 ((struct roar_stream*)info)->info.codec = ROAR_CODEC_DEFAULT; 
     19 close(socks[1]); 
     20 
     21 info->codecfilter = -1; 
     22 
     23 return 0; 
     24} 
     25 
    526//ll 
  • roard/include/codecfilter_cmd.h

    r172 r196  
    66#include <roaraudio.h> 
    77 
     8int cf_cmd_open(CODECFILTER_USERDATA_T * inst, int codec, 
     9                                             struct roar_stream_server * info, 
     10                                             struct roar_codecfilter   * filter); 
     11 
    812#endif 
    913 
Note: See TracChangeset for help on using the changeset viewer.