Ignore:
Timestamp:
Apr 26, 2012, 8:59:09 AM (9 years ago)
Author:
sommeria
Message:

civ_matlab and patch improved, changes in the management of interpolation (still in progress).
adapatation to movies (use of VideoReader?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_file_type.m

    r387 r397  
    1010% INPUT:
    1111% fileinput: name, including path, of the file to analyse
    12 function [FileType,FileInfo,Object]=get_file_type(fileinput)
     12function [FileType,FileInfo,VideoObject]=get_file_type(fileinput)
    1313FileType='';
    1414FileInfo=[];
    15 Object=[];
     15VideoObject=[];
    1616[tild,tild,FileExt]=fileparts(fileinput);
    1717
     
    7070            if error_nc
    7171                try
    72                     if exist('VideoReader','file')%recent version of Matlab
    73                         Object=VideoReader(fileinput);
    74                     else
    75                         Object=mmreader(fileinput);%older Matlab function for movies
    76                     end
    77                     FileType='video';
    78                     FileInfo.NbFrame=get(Object,'NumberOfFrames');
     72                    if exist('VideoReader.m','file')%recent version of Matlab
     73                        VideoObject=VideoReader(fileinput);
     74                        FileInfo.NumberOfFrames=get(VideoObject,'NumberOfFrames');
     75                        FileType='video';
     76                    end             
    7977                end
    8078            end
Note: See TracChangeset for help on using the changeset viewer.