summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-03-20 17:05:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-20 17:05:26 +0000
commita459c33e0b5ef65014be5716b6a5e5d89e8c8624 (patch)
treee9fa7bd8196d458972c4da35e2f953484e0193e8 /cmds
parenta2bacf9dcb22243ffaa96a50a008694344fc5da0 (diff)
parent6bc010e3062b50d5cf9605dd5ffaa0904772312e (diff)
downloadframeworks_av-a459c33e0b5ef65014be5716b6a5e5d89e8c8624.zip
frameworks_av-a459c33e0b5ef65014be5716b6a5e5d89e8c8624.tar.gz
frameworks_av-a459c33e0b5ef65014be5716b6a5e5d89e8c8624.tar.bz2
am 6bc010e3: am 9e36b5a5: Merge "Add the presentation rotation support" into jb-mr2-dev
* commit '6bc010e3062b50d5cf9605dd5ffaa0904772312e': Add the presentation rotation support
Diffstat (limited to 'cmds')
-rw-r--r--cmds/stagefright/muxer.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/cmds/stagefright/muxer.cpp b/cmds/stagefright/muxer.cpp
index fac2acc..cca33e0 100644
--- a/cmds/stagefright/muxer.cpp
+++ b/cmds/stagefright/muxer.cpp
@@ -55,7 +55,8 @@ static int muxing(
const char *outputFileName,
bool enableTrim,
int trimStartTimeMs,
- int trimEndTimeMs) {
+ int trimEndTimeMs,
+ int rotationDegrees) {
sp<NuMediaExtractor> extractor = new NuMediaExtractor;
if (extractor->setDataSource(path) != OK) {
fprintf(stderr, "unable to instantiate extractor. %s\n", path);
@@ -141,6 +142,7 @@ static int muxing(
size_t trackIndex = -1;
sp<ABuffer> newBuffer = new ABuffer(bufferSize);
+ muxer->setOrientationHint(rotationDegrees);
muxer->start();
while (!sawInputEOS) {
@@ -210,12 +212,13 @@ int main(int argc, char **argv) {
char *outputFileName = NULL;
int trimStartTimeMs = -1;
int trimEndTimeMs = -1;
+ int rotationDegrees = 0;
// When trimStartTimeMs and trimEndTimeMs seems valid, we turn this switch
// to true.
bool enableTrim = false;
int res;
- while ((res = getopt(argc, argv, "h?avo:s:e:")) >= 0) {
+ while ((res = getopt(argc, argv, "h?avo:s:e:r:")) >= 0) {
switch (res) {
case 'a':
{
@@ -247,6 +250,12 @@ int main(int argc, char **argv) {
break;
}
+ case 'r':
+ {
+ rotationDegrees = atoi(optarg);
+ break;
+ }
+
case '?':
case 'h':
default:
@@ -288,7 +297,7 @@ int main(int argc, char **argv) {
looper->start();
int result = muxing(looper, argv[0], useAudio, useVideo, outputFileName,
- enableTrim, trimStartTimeMs, trimEndTimeMs);
+ enableTrim, trimStartTimeMs, trimEndTimeMs, rotationDegrees);
looper->stop();