| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_CAST_LOGGING_LOGGING_RAW_H_ | 5 #ifndef MEDIA_CAST_LOGGING_LOGGING_RAW_H_ |
| 6 #define MEDIA_CAST_LOGGING_LOGGING_RAW_H_ | 6 #define MEDIA_CAST_LOGGING_LOGGING_RAW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public: | 23 public: |
| 24 LoggingRaw(); | 24 LoggingRaw(); |
| 25 ~LoggingRaw(); | 25 ~LoggingRaw(); |
| 26 | 26 |
| 27 // Inform of new event: three types of events: frame, packets and generic. | 27 // Inform of new event: three types of events: frame, packets and generic. |
| 28 // Frame events can be inserted with different parameters. | 28 // Frame events can be inserted with different parameters. |
| 29 void InsertFrameEvent(const base::TimeTicks& time_of_event, | 29 void InsertFrameEvent(const base::TimeTicks& time_of_event, |
| 30 CastLoggingEvent event, uint32 rtp_timestamp, | 30 CastLoggingEvent event, uint32 rtp_timestamp, |
| 31 uint32 frame_id); | 31 uint32 frame_id); |
| 32 | 32 |
| 33 // Size - Inserting the size implies that this is an encoded frame. | |
| 34 // This function is only applicable for the following frame events: | 33 // This function is only applicable for the following frame events: |
| 35 // kAudioFrameEncoded, kVideoFrameEncoded | 34 // kAudioFrameEncoded, kVideoFrameEncoded |
| 36 void InsertFrameEventWithSize(const base::TimeTicks& time_of_event, | 35 // |size| - Size of encoded frame. |
| 36 // |key_frame| - Whether the frame is a key frame. This field is only |
| 37 // applicable for kVideoFrameEncoded event. |
| 38 void InsertEncodedFrameEvent(const base::TimeTicks& time_of_event, |
| 37 CastLoggingEvent event, uint32 rtp_timestamp, | 39 CastLoggingEvent event, uint32 rtp_timestamp, |
| 38 uint32 frame_id, int size); | 40 uint32 frame_id, int size, bool key_frame); |
| 39 | 41 |
| 40 // Render/playout delay | 42 // Render/playout delay |
| 41 // This function is only applicable for the following frame events: | 43 // This function is only applicable for the following frame events: |
| 42 // kAudioPlayoutDelay, kVideoRenderDelay | 44 // kAudioPlayoutDelay, kVideoRenderDelay |
| 43 void InsertFrameEventWithDelay(const base::TimeTicks& time_of_event, | 45 void InsertFrameEventWithDelay(const base::TimeTicks& time_of_event, |
| 44 CastLoggingEvent event, uint32 rtp_timestamp, | 46 CastLoggingEvent event, uint32 rtp_timestamp, |
| 45 uint32 frame_id, base::TimeDelta delay); | 47 uint32 frame_id, base::TimeDelta delay); |
| 46 | 48 |
| 47 // Insert a packet event. | 49 // Insert a packet event. |
| 48 void InsertPacketEvent(const base::TimeTicks& time_of_event, | 50 void InsertPacketEvent(const base::TimeTicks& time_of_event, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 63 // Removes |subscriber| so that it will stop receiving events. | 65 // Removes |subscriber| so that it will stop receiving events. |
| 64 // Note that this class does NOT own the subscribers. This function MUST be | 66 // Note that this class does NOT own the subscribers. This function MUST be |
| 65 // called before |subscriber| is destroyed if it was previously added. | 67 // called before |subscriber| is destroyed if it was previously added. |
| 66 // It is a no-op to remove a subscriber that doesn't exist. | 68 // It is a no-op to remove a subscriber that doesn't exist. |
| 67 void RemoveSubscriber(RawEventSubscriber* subscriber); | 69 void RemoveSubscriber(RawEventSubscriber* subscriber); |
| 68 | 70 |
| 69 private: | 71 private: |
| 70 void InsertBaseFrameEvent(const base::TimeTicks& time_of_event, | 72 void InsertBaseFrameEvent(const base::TimeTicks& time_of_event, |
| 71 CastLoggingEvent event, uint32 frame_id, | 73 CastLoggingEvent event, uint32 frame_id, |
| 72 uint32 rtp_timestamp, base::TimeDelta delay, | 74 uint32 rtp_timestamp, base::TimeDelta delay, |
| 73 int size); | 75 int size, bool key_frame); |
| 74 | 76 |
| 75 // List of subscriber pointers. This class does not own the subscribers. | 77 // List of subscriber pointers. This class does not own the subscribers. |
| 76 std::vector<RawEventSubscriber*> subscribers_; | 78 std::vector<RawEventSubscriber*> subscribers_; |
| 77 | 79 |
| 78 DISALLOW_COPY_AND_ASSIGN(LoggingRaw); | 80 DISALLOW_COPY_AND_ASSIGN(LoggingRaw); |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 } // namespace cast | 83 } // namespace cast |
| 82 } // namespace media | 84 } // namespace media |
| 83 | 85 |
| 84 #endif // MEDIA_CAST_LOGGING_LOGGING_RAW_H_ | 86 #endif // MEDIA_CAST_LOGGING_LOGGING_RAW_H_ |
| OLD | NEW |