diff options
Diffstat (limited to 'doc/hackersguide')
-rw-r--r-- | doc/hackersguide/internals.sgml | 80 | ||||
-rw-r--r-- | doc/hackersguide/output.sgml | 2 | ||||
-rw-r--r-- | doc/hackersguide/overview.sgml | 24 | ||||
-rw-r--r-- | doc/hackersguide/stream.sgml | 10 |
4 files changed, 58 insertions, 58 deletions
diff --git a/doc/hackersguide/internals.sgml b/doc/hackersguide/internals.sgml index 9bd1ec684..8ffef06cd 100644 --- a/doc/hackersguide/internals.sgml +++ b/doc/hackersguide/internals.sgml @@ -64,7 +64,7 @@ <para> support for multiple plugin directories (<filename>$prefix/lib/xine/plugins</filename>, - <filename>$HOME/.xine/plugins</filename>, ...) + <filename>$HOME/.xine/plugins</filename>, …) </para> </listitem> <listitem> @@ -124,7 +124,7 @@ demux_mpeg_block.so decode_mpeg.so video_out_xv.so - ... + … xine-vcdnav-0.9.11 input_vcdnav.so xine-lib-1.2 @@ -135,21 +135,21 @@ demuxers fli.so avi.so - ... + … decoders ffmpeg.so mpeg.so (may contain mpeg 1/2 audio and video decoders) pcm.so - ... + … output video_xv.so audio_oss.so - ... + … xine-lib-3.0 avi.so (avi demuxer) mpeg.so (contains mpeg demuxers and audio/video decoders) video_out_xv.so (Xv video out) - ...</screen> + …</screen> </para> <para> As you can see, every package is free to organize plugins at will @@ -244,12 +244,12 @@ 13, found in xine-lib 2.13.7 would then define this plugin list: <programlisting> #include <xine/plugin.h> - ... + … plugin_t *init_api12(void) { input_plugin_t *this; this = malloc(sizeof(input_plugin_t)); - ... + … return (plugin_t *)this; } /* same thing, with different initialization for API 13 */ @@ -380,7 +380,7 @@ <para> Another problem xine must handle is the sound card clock drift. vpts are compared to the system clock (or even to a different clock provided by a scr plugin) - for presentation but sound card is sampling audio by it's own clocking + for presentation but sound card is sampling audio by its own clocking mechanism, so a small drift may occur. As the playback goes on this error will accumulate possibly resulting in audio gaps or audio drops. To avoid that annoying effect, two countermeasures are available (switchable with xine config @@ -396,7 +396,7 @@ * smoothing algorithms to correct sound card clock drifts. * obs: previously this error was added to xine scr. * - * audio buf ---> metronom --> audio fifo --> (buf->vpts - hw_vpts) + * audio buf ---> metronom --> audio fifo --> (buf->vpts - hw_vpts) * (vpts_offset + error) gap * <---------- control --------------| * @@ -448,7 +448,7 @@ In order to optimize to the most common case, xine's internal format for screen overlays is a similar representation to the 'spu' data. This brings not only performance benefit (since blending functions may skip large image areas due to RLE) but also - compatibility: it's possible to reencode any xine overlay to the original spu format + compatibility: it's possible to re-encode any xine overlay to the original spu format for displaying with mpeg hardware decoders like DXR3. </para> <para> @@ -486,38 +486,38 @@ <programlisting> video_overlay_event_t event; - event.object.handle = this->video_overlay->get_handle(this->video_overlay,0); + event.object.handle = this->video_overlay->get_handle(this->video_overlay,0); - memset(this->event.object.overlay, 0, sizeof(*this->event.object.overlay)); + memset(this->event.object.overlay, 0, sizeof(*this->event.object.overlay)); /* set position and size for this overlay */ - event.object.overlay->x = 0; - event.object.overlay->y = 0; - event.object.overlay->width = 100; - event.object.overlay->height = 100; + event.object.overlay->x = 0; + event.object.overlay->y = 0; + event.object.overlay->width = 100; + event.object.overlay->height = 100; /* clipping region is mostly used by dvd menus for highlighting buttons */ - event.object.overlay->clip_top = 0; - event.object.overlay->clip_bottom = image_height; - event.object.overlay->clip_left = 0; - event.object.overlay->clip_right = image_width; + event.object.overlay->clip_top = 0; + event.object.overlay->clip_bottom = image_height; + event.object.overlay->clip_left = 0; + event.object.overlay->clip_right = image_width; /* the hard part: provide a RLE image */ - event.object.overlay->rle = your_rle; - event.object.overlay->data_size = your_size; - event.object.overlay->num_rle = your_rle_count; + event.object.overlay->rle = your_rle; + event.object.overlay->data_size = your_size; + event.object.overlay->num_rle = your_rle_count; /* palette must contain YUV values for each color index */ - memcpy(event.object.overlay->clip_color, color, sizeof(color)); + memcpy(event.object.overlay->clip_color, color, sizeof(color)); /* this table contains transparency levels for each color index. 0 = completely transparent, 15 - completely opaque */ - memcpy(event.object.overlay->clip_trans, trans, sizeof(trans)); + memcpy(event.object.overlay->clip_trans, trans, sizeof(trans)); /* set the event type and time for displaying */ event.event_type = EVENT_SHOW_SPU; event.vpts = 0; /* zero is a special vpts value, it means 'now' */ - video_overlay->add_event(video_overlay, &event);</programlisting> + video_overlay->add_event(video_overlay, &event);</programlisting> </para> </sect2> <sect2> @@ -535,7 +535,7 @@ <programlisting> osd_object_t osd; - osd = this->osd_renderer->new_object(osd_renderer, 300, 200);</programlisting> + osd = this->osd_renderer->new_object(osd_renderer, 300, 200);</programlisting> <para> Now we may want to set font and color for text rendering. Although we will refer to fonts over this document, in fact the OSD can be any kind of bitmap. Font @@ -547,22 +547,22 @@ </para> <programlisting> /* set sans serif 24 font */ - osd_renderer->set_font(osd, "sans", 24); + osd_renderer->set_font(osd, "sans", 24); /* copy pre-defined colors for white, black border, transparent background to starting at the index used by the first text palette */ - osd_renderer->set_text_palette(osd, TEXTPALETTE_WHITE_BLACK_TRANSPARENT, OSD_TEXT1); + osd_renderer->set_text_palette(osd, TEXTPALETTE_WHITE_BLACK_TRANSPARENT, OSD_TEXT1); /* copy pre-defined colors for white, no border, translucid background to starting at the index used by the second text palette */ - osd_renderer->set_text_palette(osd, TEXTPALETTE_WHITE_NONE_TRANSLUCID, OSD_TEXT2);</programlisting> + osd_renderer->set_text_palette(osd, TEXTPALETTE_WHITE_NONE_TRANSLUCID, OSD_TEXT2);</programlisting> <para> Now render the text and show it: <programlisting> - osd_renderer->render_text(osd, 0, 0, "white text, black border", OSD_TEXT1); - osd_renderer->render_text(osd, 0, 30, "white text, no border", OSD_TEXT2); + osd_renderer->render_text(osd, 0, 0, "white text, black border", OSD_TEXT1); + osd_renderer->render_text(osd, 0, 30, "white text, no border", OSD_TEXT2); - osd_renderer->show(osd, 0); /* 0 stands for 'now' */</programlisting> + osd_renderer->show(osd, 0); /* 0 stands for 'now' */</programlisting> </para> <para> There's a 1:1 mapping between OSD objects and overlays, therefore the @@ -572,11 +572,11 @@ </para> <programlisting> for( i=0; i < 100; i+=10 ) { - osd_renderer->set_position(osd, i, i ); - osd_renderer->show(osd, 0); + osd_renderer->set_position(osd, i, i ); + osd_renderer->show(osd, 0); sleep(1); } - osd_renderer->hide(osd, 0);</programlisting> + osd_renderer->hide(osd, 0);</programlisting> <para> For additional functions please check osd.h or the public header. </para> @@ -618,13 +618,13 @@ </para> <programlisting> /* obtains size the text will occupy */ - renderer->get_text_size(osd, text, &width, &height); + renderer->get_text_size(osd, text, &width, &height); /* draws a box using font background color (translucid) */ - renderer->filled_rect(osd, x1, y1, x1+width, y1+height, OSD_TEXT2 + 1); + renderer->filled_rect(osd, x1, y1, x1+width, y1+height, OSD_TEXT2 + 1); /* render text */ - renderer->render_text(osd, x1, y1, text, OSD_TEXT2);</programlisting> + renderer->render_text(osd, x1, y1, text, OSD_TEXT2);</programlisting> </sect3> <sect3> <title>OSD text and palette FAQ</title> diff --git a/doc/hackersguide/output.sgml b/doc/hackersguide/output.sgml index 806e89d0a..57781c05e 100644 --- a/doc/hackersguide/output.sgml +++ b/doc/hackersguide/output.sgml @@ -267,7 +267,7 @@ a deep copy of the frame, because the decoder might still use the frame as a reference frame for future decoding. The usual procedure is: <programlisting> - modified_frame = port->original_port->get_frame(port->original_port, ...); + modified_frame = port->original_port->get_frame(port->original_port, …); _x_post_frame_copy_down(frame, modified_frame); copy_and_modify(frame, modified_frame); skip = modified_frame->draw(modified_frame, stream); diff --git a/doc/hackersguide/overview.sgml b/doc/hackersguide/overview.sgml index c8d15a4f9..eb62e5bd3 100644 --- a/doc/hackersguide/overview.sgml +++ b/doc/hackersguide/overview.sgml @@ -460,7 +460,7 @@ <para> Contains various video output driver plugins. Video output drivers are thin abstraction layers over various video output platforms - (e.g. X11, directfb, directX,...). Video output driver plugins + (e.g. X11, directfb, directX, …). Video output driver plugins provide functions like frame allocation and drawing and handle stuff like hardware acceleration, scaling and colorspace conversion if necessary. They do not handle a/v sync since this is done @@ -497,7 +497,7 @@ <term><filename>xine-engine</filename></term> <listitem> <para> - The heart of xine - it's engine. Contains code to + The heart of xine – its engine. Contains code to load and handle all the plugins, the configuration repository as well as the generic decoding loops and code for synchronized output. A lot of helper functions for plugins to use live here as well. @@ -573,7 +573,7 @@ <programlisting> static void push (my_stack_t *this_gen, int i) { intstack_t *this = (intstack_t *)this_gen; - this->values[MAX_STACK_SIZE - ++this->stack_size] = i; + this->values[MAX_STACK_SIZE - ++this->stack_size] = i; }</programlisting> </para> <para> @@ -613,15 +613,15 @@ this = malloc(sizeof(intstack_t)); /* fill in methods */ - this->push = push; - this->add = add; - this->pop = pop; + this->push = push; + this->add = add; + this->pop = pop; /* init data fields */ - this->stack_size = 0; + this->stack_size = 0; /* return public part */ - return &this->stack; + return &this->stack; }</programlisting> </para> <sect2> @@ -686,7 +686,7 @@ <listitem> <para> use something like - <programlisting> printf("module: ..."[,...]);</programlisting> + <programlisting> printf("module: ..."[,…]);</programlisting> for console output. All console output goes to stdout and must be prefixed by the module name which generates the output (see example above). @@ -714,7 +714,7 @@ <para> Output which is done thru this function will be displayed for the end user by the frontend. - If <varname>xine->verbosity</varname> is not 0 the messages will also + If <varname>xine->verbosity</varname> is not 0 the messages will also be displayed on the console. Ideally these strings are translated. This function is for information which the user should @@ -727,7 +727,7 @@ <sect2> <title>xprintf</title> <para> - This macro uses the <varname>xine->verbosity</varname> value to decide + This macro uses the <varname>xine->verbosity</varname> value to decide if the string should be printed to the console. Possible values are XINE_VERBOSITY_NONE, XINE_VERBOSITY_LOG or XINE_VERBOSITY_DEBUG. By default nothing is printed. @@ -821,7 +821,7 @@ committing it locally and using <command>hg export <parameter>.</parameter> ><filename>foo.patch</filename></command> to create the file to be attached is acceptable (but note that the first - line - up to the first line feed - of the commit message is regarded as + line – up to the first line feed – of the commit message is regarded as the patch summary; if you're not sure, check with <command>hg log -r<parameter>.</parameter></command>. Alternatively, use <token>From:</token> and <token>Subject:</token> lines diff --git a/doc/hackersguide/stream.sgml b/doc/hackersguide/stream.sgml index d05bbba65..d9a5471bd 100644 --- a/doc/hackersguide/stream.sgml +++ b/doc/hackersguide/stream.sgml @@ -392,9 +392,9 @@ <programlisting> buf_element_t *buf; - buf = stream->video_fifo->buffer_pool_alloc(stream->video_fifo); - buf->type = BUF_CONTROL_START; - stream->video_fifo->put(stream->video_fifo, buf);</programlisting> + buf = stream->video_fifo->buffer_pool_alloc(stream->video_fifo); + buf->type = BUF_CONTROL_START; + stream->video_fifo->put(stream->video_fifo, buf);</programlisting> <para> Buffers must have set the <varname>type</varname> field as shown. All buffer types are defined in <filename>xine-engine/buffer.h</filename>. @@ -410,7 +410,7 @@ To help finding out buffer types for known codecs, functions from <filename>buffer_types.c</filename> may be used to convert "FOURCC" codes or audio format tags (as used in AVI files) to the xine byffer type: - <programlisting> buf->type = fourcc_to_buf_video((void*)this->avi->bih.biCompression);</programlisting> + <programlisting> buf->type = fourcc_to_buf_video((void*)this->avi->bih.biCompression);</programlisting> </para> </sect2> </sect1> @@ -620,7 +620,7 @@ video, subtitles do not form a continuous stream. The decoder will therefore only be called once in a while. The metronom call for timestamping, which for audio and video is done by the engine, has to be done manually for SPU: - <programlisting> vpts = metronom->got_spu_packet(metronom, buf->pts);</programlisting> + <programlisting> vpts = metronom->got_spu_packet(metronom, buf->pts);</programlisting> </para> <para> Another difference is that while both audio and video decoders are automatically |