1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
|
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.media.videoeditor;
import java.io.File;
import java.io.IOException;
import java.lang.ref.SoftReference;
import android.graphics.Bitmap;
import android.media.videoeditor.MediaArtistNativeHelper.ClipSettings;
import android.media.videoeditor.MediaArtistNativeHelper.Properties;
import android.media.videoeditor.VideoEditorProfile;
import android.view.Surface;
import android.view.SurfaceHolder;
/**
* This class represents a video clip item on the storyboard
* {@hide}
*/
public class MediaVideoItem extends MediaItem {
/**
* Instance variables
*/
private final int mWidth;
private final int mHeight;
private final int mAspectRatio;
private final int mFileType;
private final int mVideoType;
private final int mVideoProfile;
private final int mVideoLevel;
private final int mVideoBitrate;
private final long mDurationMs;
private final int mAudioBitrate;
private final int mFps;
private final int mAudioType;
private final int mAudioChannels;
private final int mAudioSamplingFrequency;
private long mBeginBoundaryTimeMs;
private long mEndBoundaryTimeMs;
private int mVolumePercentage;
private boolean mMuted;
private String mAudioWaveformFilename;
private MediaArtistNativeHelper mMANativeHelper;
private VideoEditorImpl mVideoEditor;
private final int mVideoRotationDegree;
/**
* The audio waveform data
*/
private SoftReference<WaveformData> mWaveformData;
/**
* An object of this type cannot be instantiated with a default constructor
*/
@SuppressWarnings("unused")
private MediaVideoItem() throws IOException {
this(null, null, null, RENDERING_MODE_BLACK_BORDER);
}
/**
* Constructor
*
* @param editor The video editor reference
* @param mediaItemId The MediaItem id
* @param filename The image file name
* @param renderingMode The rendering mode
*
* @throws IOException if the file cannot be opened for reading
*/
public MediaVideoItem(VideoEditor editor, String mediaItemId, String filename,
int renderingMode) throws IOException {
this(editor, mediaItemId, filename, renderingMode, 0, END_OF_FILE, 100, false, null);
}
/**
* Constructor
*
* @param editor The video editor reference
* @param mediaItemId The MediaItem id
* @param filename The image file name
* @param renderingMode The rendering mode
* @param beginMs Start time in milliseconds. Set to 0 to extract from the
* beginning
* @param endMs End time in milliseconds. Set to {@link #END_OF_FILE} to
* extract until the end
* @param volumePercent in %/. 100% means no change; 50% means half value, 200%
* means double, 0% means silent.
* @param muted true if the audio is muted
* @param audioWaveformFilename The name of the audio waveform file
*
* @throws IOException if the file cannot be opened for reading
*/
MediaVideoItem(VideoEditor editor, String mediaItemId, String filename,
int renderingMode, long beginMs, long endMs, int volumePercent, boolean muted,
String audioWaveformFilename) throws IOException {
super(editor, mediaItemId, filename, renderingMode);
if (editor instanceof VideoEditorImpl) {
mMANativeHelper = ((VideoEditorImpl)editor).getNativeContext();
mVideoEditor = ((VideoEditorImpl)editor);
}
final Properties properties;
try {
properties = mMANativeHelper.getMediaProperties(filename);
} catch ( Exception e) {
throw new IllegalArgumentException(e.getMessage() + " : " + filename);
}
/** Check the platform specific maximum import resolution */
VideoEditorProfile veProfile = VideoEditorProfile.get();
if (veProfile == null) {
throw new RuntimeException("Can't get the video editor profile");
}
final int maxInputWidth = veProfile.maxInputVideoFrameWidth;
final int maxInputHeight = veProfile.maxInputVideoFrameHeight;
if ((properties.width > maxInputWidth) ||
(properties.height > maxInputHeight)) {
throw new IllegalArgumentException(
"Unsupported import resolution. Supported maximum width:" +
maxInputWidth + " height:" + maxInputHeight +
", current width:" + properties.width +
" height:" + properties.height);
}
/** Check the platform specific maximum video profile and level */
if (!properties.profileSupported) {
throw new IllegalArgumentException(
"Unsupported video profile " + properties.profile);
}
if (!properties.levelSupported) {
throw new IllegalArgumentException(
"Unsupported video level " + properties.level);
}
switch (mMANativeHelper.getFileType(properties.fileType)) {
case MediaProperties.FILE_3GP:
case MediaProperties.FILE_MP4:
case MediaProperties.FILE_M4V:
break;
default:
throw new IllegalArgumentException("Unsupported Input File Type");
}
switch (mMANativeHelper.getVideoCodecType(properties.videoFormat)) {
case MediaProperties.VCODEC_H263:
case MediaProperties.VCODEC_H264:
case MediaProperties.VCODEC_MPEG4:
break;
default:
throw new IllegalArgumentException("Unsupported Video Codec Format in Input File");
}
mWidth = properties.width;
mHeight = properties.height;
mAspectRatio = mMANativeHelper.getAspectRatio(properties.width,
properties.height);
mFileType = mMANativeHelper.getFileType(properties.fileType);
mVideoType = mMANativeHelper.getVideoCodecType(properties.videoFormat);
mVideoProfile = properties.profile;
mVideoLevel = properties.level;
mDurationMs = properties.videoDuration;
mVideoBitrate = properties.videoBitrate;
mAudioBitrate = properties.audioBitrate;
mFps = (int)properties.averageFrameRate;
mAudioType = mMANativeHelper.getAudioCodecType(properties.audioFormat);
mAudioChannels = properties.audioChannels;
mAudioSamplingFrequency = properties.audioSamplingFrequency;
mBeginBoundaryTimeMs = beginMs;
mEndBoundaryTimeMs = endMs == END_OF_FILE ? mDurationMs : endMs;
mVolumePercentage = volumePercent;
mMuted = muted;
mAudioWaveformFilename = audioWaveformFilename;
if (audioWaveformFilename != null) {
mWaveformData = new SoftReference<WaveformData>(
new WaveformData(audioWaveformFilename));
} else {
mWaveformData = null;
}
mVideoRotationDegree = properties.videoRotation;
}
/**
* Sets the start and end marks for trimming a video media item.
* This method will adjust the duration of bounding transitions, effects
* and overlays if the current duration of the transactions become greater
* than the maximum allowable duration.
*
* @param beginMs Start time in milliseconds. Set to 0 to extract from the
* beginning
* @param endMs End time in milliseconds. Set to {@link #END_OF_FILE} to
* extract until the end
*
* @throws IllegalArgumentException if the start time is greater or equal than
* end time, the end time is beyond the file duration, the start time
* is negative
*/
public void setExtractBoundaries(long beginMs, long endMs) {
if (beginMs > mDurationMs) {
throw new IllegalArgumentException("setExtractBoundaries: Invalid start time");
}
if (endMs > mDurationMs) {
throw new IllegalArgumentException("setExtractBoundaries: Invalid end time");
}
if ((endMs != -1) && (beginMs >= endMs) ) {
throw new IllegalArgumentException("setExtractBoundaries: Start time is greater than end time");
}
if ((beginMs < 0) || ((endMs != -1) && (endMs < 0))) {
throw new IllegalArgumentException("setExtractBoundaries: Start time or end time is negative");
}
mMANativeHelper.setGeneratePreview(true);
if (beginMs != mBeginBoundaryTimeMs) {
if (mBeginTransition != null) {
mBeginTransition.invalidate();
}
}
if (endMs != mEndBoundaryTimeMs) {
if (mEndTransition != null) {
mEndTransition.invalidate();
}
}
mBeginBoundaryTimeMs = beginMs;
mEndBoundaryTimeMs = endMs;
adjustTransitions();
mVideoEditor.updateTimelineDuration();
/**
* Note that the start and duration of any effects and overlays are
* not adjusted nor are they automatically removed if they fall
* outside the new boundaries.
*/
}
/**
* @return The boundary begin time
*/
public long getBoundaryBeginTime() {
return mBeginBoundaryTimeMs;
}
/**
* @return The boundary end time
*/
public long getBoundaryEndTime() {
return mEndBoundaryTimeMs;
}
/*
* {@inheritDoc}
*/
@Override
public void addEffect(Effect effect) {
if (effect instanceof EffectKenBurns) {
throw new IllegalArgumentException("Ken Burns effects cannot be applied to MediaVideoItem");
}
super.addEffect(effect);
}
/*
* {@inheritDoc}
*/
@Override
public Bitmap getThumbnail(int width, int height, long timeMs) {
if (timeMs > mDurationMs) {
throw new IllegalArgumentException("Time Exceeds duration");
}
if (timeMs < 0) {
throw new IllegalArgumentException("Invalid Time duration");
}
if ((width <= 0) || (height <= 0)) {
throw new IllegalArgumentException("Invalid Dimensions");
}
if (mVideoRotationDegree == 90 || mVideoRotationDegree == 270) {
int temp = width;
width = height;
height = temp;
}
return mMANativeHelper.getPixels(
getFilename(), width, height, timeMs, mVideoRotationDegree);
}
/*
* {@inheritDoc}
*/
@Override
public void getThumbnailList(int width, int height,
long startMs, long endMs,
int thumbnailCount,
int[] indices,
GetThumbnailListCallback callback)
throws IOException {
if (startMs > endMs) {
throw new IllegalArgumentException("Start time is greater than end time");
}
if (endMs > mDurationMs) {
throw new IllegalArgumentException("End time is greater than file duration");
}
if ((height <= 0) || (width <= 0)) {
throw new IllegalArgumentException("Invalid dimension");
}
if (mVideoRotationDegree == 90 || mVideoRotationDegree == 270) {
int temp = width;
width = height;
height = temp;
}
mMANativeHelper.getPixelsList(getFilename(), width, height,
startMs, endMs, thumbnailCount, indices, callback,
mVideoRotationDegree);
}
/*
* {@inheritDoc}
*/
@Override
void invalidateTransitions(long startTimeMs, long durationMs) {
/**
* Check if the item overlaps with the beginning and end transitions
*/
if (mBeginTransition != null) {
if (isOverlapping(startTimeMs, durationMs,
mBeginBoundaryTimeMs, mBeginTransition.getDuration())) {
mBeginTransition.invalidate();
}
}
if (mEndTransition != null) {
final long transitionDurationMs = mEndTransition.getDuration();
if (isOverlapping(startTimeMs, durationMs,
mEndBoundaryTimeMs - transitionDurationMs, transitionDurationMs)) {
mEndTransition.invalidate();
}
}
}
/*
* {@inheritDoc}
*/
@Override
void invalidateTransitions(long oldStartTimeMs, long oldDurationMs, long newStartTimeMs,
long newDurationMs) {
/**
* Check if the item overlaps with the beginning and end transitions
*/
if (mBeginTransition != null) {
final long transitionDurationMs = mBeginTransition.getDuration();
final boolean oldOverlap = isOverlapping(oldStartTimeMs, oldDurationMs,
mBeginBoundaryTimeMs, transitionDurationMs);
final boolean newOverlap = isOverlapping(newStartTimeMs, newDurationMs,
mBeginBoundaryTimeMs, transitionDurationMs);
/**
* Invalidate transition if:
*
* 1. New item overlaps the transition, the old one did not
* 2. New item does not overlap the transition, the old one did
* 3. New and old item overlap the transition if begin or end
* time changed
*/
if (newOverlap != oldOverlap) { // Overlap has changed
mBeginTransition.invalidate();
} else if (newOverlap) { // Both old and new overlap
if ((oldStartTimeMs != newStartTimeMs) ||
!(oldStartTimeMs + oldDurationMs > transitionDurationMs &&
newStartTimeMs + newDurationMs > transitionDurationMs)) {
mBeginTransition.invalidate();
}
}
}
if (mEndTransition != null) {
final long transitionDurationMs = mEndTransition.getDuration();
final boolean oldOverlap = isOverlapping(oldStartTimeMs, oldDurationMs,
mEndBoundaryTimeMs - transitionDurationMs, transitionDurationMs);
final boolean newOverlap = isOverlapping(newStartTimeMs, newDurationMs,
mEndBoundaryTimeMs - transitionDurationMs, transitionDurationMs);
/**
* Invalidate transition if:
*
* 1. New item overlaps the transition, the old one did not
* 2. New item does not overlap the transition, the old one did
* 3. New and old item overlap the transition if begin or end
* time changed
*/
if (newOverlap != oldOverlap) { // Overlap has changed
mEndTransition.invalidate();
} else if (newOverlap) { // Both old and new overlap
if ((oldStartTimeMs + oldDurationMs != newStartTimeMs + newDurationMs) ||
((oldStartTimeMs > mEndBoundaryTimeMs - transitionDurationMs) ||
newStartTimeMs > mEndBoundaryTimeMs - transitionDurationMs)) {
mEndTransition.invalidate();
}
}
}
}
/*
* {@inheritDoc}
*/
@Override
public int getAspectRatio() {
return mAspectRatio;
}
/*
* {@inheritDoc}
*/
@Override
public int getFileType() {
return mFileType;
}
/*
* {@inheritDoc}
*/
@Override
public int getWidth() {
if (mVideoRotationDegree == 90 ||
mVideoRotationDegree == 270) {
return mHeight;
} else {
return mWidth;
}
}
/*
* {@inheritDoc}
*/
@Override
public int getHeight() {
if (mVideoRotationDegree == 90 ||
mVideoRotationDegree == 270) {
return mWidth;
} else {
return mHeight;
}
}
/*
* {@inheritDoc}
*/
@Override
public long getDuration() {
return mDurationMs;
}
/*
* {@inheritDoc}
*/
@Override
public long getTimelineDuration() {
return mEndBoundaryTimeMs - mBeginBoundaryTimeMs;
}
/**
* Render a frame according to the playback (in the native aspect ratio) for
* the specified media item. All effects and overlays applied to the media
* item are ignored. The extract boundaries are also ignored. This method
* can be used to playback frames when implementing trimming functionality.
*
* @param surfaceHolder SurfaceHolder used by the application
* @param timeMs time corresponding to the frame to display (relative to the
* the beginning of the media item).
* @return The accurate time stamp of the frame that is rendered .
* @throws IllegalStateException if a playback, preview or an export is
* already in progress
* @throws IllegalArgumentException if time is negative or greater than the
* media item duration
*/
public long renderFrame(SurfaceHolder surfaceHolder, long timeMs) {
if (surfaceHolder == null) {
throw new IllegalArgumentException("Surface Holder is null");
}
if (timeMs > mDurationMs || timeMs < 0) {
throw new IllegalArgumentException("requested time not correct");
}
final Surface surface = surfaceHolder.getSurface();
if (surface == null) {
throw new RuntimeException("Surface could not be retrieved from Surface holder");
}
if (mFilename != null) {
return mMANativeHelper.renderMediaItemPreviewFrame(surface,
mFilename,timeMs,mWidth,mHeight);
} else {
return 0;
}
}
/**
* This API allows to generate a file containing the sample volume levels of
* the Audio track of this media item. This function may take significant
* time and is blocking. The file can be retrieved using
* getAudioWaveformFilename().
*
* @param listener The progress listener
*
* @throws IOException if the output file cannot be created
* @throws IllegalArgumentException if the mediaItem does not have a valid
* Audio track
*/
public void extractAudioWaveform(ExtractAudioWaveformProgressListener listener)
throws IOException {
int frameDuration = 0;
int sampleCount = 0;
final String projectPath = mMANativeHelper.getProjectPath();
/**
* Waveform file does not exist
*/
if (mAudioWaveformFilename == null ) {
/**
* Since audioWaveformFilename will not be supplied,it is generated
*/
String mAudioWaveFileName = null;
mAudioWaveFileName =
String.format(projectPath + "/" + "audioWaveformFile-"+ getId() + ".dat");
/**
* Logic to get frame duration = (no. of frames per sample * 1000)/
* sampling frequency
*/
if (mMANativeHelper.getAudioCodecType(mAudioType) ==
MediaProperties.ACODEC_AMRNB ) {
frameDuration = (MediaProperties.SAMPLES_PER_FRAME_AMRNB*1000)/
MediaProperties.DEFAULT_SAMPLING_FREQUENCY;
sampleCount = MediaProperties.SAMPLES_PER_FRAME_AMRNB;
} else if (mMANativeHelper.getAudioCodecType(mAudioType) ==
MediaProperties.ACODEC_AMRWB ) {
frameDuration = (MediaProperties.SAMPLES_PER_FRAME_AMRWB * 1000)/
MediaProperties.DEFAULT_SAMPLING_FREQUENCY;
sampleCount = MediaProperties.SAMPLES_PER_FRAME_AMRWB;
} else if (mMANativeHelper.getAudioCodecType(mAudioType) ==
MediaProperties.ACODEC_AAC_LC ) {
frameDuration = (MediaProperties.SAMPLES_PER_FRAME_AAC * 1000)/
MediaProperties.DEFAULT_SAMPLING_FREQUENCY;
sampleCount = MediaProperties.SAMPLES_PER_FRAME_AAC;
}
mMANativeHelper.generateAudioGraph( getId(),
mFilename,
mAudioWaveFileName,
frameDuration,
MediaProperties.DEFAULT_CHANNEL_COUNT,
sampleCount,
listener,
true);
/**
* Record the generated file name
*/
mAudioWaveformFilename = mAudioWaveFileName;
}
mWaveformData =
new SoftReference<WaveformData>(new WaveformData(mAudioWaveformFilename));
}
/**
* Get the audio waveform file name if {@link #extractAudioWaveform()} was
* successful. The file format is as following:
* <ul>
* <li>first 4 bytes provide the number of samples for each value, as big-endian signed</li>
* <li>4 following bytes is the total number of values in the file, as big-endian signed</li>
* <li>all values follow as bytes Name is unique.</li>
*</ul>
* @return the name of the file, null if the file has not been computed or
* if there is no Audio track in the mediaItem
*/
String getAudioWaveformFilename() {
return mAudioWaveformFilename;
}
/**
* Invalidate the AudioWaveform File
*/
void invalidate() {
if (mAudioWaveformFilename != null) {
new File(mAudioWaveformFilename).delete();
mAudioWaveformFilename = null;
}
}
/**
* @return The waveform data
*/
public WaveformData getWaveformData() throws IOException {
if (mWaveformData == null) {
return null;
}
WaveformData waveformData = mWaveformData.get();
if (waveformData != null) {
return waveformData;
} else if (mAudioWaveformFilename != null) {
try {
waveformData = new WaveformData(mAudioWaveformFilename);
} catch(IOException e) {
throw e;
}
mWaveformData = new SoftReference<WaveformData>(waveformData);
return waveformData;
} else {
return null;
}
}
/**
* Set volume of the Audio track of this mediaItem
*
* @param volumePercent in %/. 100% means no change; 50% means half value, 200%
* means double, 0% means silent.
* @throws UsupportedOperationException if volume value is not supported
*/
public void setVolume(int volumePercent) {
if ((volumePercent <0) || (volumePercent >100)) {
throw new IllegalArgumentException("Invalid volume");
}
mVolumePercentage = volumePercent;
}
/**
* Get the volume value of the audio track as percentage. Call of this
* method before calling setVolume will always return 100%
*
* @return the volume in percentage
*/
public int getVolume() {
return mVolumePercentage;
}
/**
* @param muted true to mute the media item
*/
public void setMute(boolean muted) {
mMANativeHelper.setGeneratePreview(true);
mMuted = muted;
if (mBeginTransition != null) {
mBeginTransition.invalidate();
}
if (mEndTransition != null) {
mEndTransition.invalidate();
}
}
/**
* @return true if the media item is muted
*/
public boolean isMuted() {
return mMuted;
}
/**
* @return The video type
*/
public int getVideoType() {
return mVideoType;
}
/**
* @return The video profile
*/
public int getVideoProfile() {
return mVideoProfile;
}
/**
* @return The video profile
*/
public int getVideoLevel() {
return mVideoLevel;
}
/**
* @return The video bitrate
*/
public int getVideoBitrate() {
return mVideoBitrate;
}
/**
* @return The audio bitrate
*/
public int getAudioBitrate() {
return mAudioBitrate;
}
/**
* @return The number of frames per second
*/
public int getFps() {
return mFps;
}
/**
* @return The audio codec
*/
public int getAudioType() {
return mAudioType;
}
/**
* @return The number of audio channels
*/
public int getAudioChannels() {
return mAudioChannels;
}
/**
* @return The audio sample frequency
*/
public int getAudioSamplingFrequency() {
return mAudioSamplingFrequency;
}
/**
* @return The Video media item properties in ClipSettings class object
* {@link android.media.videoeditor.MediaArtistNativeHelper.ClipSettings}
*/
ClipSettings getVideoClipProperties() {
ClipSettings clipSettings = new ClipSettings();
clipSettings.clipPath = getFilename();
clipSettings.fileType = mMANativeHelper.getMediaItemFileType(getFileType());
clipSettings.beginCutTime = (int)getBoundaryBeginTime();
clipSettings.endCutTime = (int)getBoundaryEndTime();
clipSettings.mediaRendering = mMANativeHelper.getMediaItemRenderingMode(getRenderingMode());
clipSettings.rotationDegree = mVideoRotationDegree;
return clipSettings;
}
}
|