Pepper_31_C_interfaces
ppb_stream_parser_samsung.h
Go to the documentation of this file.
1 /**
2  * This file defines the <code>PPB_StreamParser_Samsung</code> interface.
3  */
4 
5 /* From samsung/ppb_stream_parser_samsung.idl,
6  * modified Tue Dec 17 19:52:52 2013.
7  */
8 
9 #ifndef PPAPI_C_SAMSUNG_PPB_STREAM_PARSER_SAMSUNG_H_
10 #define PPAPI_C_SAMSUNG_PPB_STREAM_PARSER_SAMSUNG_H_
11 
12 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h"
17 #include "ppapi/c/pp_var.h"
18 #include "ppapi/c/samsung/pp_media_common_samsung.h"
19 #include "ppapi/c/samsung/pp_stream_parser_samsung.h"
20 #include "ppapi/c/samsung/ppp_stream_parser_samsung.h"
21 
22 #define PPB_STREAMPARSER_SAMSUNG_INTERFACE_0_9 "PPB_StreamParser_Samsung;0.9"
23 #define PPB_STREAMPARSER_SAMSUNG_INTERFACE \
24  PPB_STREAMPARSER_SAMSUNG_INTERFACE_0_9
25 
26 /**
27  * @file
28  */
29 
30 
31 /**
32  * @addtogroup Interfaces
33  * @{
34  */
35 /**
36  * Abstract Interface used to parse media data streams
37  */
39  /**
40  * Used for registering stream parser in Browser. |stream_type| is a MIME type
41  * of stream, to witch parser be registered. |interface_id| is an id of PPP
42  * interface, received at interface registration process.
43  */
45  PP_Instance instance,
46  struct PP_Var stream_type,
47  const struct PPP_StreamParser_Samsung_0_9* stream_parser_interface,
48  void* user_data);
49  /**
50  * Indicates completion of parser initialization. |stream_id| it's a id
51  * of stream, that Browser request to parse, if Borwser request parsing more
52  * that one stream of that type, it's allows to recognize that stream.
53  * On success, |result| is set to PP_OK, or PP_FALSE if an error occurred.
54  * If initialization is success, the |duration| contains stream duration
55  * (in microseconds).
56  */
57  PP_Bool (*Init)(PP_Instance instance,
58  int32_t stream_id,
59  PP_Bool result,
60  PP_MicrosecondsDelta duration);
61  /**
62  * Indicates when new audio configuration have been parsed,
63  * |config| it's a configuration struct
64  */
66  int32_t stream_id,
67  const struct PP_SP_AudioDecoderConfig* config);
68  /**
69  * Indicates when new video configuration have been parsed,
70  * |config| it's a configuration struct
71  */
73  int32_t stream_id,
74  const struct PP_SP_VideoDecoderConfig* config);
75  /**
76  * New stream buffers have been parsed, |type| indicates type of track it's
77  * enum defined in pp_stream_parser_samsung.h, |track_id| it's id of track,
78  * useful if is more that one track of that type, and |frames| is
79  * a |PP_VarArray| that contains X structures of |PP_Frames| (that contains
80  * information like |is_key_frame| flag |PP_Bool|, |size| of frame, |duration|
81  * time, decode timestamp or presentation timestamp |PP_MicrosecondsDelta|.
82  * X is the number of frames that be sended, and size of PP_VarArray
83  * is X*sizeof(PP_Frames). Frames data are send by buffer. |buffer| size
84  * must be of at least sum of all frames |size|.
85  */
87  int32_t stream_id,
88  PP_StreamType type,
89  int32_t track_id,
90  PP_Resource buffer,
91  uint32_t frames_count,
92  const struct PP_Frames frames[]);
93  /**
94  * Signals the beginning od a new media segment, |timestamp| the earliest
95  * timestamp of all the streams in the segment
96  */
97  void (*NewMediaSegment)(PP_Instance instance,
98  int32_t stream_id,
99  PP_MicrosecondsDelta timestamp);
100  /**
101  *
102  */
103  void (*EndOfSegment)(PP_Instance instance, int32_t stream_id);
104  /**
105  * A new potentialy encrypted stream has been parsed. |type| describes type
106  * of the initialization data |init_data| associated with the stream.
107  */
109  int32_t stream_id,
110  struct PP_Var type,
111  struct PP_Var init_data);
112 };
113 
115 /**
116  * @}
117  */
118 
119 #endif /* PPAPI_C_SAMSUNG_PPB_STREAM_PARSER_SAMSUNG_H_ */
120 
void(* NewMediaSegment)(PP_Instance instance, int32_t stream_id, PP_MicrosecondsDelta timestamp)
int64_t PP_MicrosecondsDelta
PP_VarType type
Definition: pp_var.h:156
int32_t PP_Resource
Definition: pp_resource.h:40
PP_Bool(* Init)(PP_Instance instance, int32_t stream_id, PP_Bool result, PP_MicrosecondsDelta duration)
PP_Bool(* NeedKey)(PP_Instance instance, int32_t stream_id, struct PP_Var type, struct PP_Var init_data)
Definition: pp_var.h:155
PP_Bool(* NewBuffers)(PP_Instance instance, int32_t stream_id, PP_StreamType type, int32_t track_id, PP_Resource buffer, uint32_t frames_count, const struct PP_Frames frames[])
PP_Bool(* RegisterParser)(PP_Instance instance, struct PP_Var stream_type, const struct PPP_StreamParser_Samsung_0_9 *stream_parser_interface, void *user_data)
PP_Bool(* NewVideoConfig)(PP_Instance instance, int32_t stream_id, const struct PP_SP_VideoDecoderConfig *config)
void(* EndOfSegment)(PP_Instance instance, int32_t stream_id)
int32_t PP_Instance
Definition: pp_instance.h:34
PP_Bool
Definition: pp_bool.h:30
PP_Bool(* NewAudioConfig)(PP_Instance instance, int32_t stream_id, const struct PP_SP_AudioDecoderConfig *config)