📄 jvqid3v2.pas
字号:
{******************************************************************************}
{* WARNING: JEDI VCL To CLX Converter generated unit. *}
{* Manual modifications will be lost on next release. *}
{******************************************************************************}
{-----------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1.1.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is: JvID3v2.PAS, released on 2001-02-28.
The Initial Developer of the Original Code is S閎astien Buysse [sbuysse att buypin dott com]
Portions created by S閎astien Buysse are Copyright (C) 2001 S閎astien Buysse.
All Rights Reserved.
Contributor(s): Michael Beck [mbeck att bigfoot dott com].
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
located at http://jvcl.sourceforge.net
Known Issues:
-----------------------------------------------------------------------------}
// $Id: JvQId3v2.pas,v 1.17 2004/09/07 23:11:17 asnepvangers Exp $
unit JvQID3v2;
{$I jvcl.inc}
interface
uses
Classes, QGraphics, QControls,
JvQID3v2Types, JvQID3v2Base;
type
TJvID3Persistent = class(TPersistent)
private
FController: TJvID3Controller;
public
constructor Create(AController: TJvID3Controller);
end;
TJvID3Text = class(TJvID3Persistent)
private
FDummyList: TStringList;
function GetDateTime(const FrameID: Integer{TJvID3FrameID}): TDateTime;
function GetList(const FrameID: Integer{TJvID3FrameID}): TStrings;
function GetNumber(const FrameID: Integer{TJvID3FrameID}): Cardinal;
function GetText(const FrameID: Integer{TJvID3FrameID}): string;
procedure SetDateTime(const FrameID: Integer{TJvID3FrameID}; const Value: TDateTime);
procedure SetList(const FrameID: Integer{TJvID3FrameID}; const Value: TStrings);
procedure SetNumber(const FrameID: Integer{TJvID3FrameID}; const Value: Cardinal);
procedure SetText(const FrameID: Integer{TJvID3FrameID}; const Value: string);
public
constructor Create(AController: TJvID3Controller);
destructor Destroy; override;
published
{ Do not store dummies }
property Album: string index fiAlbum read GetText write SetText stored False;
property AlbumSortOrder: string index fiAlbumSortOrder read GetText write SetText stored False;
property Band: string index fiBand read GetText write SetText stored False;
property BPM: Cardinal index fiBPM read GetNumber write SetNumber stored False;
property Composer: TStrings index fiComposer read GetList write SetList stored False;
property Conductor: string index fiConductor read GetText write SetText stored False;
property ContentType: string index fiContentType read GetText write SetText stored False;
property ContentGroup: string index fiContentGroup read GetText write SetText stored False;
property Copyright: string index fiCopyright read GetText write SetText stored False;
property Date: string index fiDate read GetText write SetText stored False;
property EncodedBy: string index fiEncodedBy read GetText write SetText stored False;
property EncoderSettings: string index fiEncoderSettings read GetText write SetText stored False;
property EncodingTime: TDateTime index fiEncodingTime read GetDateTime write SetDateTime stored False;
property FileOwner: string index fiFileOwner read GetText write SetText stored False;
property FileType: string index fiFileType read GetText write SetText stored False;
property InitialKey: string index fiInitialKey read GetText write SetText stored False;
property ISRC: string index fiISRC read GetText write SetText stored False;
property Language: TStrings index fiLanguage read GetList write SetList stored False;
property LeadArtist: TStrings index fiLeadArtist read GetList write SetList stored False;
property Lyricist: TStrings index fiLyricist read GetList write SetList stored False;
property MediaType: string index fiMediaType read GetText write SetText stored False;
property MixArtist: string index fiMixArtist read GetText write SetText stored False;
property Mood: string index fiMood read GetText write SetText stored False;
property NetRadioOwner: string index fiNetRadioOwner read GetText write SetText stored False;
property NetRadioStation: string index fiNetRadioStation read GetText write SetText stored False;
property OrigAlbum: string index fiOrigAlbum read GetText write SetText stored False;
property OrigArtist: TStrings index fiOrigArtist read GetList write SetList stored False;
property OrigFileName: string index fiOrigFileName read GetText write SetText stored False;
property OrigLyricist: TStrings index fiOrigLyricist read GetList write SetList stored False;
property OrigReleaseTime: TDateTime index fiOrigReleaseTime read GetDateTime write SetDateTime stored False;
property OrigYear: Cardinal index fiOrigYear read GetNumber write SetNumber stored False;
property PartInSet: string index fiPartInSet read GetText write SetText stored False;
property PerformerSortOrder: string index fiPerformerSortOrder read GetText write SetText stored False;
property PlaylistDelay: Cardinal index fiPlaylistDelay read GetNumber write SetNumber stored False;
property ProducedNotice: string index fiProducedNotice read GetText write SetText stored False;
property Publisher: string index fiPublisher read GetText write SetText stored False;
property RecordingDates: string index fiRecordingDates read GetText write SetText stored False;
property RecordingTime: TDateTime index fiRecordingTime read GetDateTime write SetDateTime stored False;
property ReleaseTime: TDateTime index fiReleaseTime read GetDateTime write SetDateTime stored False;
property SetSubTitle: string index fiSetSubTitle read GetText write SetText stored False;
property Size: Cardinal index fiSize read GetNumber write SetNumber stored False;
property SongLen: Cardinal index fiSongLen read GetNumber write SetNumber stored False;
property SubTitle: string index fiSubTitle read GetText write SetText stored False;
property TaggingTime: TDateTime index fiTaggingTime read GetDateTime write SetDateTime stored False;
property Time: string index fiTime read GetText write SetText stored False;
property Title: string index fiTitle read GetText write SetText stored False;
property TitleSortOrder: string index fiTitleSortOrder read GetText write SetText stored False;
property TrackNum: string index fiTrackNum read GetText write SetText stored False;
property Year: Cardinal index fiYear read GetNumber write SetNumber stored False;
end;
TJvID3Web = class(TJvID3Persistent)
private
function GetText(const FrameID: Integer{TJvID3FrameID}): string;
procedure SetText(const FrameID: Integer{TJvID3FrameID}; const Value: string);
published
{ Do not store dummies }
property Artist: string index fiWWWArtist read GetText write SetText stored False;
property AudioFile: string index fiWWWAudioFile read GetText write SetText stored False;
property AudioSource: string index fiWWWAudioSource read GetText write SetText stored False;
property CommercialInfo: string index fiWWWCommercialInfo read GetText write SetText stored False;
property Copyright: string index fiWWWCopyright read GetText write SetText stored False;
property Payment: string index fiWWWPayment read GetText write SetText stored False;
property Publisher: string index fiWWWPublisher read GetText write SetText stored False;
property RadioPage: string index fiWWWRadioPage read GetText write SetText stored False;
end;
TJvID3UDText = class(TJvID3Persistent)
private
FDummyI: Integer;
FItemIndex: Integer;
function GetDescription: string;
function GetItemCount: Integer;
function GetItemIndex: Integer;
function GetValue: string;
procedure SetDescription(const Value: string);
procedure SetItemIndex(const Value: Integer);
procedure SetValue(const Value: string);
public
procedure Add(const ADescription, AValue: string);
published
property ItemIndex: Integer read GetItemIndex write SetItemIndex;
{ Do not store dummies }
property Description: string read GetDescription write SetDescription stored False;
property Value: string read GetValue write SetValue stored False;
property ItemCount: Integer read GetItemCount write FDummyI stored False;
end;
TJvID3UDUrl = class(TJvID3Persistent)
private
FItemIndex: Integer;
FDummyI: Integer;
function GetDescription: string;
function GetItemCount: Integer;
function GetItemIndex: Integer;
function GetURL: string;
procedure SetDescription(const Value: string);
procedure SetItemIndex(const Value: Integer);
procedure SetURL(const Value: string);
public
procedure Add(const ADescription, AURL: string);
published
property ItemIndex: Integer read GetItemIndex write SetItemIndex;
{ Do not store dummies }
property Description: string read GetDescription write SetDescription stored False;
property URL: string read GetURL write SetURL stored False;
property ItemCount: Integer read GetItemCount write FDummyI stored False;
end;
TJvID3Pictures = class(TJvID3Persistent)
private
FPictures: array[TJvID3PictureType] of TPicture;
FUpdating: Boolean;
function GetPicture(const AType: Integer{TJvID3PictureType}): TPicture;
procedure SetPicture(const AType: Integer{TJvID3PictureType}; const Value: TPicture);
procedure PictureChanged(Sender: TObject);
procedure PictureToFrame(const AType: TJvID3PictureType);
procedure RetrievePictures;
procedure RemovePictures;
public
constructor Create(AController: TJvID3Controller); virtual;
destructor Destroy; override;
published
property Other: TPicture index ptOther read GetPicture write SetPicture stored False;
property FileIcon: TPicture index ptFileIcon read GetPicture write SetPicture stored False;
property OtherFileIcon: TPicture index ptOtherFileIcon read GetPicture write SetPicture stored False;
property CoverFront: TPicture index ptCoverFront read GetPicture write SetPicture stored False;
property CoverBack: TPicture index ptCoverBack read GetPicture write SetPicture stored False;
property LeafletPage: TPicture index ptLeafletPage read GetPicture write SetPicture stored False;
property Media: TPicture index ptMedia read GetPicture write SetPicture stored False;
property LeadArtist: TPicture index ptLeadArtist read GetPicture write SetPicture stored False;
property Artist: TPicture index ptArtist read GetPicture write SetPicture stored False;
property Conductor: TPicture index ptConductor read GetPicture write SetPicture stored False;
property Band: TPicture index ptBand read GetPicture write SetPicture stored False;
property Composer: TPicture index ptComposer read GetPicture write SetPicture stored False;
property Lyricist: TPicture index ptLyricist read GetPicture write SetPicture stored False;
property RecordingLocation: TPicture index ptRecordingLocation read GetPicture write SetPicture stored False;
property DuringRecording: TPicture index ptDuringRecording read GetPicture write SetPicture stored False;
property DuringPerformance: TPicture index ptDuringPerformance read GetPicture write SetPicture stored False;
property MovieVideoScreenCapture: TPicture index ptMovieVideoScreenCapture read GetPicture write SetPicture stored
False;
property BrightColouredFish: TPicture index ptBrightColouredFish read GetPicture write SetPicture stored False;
property Illustration: TPicture index ptIllustration read GetPicture write SetPicture stored False;
property BandLogotype: TPicture index ptBandLogotype read GetPicture write SetPicture stored False;
property PublisherLogotype: TPicture index ptPublisherLogotype read GetPicture write SetPicture stored False;
end;
TJvID3PicturesDesc = class(TJvID3Persistent)
private
function GetText(const AType: Integer{TJvID3PictureType}): string;
procedure SetText(const AType: Integer{TJvID3PictureType}; const Value: string);
published
property Other: string index ptOther read GetText write SetText stored False;
property FileIcon: string index ptFileIcon read GetText write SetText stored False;
property OtherFileIcon: string index ptOtherFileIcon read GetText write SetText stored False;
property CoverFront: string index ptCoverFront read GetText write SetText stored False;
property CoverBack: string index ptCoverBack read GetText write SetText stored False;
property LeafletPage: string index ptLeafletPage read GetText write SetText stored False;
property Media: string index ptMedia read GetText write SetText stored False;
property LeadArtist: string index ptLeadArtist read GetText write SetText stored False;
property Artist: string index ptArtist read GetText write SetText stored False;
property Conductor: string index ptConductor read GetText write SetText stored False;
property Band: string index ptBand read GetText write SetText stored False;
property Composer: string index ptComposer read GetText write SetText stored False;
property Lyricist: string index ptLyricist read GetText write SetText stored False;
property RecordingLocation: string index ptRecordingLocation read GetText write SetText stored False;
property DuringRecording: string index ptDuringRecording read GetText write SetText stored False;
property DuringPerformance: string index ptDuringPerformance read GetText write SetText stored False;
property MovieVideoScreenCapture: string index ptMovieVideoScreenCapture read GetText write SetText stored False;
property BrightColouredFish: string index ptBrightColouredFish read GetText write SetText stored False;
property Illustration: string index ptIllustration read GetText write SetText stored False;
property BandLogotype: string index ptBandLogotype read GetText write SetText stored False;
property PublisherLogotype: string index ptPublisherLogotype read GetText write SetText stored False;
end;
TJvID3Images = class(TJvID3Persistent)
private
FPictures: TJvID3Pictures;
FInfos: TJvID3PicturesDesc;
public
constructor Create(AController: TJvID3Controller);
destructor Destroy; override;
published
property Pictures: TJvID3Pictures read FPictures;
property Infos: TJvID3PicturesDesc read FInfos;
end;
TJvID3Ipl = class(TJvID3Persistent)
private
FDummyI: Integer;
FItemIndex: Integer;
function GetItemCount: Integer;
function GetJob: string;
function GetPerson: string;
procedure SetItemIndex(const Value: Integer);
procedure SetJob(const Value: string);
procedure SetPerson(const Value: string);
published
property ItemIndex: Integer read FItemIndex write SetItemIndex;
{ Do not store dummies }
property Job: string read GetJob write SetJob stored False;
property Person: string read GetPerson write SetPerson stored False;
property ItemCount: Integer read GetItemCount write FDummyI stored False;
end;
TJvID3Owner = class(TJvID3Persistent)
private
function GetDatePurchased: TDateTime;
function GetPrice: string;
function GetSeller: string;
procedure SetDatePurchased(const Value: TDateTime);
procedure SetPrice(const Value: string);
procedure SetSeller(const Value: string);
published
{ Do not store dummies }
property Price: string read GetPrice write SetPrice stored False;
property DatePurchased: TDateTime read GetDatePurchased write SetDatePurchased stored False;
property Seller: string read GetSeller write SetSeller stored False;
end;
TJvID3Popularimeter = class(TJvID3Persistent)
private
function GetCounter: Cardinal;
function GetRating: Byte;
function GetEMailAddress: string;
procedure SetCounter(const Value: Cardinal);
procedure SetRating(const Value: Byte);
procedure SetEMailAddress(const Value: string);
published
{ Do not store dummies }
property EMailAddress: string read GetEMailAddress write SetEMailAddress stored False;
property Rating: Byte read GetRating write SetRating stored False;
property Counter: Cardinal read GetCounter write SetCounter stored False;
end;
TJvID3v2 = class(TJvID3Controller)
private
FID3Text: TJvID3Text;
FWeb: TJvID3Web;
FUserDefinedText: TJvID3UDText;
FUserDefinedWeb: TJvID3UDUrl;
FInvolvedPeople: TJvID3Ipl;
FImages: TJvID3Images;
FOwner: TJvID3Owner;
FPopularimeter: TJvID3Popularimeter;
function GetPlayCounter: Cardinal;
procedure SetPlayCounter(const Value: Cardinal);
protected
procedure ActiveChanged(Sender: TObject; Activated: Boolean);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Header;
property ExtendedHeader;
published
{ Do not store dummies }
property Texts: TJvID3Text read FID3Text;
property UserDefinedText: TJvID3UDText read FUserDefinedText;
property Web: TJvID3Web read FWeb;
property UserDefinedWeb: TJvID3UDUrl read FUserDefinedWeb;
property InvolvedPeople: TJvID3Ipl read FInvolvedPeople;
property Images: TJvID3Images read FImages;
property PlayCounter: Cardinal read GetPlayCounter write SetPlayCounter stored False;
property Owner: TJvID3Owner read FOwner;
property Popularimeter: TJvID3Popularimeter read FPopularimeter;
property Version;
property FileInfo;
end;
implementation
uses
{$IFDEF UNITVERSIONING}
JclUnitVersioning,
{$ENDIF UNITVERSIONING}
SysUtils, Math,
JvQResources;
//=== Local procedures =======================================================
function ExtractMIMETypeFromClassName(AClassName: string): string;
begin
AClassName := AnsiLowerCase(AClassName);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -