OggStream: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
Line 28: Line 28:
== API ==
== API ==


'''coming soon'''
The _init function starts the process by telling liboggstream what is being put into it and what is needed from it. 
 
extern oggstream_state *oggstream_create(void);
extern int oggstream_destroy(*oggstream_state);
extern int oggstream_init(oggstream_state *oss,
                          int              num_inputs,
                          os_input        *inputs
                          int              num_outputs,
                          os_output      *outputs);
struct os_input {
  char *method;
  void *address; /* Pointer type depends on method */
};
struct os_output {
  char *method;
  void *address; /* Pointer type depends on method */
  /* this is missing format preference, is this the right place? */
};

Revision as of 07:36, 22 November 2004

Goals

  • Abstract:
    • application (app) can be nothing more than a gui frontend to liboggstream
      • allows very simple media players, editors, and stream systems to be developed
      • minimizes duplicated effort (and thus faster deployment)
      • ensures consistant Ogg support for all media players (ie, chaining, seeking, etc)
    • can also be used to just decode codecs, choosing to handle file/stream receiving


  • Technical:
    • apps need to know information about a stream;
      • what codecs it contains
      • what it's total length is (or non-seekable)
    • apps need to be able to exchange uncompressed data with the library for encoding/decoding
    • for non-transcoding operations (ie, streaming), apps also need to be able to exchange raw codec packets
    • when meta/effects codecs are available, apps need to be able to access "processed" and "unprocessed" data
    • support multiple "protocol" plugins (ie, file, http, etc)
      • must provide buffered/cached info for app. (ie, for seek bar to show buffer status)
        • makes it easy to show holes in stream
      • allow app to provide data through "pipe" or "memory" protocol plugin
    • "Auto Update" system for automatic plugin search/installation from central site
      • list licenses and restrictions
        • it should prefer Xiph, then Free, then Proprietary, and finally Commercial
        • this can either be based on their country or simply run with US IP law
      • Linux-based systems can use distro-specific installation method (Gentoo can use Portage, Redhat use RPM, etc)

API

The _init function starts the process by telling liboggstream what is being put into it and what is needed from it.

extern oggstream_state *oggstream_create(void);
extern int oggstream_destroy(*oggstream_state);
extern int oggstream_init(oggstream_state *oss,
                          int              num_inputs,
                          os_input        *inputs
                          int              num_outputs,
                          os_output       *outputs);
struct os_input {
  char *method;
  void *address; /* Pointer type depends on method */
};
struct os_output {
  char *method;
  void *address; /* Pointer type depends on method */
  /* this is missing format preference, is this the right place? */
};