Changeset 157

Show
Ignore:
Timestamp:
10/13/06 19:04:45 (2 years ago)
Author:
dconrad
Message:

Add the stuff in CodecPrivate? for Real Video as an ImageDescriptionExtension?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/MatroskaCodecIDs.cpp

    r156 r157  
    222222                 
    223223                AddImageDescriptionExtension(imgDesc, imgDescExt, kSampleDescriptionExtensionVobSubIdx); 
     224                 
     225                DisposeHandle((Handle) imgDescExt); 
     226        } 
     227        return noErr; 
     228} 
     229 
     230ComponentResult DescExt_Real(KaxTrackEntry *tr_entry, SampleDescriptionHandle desc, DescExtDirection dir) 
     231{ 
     232        if (!tr_entry || !desc) return paramErr; 
     233        ImageDescriptionHandle imgDesc = (ImageDescriptionHandle) desc; 
     234         
     235        if (dir == kToSampleDescription) { 
     236                KaxCodecPrivate *codecPrivate = FindChild<KaxCodecPrivate>(*tr_entry); 
     237                if (codecPrivate == NULL) 
     238                        return invalidAtomErr; 
     239                 
     240                Handle imgDescExt = NewHandle(codecPrivate->GetSize()); 
     241                memcpy(*imgDescExt, codecPrivate->GetBuffer(), codecPrivate->GetSize()); 
     242                 
     243                AddImageDescriptionExtension(imgDesc, imgDescExt, kSampleDescriptionExtensionReal); 
    224244                 
    225245                DisposeHandle((Handle) imgDescExt); 
  • trunk/MatroskaCodecIDs.h

    r156 r157  
    6666        kSampleDescriptionExtensionTheora = 'XdxT', 
    6767        kSampleDescriptionExtensionVobSubIdx = '.IDX', 
     68        kSampleDescriptionExtensionReal = 'RVex', 
    6869}; 
    6970 
     
    142143ComponentResult DescExt_XiphFLAC(KaxTrackEntry *tr_entry, SampleDescriptionHandle desc, DescExtDirection dir); 
    143144ComponentResult DescExt_VobSub(KaxTrackEntry *tr_entry, SampleDescriptionHandle desc, DescExtDirection dir); 
     145ComponentResult DescExt_Real(KaxTrackEntry *tr_entry, SampleDescriptionHandle desc, DescExtDirection dir); 
    144146 
    145147struct CodecDescExtFunc { 
     
    153155        { kAudioFormatXiphFLAC, DescExt_XiphFLAC }, 
    154156        { kSubFormatVobSub, DescExt_VobSub }, 
     157        { kVideoFormatReal5, DescExt_Real }, 
     158        { kVideoFormatRealG2, DescExt_Real }, 
     159        { kVideoFormatReal8, DescExt_Real }, 
     160        { kVideoFormatReal9, DescExt_Real }, 
    155161}; 
    156162