Skip to content

Instantly share code, notes, and snippets.

@johnmurrayvi
Created June 24, 2013 00:13
Show Gist options
  • Save johnmurrayvi/5847027 to your computer and use it in GitHub Desktop.
Save johnmurrayvi/5847027 to your computer and use it in GitHub Desktop.
play count increment debugging
***** First track *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 16384 [STREAM_BEFORE_START]
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 4096 [METADATA_CHANGE]
***** About to start first track *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 16385 [STREAM_START]
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): CASE: STREAM_START
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): ***** SETTING mCurrentStartTime to PR_Now()
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): ** mCurrentStartTime (unsigned) = 3903394665
***** Start time was set correctly *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 5376 [BEFORE_TRACK_CHANGE]
***** About to change to second track *****
***** following the TRACK_CHANGE case, we go into VerifyDataAndCreateNewEntry *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 5377 [TRACK_CHANGE]
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): CASE: TRACK_CHANGE
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::VerifyDataAndCreateNewEntry(): sbPlaybackHistoryService[0xb3e0e400] - VerifyDataAndCreateNewEntry
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::VerifyDataAndCreateNewEntry(): ** mCurrentlyTracking = true
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::VerifyDataAndCreateNewEntry(): ** mCurrentStartTime (unsigned) = 3903394665
***** Still have correct start time *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 16385 [STREAM_START]
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): CASE: STREAM_START
***** Uhh okay, we caught STREAM_START in the switch statement, *****
***** but haven't gone into UpdateTrackingDataFromEvent (i.e. start time != 0 yet) *****
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::VerifyDataAndCreateNewEntry(): sbPlaybackHistoryServie: LEAVING VerifyDataAndCreateNewEntry
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - UpdateTrackingDataFromEvent
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): BEFORE setting data
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): ** mCurrentStartTime (unsigned) = 3903394665
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): AFTER setting data
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): ** mCurrentStartTime (unsigned) = 0
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): ***** LEAVING *****
***** UpdateTrackingDataFromEvent works correctly setting the start time to 0 *****
***** Almost done with the second track *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 5376 [BEFORE_TRACK_CHANGE]
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 5377 [TRACK_CHANGE]
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): CASE: TRACK_CHANGE
***** About to change to third track, in the TRACK_CHANGE case *****
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::VerifyDataAndCreateNewEntry(): sbPlaybackHistoryService[0xb3e0e400] - VerifyDataAndCreateNewEntry
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::VerifyDataAndCreateNewEntry(): ** mCurrentlyTracking = true
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::VerifyDataAndCreateNewEntry(): ** mCurrentStartTime (unsigned) = 0
***** mCurrentStartTime is still 0 from the previous UpdateTrackingDataFromEvent?! *****
-679024832[7f1fd6060370]: WARNING: NS_ENSURE_TRUE(mCurrentStartTime) failed: file /mnt/git/nightingale/sbtrunk-old-xul/components/mediacore/playback/history/src/sbPlaybackHistoryService.cpp, line 1655
WARNING: NS_ENSURE_TRUE(mCurrentStartTime) failed: file /mnt/git/nightingale/sbtrunk-old-xul/components/mediacore/playback/history/src/sbPlaybackHistoryService.cpp, line 1655
***** Fails verification like it should *****
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::ResetTrackingData(): sbPlaybackHistoryService[0xb3e0e400] - ResetTrackingData
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::ResetTrackingData(): BEFORE resetting data
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::ResetTrackingData(): ** mCurrentStartTime (unsigned) = 0
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::ResetTrackingData(): AFTER resetting data
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::ResetTrackingData(): ** mCurrentStartTime (unsigned) = 0
***** Values are reset to 0 BEFORE THE NEXT STREAM_START IS CAUGHT! *****
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - UpdateTrackingDataFromEvent
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): BEFORE setting data
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): ** mCurrentStartTime (unsigned) = 0
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): AFTER setting data
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): ** mCurrentStartTime (unsigned) = 0
-679024832[7f1fd6060370]: nsresult sbPlaybackHistoryService::UpdateTrackingDataFromEvent(sbIMediacoreEvent*): ***** LEAVING *****
***** We go through UpdateTrackingDataFromEvent before as well (??) *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 16385 [STREAM_START]
***** NOW we caught STREAM_START *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): CASE: STREAM_START
***** And enter the conditional because mCurrentStartTime is 0! *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): ***** SETTING mCurrentStartTime to PR_Now()
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): ** mCurrentStartTime (unsigned) = 20460246
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 4096 [METADATA_CHANGE]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment