| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Run coded frame eviction/garbage collection algorithm. | 60 // Run coded frame eviction/garbage collection algorithm. |
| 61 // |currentPlaybackTime| is HTMLMediaElement::currentTime. The algorithm | 61 // |currentPlaybackTime| is HTMLMediaElement::currentTime. The algorithm |
| 62 // will try to preserve data around current playback position. | 62 // will try to preserve data around current playback position. |
| 63 // |newDataSize| is size of new data about to be appended to SourceBuffer. | 63 // |newDataSize| is size of new data about to be appended to SourceBuffer. |
| 64 // Could be zero for appendStream if stream size is unknown in advance. | 64 // Could be zero for appendStream if stream size is unknown in advance. |
| 65 // Returns false if buffer is still full after eviction. | 65 // Returns false if buffer is still full after eviction. |
| 66 virtual bool evictCodedFrames(double currentPlaybackTime, | 66 virtual bool evictCodedFrames(double currentPlaybackTime, |
| 67 size_t newDataSize) = 0; | 67 size_t newDataSize) = 0; |
| 68 | 68 |
| 69 // Appends data and runs the segment parser loop algorithm. | 69 // Appends data and runs the segment parser loop algorithm. |
| 70 // The algorithm may update |*timestampOffset| if |timestampOffset| is not nul
l. | 70 // The algorithm may update |*timestampOffset| if |timestampOffset| is not |
| 71 // null. |
| 71 // Returns true on success, otherwise the append error algorithm needs to | 72 // Returns true on success, otherwise the append error algorithm needs to |
| 72 // run with the decode error parameter set to true. | 73 // run with the decode error parameter set to true. |
| 73 virtual bool append(const unsigned char* data, | 74 virtual bool append(const unsigned char* data, |
| 74 unsigned length, | 75 unsigned length, |
| 75 double* timestampOffset) = 0; | 76 double* timestampOffset) = 0; |
| 76 | 77 |
| 77 virtual void resetParserState() = 0; | 78 virtual void resetParserState() = 0; |
| 78 virtual void remove(double start, double end) = 0; | 79 virtual void remove(double start, double end) = 0; |
| 79 virtual bool setTimestampOffset(double) = 0; | 80 virtual bool setTimestampOffset(double) = 0; |
| 80 | 81 |
| 81 // Set presentation timestamp for the start of append window. | 82 // Set presentation timestamp for the start of append window. |
| 82 virtual void setAppendWindowStart(double) = 0; | 83 virtual void setAppendWindowStart(double) = 0; |
| 83 | 84 |
| 84 // Set presentation timestamp for the end of append window. | 85 // Set presentation timestamp for the end of append window. |
| 85 virtual void setAppendWindowEnd(double) = 0; | 86 virtual void setAppendWindowEnd(double) = 0; |
| 86 | 87 |
| 87 // After this method is called, this WebSourceBuffer should never use the | 88 // After this method is called, this WebSourceBuffer should never use the |
| 88 // client pointer passed to setClient(). | 89 // client pointer passed to setClient(). |
| 89 virtual void removedFromMediaSource() = 0; | 90 virtual void removedFromMediaSource() = 0; |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 } // namespace blink | 93 } // namespace blink |
| 93 | 94 |
| 94 #endif | 95 #endif |
| OLD | NEW |