Please read the following table in HTML format from a webpage and then answer the question in detail according to the table. Each table cell is defined by a <td> and a </td> tag. Each table row starts with a <tr> and ends with a </tr> tag. 'rowspan=m' and 'colspan=n' represents a cell spaning over 'm' rows and 'n' columns.

Webpage title:
Skylar Astin
Table title:
Film
Table:
<table id='hittask' contenteditable='False'>
<tr> <th colspan=1 rowspan=1 > Year </th><th colspan=1 rowspan=1 > Title </th><th colspan=1 rowspan=1 > Role </th><th colspan=1 rowspan=1 > Notes </th></tr>
<tr> <td colspan=1 rowspan=1 > 2008 </td><td colspan=1 rowspan=1 > Hamlet 2 </td><td colspan=1 rowspan=1 > Rand Posin </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 2009 </td><td colspan=1 rowspan=1 > Taking Woodstock </td><td colspan=1 rowspan=1 > John P. Roberts </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td class="highlighted"  colspan=1 rowspan=3 > 2012 </td><td colspan=1 rowspan=1 > Love Written in Blood </td><td colspan=1 rowspan=1 > Henderson </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td class="highlighted"  colspan=1 rowspan=1 > Pitch Perfect </td><td class="highlighted"  colspan=1 rowspan=1 > Jesse Swanson </td><td colspan=1 rowspan=1 > Teen Choice Award for Choice Movie Actor Comedy Nominated – Teen Choice Award for Choice Movie Liplock (shared with Anna Kendrick) </td></tr>
<tr> <td colspan=1 rowspan=1 > Wreck-It Ralph </td><td colspan=1 rowspan=1 > Roy (voice) </td><td colspan=1 rowspan=1 > BTVA Feature Film Voice Acting Award for Best Vocal Ensemble in a Feature Film BTVA People's Choice Voice Acting Award for Best Vocal Ensemble in a Feature Film </td></tr>
<tr> <td colspan=1 rowspan=1 > 2013 </td><td colspan=1 rowspan=1 > 21 & Over </td><td colspan=1 rowspan=1 > Casey Altman </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=2 > 2014 </td><td colspan=1 rowspan=1 > Cavemen </td><td colspan=1 rowspan=1 > Dean Parker </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > The Oven </td><td colspan=1 rowspan=1 > Owen Miller </td><td colspan=1 rowspan=1 > Short film </td></tr>
<tr> <td class="highlighted"  colspan=1 rowspan=1 > 2015 </td><td class="highlighted"  colspan=1 rowspan=1 > Pitch Perfect 2 </td><td class="highlighted"  colspan=1 rowspan=1 > Jesse Swanson </td><td colspan=1 rowspan=1 > Teen Choice Award for Choice Movie Actor Comedy </td></tr>
<tr> <td colspan=1 rowspan=2 > 2016 </td><td colspan=1 rowspan=1 > Monkey Up </td><td colspan=1 rowspan=1 > Monty (voice) </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > Flock of Dudes </td><td colspan=1 rowspan=1 > David </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 2017 </td><td colspan=1 rowspan=1 > Speech & Debate </td><td colspan=1 rowspan=1 > Walter Healy </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 2018 </td><td colspan=1 rowspan=1 > Hot Air </td><td colspan=1 rowspan=1 > Gareth Whitely </td><td colspan=1 rowspan=1 >  </td></tr>
<tr> <td colspan=1 rowspan=1 > 2019 </td><td colspan=1 rowspan=1 > Ghosts of War </td><td colspan=1 rowspan=1 > Eugene </td><td colspan=1 rowspan=1 > In post-production </td></tr>
</table>
Question:
What roles did Astin play in Pitch perfect and pitch perfect 2?
Answer:
In 2012, Astin starred in the film Pitch Perfect (2012) as Jesse Swanson, and reprised the role in the 2015 sequel Pitch Perfect 2.