Hi,
if I add a Tween Track to my QT movie, I end up with a movie file requiring
QT7 and not working on QT10. If I don't add the tween track, QT10 can open
the movie. So the difference is the Tween Track.
However Safari 5.0.3 can play the movie with the Tween Track and I can
properly hear the volume decreasing. So the Tween Track works well.
Is anyone who knows how to create a Tween Track working on QT10?
I do:


  scale = GetMovieTimeScale(_movie);
  tweenTrack = NewMovieTrack(_movie, 0, 0, kNoVolume);
  tweenMedia = NewTrackMedia(tweenTrack, TweenMediaType,  scale nil,  0);

  BeginMediaEdits(tweenMedia);
  ...
  AddTweenSampleToMedia2(tweenMedia, rampOffset, rampDur, lastVol, thisVol);
  ...
  EndMediaEdits(tweenMedia);
    
  InsertMediaIntoTrack(tweenTrack, insPoint, 0, tweenDuration, fixed1);
  QTNewAtomContainer(&inputMap);
  AddTrackReference(mySndTrack, tweenTrack, kTrackModifierReference,
&referenceIndex);
  QTInsertChild(inputMap, kParentAtomIsContainer, kTrackModifierInput,
referenceIndex, 0, 0, nil, &inputAtom);

  OSType inputType = EndianU32_NtoB(kTrackModifierTypeVolume);
  QTInsertChild(inputMap, inputAtom, kTrackModifierType, 1, 0,
sizeof(inputType), &inputType, nil);
    
  long tweenID = EndianU32_NtoB(1);
  QTInsertChild(inputMap, inputAtom, kInputMapSubInputID, 1, 0,
sizeof(tweenID), &tweenID, nil);

  err = SetMediaInputMap(GetTrackMedia(mySndTrack), inputMap);
  if(err != noErr) return err;
    
  QTDisposeAtomContainer(inputMap);



Regards
-- Leonardo


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to