sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget>/translations/zh_CN/userspace-api/media/v4l/vidioc-encoder-cmdmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/zh_TW/userspace-api/media/v4l/vidioc-encoder-cmdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/it_IT/userspace-api/media/v4l/vidioc-encoder-cmdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/ja_JP/userspace-api/media/v4l/vidioc-encoder-cmdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/ko_KR/userspace-api/media/v4l/vidioc-encoder-cmdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget>/translations/sp_SP/userspace-api/media/v4l/vidioc-encoder-cmdmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhX/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/vidioc-encoder-cmd.rsthKubhtarget)}(h.. _VIDIOC_ENCODER_CMD:h]h}(h]h ]h"]h$]h&]refidvidioc-encoder-cmduh1hhKhhhhhhubhsection)}(hhh](htitle)}(h0ioctl VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMDh]h0ioctl VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMD}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hHVIDIOC_ENCODER_CMD - VIDIOC_TRY_ENCODER_CMD - Execute an encoder commandh]hHVIDIOC_ENCODER_CMD - VIDIOC_TRY_ENCODER_CMD - Execute an encoder command}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single V4L.VIDIOC_ENCODER_CMD (C macro)c.V4L.VIDIOC_ENCODER_CMDhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hVIDIOC_ENCODER_CMDh]hdesc_signature_line)}(hVIDIOC_ENCODER_CMDh]h desc_name)}(hVIDIOC_ENCODER_CMDh]h desc_sig_name)}(hj+h]hVIDIOC_ENCODER_CMD}(hj;hhhNhNubah}(h]h ]nah"]h$]h&]uh1j9hj5ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j3hj/hhhhhKubah}(h]h ]h"]h$]h&]hh add_permalinkuh1j-sphinx_line_type declaratorhj)hhhhhKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j'hhhKhj$hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jehj$hhhhhKubeh}(h]h ](cmacroeh"]h$]h&]domainjsobjtypejtdesctypejtnoindex noindexentrynocontentsentryuh1j"hhhjhNhNubh)}(hH``int ioctl(int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp)``h]hliteral)}(hjh]hDint ioctl(int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$V4L.VIDIOC_TRY_ENCODER_CMD (C macro)c.V4L.VIDIOC_TRY_ENCODER_CMDhNtauh1jhjhhhNhNubj#)}(hhh](j()}(hVIDIOC_TRY_ENCODER_CMDh]j.)}(hVIDIOC_TRY_ENCODER_CMDh]j4)}(hVIDIOC_TRY_ENCODER_CMDh]j:)}(hjh]hVIDIOC_TRY_ENCODER_CMD}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j9hjubah}(h]h ](jLjMeh"]h$]h&]hhuh1j3hjhhhhhKubah}(h]h ]h"]h$]h&]hhjWuh1j-jXjYhjhhhhhKubah}(h]jah ](j]j^eh"]h$]h&]jbjc)jdhuh1j'hhhKhjhhubjf)}(hhh]h}(h]h ]h"]h$]h&]uh1jehjhhhhhKubeh}(h]h ](jsmacroeh"]h$]h&]jxjsjyjjzjj{j|j}uh1j"hhhjhNhNubh)}(hL``int ioctl(int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp)``h]j)}(hjh]hHint ioctl(int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h5``fd`` File descriptor returned by :c:func:`open()`. h](hterm)}(h``fd``h]j)}(hj"h]hfd}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(h-File descriptor returned by :c:func:`open()`.h](hFile descriptor returned by }(hj<hhhNhNubh)}(h:c:func:`open()`h]j)}(hjFh]hopen()}(hjHhhhNhNubah}(h]h ](xrefjsc-funceh"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]refdoc*userspace-api/media/v4l/vidioc-encoder-cmd refdomainjsreftypefunc refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]je ASTIdentifier)} identifierV4LsbNasb reftargetopenuh1hhhhKhj<ubh.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj9ubah}(h]h ]h"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h7``argp`` Pointer to struct :c:type:`v4l2_encoder_cmd`. h](j)}(h``argp``h]j)}(hjh]hargp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK!hjubj8)}(hhh]h)}(h-Pointer to struct :c:type:`v4l2_encoder_cmd`.h](hPointer to struct }(hjhhhNhNubh)}(h:c:type:`v4l2_encoder_cmd`h]j)}(hjh]hv4l2_encoder_cmd}(hjhhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjsv4l2_encoder_cmduh1hhhhK!hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]uh1jhhhK!hjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK$ubh)}(hThese ioctls control an audio/video (usually MPEG-) encoder. ``VIDIOC_ENCODER_CMD`` sends a command to the encoder, ``VIDIOC_TRY_ENCODER_CMD`` can be used to try a command without actually executing it.h](h=These ioctls control an audio/video (usually MPEG-) encoder. }(hjhhhNhNubj)}(h``VIDIOC_ENCODER_CMD``h]hVIDIOC_ENCODER_CMD}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh! sends a command to the encoder, }(hjhhhNhNubj)}(h``VIDIOC_TRY_ENCODER_CMD``h]hVIDIOC_TRY_ENCODER_CMD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh< can be used to try a command without actually executing it.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK&hjhhubh)}(hTo send a command applications must initialize all fields of a struct :c:type:`v4l2_encoder_cmd` and call ``VIDIOC_ENCODER_CMD`` or ``VIDIOC_TRY_ENCODER_CMD`` with a pointer to this structure.h](hFTo send a command applications must initialize all fields of a struct }(hj7hhhNhNubh)}(h:c:type:`v4l2_encoder_cmd`h]j)}(hjAh]hv4l2_encoder_cmd}(hjChhhNhNubah}(h]h ](jRjsc-typeeh"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypetype refexplicitrefwarnjdjhjsv4l2_encoder_cmduh1hhhhK+hj7ubh and call }(hj7hhhNhNubj)}(h``VIDIOC_ENCODER_CMD``h]hVIDIOC_ENCODER_CMD}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh or }(hj7hhhNhNubj)}(h``VIDIOC_TRY_ENCODER_CMD``h]hVIDIOC_TRY_ENCODER_CMD}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh" with a pointer to this structure.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK+hjhhubh)}(hrThe ``cmd`` field must contain the command code. Some commands use the ``flags`` field for additional information.h](hThe }(hjhhhNhNubj)}(h``cmd``h]hcmd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh< field must contain the command code. Some commands use the }(hjhhhNhNubj)}(h ``flags``h]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh" field for additional information.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK0hjhhubh)}(hAfter a STOP command, :c:func:`read()` calls will read the remaining data buffered by the driver. When the buffer is empty, :c:func:`read()` will return zero and the next :c:func:`read()` call will restart the encoder.h](hAfter a STOP command, }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jRjsc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypefunc refexplicitrefwarnjdjhjsreaduh1hhhhK3hjubhV calls will read the remaining data buffered by the driver. When the buffer is empty, }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jRjsc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypefunc refexplicitrefwarnjdjhjsreaduh1hhhhK3hjubh will return zero and the next }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jRjsc-funceh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypefunc refexplicitrefwarnjdjhjsreaduh1hhhhK3hjubh call will restart the encoder.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK3hjhhubh)}(hA :c:func:`read()` or :ref:`VIDIOC_STREAMON ` call sends an implicit START command to the encoder if it has not been started yet. Applies to both queues of mem2mem encoders.h](hA }(hj5hhhNhNubh)}(h:c:func:`read()`h]j)}(hj?h]hread()}(hjAhhhNhNubah}(h]h ](jRjsc-funceh"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypefunc refexplicitrefwarnjdjhjsreaduh1hhhhK8hj5ubh or }(hj5hhhNhNubh)}(h(:ref:`VIDIOC_STREAMON `h]hinline)}(hjbh]hVIDIOC_STREAMON}(hjfhhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jdhj`ubah}(h]h ]h"]h$]h&]refdocj^ refdomainjpreftyperef refexplicitrefwarnjsvidioc_streamonuh1hhhhK8hj5ubh call sends an implicit START command to the encoder if it has not been started yet. Applies to both queues of mem2mem encoders.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK8hjhhubh)}(hA :c:func:`close()` or :ref:`VIDIOC_STREAMOFF ` call of a streaming file descriptor sends an implicit immediate STOP to the encoder, and all buffered data is discarded. Applies to both queues of mem2mem encoders.h](hA }(hjhhhNhNubh)}(h:c:func:`close()`h]j)}(hjh]hclose()}(hjhhhNhNubah}(h]h ](jRjsc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjsreftypefunc refexplicitrefwarnjdjhjscloseuh1hhhhK`h]je)}(hjh]hVIDIOC_STREAMOFF}(hjhhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]refdocj^ refdomainjreftyperef refexplicitrefwarnjsvidioc_streamonuh1hhhhK` chapter.h](h.On success 0 is returned, on error -1 and the }(hj5 hhhNhNubj)}(h ``errno``h]herrno}(hj= hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5 ubhM variable is set appropriately. The generic error codes are described at the }(hj5 hhhNhNubh)}(h':ref:`Generic Error Codes `h]je)}(hjQ h]hGeneric Error Codes}(hjS hhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jdhjO ubah}(h]h ]h"]h$]h&]refdocj^ refdomainj] reftyperef refexplicitrefwarnjs gen-errorsuh1hhhhKhj5 ubh chapter.}(hj5 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$ hhubj)}(hhh](j)}(hEBUSY A drain sequence of a device implementing the :ref:`encoder` is still in progress. It is not allowed to issue another encoder command until it completes. h](j)}(hEBUSYh]hEBUSY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj| ubj8)}(hhh]h)}(hA drain sequence of a device implementing the :ref:`encoder` is still in progress. It is not allowed to issue another encoder command until it completes.h](h.A drain sequence of a device implementing the }(hj hhhNhNubh)}(h:ref:`encoder`h]je)}(hj h]hencoder}(hj hhhNhNubah}(h]h ](jRstdstd-refeh"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]refdocj^ refdomainj reftyperef refexplicitrefwarnjsencoderuh1hhhhKhj ubh] is still in progress. It is not allowed to issue another encoder command until it completes.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j7hj| ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjy ubj)}(h%EINVAL The ``cmd`` field is invalid. h](j)}(hEINVALh]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj8)}(hhh]h)}(hThe ``cmd`` field is invalid.h](hThe }(hj hhhNhNubj)}(h``cmd``h]hcmd}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh field is invalid.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j7hj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjy hhubj)}(hVEPERM The application sent a PAUSE or RESUME command when the encoder was not running.h](j)}(hEPERMh]hEPERM}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj8)}(hhh]h)}(hPThe application sent a PAUSE or RESUME command when the encoder was not running.h]hPThe application sent a PAUSE or RESUME command when the encoder was not running.}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj" ubah}(h]h ]h"]h$]h&]uh1j7hj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjy hhubeh}(h]h ]h"]h$]h&]uh1jhj$ hhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKubeh}(h](/ioctl-vidioc-encoder-cmd-vidioc-try-encoder-cmdheh ]h"](0ioctl vidioc_encoder_cmd, vidioc_try_encoder_cmdvidioc_encoder_cmdeh$]h&]uh1hhhhhhhhKj }jS hsj }hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjz error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h]hajI]j?aj4 ]j* aunameids}(jS hjR jO hhjjjjj! j j jIj j4 jJ jG u nametypes}(jS jR hjjj! j j jJ uh}(hhjO hhhjjj j)jjjjj jj,j1jIjJj4 j5 jG j$ j0jj jJj j5 u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j KsRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h8Hyperlink target "vidioc-encoder-cmd" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j ubj )}(hhh]h)}(hhh]h2Hyperlink target "encoder-cmds" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypej sourcehlineK^uh1j ubj )}(hhh]h)}(hhh]h3Hyperlink target "encoder-flags" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypej sourcehlineKuh1j ube transformerN include_log] decorationNhhub.