That would mean that you want to consume a license for every play in a
loop. Right?

As a consumer, that is a very bad scenario. Also, it introduces
trickcy situations/questions like, what does "played completely" mean?
Does it mean that the last sample/frame has been rendered? Or, does
that mean that the last sample has retrieved from the file (assuming
file playback as an example)?

As I mentioned earlier, probably in some other thread, "UsageComplete"
should not have anything to do with rights consumption. Decrementing
the DRM counter should be done in "AuthorizeUsage".

Checking the start or end of file (assuming you mean the duration) is
not a fool proof way. I could be wicked and reposition to the 1st
second, instead of starting from 0. What would you do then?

-Ravi

On Oct 17, 6:23 am, Atish <atish...@gmail.com> wrote:
> i want to consume rights each time is played(completely...)
>
> So i thought of moving the UsuageComplete code to DoPause or DoStart .
>
> and i'll check file start or file end in method so that it'll consume
> the rights only once during one time play...
>
> is there any better method to do it??
>
> On Oct 17, 10:16 am, RaviY <yend...@pv.com> wrote:
>
> > Are you saying that you want to consume a right every time the clip is
> > either paused, or stopped, or played in a loop?
>
> > On Oct 15, 8:47 am, Atish <atish...@gmail.com> wrote:
>
> > > Whatever u said is absolutely correct.But imaging actual use case
> > > scenario user doesnot want to remain in the player screen to play the
> > > content infinitely(unless he is fanatic about the song!!!)
>
> > > But what i m talking about is u can come out of the player app and
> > > anytime u can go n start playing.
> > > As nobody called reset or stop all nodes will retain their STATE
> > > (PAUSED).Next time it will start from PAUSED STATE ONLY. :(
>
> > > If we can consume rights during START(STATE) or PAUSED/STOPPED
> > > (whichever is called by app) then at least we will save some royalty
> > > to the operator...
>
> > > what do u say??isn't there any way to move the usage complete code to
> > > any other state??
>
> > > On Oct 15, 2:22 pm, NoraBora <noranb...@gmail.com> wrote:
>
> > > >     Yes. the app can play a drm content with one consumption(because
> > > > AuthorizeUsage called during prepare) until reset(). but isn't this a 
> > > > normal
> > > > scenario?
> > > >    Imagine that near the playback end, user can seek to the first and 
> > > > can
> > > > watch forever by one consumption. What's the difference?
>
> > > >    If you really want the drm content to be played only once with one
> > > > consumption, maybe you could try using intents like
> > > > BITMASK_PVMF_CPM_DRM_INTENT_RESUME, 
> > > > BITMASK_PVMF_CPM_DRM_INTENT_SEEK_BACK in
> > > > parser nodes. (I haven't used them yet..)
>
> > > > 2009/10/15 Atish <atish...@gmail.com>
>
> > > > > yeah we can do that but i feel that won't be a gud solution as anybody
> > > > > can write an application which won't call reset.
> > > > > So that app can play the DRM content for ever by continous playing the
> > > > > file.
> > > > > So some changes need to be done in ParserNode level so that each time
> > > > > node goes from pause to start it should at least call  AuthorizeUsuage
> > > > > and UsuageComplete..
>
> > > > > what do u say??
>
> > > > > On Oct 15, 12:28 pm, NoraBora <noranb...@gmail.com> wrote:
> > > > > > I tested what you said.
> > > > > > MediaPlayer.start() ... wait...play complete..MediaPlayer.start()
> > > > > > In the second start(), none of the cpm function called.
>
> > > > > > Under this opencore structure,
> > > > > > all I can think of is to reset MediaPlayer in CompletionListener.
>
> > > > > > I hope there is a better solution.
>
> > > > > > 2009/10/14 Atish <atish...@gmail.com>
>
> > > > > > > Thanks for Replying...
>
> > > > > > > I have already tried that.
>
> > > > > > > CPM's AuthorizeUsage() will be called only once when u start 
> > > > > > > playing a
> > > > > > > new media file.
>
> > > > > > > Once play is finished node will be in paused state.So if u start
> > > > > > > playing again node will go to Start state.
> > > > > > > PvPlayerEngine->Resume->ParserNode->Start.
> > > > > > > So AuthorizeUsage()  won't be called.
>
> > > > > > > As all the cpm calls are enqued in Init of Parser node only if u
> > > > > > > change media file or call Reset from App then only cpm commands 
> > > > > > > will
> > > > > > > be invoked.
>
> > > > > > > Please guide me what to do in this scenario???
>
> > > > > > > On Oct 14, 12:32 pm, NoraBora <noranb...@gmail.com> wrote:
> > > > > > > > I didn't know the default music player doesn't call
> > > > > MediaPlayer.Reset().
>
> > > > > > > > How about you put such as ConsumeRight() in CPM's 
> > > > > > > > AuthorizeUsage()
> > > > > not in
> > > > > > > > CPM's UsageComplete()?
> > > > > > > > In this case the consumption happens before playback.
>
> > > > > > > > 2009/10/14 Atish <atish...@gmail.com>
>
> > > > > > > > > But Currently android music player doesnot call Reset.That 
> > > > > > > > > means it
> > > > > > > > > can play DRM files with no constratint!!!!
>
> > > > > > > > > So where should i put that UsuageComplete code so that every 
> > > > > > > > > case
> > > > > is
> > > > > > > > > considered??
>
> > > > > > > > > On Oct 14, 6:44 am, NoraBora <noranb...@gmail.com> wrote:
> > > > > > > > > > DoReset() is invoked by MediaPlayer.reset();
>
> > > > > > > > > > 2009/10/13 Atish <atish...@gmail.com>
>
> > > > > > > > > > > Hi All,
> > > > > > > > > > > I m trying to run CPM plugin thru opencore for playing DRM
> > > > > contents
> > > > > > > in
> > > > > > > > > > > Android.
>
> > > > > > > > > > > I was succesfule in registrering and checking the rights 
> > > > > > > > > > > for
> > > > > DRM
> > > > > > > > > > > content thru CPM plugin.
>
> > > > > > > > > > > But consuming rights is not working because of below 
> > > > > > > > > > > mentioned
> > > > > > > reason.
>
> > > > > > > > > > >  Push(iCPMContainer,
> > > > > > > PVMFSubNodeContainerBaseMp3::ECPMUsageComplete);
> > > > > > > > > > > This command will enque the consume rights commands
> > > > > > > > > > > (ECPMUsageComplete).But this  code is present in DoReset.
>
> > > > > > > > > > > So how do reset will be invoked??
> > > > > > > > > > > Current android music player doesnot even call stop.
>
> > > > > > > > > > > so ECPMUsageComplete is not getting called...
> > > > > > > > > > > how to solve this issue...???- Hide quoted text -
>
> > > > > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -
>
>
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to