Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: Source/modules/mediasource/SourceBufferList.cpp

Issue 552943002: MSE: Start letting SourceBuffer begin to do initialization segment received algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased. Addressed philipj@'s PS5 comments. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/modules/mediasource/SourceBufferList.h ('k') | public/platform/WebSourceBuffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 ASSERT(m_list.isEmpty()); 49 ASSERT(m_list.isEmpty());
50 #endif 50 #endif
51 } 51 }
52 52
53 void SourceBufferList::add(SourceBuffer* buffer) 53 void SourceBufferList::add(SourceBuffer* buffer)
54 { 54 {
55 m_list.append(buffer); 55 m_list.append(buffer);
56 scheduleEvent(EventTypeNames::addsourcebuffer); 56 scheduleEvent(EventTypeNames::addsourcebuffer);
57 } 57 }
58 58
59 void SourceBufferList::insert(size_t position, SourceBuffer* buffer)
60 {
61 m_list.insert(position, buffer);
62 scheduleEvent(EventTypeNames::addsourcebuffer);
63 }
64
59 void SourceBufferList::remove(SourceBuffer* buffer) 65 void SourceBufferList::remove(SourceBuffer* buffer)
60 { 66 {
61 size_t index = m_list.find(buffer); 67 size_t index = m_list.find(buffer);
62 if (index == kNotFound) 68 if (index == kNotFound)
63 return; 69 return;
64 m_list.remove(index); 70 m_list.remove(index);
65 scheduleEvent(EventTypeNames::removesourcebuffer); 71 scheduleEvent(EventTypeNames::removesourcebuffer);
66 } 72 }
67 73
68 void SourceBufferList::clear() 74 void SourceBufferList::clear()
(...skipping 22 matching lines...) Expand all
91 return m_executionContext; 97 return m_executionContext;
92 } 98 }
93 99
94 void SourceBufferList::trace(Visitor* visitor) 100 void SourceBufferList::trace(Visitor* visitor)
95 { 101 {
96 visitor->trace(m_list); 102 visitor->trace(m_list);
97 EventTargetWithInlineData::trace(visitor); 103 EventTargetWithInlineData::trace(visitor);
98 } 104 }
99 105
100 } // namespace blink 106 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/mediasource/SourceBufferList.h ('k') | public/platform/WebSourceBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698