Loading include/media/IMediaPlayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ public: virtual status_t setParameter(int key, const Parcel& request) = 0; virtual status_t getParameter(int key, Parcel* reply) = 0; virtual status_t setRetransmitEndpoint(const struct sockaddr_in* endpoint) = 0; virtual status_t setNextPlayer(const sp<IMediaPlayer>& next) = 0; // Invoke a generic method on the player by using opaque parcels // for the request and reply. Loading include/media/MediaPlayerInterface.h +1 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ public: virtual void close() = 0; virtual status_t setPlaybackRatePermille(int32_t rate) { return INVALID_OPERATION; } virtual bool needsTrailingPadding() { return true; } }; MediaPlayerBase() : mCookie(0), mNotify(0) {} Loading include/media/mediaplayer.h +4 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,9 @@ enum media_error_type { enum media_info_type { // 0xx MEDIA_INFO_UNKNOWN = 1, // The player was started because it was used as the next player for another // player, which just completed playback MEDIA_INFO_STARTED_AS_NEXT = 2, // 7xx // The video is too complex for the decoder: it can't decode frames fast // enough. Possibly only the audio plays fine at this stage. Loading Loading @@ -207,6 +210,7 @@ public: status_t setParameter(int key, const Parcel& request); status_t getParameter(int key, Parcel* reply); status_t setRetransmitEndpoint(const char* addrString, uint16_t port); status_t setNextMediaPlayer(const sp<MediaPlayer>& player); private: void clear_l(); Loading media/libmedia/IMediaPlayer.cpp +14 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ enum { SET_PARAMETER, GET_PARAMETER, SET_RETRANSMIT_ENDPOINT, SET_NEXT_PLAYER, }; class BpMediaPlayer: public BpInterface<IMediaPlayer> Loading Loading @@ -307,7 +308,15 @@ public: if (OK != err) { return err; } return reply.readInt32(); } status_t setNextPlayer(const sp<IMediaPlayer>& player) { Parcel data, reply; data.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor()); sp<IBinder> b(player->asBinder()); data.writeStrongBinder(b); remote()->transact(SET_NEXT_PLAYER, data, &reply); return reply.readInt32(); } }; Loading Loading @@ -489,7 +498,11 @@ status_t BnMediaPlayer::onTransact( } else { reply->writeInt32(setRetransmitEndpoint(NULL)); } return NO_ERROR; } break; case SET_NEXT_PLAYER: { CHECK_INTERFACE(IMediaPlayer, data, reply); reply->writeInt32(setNextPlayer(interface_cast<IMediaPlayer>(data.readStrongBinder()))); return NO_ERROR; } break; default: Loading media/libmedia/mediaplayer.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -788,4 +788,11 @@ void MediaPlayer::died() } status_t MediaPlayer::setNextMediaPlayer(const sp<MediaPlayer>& next) { if (mPlayer == NULL) { return NO_INIT; } return mPlayer->setNextPlayer(next == NULL ? NULL : next->mPlayer); } }; // namespace android Loading
include/media/IMediaPlayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ public: virtual status_t setParameter(int key, const Parcel& request) = 0; virtual status_t getParameter(int key, Parcel* reply) = 0; virtual status_t setRetransmitEndpoint(const struct sockaddr_in* endpoint) = 0; virtual status_t setNextPlayer(const sp<IMediaPlayer>& next) = 0; // Invoke a generic method on the player by using opaque parcels // for the request and reply. Loading
include/media/MediaPlayerInterface.h +1 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ public: virtual void close() = 0; virtual status_t setPlaybackRatePermille(int32_t rate) { return INVALID_OPERATION; } virtual bool needsTrailingPadding() { return true; } }; MediaPlayerBase() : mCookie(0), mNotify(0) {} Loading
include/media/mediaplayer.h +4 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,9 @@ enum media_error_type { enum media_info_type { // 0xx MEDIA_INFO_UNKNOWN = 1, // The player was started because it was used as the next player for another // player, which just completed playback MEDIA_INFO_STARTED_AS_NEXT = 2, // 7xx // The video is too complex for the decoder: it can't decode frames fast // enough. Possibly only the audio plays fine at this stage. Loading Loading @@ -207,6 +210,7 @@ public: status_t setParameter(int key, const Parcel& request); status_t getParameter(int key, Parcel* reply); status_t setRetransmitEndpoint(const char* addrString, uint16_t port); status_t setNextMediaPlayer(const sp<MediaPlayer>& player); private: void clear_l(); Loading
media/libmedia/IMediaPlayer.cpp +14 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ enum { SET_PARAMETER, GET_PARAMETER, SET_RETRANSMIT_ENDPOINT, SET_NEXT_PLAYER, }; class BpMediaPlayer: public BpInterface<IMediaPlayer> Loading Loading @@ -307,7 +308,15 @@ public: if (OK != err) { return err; } return reply.readInt32(); } status_t setNextPlayer(const sp<IMediaPlayer>& player) { Parcel data, reply; data.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor()); sp<IBinder> b(player->asBinder()); data.writeStrongBinder(b); remote()->transact(SET_NEXT_PLAYER, data, &reply); return reply.readInt32(); } }; Loading Loading @@ -489,7 +498,11 @@ status_t BnMediaPlayer::onTransact( } else { reply->writeInt32(setRetransmitEndpoint(NULL)); } return NO_ERROR; } break; case SET_NEXT_PLAYER: { CHECK_INTERFACE(IMediaPlayer, data, reply); reply->writeInt32(setNextPlayer(interface_cast<IMediaPlayer>(data.readStrongBinder()))); return NO_ERROR; } break; default: Loading
media/libmedia/mediaplayer.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -788,4 +788,11 @@ void MediaPlayer::died() } status_t MediaPlayer::setNextMediaPlayer(const sp<MediaPlayer>& next) { if (mPlayer == NULL) { return NO_INIT; } return mPlayer->setNextPlayer(next == NULL ? NULL : next->mPlayer); } }; // namespace android