Skip to content

Commit

Permalink
HD settings, holzi, ini file
Browse files Browse the repository at this point in the history
see news.txt
  • Loading branch information
abc874 authored Mar 21, 2021
1 parent 47556a9 commit 94c06a1
Show file tree
Hide file tree
Showing 10 changed files with 521 additions and 298 deletions.
4 changes: 4 additions & 0 deletions CAResources.pas
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ interface
RsCutApplicationWmv = 'WMV Cut Application';
RsCutApplicationAvi = 'AVI Cut Application';
RsCutApplicationHqAvi = 'HQ Avi Cut Application';
RsCutApplicationHdAvi = 'HD Avi Cut Application';
RsCutApplicationMp4 = 'MP4 Cut Application';
RsCutApplicationOther = 'Other Cut Application';

Expand Down Expand Up @@ -224,6 +225,7 @@ interface
RsMovieTypeAvi = 'AVI File';
RsMovieTypeMp4 = 'MP4 Iso File';
RsMovieTypeHqAvi = 'HQ AVI File';
RsMovieTypeHdAvi = 'HD AVI File';
RsMovieTypeNone = '[None]';

{ Settings_dialog }
Expand Down Expand Up @@ -345,6 +347,8 @@ interface

RSIgnorePrefix = 'Nothing found. Repeat search ignoring prefix?';

RSIniInProfile = 'Using %s.';

implementation

end.
Expand Down
21 changes: 17 additions & 4 deletions Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,7 @@ procedure TFMain.ShowMetaData;
Lines.Add(Format(RsMovieMetaDataFilename, [MovieInfo.current_filename]));
Lines.Add(Format(RsMovieMetaDataFrameRate, [FloatToStrF(1 / MovieInfo.frame_duration, ffFixed, 15, 4)]));

if MovieInfo.MovieType in [mtAVI, mtHQAvi] then
if MovieInfo.MovieType in [mtAVI, mtHQAvi, mtHDAvi] then
Lines.Add(Format(RsMovieMetaDataVideoFourCC, [fcc2string(MovieInfo.FFourCC)]));

if MovieInfo.MovieType in [mtWMV] then
Expand Down Expand Up @@ -2805,6 +2805,13 @@ procedure TFMain.actAsfbinInfoExecute(Sender: TObject);
info := info + CutApplication.InfoString + #13#10;
end;

CutApplication := Settings.GetCutApplicationByMovieType(mtHDAVI);
if Assigned(CutApplication) then
begin
info := info + RsCutApplicationHdAvi + #13#10;
info := info + CutApplication.InfoString + #13#10;
end;

CutApplication := Settings.GetCutApplicationByMovieType(mtMP4);
if Assigned(CutApplication) then
begin
Expand Down Expand Up @@ -3048,10 +3055,16 @@ function TFMain.SearchCutlists(AutoOpen: Boolean; SearchLocal, SearchWeb: Boolea
begin
if SearchWeb then
begin
numFound := numFound + SearchCutlistsByFileSize_XML(SearchType);

if (numFound = 0) and (SearchType = cstByName) and (MessageDlg(RSIgnorePrefix, mtConfirmation, mbYesNo, 0) = mrYes) then
if Settings.ExtendedSearchMode = esmAlways then
begin
numFound := numFound + SearchCutlistsByFileSize_XML(SearchType, True);
end else
begin
numFound := numFound + SearchCutlistsByFileSize_XML(SearchType);

if (numFound = 0) and (SearchType = cstByName) and (Settings.ExtendedSearchMode = esmOnDemand) and (MessageDlg(RSIgnorePrefix, mtConfirmation, mbYesNo, 0) = mrYes) then
numFound := numFound + SearchCutlistsByFileSize_XML(SearchType, True);
end;
end;

if SearchLocal then
Expand Down
29 changes: 19 additions & 10 deletions Movie.pas
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface
MP4_EXTENSIONS: array[0..2] of string = ('.mp4', '.m4v', '.mp4v');

type
TMovieType = (mtUnknown, mtWMV, mtAVI, mtMP4, mtHQAVI, mtNone);
TMovieType = (mtUnknown, mtWMV, mtAVI, mtMP4, mtHQAVI, mtHDAVI, mtNone);

TMovieInfo = class
private
Expand Down Expand Up @@ -137,8 +137,12 @@ function TMovieInfo.InitMovie(FileName: string): Boolean;
MovieType := mtMP4;

// for OTR
if (MovieType = mtUnknown) and FileName.EndsWith('.hq.avi', True) then
MovieType := mtHQAVI;
if (MovieType = mtUnknown) then
if FileName.EndsWith('.hq.avi', True) then
MovieType := mtHQAVI
else
if FileName.EndsWith('.hd.avi', True) then
MovieType := mtHDAVI;

// try to detect MovieType from file extension
if MovieType = mtUnknown then
Expand All @@ -153,15 +157,19 @@ function TMovieInfo.InitMovie(FileName: string): Boolean;
end;

// try to get Video FourCC from AVI
if MovieType in [mtAVI, mtHQAVI] then
if MovieType in [mtAVI, mtHQAVI, mtHDAVI] then
begin
GetAviInformation;
s := fcc2String(FFourCC);
if FFourCC = 0 then
MovieType := mtUnknown
else
if SameText(s, 'H264') then
MovieType := mtHQAVI;
if FFourCC <> 0 then
begin
s := fcc2String(FFourCC);
if SameText(s, 'DX50') then
MovieType := mtAVI
else
if SameText(s, 'H264') and (MovieType = mtAVI) then
MovieType := mtHQAVI;
end else
MovieType := mtUnknown;
end;
end;
end;
Expand Down Expand Up @@ -192,6 +200,7 @@ function TMovieInfo.GetStringFromMovieType(aMovieType: TMovieType): string;
mtAVI : Result := CAResources.RsMovieTypeAvi;
mtMP4 : Result := CAResources.RsMovieTypeMp4;
mtHQAVI : Result := CAResources.RsMovieTypeHqAvi;
mtHDAVI : Result := CAResources.RsMovieTypeHdAvi;
else Result := CAResources.RsMovieTypeNone;
end;
end;
Expand Down
Loading

0 comments on commit 94c06a1

Please sign in to comment.