/** * Parse the media synchronously with a flag. This Media should be alive (not released). * * @param flags see {@link Parse} * @return true in case of success, false otherwise. */ public boolean parse(int flags) { boolean parse = false; synchronized (this) { if ((mParseStatus & (PARSE_STATUS_PARSED | PARSE_STATUS_PARSING)) == 0) { mParseStatus |= PARSE_STATUS_PARSING; parse = true; } } if (parse && nativeParse(flags)) { postParse(); return true; } else return false; }
/** * Parse the media synchronously with a flag. This Media should be alive (not released). * * @param flags see {@link Parse} * @return true in case of success, false otherwise. */ public boolean parse(int flags) { boolean parse = false; synchronized (this) { if ((mParseStatus & (PARSE_STATUS_PARSED | PARSE_STATUS_PARSING)) == 0) { mParseStatus |= PARSE_STATUS_PARSING; parse = true; } } if (parse && nativeParse(flags)) { postParse(); return true; } else return false; }
/** * Parse the media synchronously with a flag. This Media should be alive (not released). * * @param flags see {@link Parse} * @return true in case of success, false otherwise. */ public boolean parse(int flags) { boolean parse = false; synchronized (this) { if ((mParseStatus & (PARSE_STATUS_PARSED | PARSE_STATUS_PARSING)) == 0) { mParseStatus |= PARSE_STATUS_PARSING; parse = true; } } if (parse && nativeParse(flags)) { postParse(); return true; } else return false; }
/** * Parse the media synchronously with a flag. This Media should be alive (not released). * * @param flags see {@link Parse} * @return true in case of success, false otherwise. */ public boolean parse(int flags) { boolean parse = false; synchronized (this) { if ((mParseStatus & (PARSE_STATUS_PARSED | PARSE_STATUS_PARSING)) == 0) { mParseStatus |= PARSE_STATUS_PARSING; parse = true; } } if (parse && nativeParse(flags)) { postParse(); return true; } else return false; }
/** * Parse the media synchronously with a flag. This Media should be alive (not released). * * @param flags see {@link Parse} * @return true in case of success, false otherwise. */ public boolean parse(int flags) { boolean parse = false; synchronized (this) { if ((mParseStatus & (PARSE_STATUS_PARSED | PARSE_STATUS_PARSING)) == 0) { mParseStatus |= PARSE_STATUS_PARSING; parse = true; } } if (parse && nativeParse(flags)) { postParse(); return true; } else return false; }
@Override protected synchronized Event onEventNative(int eventType, long arg1, long arg2, float argf1) { switch (eventType) { case Event.MetaChanged: // either we update all metas (if first call) or we update a specific meta int id = (int) arg1; if (id >= 0 && id < Meta.MAX) mNativeMetas[id] = null; return new Event(eventType, arg1); case Event.DurationChanged: mDuration = -1; break; case Event.ParsedChanged: postParse(); return new Event(eventType, arg1); case Event.StateChanged: mState = -1; break; } return new Event(eventType); }
@Override protected synchronized Event onEventNative(int eventType, long arg1, float arg2) { switch (eventType) { case Event.MetaChanged: // either we update all metas (if first call) or we update a specific meta int id = (int) arg1; if (id >= 0 && id < Meta.MAX) mNativeMetas[id] = null; return new Event(eventType, arg1); case Event.DurationChanged: mDuration = -1; break; case Event.ParsedChanged: postParse(); return new Event(eventType, arg1); case Event.StateChanged: mState = -1; break; } return new Event(eventType); }
@Override protected synchronized Event onEventNative(int eventType, long arg1, long arg2, float argf1) { switch (eventType) { case Event.MetaChanged: // either we update all metas (if first call) or we update a specific meta int id = (int) arg1; if (id >= 0 && id < Meta.MAX) mNativeMetas[id] = null; return new Event(eventType, arg1); case Event.DurationChanged: mDuration = -1; break; case Event.ParsedChanged: postParse(); return new Event(eventType, arg1); case Event.StateChanged: mState = -1; break; } return new Event(eventType); }
@Override protected synchronized Event onEventNative(int eventType, long arg1, long arg2, float argf1) { switch (eventType) { case Event.MetaChanged: // either we update all metas (if first call) or we update a specific meta int id = (int) arg1; if (id >= 0 && id < Meta.MAX) mNativeMetas[id] = null; return new Event(eventType, arg1); case Event.DurationChanged: mDuration = -1; break; case Event.ParsedChanged: postParse(); return new Event(eventType, arg1); case Event.StateChanged: mState = -1; break; } return new Event(eventType); }
@Override protected synchronized Event onEventNative(int eventType, long arg1, float arg2) { switch (eventType) { case Event.MetaChanged: // either we update all metas (if first call) or we update a specific meta int id = (int) arg1; if (id >= 0 && id < Meta.MAX) mNativeMetas[id] = null; return new Event(eventType, arg1); case Event.DurationChanged: mDuration = -1; break; case Event.ParsedChanged: postParse(); return new Event(eventType, arg1); case Event.StateChanged: mState = -1; break; } return new Event(eventType); }