DB3210 - Drawing on player possible - developers needed : Эльфостроение : Форум |
Страница 3 из 3: « 1 2 [3] |
blacklizard: |
11.11.10, 13:09 |
Hi, I dumped AudioPlayerBook Код: f=_fopen(L"/usb/other",L"dump.bin",0x108,0x180,0); fwrite (f, (char*)(FindBook(get_IsAudioPlayerBook())),0x400); fclose(f); I can find current_track_id and total track number after BOOK structure My problem is, i dunno how to convert it to struct, help needed |
den_po: |
11.11.10, 13:25 |
blacklizard, почему ты не используешь коллбэк? |
blacklizard: |
11.11.10, 13:44 |
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; |
D3mon: |
01.12.11, 02:50 |
Немножечко дополню структуру, предложенную KrasH'ем. Код: typedef struct { BOOK book; PMusicServer pIMusicServer; char dummy_0x0[0x4]; GUI * Music_Gui_PlayQueue; char dummy_0x1[0x14]; wchar_t current_track_id; wchar_t selected_track_id; wchar_t tracks_count; char dummy[0x6]; TMusicServer_Time ElapsedTime; char dummy_0x2[0x4]; SUB_EXECUTE *CurrentTrack_SUB_EXECUTE; char dummy_0x3[0x4C]; }MUSIC_APPLICATION_BOOK_3210; Теперь поясню: 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; |
farid: |
27.02.12, 18:19 |
Код: 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; typedef struct { BOOK book; PMusicServer pIMusicServer; GUI * Music_Gui_PlayQueue; char dummy_0[0x10]; wchar_t current_track_id; wchar_t selected_track_id; wchar_t tracks_count; char dummy_1[0x5]; char loop; char shuffle; char dummy_2[0x3]; TMusicServer_Time ElapsedTime; char dummy_3[0x4]; SUB_EXECUTE *CurrentTrack; }MUSIC_APPLICATION_BOOK_3150v1; |
E1kolyan: |
27.02.12, 19:27 |
Если бы кто нибудь был бы внимательным то Лазер выкладывал описание интерфейса мьюсик сервер, там все методы описаны... |
D3mon: |
27.02.12, 23:13 |
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 MUSIC_APPLICATION_BOOK_DB3210_WALKMAN: IMusicServer: |
E1kolyan: |
28.02.12, 18:26 |
Начало у Дениса такое... IMusicServer__Start+1 IMusicServer__Destroy+1 IMusicServer__Subscribe+1 IMusicServer__Unsubscribe+1 IMusicServer__StartApplication+1 IMusicServer__StopApplication+1 |
Страница 3 из 3: « 1 2 [3] |
URL этой темы: https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=4938&start=20 © 2005-2018 supertrubka.org |