Lines Matching defs:media

72      * Create a SlideModel with exist media collection.
75 * @param mediaList The exist media collection.
77 * @throws IllegalStateException One or more media in the mediaList cannot
85 for (MediaModel media : mediaList) {
86 internalAdd(media);
88 int mediaDur = media.getDuration();
97 private void internalAdd(MediaModel media) throws IllegalStateException {
98 if (media == null) {
103 if (media.isText()) {
104 String contentType = media.getContentType();
107 internalAddOrReplace(mText, media);
108 mText = media;
110 Log.w(TAG, "[SlideModel] content type " + media.getContentType() +
113 } else if (media.isImage()) {
115 internalAddOrReplace(mImage, media);
116 mImage = media;
119 Log.w(TAG, "[SlideModel] content type " + media.getContentType() +
122 } else if (media.isAudio()) {
124 internalAddOrReplace(mAudio, media);
125 mAudio = media;
128 Log.w(TAG, "[SlideModel] content type " + media.getContentType() +
131 } else if (media.isVideo()) {
133 internalAddOrReplace(mVideo, media);
134 mVideo = media;
138 Log.w(TAG, "[SlideModel] content type " + media.getContentType() +
144 private void internalAddOrReplace(MediaModel old, MediaModel media) {
145 // If the media is resizable, at this point consider it to be zero length.
147 // slideshow and equally allocate it to all the resizeable media items and resize them.
148 int addSize = media.getMediaResizable() ? 0 : media.getMediaSize();
154 mMedia.add(media);
169 mMedia.set(mMedia.indexOf(old), media);
174 media.registerModelChangedObserver(observer);
193 // If the media is resizable, at this point consider it to be zero length.
195 // slideshow and equally allocate it to all the resizeable media items and resize them.
272 * a media object in the same type, the media object will be replaced by
275 * @param object A media object to be added into the slide.
277 * @throws IllegalStateException One or more media in the mediaList cannot
295 for (MediaModel media : mMedia) {
296 media.unregisterAllModelChangedObservers();
297 int decreaseSize = media.getMediaSize();
395 MediaModel media = mMedia.get(location);
396 if ((media != null) && internalRemove(media)) {
399 return media;
443 for (MediaModel media : mMedia) {
444 media.registerModelChangedObserver(observer);
451 for (MediaModel media : mMedia) {
452 media.unregisterModelChangedObserver(observer);
458 for (MediaModel media : mMedia) {
459 media.unregisterAllModelChangedObservers();