Gecko:MediaRecorder: Difference between revisions

Jump to navigation Jump to search
Line 85: Line 85:


  /**
  /**
   * This class is similar to MediaStreamGraph.
   * MediaRecord keep a state-machine and calls
   * It take response to initialize all the component and link them together.
   * It take response to initialize all the component and link them together.
   */
   */
  class MediaEncoder : MediaStreamListener {
  class MediaEncoderListener : MediaStreamListener {
  public:
  public:
     /* Callback functions for MediaStream */
     /* Callback functions for MediaStream */
Line 104: Line 104:
     void NotifyQueuedTrackChanges(MediaStreamGraph, TrackID, TrackRate, TrackTicks, uint32_t, MediaSegment);
     void NotifyQueuedTrackChanges(MediaStreamGraph, TrackID, TrackRate, TrackTicks, uint32_t, MediaSegment);
   
   
     /* Callback functions to JS */
     <strike>/* Callback functions to JS */
     void SetDataAvailableCallback()
     void SetDataAvailableCallback()
     void SetErrorCallback()
     void SetErrorCallback()
Line 114: Line 114:
     void SetStopCallback()
     void SetStopCallback()
     void SetUnmuteTrackCallback()  /*NOT IMPL*/
     void SetUnmuteTrackCallback()  /*NOT IMPL*/
     void SetWarningCallback()
     void SetWarningCallback()</strike>
 
    enum EncoderState {
        NOT_STARTED,    // Encoder initialized, no data inside
        ENCODING,      // Encoder work on current data
        DATA_AVAILABLE, // Some encoded data available
        ENCODED,        // All input track stopped (EOS reached)
    }
 
    /* Status/Data polling function */
    void GetEncodedData(unsigned char* buffer, int length);
    EncoderState GetEncoderState();
   
     /* Option query functions */
     /* Option query functions */
     nsArray<String> GetSupportMIMEType()
     nsArray<String> GetSupportMIMEType()
Line 126: Line 137:
     void SetVideoHeight();
     void SetVideoHeight();
   
   
     /* JS control functions */
     <strike>/* JS control functions */
     void MuteTrack(TrackID)  /*NOT IMPL*/
     void MuteTrack(TrackID)  /*NOT IMPL*/
     void Pause()
     void Pause()
Line 135: Line 146:
     void Stop()
     void Stop()
     void TakePhoto  /*NOT IMPL*/
     void TakePhoto  /*NOT IMPL*/
     void UnmuteTrack  /*NOT IMPL*/
     void UnmuteTrack  /*NOT IMPL*/</strike>
   
   
     /* initial internal state and codecs */
     /* initial internal state and codecs */
Confirmed users
157

edits

Navigation menu