#23 [11.11.10, 13:44] Re: DB3210 - Drawing on player possible - developers needed
den_po, i really dont know how to implement ICMusicServer.
Every time i try to subscribe, what i get is only reboot.
Mind showing example?
BTW
Код:
class IMusicServer1 : public IUnknown { public: virtual int StartMusicServer(ICBMusicServer* pICBMusicServer, u16 msgBase, int clientData, char StartMode, int track_id); virtual int Destroy(unsigned long subscriptionHandle); virtual int Subscribe(ICBMusicServer* pICBMusicServer, u16 msgBase, int clientData, unsigned long * pSubscriptionHandle); virtual int Unsubscribe(unsigned long subscriptionHandle); virtual int StartApplication(TMusicServer_Action action); virtual int StopApplication(void); virtual int SetPurchaseFlag(void); virtual int GetTags(int track_id, int bufsize, wchar_t* artist, wchar_t* album, wchar_t* title); virtual int GetFullInfo(int track_id, int bufsize, wchar_t* artist, wchar_t* album, wchar_t* title, wchar_t* filename,TMusicServer_Time* Fulltime,TMusicServer_Time* ElapsedTime,bool* HaveAlbumArt,bool* IsRealMediaFile); virtual int GetTrackFullpath(wchar_t track_id, int bufsize, wchar_t *buf); virtual int GetAlbumArt(int track_id, int bufsize, wchar_t* filename, int* Offset, int* Size, TMusicServer_AlbumArt_ImageType* pImageType/*0=Jpeg,1=Gif,2=Png,3=Bmp,4=None,5=Embedded*/, TBool* IsDRMProtected); virtual int GetState(char* State); virtual int Play(int track_id); virtual int Pause(void); virtual int FastFoward(void); virtual int Rewind(void); virtual void* unk_0x50(); virtual int Previous(void); virtual int SetElapsedTime(TIME time); virtual int GetElapsedTime(TIME* time); virtual int SetWindowMode(char mode); virtual int SetStarted(TBool started); virtual int SetStereoWidening(TBool enable); virtual int EnableEqualizer(void); virtual int DisableEqualizer(void); virtual int EqualizerGain_Set(int band, int level); virtual int EqualizerPreset_Set(int equalizerPreset); };
//CID = 1214435DCCDC4BBFBC70094CD953DCD6 class ICBMusicServer : public IUnknown { public: virtual int OnInitiated(RVoid statusCode,FUint32 nbrOfItems,TBool random,TBool loop,TClientData clientData); //Notifies the client when the server has been initiated. virtual int OnDestroy(TClientData clientData); //Notifies the client when the client should be destroyed, can be triggered by accessory virtual int OnDestroyed(TClientData clientData); //Notifies the client that the music server is destroyed and that all data also are destroyed. virtual int OnStopped( TMusicServer_Cause cause,TMusicServer_Time time,TClientData clientData); //Notifies the client when the music has stopped for some reason virtual int OnStateChanged(TMusicServer_State state,TMusicServer_Time elapsedTime, TClientData clientData); //Notifies the client when the state has changed for some reason virtual int OnTimeFeedback( TMusicServer_Time elapsedTime,TClientData clientData); //Returns a time feedback virtual int OnAudioMuted( TMusicServer_MuteReason muteReason,TClientData clientData); //Returns a mute reason virtual int OnNbrOfItemsChanged( FUint32 nbrOfItems,TClientData clientData,RVoid result); //Returns the number of items in the play queue. virtual int OnItemChanged(RVoid statusCode,FUint32 itemIndex,TMusicServer_Time resumePosition,TMusicServer_Action currentPlayerAction,TChar* pURI,FUint32 lengthOfURI,TChar* pTitle,FUint32 lengthOfTitle,TChar* pArtist,FUint32 lengthOfArtist,TChar* pAlbum,FUint32 lengthOfAlbum,TMusicServer_Time playLength,TBool containsAlbumart,TBool isDRMProtected,TBool isRealMediaFile,TClientData clientData); //Notifies the client that the current item has changed in some way virtual int OnApplicationStarted(TBool started,TClientData clientData); //Notifies the clients that the player is started/shut down. virtual int OnError( RVoid errorCode,TClientData clientData);//Returns an errorcode };
Добавлено 11.11.10 18:48
I know that i should use OnStateChanged but another thing is confusing me, why the argument is pass by reference not pointer?
Добавлено 11.11.10 19:38
Код:
typedef struct { char dummy[0x38]; short int current_track_id; }AUDIO_PLAYER_BOOK_3210;
Works good :)
Добавлено 11.11.10 19:49
Код:
typedef struct { char dummy1[0x30]; short int current_track_id; }AUDIO_PLAYER_BOOK_3150;
Теперь поясню: current_track_id - id трека, который сейчас активен (либо играет, либо стоит на паузе, не важно) selected_track_id - id трека, который находится в фокусе в списке воспроизведения.
Добавлено 1.12.11 17:45
И соответственно, если список воспроизведения скрыт или в фокусе текущий трек, то selected_track_id = current_track_id. А так же: SUB_EXECUTE *CurrentTrack_SUB_EXECUTE; - это указатель на SUB_EXECUTE не текущего трека, а того, который в фокусе, т.е. логичнее назвать SUB_EXECUTE *SelectedTrack_SUB_EXECUTE;
Sony Xperia XZ3 Green Sony Xperia Z3 Compact Orange W995i SW-R1GA026 :(
Спасибо сказали: Therion, MAVER145, farid
farid
Patchmaster
Регистрация: 8.8.09 Сообщений: 338 Репутация: 5753 Откуда: Indonesia
#25 [27.02.12, 18:19] Re: DB3210 - Drawing on player possible - developers needed
Код:
class IMusicServer3 : public IUnknown { public: virtual void* unk_0x10(); virtual void* unk_0x14(); virtual void* unk_0x18(); virtual int GetTags(int track_id, int bufsize, wchar_t* artist, wchar_t* album, wchar_t* title); virtual int GetFullInfo(int track_id, int bufsize, wchar_t* artist, wchar_t* album, wchar_t* title, wchar_t* filename,TMusicServer_Time* Fulltime,TMusicServer_Time* ElapsedTime,bool* HaveAlbumArt,bool* IsRealMediaFile); virtual int GetTrackFullpath(wchar_t track_id, int bufsize, wchar_t *buf); virtual void* unk_0x28(); virtual void* unk_0x2C(); virtual int GetState(char* State); virtual int Play(bool activePress); virtual int Pause(void); virtual int FastFoward(void); virtual int Rewind(void); virtual int Next(int track_id); virtual int Previous(void); virtual void* unk_0x4C(); virtual void* unk_0x50(); virtual void* unk_0x54(); virtual void* unk_0x58(); virtual void* unk_0x5C(); virtual void* unk_0x60(); };
Код:
typedef void* PMusicServer;
typedef struct { unsigned long hour; unsigned long min; unsigned long sec; }TMusicServer_Time;
#27 [27.02.12, 23:13] Re: DB3210 - Drawing on player possible - developers needed
E1kolyan, Коль, интерфейс, описанный там, совпадает на 100% только с db3210.. Для 3150 каких-то методов нету.
farid,
virtual int Next(int track_id);
(int track_id) - it's wrong!
That's correct: Код:
virtual int Next(bool activePress);
Код:
@param[in] activePress True if next was pressed actively by user. * if activePress and state playing and the current * item is the last in the list to be played, the first item in the * list will start playing. If not activePress, the first * item will be chosen but not start playing
typedef enum { TMMEEqBand_ClearBass1, ///< Only for Clear Audio TMMEEqBand_ClearBass2, ///< Only for Clear Audio TMMEEqBand_63, ///< Only for ordinary EQ TMMEEqBand_250, ///< Only for ordinary EQ TMMEEqBand_400, ///< Only for Clear Audio TMMEEqBand_1000, ///< Both Clear Audio and ordinary EQ TMMEEqBand_2500, ///< Only for Clear Audio TMMEEqBand_4000, ///< Only for ordinary EQ TMMEEqBand_6300, ///< Only for Clear Audio TMMEEqBand_16000, ///< Both Clear Audio and ordinary EQ TMMEEqBand_Last }TMusicServer_EqBand;
typedef enum { TMMEEqPreset_Normal, TMMEEqPreset_Heavy, TMMEEqPreset_Pops, TMMEEqPreset_Jazz, TMMEEqPreset_Unique, TMMEEqPreset_Soul, TMMEEqPreset_EasyListening, TMMEEqPreset_BassBoost, TMMEEqPreset_TrebleBoost, TMMEEqPreset_Last // Always have this as the last preset } TMusicServer_EqPreset;
typedef enum { TMusicServerAction_None, ///< No action set. TMusicServerAction_CreateMaximized, ///< Must be able to create player maximized from extern part, accessories. TMusicServerAction_CreateMinimized, ///< Must be able to create player minimized from extern part, accessories. TMusicServerAction_Destroy, ///< Must be able to destroy player from extern part, accessories. TMusicServerAction_Play, ///< Starts player. TMusicServerAction_Pause, ///< Pauses player. TMusicServerAction_Next, ///< Get next file. TMusicServerAction_Previous, ///< Get previous file. TMusicServerAction_StartFastForward, ///< Starts fastforward of player. TMusicServerAction_StopFastForward, ///< Stops fastfowardad of player, must be done before play. TMusicServerAction_StartRewind, ///< Starts rewind of player. TMusicServerAction_StopRewind, ///< Stops rewind of player, must be done before play. TMusicServerAction_Last ///< Place holder. Put new data before this! } TMusicServer_Action;
typedef enum { TMusicServerState_Idle, ///< Player is idle, eg is in the init phase but not yet fully initiated. TMusicServerState_Initiated, ///< Player is initiated. TMusicServerState_Playing, ///< Player is playing. TMusicServerState_Paused, ///< Player is paused. Use the resume method to resume the playback. TMusicServerState_FastForwarding, ///< Player is fast forwarding. TMusicServerState_Rewinding, ///< Player is rewinding. TMusicServerState_Interrupted, ///< Player is interrupted by another playback session/player/call. TMusicServerState_Unknown, ///< State is unknown to the Music Server. TMusicServerState_Last ///< Place holder. Put new data before this! } TMusicServer_State;
typedef enum { TMusicServerCause_Error, ///< General unspecified error. TMusicServerCause_Platform_Error, ///< Unspecified platform error. TMusicServerCause_Beginning_Of_File_Passed, ///< Passed beginnig of media file (case of rewind operation). TMusicServerCause_End_Of_File, ///< End of media file reached. TMusicServerCause_Client_Termination, ///< Client terminated the session player. TMusicServerCause_DRM_Credentials_Expired, ///< DRM credentials expired. TMusicServerCause_File_Not_Found, ///< File does not exist. TMusicServerCause_Last ///< Place holder. Put new data before this! } TMusicServer_Cause;
class ICBMusicServer : public IUnknown { public: virtual void OnInitiated(int status, int track_count, bool random, bool loop, int ClientData); virtual void OnDestroy(int ClientData); virtual void OnDestroyed(int ClientData); virtual void OnStopped(TMusicServer_Cause cause, TMusicServer_Time time, int ClientData); virtual void OnStateChanged(TMusicServer_State state, TMusicServer_Time elapsedtime, int ClientData); virtual void OnTimeFeedback(TMusicServer_Time elapsedtime, int ClientData); virtual void OnAudioMuted(TMusicServer_MuteReason muteReason, int ClientData); virtual void OnNbrOfItemsChanged(int track_count, int ClientData, int result); virtual void OnItemChanged(int status, int track_id, TMusicServer_Time Position, TMusicServer_Action Action, wchar_t * fullpath, int path_lengh, wchar_t * Title, int TitleLengh, wchar_t * Artist, int ArtistLengh, wchar_t * Album, int AlbumLengh, TMusicServer_Time FullTime, bool isAlumArt, bool isDRMProtected, bool isRealMediaFile, int ClientData); virtual void OnApplicationStarted(bool started, int ClientData); virtual void OnError(int error, int ClientData); };
class IMusicServer : public IUnknown { public: virtual int StartMusicServer(ICBMusicServer* pICBMusicServer, u16 msgBase, int clientData, bool StartModePlaying, int track_id); virtual int Destroy(unsigned long subscriptionHandle); virtual int Subscribe(ICBMusicServer* pICBMusicServer, u16 msgBase, int clientData, unsigned long * pSubscriptionHandle); virtual int Unsubscribe(unsigned long subscriptionHandle); virtual int StartApplication(TMusicServer_Action action); virtual int StopApplication(void); virtual int SetPurchaseFlag(void); virtual int GetTags(int track_id, int bufsize, wchar_t* artist, wchar_t* album, wchar_t* title); virtual int GetFullInfo(int track_id, int bufsize, wchar_t* artist, wchar_t* album, wchar_t* title, wchar_t* filename, TMusicServer_Time* Fulltime, TMusicServer_Time* ElapsedTime, bool* HaveAlbumArt, bool* IsRealMediaFile); virtual int GetTrackFullpath(int track_id, int bufsize, wchar_t *buf); virtual int GetAlbumArt(int track_id, int bufsize, wchar_t* filename, int* Offset,int* Size, TMusicServer_AlbumArt_ImageType* pImageType, bool* IsDRMProtected); virtual int GetState(TMusicServer_State* State); virtual int Play(int track_id); virtual int Pause(void); virtual int FastFoward(void); virtual int Rewind(void); virtual int Next(bool activePress); virtual int Previous(void); virtual int SetElapsedTime(TMusicServer_Time time); virtual int GetElapsedTime(TMusicServer_Time* time); virtual int SetWindowMode(bool maximazed); virtual int SetStarted(bool started); virtual int SetStereoWidening(bool enable); virtual int EnableEqualizer(void); virtual int DisableEqualizer(void); virtual int EqualizerGain_Set(TMusicServer_EqBand band, int level); virtual int EqualizerPreset_Set(TMusicServer_EqPreset equalizerPreset); virtual int SetSettings_Boolean(TMusicServer_Settings type, bool value); virtual void* unk_2(); virtual void* unk_3(); virtual void* unk_4(); virtual int SkipTrack(void); virtual int RemoveFromPlaylist(int track_id); virtual int SavePlayQueue(wchar_t* PlayListName); };
Sony Xperia XZ3 Green Sony Xperia Z3 Compact Orange W995i SW-R1GA026 :(
Вы не можете начинать темы. Вы не можете редактировать свои сообщения. Вы не можете создавать опросы. Вы не можете вкладывать файлы в сообщения. Вы не можете отвечать на сообщения. Вы не можете удалять свои сообщения. Вы не можете голосовать.