Changeset 745

Show
Ignore:
Timestamp:
11/27/07 13:04:10 (9 months ago)
Author:
astrange
Message:

Match the new lavf API.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/perian-1.1/ff_MovieImport.c

    r742 r745  
    339339        uint8_t buf[PROBE_BUF_SIZE]; 
    340340        AVProbeData *pd = (AVProbeData *)malloc(sizeof(AVProbeData)); 
    341         ByteIOContext byteContext; 
     341        ByteIOContext *byteContext; 
    342342 
    343343        /* default */ 
     
    364364                if (IS_AVI(storage->componentType)) { 
    365365                        /* Prepare the iocontext structure */ 
    366                         memset(&byteContext, 0, sizeof(byteContext)); 
    367366                        result = url_open_dataref(&byteContext, dataRef, dataRefType, NULL, NULL, NULL); 
    368367                        require_noerr(result, bail); 
    369368                         
    370                         OSType fourcc = get_avi_strf_fourcc(&byteContext); 
     369                        OSType fourcc = get_avi_strf_fourcc(byteContext); 
    371370                        enum CodecID id = codec_get_id(codec_bmp_tags, BSWAP(fourcc)); 
    372371                         
     
    374373                                *valid = 0; 
    375374                         
    376                         url_fclose(&byteContext); 
     375                        url_fclose(byteContext); 
    377376                } 
    378377        } 
     
    420419{ 
    421420        ComponentResult result = noErr; 
    422         ByteIOContext byteContext; 
     421        ByteIOContext *byteContext; 
    423422        AVFormatContext *ic = NULL; 
    424423        AVFormatParameters params; 
     
    437436                 
    438437        /* Prepare the iocontext structure */ 
    439         memset(&byteContext, 0, sizeof(byteContext)); 
    440438        result = url_open_dataref(&byteContext, dataRef, dataRefType, &storage->dataHandler, &storage->dataHandlerSupportsWideOffsets, &storage->dataSize); 
    441439        storage->isStreamed = dataRefType == URLDataHandlerSubType; 
     
    444442        /* Open the Format Context */ 
    445443        memset(&params, 0, sizeof(params)); 
    446         result = av_open_input_stream(&ic, &byteContext, "", storage->format, &params); 
     444        result = av_open_input_stream(&ic, byteContext, "", storage->format, &params); 
    447445        require_noerr(result,bail); 
    448446        storage->format_context = ic; 
     
    555553        else 
    556554                storage->movieLoadState == kMovieLoadStateError; 
    557          
     555                
    558556        return result; 
    559557} /* FFAvi_MovieImportDataRef */ 
  • branches/perian-1.1/ff_dataref.c

    r703 r745  
    199199 
    200200/* This is the public function to open bytecontext withs datarefs */ 
    201 OSStatus url_open_dataref(ByteIOContext *pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize) 
     201OSStatus url_open_dataref(ByteIOContext **pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize) 
    202202{ 
    203203        URLContext *uc; 
     
    217217                return err; 
    218218        } 
    219         uc->filename[0] = '\0'
     219        uc->filename = NULL
    220220        uc->prot = up; 
    221221        uc->flags = URL_RDONLY; // we're just using the read access... 
  • branches/perian-1.1/ff_private.h

    r716 r745  
    9393 
    9494/* Public interface of the DataRef interface */ 
    95 OSStatus url_open_dataref(ByteIOContext *pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize); 
     95OSStatus url_open_dataref(ByteIOContext **pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize); 
    9696 
    9797/* Import routines */