ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP); processor.setContentDescriptor(cd);
/** * Creates a <tt>ContentDescriptor</tt> to be set on a specific * <tt>Processor</tt> of captured media to be sent to the remote peer. * Allows extenders to override. The default implementation returns * {@link ContentDescriptor#RAW_RTP}. * * @param processor the <tt>Processor</tt> of captured media to be sent to * the remote peer which is to have its <tt>contentDescriptor</tt> set to * the returned <tt>ContentDescriptor</tt> * @return a <tt>ContentDescriptor</tt> to be set on the specified * <tt>processor</tt> of captured media to be sent to the remote peer */ protected ContentDescriptor createProcessorContentDescriptor( Processor processor) { return (contentDescriptor == null) ? new ContentDescriptor(ContentDescriptor.RAW_RTP) : contentDescriptor; }
/** * Implements {@link SourceStream#getContentDescriptor()}. Returns a * <tt>ContentDescriptor</tt> which describes the content type of this * instance. * * @return a <tt>ContentDescriptor</tt> which describes the content type of * this instance */ @Override public ContentDescriptor getContentDescriptor() { return new ContentDescriptor(audioMixer.getContentType()); }
/** * Returns a content descriptor to create a recording session with. * * @param format the format that corresponding to the content descriptor * @return content descriptor * @throws IllegalArgumentException if the specified <tt>format</tt> is not * a supported recording format */ private ContentDescriptor getContentDescriptor(String format) throws IllegalArgumentException { String type; if (SoundFileUtils.wav.equalsIgnoreCase(format)) type = FileTypeDescriptor.WAVE; else if (SoundFileUtils.mp3.equalsIgnoreCase(format)) type = FileTypeDescriptor.MPEG_AUDIO; else if (SoundFileUtils.gsm.equalsIgnoreCase(format)) type = FileTypeDescriptor.GSM; else if (SoundFileUtils.au.equalsIgnoreCase(format)) type = FileTypeDescriptor.BASIC_AUDIO; else if (SoundFileUtils.aif.equalsIgnoreCase(format)) type = FileTypeDescriptor.AIFF; else { throw new IllegalArgumentException( format + " is not a supported recording format."); } return new ContentDescriptor(type); }
/** * Constructor. * * @param translator the <tt>RTPTranslator</tt> to which this instance will * attach in order to record media. */ public RecorderRtpImpl(RTPTranslator translator) { this.translator = (RTPTranslatorImpl) translator; boolean performActiveSpeakerDetection = false; if (cfg != null) { performActiveSpeakerDetection = cfg.getBoolean( PERFORM_ASD_PNAME, performActiveSpeakerDetection); // setting custom audio codec String audioCodec = cfg.getString(AUDIO_CODEC_PNAME); if ("wav".equalsIgnoreCase(audioCodec)) { AUDIO_FILENAME_SUFFIX = ".wav"; AUDIO_CONTENT_DESCRIPTOR = new ContentDescriptor(FileTypeDescriptor.WAVE); } } this.performActiveSpeakerDetection = performActiveSpeakerDetection; }
ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP); processor.setContentDescriptor(cd);
ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP); processor.setContentDescriptor(cd);