javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java
equal
deleted
inserted
replaced
156 * |
156 * |
157 * @exception IllegalArgumentException Thrown if |
157 * @exception IllegalArgumentException Thrown if |
158 * <code>stream</code> is null. |
158 * <code>stream</code> is null. |
159 * |
159 * |
160 */ |
160 */ |
161 public void setRecordStream(OutputStream aStream) |
161 synchronized public void setRecordStream(OutputStream aStream) |
162 { |
162 { |
163 checkState(); |
163 checkState(); |
164 if (null == aStream) |
164 if (null == aStream) |
165 { |
165 { |
166 throw new IllegalArgumentException("Stream is null"); |
166 throw new IllegalArgumentException("Stream is null"); |
234 * @exception MediaException Thrown if the locator is not in URL syntax |
234 * @exception MediaException Thrown if the locator is not in URL syntax |
235 * or it specifies a protocol that is not supported. |
235 * or it specifies a protocol that is not supported. |
236 * @exception SecurityException Thrown if the caller does not |
236 * @exception SecurityException Thrown if the caller does not |
237 * have security permission to set the record location. |
237 * have security permission to set the record location. |
238 */ |
238 */ |
239 public void setRecordLocation(String aLocator) |
239 synchronized public void setRecordLocation(String aLocator) |
240 throws IOException, MediaException |
240 throws IOException, MediaException |
241 { |
241 { |
242 checkState(); |
242 checkState(); |
243 if (aLocator == null) |
243 if (aLocator == null) |
244 { |
244 { |
305 * The content type is given in the |
305 * The content type is given in the |
306 * <a HREF="../Manager.html#content-type">content type syntax</a>. |
306 * <a HREF="../Manager.html#content-type">content type syntax</a>. |
307 * |
307 * |
308 * @return The content type of the media. |
308 * @return The content type of the media. |
309 */ |
309 */ |
310 public String getContentType() |
310 synchronized public String getContentType() |
311 { |
311 { |
312 checkState(); |
312 checkState(); |
313 return _getContentType(iEventSource, iControlHandle); |
313 return _getContentType(iEventSource, iControlHandle); |
314 } |
314 } |
315 |
315 |
344 * If <code>commit</code> has been called and |
344 * If <code>commit</code> has been called and |
345 * <code>setRecordLocation</code> or <code>setRecordStream</code> |
345 * <code>setRecordLocation</code> or <code>setRecordStream</code> |
346 * has not been called. |
346 * has not been called. |
347 * </ul> |
347 * </ul> |
348 */ |
348 */ |
349 public void startRecord() |
349 synchronized public void startRecord() |
350 { |
350 { |
351 checkState(); |
351 checkState(); |
352 // Ignore if startRecord is called when the recording has already started |
352 // Ignore if startRecord is called when the recording has already started |
353 if (iStarted) |
353 if (iStarted) |
354 { |
354 { |
388 * <p> |
388 * <p> |
389 * When <code>stopRecord</code> returns, the recording has stopped |
389 * When <code>stopRecord</code> returns, the recording has stopped |
390 * and a <i>RECORD_STOPPED</i> event will be delivered through the |
390 * and a <i>RECORD_STOPPED</i> event will be delivered through the |
391 * <code>PlayerListener</code>. |
391 * <code>PlayerListener</code>. |
392 */ |
392 */ |
393 public void stopRecord() |
393 synchronized public void stopRecord() |
394 { |
394 { |
395 checkState(); |
395 checkState(); |
396 // If stopRecord is called when the recording has already stopped, |
396 // If stopRecord is called when the recording has already stopped, |
397 // it will be ignored. |
397 // it will be ignored. |
398 if (!iStarted) |
398 if (!iStarted) |
520 * @exception IllegalArgumentException Thrown if the given size |
520 * @exception IllegalArgumentException Thrown if the given size |
521 * is invalid. |
521 * is invalid. |
522 * @exception MediaException Thrown if setting the record |
522 * @exception MediaException Thrown if setting the record |
523 * size limit is not supported. |
523 * size limit is not supported. |
524 */ |
524 */ |
525 public int setRecordSizeLimit(int aSize) throws MediaException |
525 synchronized public int setRecordSizeLimit(int aSize) throws MediaException |
526 { |
526 { |
527 checkState(); |
527 checkState(); |
528 if (aSize <= 0) |
528 if (aSize <= 0) |
529 { |
529 { |
530 throw new IllegalArgumentException("Size should be > 0"); |
530 throw new IllegalArgumentException("Size should be > 0"); |
587 * cannot be erased. The current recording is not valid. |
587 * cannot be erased. The current recording is not valid. |
588 * To record again, <code>setRecordLocation</code> or |
588 * To record again, <code>setRecordLocation</code> or |
589 * <code>setRecordStream</code> must be called. |
589 * <code>setRecordStream</code> must be called. |
590 * |
590 * |
591 */ |
591 */ |
592 public void reset() throws IOException |
592 synchronized public void reset() throws IOException |
593 { |
593 { |
594 checkState(); |
594 checkState(); |
595 if (null == iOutputStreamWriter) |
595 if (null == iOutputStreamWriter) |
596 { |
596 { |
597 return; |
597 return; |