Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

needs help - changing default compression doesn't work properly in intel mac



 
Hi
the followig code is working perfectly in PPC mac and is not working in intel mac. can
anyone tell me where i went wrong?



ComponentInstance ci = OpenDefaultComponent(MovieExportType, kQTFileTypeMovie);
    if (ci) {
        Boolean canceled;
        CFDataRef theData;
       
        // first time though, set up some default settings
        if (NULL == gExportSettings) {
            SCSpatialSettings ss;
            UInt8 falseSetting = false;                      
         ss.codecType = kMPEG4VisualCodecType;//kH264CodecType;
            ss.codec = NULL;
            ss.depth = 0;
            ss.spatialQuality = codecHighQuality;
                     
          MovieExportGetSettingsAsAtomContainer(ci, &gExportSettings);
      
           // video options
            QTAtom videAtom = QTFindChildByID(gExportSettings, kParentAtomIsContainer,
kQTSettingsVideo, 1, NULL);
            if (videAtom) {
                // spatial
              QTAtom  sptlAtom = QTFindChildByID(gExportSettings, videAtom,
scSpatialSettingsType, 1, NULL);
                if (sptlAtom) {
                    QTSetAtomData(gExportSettings, sptlAtom, sizeof(SCSpatialSettings), &ss);
                }
          }
          QTAtom soundAtom = QTFindChildByID( gExportSettings,
kParentAtomIsContainer, kQTSettingsSound, 1, NULL );
          if (soundAtom == 0)
               QTInsertChild( gExportSettings, kParentAtomIsContainer,
kQTSettingsSound, 1, 0, 0, nil, &soundAtom );
          long aLong = kMPEG4AudioFormat; //kAudioFormatMPEG4AAC
          QTAtom compAtom = QTFindChildByID(gExportSettings, soundAtom,
scSoundCompressionType, 1, NULL);
          QTSetAtomData(gExportSettings, compAtom, sizeof(aLong), &aLong);
     
          }
          
          
      MovieExportSetSettingsFromAtomContainer(ci, gExportSettings);
          
          Handle sourceDataRef = NULL;
          OSType sourceDataRefType;              
          short resId = movieInDataForkResID;
               
          // create data references from the FSRefs
          QTNewDataReferenceFromFSRef(&sourceRef, 0, &sourceDataRef,
&sourceDataRefType);          
          QTNewDataReferenceFromFSRef(&destRef, 0, &destDataRef, &destDataRefType);
          
          NewMovieFromDataRef(&sourceMovie, newMovieActive, &resId, sourceDataRef,
sourceDataRefType);
     
          
          ConvertMovieToDataRef(sourceMovie, 0, destDataRef,
destDataRefType,kQTFileTypeMovie, FOUR_CHAR_CODE
('TVOD'),createMovieFileDeleteCurFile | createMovieFileDontCreateResFile,ci);





regards

Sandeep
          

Sandeep A.C
(Visit me at: http://sandeepcnair.wetpaint.com )







                 

                                                                       

monster
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.